text:
White Lines Appearing & Disappaaring All Over GUI (Buggy Element Highlighting?)

Issue Report Checklist

[X] Searched the issues page for similar reports
[X Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[X] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[X] Could not reproduce inside jupyter qtconsole (if console-related)
[X] Tried basic troubleshooting (if a bug/error)

[X] Restarted Spyder
[X] Reset preferences with spyder --reset
[X] Reinstalled the latest version of Anaconda
[X] Tried the other applicable steps from the Troubleshooting Guide

[X] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
There are lots of little white lines that appear & disappear between GUI elements, as I move my mouse over the screen. It looks like perhaps some part of the highlighting visual effect is buggy? I have attached a couple of screenshots, with the little white lines highlighted. They're not not super obvious in the screenshots, but they are very distracting as dozens of them they continually appear & disappear all over the window as I move my mouse around the GUI.
I am using Spyder 5.1.1 on Mac Catalina.
What steps reproduce the problem?

Move mouse over GUI elements

What is the expected output? What do you see instead?
I would expect no little white lines to appear over GUI elements. As mentioned it seems like something is going wrong about how GUI elements are highlighted
Versions

Spyder version: 5.1.1
Python version: 3.7.1 64-Bit
Qt version: 5.12.10
PyQt version: 5.12.3
Operating System name/version: MacOS Catalina 10.15.7

Dependencies

Mandatory:
applaunchservices >=0.1.7     :  0.2.1 (OK)
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  1.6.0 (OK)
cookiecutter >=1.6.0          :  1.7.2 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  7.24.1 (OK)
jedi >=0.17.2;<0.19.0         :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.0.1 (OK)
nbconvert >=4.0               :  6.0.7 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
parso >=0.7.0;<0.9.0          :  0.7.0 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.9.0 (OK)
pylint >=2.5.0                :  2.8.3 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.2.1;<1.3.0          :  1.2.1 (OK)
pylsp_black >=1.0.0           :  None (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=1.0.2             :  1.0.2 (OK)
qtconsole >=5.1.0             :  5.1.0 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  57.0.0 (OK)
sphinx >=0.6.6                :  4.0.2 (OK)
spyder_kernels >=2.1.0;<2.2.0 :  2.1.0 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  1.0.2 (OK)
zmq >=17                      :  22.1.0 (OK)
Optional:
cython >=0.21                 :  0.29.15 (OK)
matplotlib >=2.0.0            :  3.3.4 (OK)
numpy >=1.7                   :  1.17.3 (OK)
pandas >=1.1.1                :  0.25.3 (NOK)
scipy >=0.17.0                :  1.6.0 (OK)
sympy >=0.7.3                 :  None (OK)

Hey @Stargrazer82301, thanks for reporting. This could be caused because you're using a very high screen resolution.
Could you let us know what's your current screen resolution to check that?

Hi; it is indeed a high-resolution screen, 5120x2880. Is there a Spyder setting I can change to remedy it?

PS: Just checked, and I am also experiencing it on a 2560x1600 screen.

Is there a Spyder setting I can change to remedy it?

No, there isn't, sorry. Also, I don't know how to fix this problem.

I made a similar observation, except I've a 1080p screen & resolution set.
When I use auto-dpi scaling, everything is fine, but the UI is to small for my old eyes and my big mouse.
So, scaling spyder's UI to a ration of 1.12 makes working comfortable possible. But, I see, too, lines between Buttons (sometimes blinking irregularly), On texts, it looks like font-hinting isn't working properly (the part with window's ClearType also shows the same effect on ordinary windows software/texts/etc.. )
so I think it's the (auto) high-dpi scaling of Spyder leading to this. May be the scaling ratio is miscalculated somehow?
In my case setting the dpi-scaling to 1.125 (instead of 1.12) makes that effect go away.
May be its good work around to try different scalings like 1.05 or 99.995???
But, yes.. its a kind of a bug with the rendering system.
Hope that helps a little bit, my friends.
Thank you for investing you time & knowledge!

Interesting. To test, I just tried setting my DPI scaling to 1.125, but I'm still seeing the lines. Odd that it should vary between systems like this.


text:
Provide templates

From mproel...@googlemail.com on 2010-06-17T02:02:01Z
It would be really helpful to provide a mechanism for entering code templates. I will explain what I mean:
For instance if you have a certain part of code you often use, like establising a connection to a camera:
import camera
camera.ipAddress = ""
retval = camera.connect()
if retval == camera.NO_ERROR:
# here starts the code
One of my favorite features is to have a "template manager", where you can add a template like the one above and give that template a name ('connect camera'). Than when being in the editor, you hit a "template manager short-cut" and get a pop-up menu with all defined tamplates (their names, additionally a short description).
This is also helpful for inserting a custom file header (according to one's software guide lines) and function comments.
And the best feature within this feature is having a special character to set the cursor position within this template, for instance considering a function comment template of the following form:
"""
Description
-----------
|
Parameters
-----------
Examples
-----------
"""
Than you write your function
def test():
<Here you hit your template short cut, get your pop-up menu, choose the function-comment entry and get the obove code inserted. The cursor position is at the '|' character, so you can start writing right now.>
Hope you got the idea,
Markus
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=235

From pierre.raybaut on 2010-06-19T05:44:54Z
Status: Accepted
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low Milestone-Release2.0

From pierre.raybaut on 2010-10-17T12:59:59Z
Labels: -Milestone-Release2.0 Milestone-Release2.1

From tim.mich...@gmail.com on 2010-08-11T05:32:37Z
It would be nice if these templates could be imported from Pydev.
The Geany IDE has a simple template mechnism.

From pierre.raybaut on 2011-03-18T02:08:35Z
Status: Duplicate
Mergedinto: 588

source: gharchive/issue

repo: spyder-ide/spyder

license: MIT

license_type: permissive

license_source: github-api


text:
No Notification of Running Instance

If spyder is already running in single instance mode, attempting to run "spyder" again just terminates the new process without notification. A simple notification, "Spyder is already running," would be helpful for troubleshooting (consider running spyder locally, then trying to open it in VNC, and not being able to understand why the process is terminating).

My apologies if I haven't submitted this request in the proper venue; I'm not a frequent contributor to Spyder or open-source projects in general. Let me know if there's a better way.

You're right, and I've thinking to add a warning for a long time :-)
I'll try to address it for 2.3.5.


text:
Console not starting

Description
What steps will reproduce the problem?

How to solve this problem so that I can work on the python
Traceback
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 744, in <lambda>
    lambda c=client: self.process_started(c))
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1380, in process_started
    self.main.variableexplorer.add_shellwidget(client.shellwidget)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\variableexplorer\plugin.py", line 137, in add_shellwidget
    nsb.setup(**self.get_settings())
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\variableexplorer\plugin.py", line 71, in get_settings
    settings[name] = self.get_option(name)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\api\plugins.py", line 172, in get_option
    return CONF.get(self.CONF_SECTION, option, default)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\config\user.py", line 382, in get
    raise cp.NoOptionError(option, section)
configparser.NoOptionError: No option 'show_callable_attributes' in section: 'variable_explorer'
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\qtconsole\base_frontend_mixin.py", line 138, in _dispatch
    handler(msg)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\widgets\namespacebrowser.py", line 224, in _handle_execute_reply
    self.set_namespace_view_settings()
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\widgets\namespacebrowser.py", line 77, in set_namespace_view_settings
    self.namespacebrowser.get_view_settings())
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\variableexplorer\widgets\namespacebrowser.py", line 244, in get_view_settings
    settings[name] = getattr(self, name)
AttributeError: 'NamespaceBrowser' object has no attribute 'show_callable_attributes'

Versions

Spyder version: 4.0.0b2
Python version: 3.7.1
Qt version: 5.9.6
PyQt5 version: 5.9.2
Operating System: Windows 10

Dependencies
pygments >=2.0     :  2.3.1 (OK)
qdarkstyle >=2.6.4 :  2.7 (OK)
sphinx >=0.6.6     :  1.8.2 (OK)
pyls >=0.19.0;<0.25:  0.24.0 (OK)
nbconvert >=4.0    :  5.4.0 (OK)
pandas >=0.13.1    :  0.23.4 (OK)
numpy >=1.7        :  1.16.4 (OK)
sympy >=0.7.3      :  1.3 (OK)
cython >=0.21      :  0.29.2 (OK)
qtconsole >=4.2.0  :  4.4.3 (OK)
IPython >=4.0      :  7.2.0 (OK)
matplotlib >=2.0.0 :  3.0.2 (OK)
pylint >=0.25      :  2.2.2 (OK)

Please downgrade spyder-kernels with the following command
conda install spyder-kernels=1.3

Brother, Thank you very much!
On Wed, Jun 26, 2019 at 3:44 PM Carlos Cordoba notifications@github.com
wrote:

Closed #9683 https://github.com/spyder-ide/spyder/issues/9683.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/9683?email_source=notifications&email_token=AGD5I55XZ6LGAB7SDGZS42TP4M6RPA5CNFSM4H3PBUU2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSF2PFJA#event-2440360612,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGD5I57LWFVSUCUVGDJVQATP4M6RPANCNFSM4H3PBUUQ
.

Thank you vry much, now it's working.....


text:
Set-SqlTempDbConfiguration errors when more than 1 data file already exists

user reported:
If you have 2 data files and 1 log file for your TempDB and try to add 2 more data files then instead of making the next logical file name be tempdev3 it will be tempdev2 just like you already have so it fails. You can see the error when you use the -Script parameter

Fixed and merged in #232.

authors: ConstantineK ctrlbold

repo: sqlcollaborative/dbatools


text:
Found a math error Test-DbaIdentityUsage with negative bigints

Bug Report
I was running this against a table that had been seeded as the max bigint negative value.  The current math tries to subtract negative which ends up adding the max bigint value to itself and cannot fit in bigint.
General Troubleshooting steps

[X ] Verified running latest release of dbatools?
[X ] Verified errors are not related to permissions?
[X ] Can duplicate in new/fresh PowerShell.exe session?

Version Information

Operating System (Name|Version): Win10
PowerShell Version: 5.1
SQL Server (Edition|Version): 2012 Ent

Steps to Reproduce
Run against a table that has bigint and seed value is max - value and then add 2 tables

[ ] Attach any screenshots (if possible/allowed)
[ ] Attach logs generated by dbatools (Get-DbatoolsLog)
[ ] Attach output from PowerShell console (if possible/allowed)

I don't believe this is an issue anymore. If it is, please feel free to reopen.

authors: gbargsley potatoqualitee


text:
Issue with Connect-DbaInstance

Verified issue does not already exist?
Yes
What error did you receive?
Hi Dbatools,
We are facing recently a weird issue ( since the V1.1.0 release). Actually, the "Connect-DbaInstance" command is not working anymore unless we explicitly specify the FQDN of the servers.
PS C:> Connect-DbaInstance -SqlInstance server.domain.org
ComputerName Name                      Product              Version   HostPlatform IsAzure IsClustered ConnectedAs

server  server.domain.org Microsoft SQL Server 15.0.4138 Windows      False   False       DOMAIN\Account
PS C:> Connect-DbaInstance -SqlInstance server
The target principal name is incorrect
At C:\Program Files\WindowsPowerShell\Modules\dbatools\1.1.0\allcommands.ps1:90200 char:9

    throw $records[0]

    ~~~~~~~~~~~~~~~~~

CategoryInfo          : ConnectionError: (server:String) [], Exception
FullyQualifiedErrorId : dbatools_Connect-DbaInstance

Steps to Reproduce
PS C:\> Connect-DbaInstance -SqlInstance server.domain.org

ComputerName Name                      Product              Version   HostPlatform IsAzure IsClustered ConnectedAs
------------ ----                      -------              -------   ------------ ------- ----------- -----------
server  server.domain.org Microsoft SQL Server 15.0.4138 Windows      False   False       DOMAIN\Account

PS C:\> Connect-DbaInstance -SqlInstance server
The target principal name is incorrect
At C:\Program Files\WindowsPowerShell\Modules\dbatools\1.1.0\allcommands.ps1:90200 char:9
+         throw $records[0]
+         ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ConnectionError: (server:String) [], Exception
    + FullyQualifiedErrorId : dbatools_Connect-DbaInstance

Are you running the latest release?
Yes
Other details or mentions
No response
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe), Windows PowerShell ISE (powershell_ise.exe)
PowerShell Host Version
Name                           Value

PSVersion                      5.1.17763.1971
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.1971
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
SQL Server Edition and Build number
All versions from SQL 2000 to SQL 2019.

Hey @habibhammy - thanks for the report. This is expected behavior as Microsoft has made a change with default certificates. Please check out https://github.com/sqlcollaborative/dbatools/discussions/7680 for more information.

Hi @potatoqualitee ,
Thanks a lot for your answer.
However, How can this also be the case for the servers were the SSL is not enabled and where no certificate was issued?
Many Thanks.

If it doesn't have a certificate, that's something that we'll have to explore. They may have made more strict changes to Kerberos as well. Can you let me know if Test-DbaSpn shows that Kerberos is setup properly? Can you also test with Set-DbatoolsConfigValue -FullName 'sql.connection.trustcert' -Value $true and let us know what happens when you change that value?
@andreasjordan can you think of anything that would cause this to happen?

Hi @potatoqualitee,
The Test-DbaSPN command on the server shows :
  PS C:\> Test-DbaSpn
  cmdlet Test-DbaSpn at command pipeline position 1
  Supply values for the following parameters:
  ComputerName[0]: Server
  ComputerName[1]:

  Cluster                : False
  ComputerName           : Server.Domain.org
  DynamicPort            : False
  Error                  : SPN missing
  InstanceName           : MSSQLSERVER
  InstanceServiceAccount : DOMAIN\Service_Account
  IsSet                  : False
  Port                   :
  RequiredSPN            : MSSQLSvc/Server.Domain.org
  SqlProduct             : SQL Server 2014 Enterprise Edition (64-bit)
  TcpEnabled             : True
  Warning                : None

  Cluster                : False
  ComputerName           : Server.Domain.org
  DynamicPort            : False
  Error                  : None
  InstanceName           : MSSQLSERVER
  InstanceServiceAccount :  DOMAIN\Service_Account
  IsSet                  : True
  Port                   : 1433
  RequiredSPN            : MSSQLSvc/Server.Domain.org:1433
  SqlProduct             : SQL Server 2014 Enterprise Edition (64-bit)
  TcpEnabled             : True
  Warning                : None

For the second command I'm getting an error :
PS C:\> Set-DbatoolsConfigValue -FullName 'sql.connection.trustcert' -Value $true
Set-DbatoolsConfigValue : The term 'Set-DbatoolsConfigValue' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Set-DbatoolsConfigValue -FullName 'sql.connection.trustcert' -Value $ ...
    + CategoryInfo          : ObjectNotFound: (Set-DbatoolsConfigValue:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Just for reference  I tried this with version V1.1.8
PS C:\> Get-InstalledModule

Version    Name                                Repository           Description
-------    ----                                ----------           -----------
1.1.8      dbatools                            https://www.power... The community module that enables SQL Server Pros to automate database development and server administration
21.1.18256 SqlServer                           https://www.power... This module allows SQL Server developers, administrators and business intelligence professionals to automat...

It's just Set-DbatoolsConfig.

Hi @andreasjordan , @potatoqualitee ,
Indeed after running the command to disable the trust certificate, the connect command restart working.
PS C:\> Set-DbatoolsConfig -FullName 'sql.connection.trustcert' -Value $true

PS C:\> Connect-DbaInstance -SqlInstance 'Server'

ComputerName   Name           Product              Version   HostPlatform IsAzure IsClustered ConnectedAs
------------   ----           -------              -------   ------------ ------- ----------- -----------
Server Server Microsoft SQL Server 14.0.3401 Windows      False   False       DOMAIN\account

authors: andreasjordan habibhammy potatoqualitee


text:
Some improvements

Change from object to PSCredential
Added $Silent parameter and changed all Write-Warning | Write-Verbose to Write-Message using new messaging system (Write-Message)
Added support for mutiple instance.
Added PSCustomObject as output

New output:

fantasitc!

source: gharchive/pull-request

authors: ClaudioESSilva potatoqualitee


text:
Set-DbaStartParameter now works with offline instances

Type of Change

[x] Bug fix (non-breaking change, fixes #2822)
[x] New feature (non-breaking change, adds functionality)
[ ] Breaking change (effects multiple commands or functionality)
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose
Fixes #2822
@sqllensman can you give this a spin just so we've an independent test. Thanks
Approach
If it can't connect to the specified instance will the proceed using just WMI.  By default it won't apply path changes as they can't be tested.
if TrustPath set, we'll trust the paths and push them in.
using the Offline switch shortcuts the connection test, so you can have 30s of your life for other uses! Needs TrustPath for path changes as well.
Commands to test
Set-DbaStartupParameter -SqlInstance localhost\sqlexpress2016 -Verbose -MinimalStart -Offline

thanks to you both!

authors: Stuart-Moore potatoqualitee


text:
Set-DBAAgentOperator Failsafe Operator Handling Correction

Modified to set the failsafe notification method on the AlertSystem
object rather than the FailSafeOperator object
Modified the list of possible input values for the
$FailSafeNotificationMethod input parameter to include 'NotifyAll'
Comment and variable spelling corrections

Type of Change

[x] Bug fix (non-breaking change, fixes # )
[ ] New feature (non-breaking change, adds functionality, fixes # )
[ ] Breaking change (effects multiple commands or functionality, fixes # )
[ ] Ran manual Pester test and has passed (.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
[ ] Unit test is included
[ ] Documentation
[ ] Build system

Purpose

Correction to the function to allow the FailSafeOperator to be set without error.
Approach

By setting the NotificationMethod property of the correct SMO object.
Commands to test

Set-DbaAgentOperator -SqlInstance localhost -Operator DBA -EmailAddress test@mydomain.com -IsFailsafeOperator NotifyAll

Thanks for that fix.
Just for reference: https://docs.microsoft.com/de-de/dotnet/api/microsoft.sqlserver.management.smo.agent.notifymethods

Can we add a validate set for $FailsafeNotificationMethod? And that should include also "NetSend" and "None" as they are valid as well.

Wow! I had a whole lot of typos, thanks so much for this 🙇🏼  @andreasjordan - I'll merge then submit a PR for the fix 💯

Thanks for the feedback @andreasjordan and @potatoqualitee for the merge.
I've got another change to the same function that I will shortly submit via PR - this change will include the suggested validate set for the $FailsafeNotificationMethod input values. The change will also allow multiple values of $FailsafeNotificationMethod to be specified where appropriate.

Oh, cool. I'll wait for your PR then, @howarthcd 🥳

Oh, cool. I'll wait for your PR then, @howarthcd 🥳

I'm still finding my feet with git @potatoqualitee so please bear with me. 😄

I get that! congrats on your first pull request with us -- thank you for the time and work you put into it 😊

authors: andreasjordan howarthcd potatoqualitee


text:
Show-SqlWhoIsActive updates and refactor

Fixes #871
tested on Posh 5.0, windows 10, SQL 2012/14/16
Changes proposed in this pull request:

Pulled out default gridview so it can be piped into a function instead.
Changed Name to Get-DbaWhoIsActive
It will now prompt to install when called from and exit the function if user declines install.

How to test this code:

[ ] run get-dbawhoisactive against a server without sp_whoisactive, see prompt.

Has been tested on minimum requirements:

[ ]  Powershell 3
[ ]  Windows 7
[ ]  SQL Server 2000

Has been tested on maximum requirements:

[ ]  SQL Server vNext
[ ]  Windows 10
[ ]  Azure Database

Tests for tester:

[ ] Working/useful help content, including link to command on dbatools web site
[ ] All examples work as advertised
[ ] Does not contain template content
[ ] Does not contain excessive/unnecessary amounts of comments
[ ] Works remotely
[ ] Works locally
[ ] Works on lower versions or throws error specifying version not supported
[ ] Works with named instances
[ ] Works with clustered instances
[ ] Handles offline/read only databases
[ ] Supports multiple servers (at the command line or piped from Get-SqlRegisteredServerName)
[ ] No un-handled errors which stop the command working with multiple servers

Thanks, bud!

authors: SirCaptainMitch potatoqualitee


text:
feat: Add support for T-SQL table options

Currently table options only supports key value-pairs where the key is an Ident and the value is an Expr. In MSSQL the WITH options can be more complex than that, configuring storage, partitioning and more.
This implements the SQL Server CREATE TABLE syntax extending SqlOptions to be an enum with more complex values.

Pull Request Test Coverage Report for Build 10740156506
Details

226 of 247 (91.5%)  changed or added relevant lines in 6 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.01%) to 89.258%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

tests/sqlparser_common.rs
9
10
90.0%

src/parser/mod.rs
66
71
92.96%

tests/sqlparser_mssql.rs
112
118
94.92%

src/ast/mod.rs
27
36
75.0%

Files with Coverage Reduction
New Missed Lines
%

src/parser/mod.rs
1
93.28%

Totals

Change from base Build 10739992817:
0.01%

Covered Lines:
29125

Relevant Lines:
32630

💛  - Coveralls

authors: bombsimon coveralls

repo: sqlparser-rs/sqlparser-rs


text:
SSL request on Databricks fails with handshake_failure

Problem Description
I'm sending metrics from a Spark job on Azure Databricks to Datadog. The library I'm using (kamon-datadog @ https://github.com/kamon-io/Kamon/tree/v2.1.1) uses OkHttp3 (version 3.14.7, but problem also occurs on 4.7.2) for communication with the Datadog API at https://api.datadoghq.com/
Running the Spark job locally works without any problems. Running it on Databricks fails with a handshake_failure error. After quite extensive debugging I was able to pinpoint the problem to the combination of OkHttp3 and Databricks.
How to reproduce
I can reliably reproduce the issue by starting a new notebook in Azure Databricks on a cluster (I tested Databricks 6.5 (Spark 2.4.5 / Scala 2.11 / Java 1.8.0_242) and 7.0 (Spark 3.0 / Scala 2.12 / Java 1.11.655)) with the OkHttp3 4.7.2 library installed (or any older version I tried), and running the following code:
import okhttp3.{OkHttpClient, Request}

val cl: OkHttpClient = new OkHttpClient()
val req = new Request.Builder()
  .url("https://api.datadoghq.com/account/login?next=%2F")
  .method("GET", null)
  .build()
cl.newCall(req).execute().toString

Stacktrace
This is the full stacktrace I receive (on Java 8):
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
	at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2020)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1127)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:367)
	at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:325)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:197)
	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:249)
	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:108)
	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:76)
	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:245)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:96)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read$$iw$$iw$$iw$$iw$$iw$$iw.<init>(command-2919730791141205:21)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read$$iw$$iw$$iw$$iw$$iw.<init>(command-2919730791141205:71)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read$$iw$$iw$$iw$$iw.<init>(command-2919730791141205:73)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read$$iw$$iw$$iw.<init>(command-2919730791141205:75)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read$$iw$$iw.<init>(command-2919730791141205:77)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read$$iw.<init>(command-2919730791141205:79)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read.<init>(command-2919730791141205:81)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read$.<init>(command-2919730791141205:85)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$read$.<clinit>(command-2919730791141205)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$eval$.$print$lzycompute(<notebook>:7)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$eval$.$print(<notebook>:6)
	at line4f279a02c14c4d08aec3bb073b25d6e927.$eval.$print(<notebook>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:793)
	at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:1054)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest$$anonfun$loadAndRunReq$1.apply(IMain.scala:645)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest$$anonfun$loadAndRunReq$1.apply(IMain.scala:644)
	at scala.reflect.internal.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31)
	at scala.reflect.internal.util.AbstractFileClassLoader.asContext(AbstractFileClassLoader.scala:19)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest.loadAndRunReq(IMain.scala:644)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:576)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:572)
	at com.databricks.backend.daemon.driver.DriverILoop.execute(DriverILoop.scala:215)
	at com.databricks.backend.daemon.driver.ScalaDriverLocal$$anonfun$repl$1.apply$mcV$sp(ScalaDriverLocal.scala:202)
	at com.databricks.backend.daemon.driver.ScalaDriverLocal$$anonfun$repl$1.apply(ScalaDriverLocal.scala:202)
	at com.databricks.backend.daemon.driver.ScalaDriverLocal$$anonfun$repl$1.apply(ScalaDriverLocal.scala:202)
	at com.databricks.backend.daemon.driver.DriverLocal$TrapExitInternal$.trapExit(DriverLocal.scala:714)
	at com.databricks.backend.daemon.driver.DriverLocal$TrapExit$.apply(DriverLocal.scala:667)
	at com.databricks.backend.daemon.driver.ScalaDriverLocal.repl(ScalaDriverLocal.scala:202)
	at com.databricks.backend.daemon.driver.DriverLocal$$anonfun$execute$9.apply(DriverLocal.scala:396)
	at com.databricks.backend.daemon.driver.DriverLocal$$anonfun$execute$9.apply(DriverLocal.scala:373)
	at com.databricks.logging.UsageLogging$$anonfun$withAttributionContext$1.apply(UsageLogging.scala:238)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
	at com.databricks.logging.UsageLogging$class.withAttributionContext(UsageLogging.scala:233)
	at com.databricks.backend.daemon.driver.DriverLocal.withAttributionContext(DriverLocal.scala:49)
	at com.databricks.logging.UsageLogging$class.withAttributionTags(UsageLogging.scala:275)
	at com.databricks.backend.daemon.driver.DriverLocal.withAttributionTags(DriverLocal.scala:49)
	at com.databricks.backend.daemon.driver.DriverLocal.execute(DriverLocal.scala:373)
	at com.databricks.backend.daemon.driver.DriverWrapper$$anonfun$tryExecutingCommand$2.apply(DriverWrapper.scala:644)
	at com.databricks.backend.daemon.driver.DriverWrapper$$anonfun$tryExecutingCommand$2.apply(DriverWrapper.scala:644)
	at scala.util.Try$.apply(Try.scala:192)
	at com.databricks.backend.daemon.driver.DriverWrapper.tryExecutingCommand(DriverWrapper.scala:639)
	at com.databricks.backend.daemon.driver.DriverWrapper.getCommandOutputAndError(DriverWrapper.scala:485)
	at com.databricks.backend.daemon.driver.DriverWrapper.executeCommand(DriverWrapper.scala:597)
	at com.databricks.backend.daemon.driver.DriverWrapper.runInnerLoop(DriverWrapper.scala:390)
	at com.databricks.backend.daemon.driver.DriverWrapper.runInner(DriverWrapper.scala:337)
	at com.databricks.backend.daemon.driver.DriverWrapper.run(DriverWrapper.scala:219)
	at java.lang.Thread.run(Thread.java:748)

Workaround
I found a similar issue on Stackoverflow: https://stackoverflow.com/questions/57297159/databricks-job-getting-javax-net-ssl-sslhandshakeexception-received-fatal-alert
Based on the "solution" I tried swapping out the request to Unirest which works without any issues, both locally as on Databricks.
In conclusion
It seems that something in the combination of Databricks and OkHttp3 is making specific SSL connections fail. Datadog happens to fail, but several other sites I tried work just fine using OkHttp on Databricks.
If there's any other info I can provide, let me know.

Can you capture handshake information from the Unirest call? The TLS version and cipher suite are likely to tell us whats going on. My suspicion is that it's handshaking on a cipher suite or TLS version that OkHttp excludes due to weak security.

+1 to Jesse's suggestion.
Other things to try but less likely
It looks like that library is disabling retries on connection failures.  Nothing below explains why the other stackoverflow post is seeing the same thing.
https://github.com/kamon-io/Kamon/search?q=retryOnConnectionFailure&unscoped_q=retryOnConnectionFailure
It is possible you are hitting bad hosts, or IPv6 hosts are configured differently?  And disabling retries is surfacing these errors, but this would be occasional.
From a test client I can see the following DNS results for me
api.datadoghq.com/52.54.172.43, api.datadoghq.com/34.198.29.173, api.datadoghq.com/34.197.8.168, api.datadoghq.com/34.237.116.15, api.datadoghq.com/34.199.65.146, api.datadoghq.com/34.193.188.163, api.datadoghq.com/54.85.85.174, api.datadoghq.com/107.23.26.180, api.datadoghq.com/2600:1f18:63f7:b900:cb74:3a43:7729:ee0, api.datadoghq.com/2600:1f18:63f7:b902:5e73:979f:a696:8c3e, api.datadoghq.com/2600:1f18:63f7:b900:9568:6f52:31d6:103a, api.datadoghq.com/2600:1f18:63f7:b901:d0ed:c769:7f20:cffd, api.datadoghq.com/2600:1f18:63f7:b902:f2f8:21b7:64fc:a5e6, api.datadoghq.com/2600:1f18:63f7:b902:317:14d6:da3f:8493, api.datadoghq.com/2600:1f18:63f7:b901:9627:c61e:e830:f72c, api.datadoghq.com/2600:1f18:63f7:b901:1f41:3d89:64cf:eb91

@swankjesse Is this the information you're looking for?
20/06/22 07:26:44 DEBUG SSLConnectionSocketFactory: Secure session established
20/06/22 07:26:44 DEBUG SSLConnectionSocketFactory:  negotiated protocol: TLSv1.2
20/06/22 07:26:44 DEBUG SSLConnectionSocketFactory:  negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
20/06/22 07:26:44 DEBUG SSLConnectionSocketFactory:  peer principal: CN=*.api.datadoghq.com
20/06/22 07:26:44 DEBUG SSLConnectionSocketFactory:  peer alternative names: [*.api.datadoghq.com, api.datadoghq.com]
20/06/22 07:26:44 DEBUG SSLConnectionSocketFactory:  issuer principal: CN=Sectigo RSA Domain Validation Secure Server CA, O=Sectigo Limited, L=Salford, ST=Greater Manchester, C=GB

@yschimke unrelated but Databricks does seem to have IPv6 connection issues occasionally as well, but this results in a network error rather than a handshake failure. According to the test at https://www.ssllabs.com/ssltest/analyze.html?d=api.datadoghq.com&latest it seems that all hosts are configured correctly and equally. I did try providing a Dns resolver to OkHttp that always returns the same IPv4 address, but the handshake_failure problem persists.

Yep.  We don't actually use that Cipher in any of the default supported ConnectionSpecs.  So it's very likely that you can work around this with a custom ConnectionSpec that registers that cipher as well as others.
$ okurl --cipherSuite=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 https://api.datadoghq.com/robots.txt
User-agent: *
Allow: /sb/
Disallow: /

If you can also get the exact JVM vendor (dump system properties etc), it would probably help also.  So we know why it's choosing that one.
It's categorised as Weak https://www.ssllabs.com/ssltest/analyze.html?d=api.datadoghq.com&s=34.193.188.163

Ok, that seems to be the cause. When using Unirest locally, it will use TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 while on Databricks it resorts to TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. The supported cipher list on Databricks doesn't list the GCM_SHA256 cipher so that should be the cause.
About the JVM vendor: for Databricks 7.0 release the JVM is specifically listed as aws-java-sdk  1.11.655. For Databricks 6.5 the vendor isn't mentioned. As they share the same problem, I'd think they both use aws-java-sdk.

So it looks like the next steps are:

Enable the CBC cipher suite to unblock you
Ask Databricks to enable more strong cipher suites in the default VM configuration.

If you end up filing a public bug report, please link it here so other developers with this problem can drop the CBC cipher suite when Databricks' bug is fixed.

I still wonder why then a site such as google.com works fine on that same Databricks / OkHttp3 combination. Google.com supports alternative weaker ciphers that are used there instead. Isn't this a being a bit too strict, like throwing out the baby with the bathwater-situation?
Anyway - to go with your first suggestion: I can see how I could enable CBC if I would be using OkHttp directly. However, since I'm using it through a library that I have no control over: is there any way I can set the acceptable cipher suites JVM-wide without being able to touch the actual OkHttpClient instance being used by the kamon-datadog library? Or would I need to file a feature request in that project to make this change?
I'll definitely make the request at Databricks but I'm afraid that may take quite a while, if ever, to be picked up.

Isn't this a being a bit too strict, like throwing out the baby with the bathwater-situation?

HTTPS clients and servers each offer a set of enabled of TLS versions and cipher suites. If there’s no intersection, you’ll get a handshake failure. OkHttp deliberately turns off weak ciphers by default, and assumes you’ll be able to turn them back on if you need ’em.
Since that doesn’t appear to be an option with this library, I recommend working with the library author to permit configuration of the OkHttp instance.

This pain you feel is the way the security industry moves things forward. Without this friction noone upgrades. We generally follow the browsers which is a safe space to be for desktops and mobiles. But it's obviously different with cloud deployments.

Since I found this issue via Google when working on a similar problem with Databricks, I figured I’d share some explanation for those in this thread.
Databricks setsjava.security.properties=/databricks/spark/dbconf/java/extra.security. The file contains a single line:
jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, GCM

The default values for jdk.tls.disabledAlgorithms in Java 8 (according to https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html) is:
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, EC keySize < 224

For OkHttp users on databricks with ssl handshake issues potentially related to cipher support, you may need to change that file. (In my case, disallowing GCM was the issue...and it seems they may have done that due to performance issues with GCM in Java 8 at the time.) See my solution for using an init script for the Databricks cluster: https://github.com/neo4j-contrib/neo4j-spark-connector/issues/300#issuecomment-788300727

Thanks for the update and explanation.
Reading that last post it seems that two opinionated frameworks are incompatible by default

DataBricks - choosing only efficient cipher suites
OkHttp - defaulting to only modern secure cipher suites

This isn't really a bug because you can always opt OkHttp back into some accepted ciphers, but it explains why by default OkHttp fails but Unirest works. And glad the performance issue with GCM seems fixed in 8+ now
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8177784
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8201633

authors: EgbertW swankjesse voutilad yschimke

repo: square/okhttp


text:
Do IPv6 parsing natively.

Avoid any risk of doing DNS during HTTP URL parsing.

https://github.com/square/okhttp/issues/1486


text:
Make OkHttp OSGi ready

This PR adds basic support for OSGi to okhttp jars by adding the proper meta-data to jar's MANIFEST.
Notes:

okhttp-urlconnection is not well supported as this artifact has the same packages as main okhttp one but as far as I understand OkHttp as now a better replacement
it would have be better if okhttp-ws had okhttp3.ws.internal instead of okhttp3.internal.ws so that there is a clear distinction between okhttp-ws internal and okhttp ones

Mind squashing into a single commit? http://rebaseandsqua.sh

Done

authors: lburgazzoli swankjesse


text:
Generate default values in Kotlin

Currently, when you specify a default value for a column, it does not show up in the generated Kotlin code, e.g.:
CREATE TABLE entity (
    foo TEXT DEFAULT "bar"
);

produces this class:
interface Entity {
    val foo: String?

    data class Impl(override val foo: String?) : Entity
}

It would be cool if default values would be reflected in Kotlin as well, like so:
data class Impl(override val foo: String? = "bar")

If you want to take full advantage of default parameters, then ordering would also matter. I'm not sure if reordering the parameters so that the ones with default values are at the bottom is desired, but even if we don't order them I think it adds value to represent default values in Kotlin as well.

This isn't possible. The generated type and default value will not always match.
How does
date INTEGER AS java.time.Instant DEFAULT 0

work?

Good point, didn't think about that case. However what do you think about adding it in cases where it does work, don't you think it would provide some value there?
In the case where you are using a custom type, I guess you could convert the SQL default value with the ColumnAdapter, but then you would have to expose them somewhere so I don't like that solution either.

I don't really like the asymmetry of it. I think I'd prefer not having the feature than having it with a bunch of limitations.
Beyond that, I don't think it's generally useful. The only place you should be manually creating instances is for tests. The DB should be the canonical source of instances in production.

I guess you're right, I was thinking this was a simple QoL improvement, but I did not think about it's limitations.

authors: JakeWharton simonschiller

repo: square/sqldelight

license_source: bigquery


text:
Not compatible with Gradle 5.1.1

Cannot access class 'com.squareup.tape2.ObjectQueue.Converter'. Check your module classpath for missing or conflicting dependencies

Actually, it's more of an issue with gradle-5.1.1-all which in turn is required with the new R8-by-default Android plugin (3.4.0).

We ship that class. What makes you think that Tape is the problem? Can you reproduce in a sample?

Are you using tape as a transitive dependency of some other library? If so, add it as an explicit dependency

I added the stacktrace to this report: https://issuetracker.google.com/issues/130746805
We use tape in an inhouse library which we include with "implementation" in gradle, and the lib itself is using "implementation" to include "2.0.0-beta1" of tape.

So I think @string-areeb 's solution works. Thanks!

This doesn't appear to be a Tape issue but rather a build system one.

authors: JakeWharton ber4444 string-areeb

repo: square/tape


text:
Don't work in python 3.6

This does not work in python 3.6, can it refresh?

The whole library is written in Python 2. We have no plans of updating to Python 3 in the short term, sorry.

I tried using it in python 2.7 but I also have many errors. Which version of python is compatible?

It should work with Python 2.7.
Have you followed INSTALL.md, DEPENDENCIES.md and FAQ.md?

Any updates? Have you managed to make it work?

Excuse me, I'm not going to use python 2. The other part of the project is all written in pyton 3.6 and has no way to go back to python 2


text:
RFC: provide insight into the status of gogit

A project I'm working on uses gogit to power a git remote helper
(i.e., it gets invoked by git when you do git clone <protocol>://..., etc from the command line).  On big repos, gogit
and our backing store are slow enough that having printed progress
indicators makes a huge difference to usability, and better allows us
to debug where slownesses might be.
This is a quick-and-dirty PR that lets gogit communicate its status
back to some listener.  I haven't fixed up the tests yet, or written
any new tests, because I wanted to get feedback first on if this is
even a good approach or not.  Please take a look and let me know!
(Note that this is different from the sideband progress stuff, which
only lets you know the progress of the remote server.  This PR gives
the status of the local client.)

@mcuadros @erizocosmico: I don't want this merged as is, I'm just looking for feedback on whether this is a reasonable approach, and if not any suggestions on how better to do it.  Thanks!

Personally I don't like having all the logic for status mixed across all the package.
I prefer having an optional storage.Storer wrapper where the call to some methods are intercepted with the goal of capture metrics.
If some information cannot be retrieve, from this method, I rather adding a new interface to the storage package to allow to the plumbing communicate this information.

Will be nice sort the ideas, and write down all the information that needs/wants to be retrieve from which operations.
Related https://github.com/src-d/go-git/issues/549

Ah thanks for the pointer to #549.  I can summarize some things there, though I'm also interested in push (more so than fetch/clone actually).
Having an interface rather than a bare channel seems reasonable.  However, the type of info that's useful for status seems almost entirely orthogonal to the Storer interface to me.  It's more about the processing/computation that happens before data begins flowing through Storer.  If you take a look at this PR, you'll see it's mostly around walking the object structure, and Storer is too low level to be able to track the stats in a meaningful way.
Later today I'll put together a list of what's tracked in this PR and post it here and in #549.

Here is a summary of the useful status information I've found that gogit needs to report.  This is from the perspective of using go-git as a library to build a git-remote-helper.  That means my project interfaces with the local git repo as a remote, using the file protocol.  Thus, actually transferring the data back and forth to the remote is not a bottleneck for us, and I haven't included that in this PR or in the list below (though in a more general interface, it would of course be needed!).
For fetch/clone:

Fetch: decoding objects being transferred from the remote, and writing them to the Storer:

Number of objects decoded so far / total number of objects expected.
The numerator could maybe be figured out from a Storer implementation, through the SetEncodedObject method, though it would need to be aware about what stage it was in.

Index: building the index has three phases, which each object being touched in each phase.  So for purposes of tracking progress, this needs to be broken down into three separate stages:

IndexHash: Writing the hash of each object to the packfile.

Number of hashes written so far / total number of hashes expected.

IndexCRC: Writing the CRC of each object to the packfile.

Number of CRCs written so far / total number of CRCs expected.

IndexOffset: Writing the offset of each object to the packfile.

Number of offsets written so far / total number of offsets expected.

For push:

Count: walking the revlist to count how many objects need to be transferred:

Total number of objects counted so far.

Read: reading/decoding each of the objects from the Storer.

Number of objects read so far / total number of objects expected.
The numerator could maybe be figured out from a Storer implementation, through the DeltaObject and EncodedObject methods, though it would need to be aware about what stage it was in.

Sort: sorting the objects by size/type.

This is typically pretty fast, but maybe not for huge repos.  No specific numbers to track here other than time spent in this stage.

Delta: running delta compression for each object.

Number of object deltas considered so far / total number of delta considerations expected.

Send: encoding objects into the packfile stream.

Number of objects encoded / number of objects expected.

Lastly, there is a Done phase for both fetches and pushes, which is probably unnecessary as the caller can just end things when the Push or Fetch call returns.
So I think 2 of the 9 phases can be covered by a Storer implementation, as long as it gains additional knowledge about when it is entering a particular phases.  (This could be done via an optional Storer wrapper, as you suggest.)    6 of the other phases occur in places (revlist, packfile.Encoder, and packfile.deltaSelector) that have an EncodedObjectStorer, but not a full Storer.  The remaining phase is in idxfile.Encoder which only has a raw io.Writer and would probably need a new object plumbed through for stats.
@mcuadros What do you think is the best way for me to proceed?  Here's one proposal:

Add a simple new plumbing/storer.StatCollector interface has methods for:

Registering the start of each stage, as indicated by a provided enum, and optionally a target expected count.
A method for incrementing the number of items processed during a given phase.

Pass this directly into the idxfile.Encoder constructor.
Try to cast it from Storer and EncodedObjectStorer in the remaining places.
In this PR, instead of calling using StatusChan, use the casted object instead and the API above, if the casted object is non-nil.

I would slightly prefer calling it explicitly instead of relying on the Storer object to interpret calls to DeltaObject, EncodedObject and SetEncodedObject in a particular way, for the sake of consistency across all the stats, but if you feel strongly about it I could be convinced.

Open to other suggestions.

I didn't forgot you. ;)

authors: mcuadros strib

repo: src-d/go-git


text:
Unable to set Base Directory

Hey,
Setting a base dir does not seem to work (recent Firefox, macOS and Linux). I don't see any errors.

Can this be configured as a flag when running srcbook? That way this can be integrated into monorepos.

I think it might be working, but not doing what you're expecting. The baseDirectory is the directory we default to when importing srcbooks (clicking "open" on the home page) and is the default relative page when you click "export".
Others have thought that the baseDir is the ~/.srcbook dir we use for the internal application, but that currently cannot be changed.
What @matsko is asking for is something we want to build, "open srcbook within this directory", but isn't done yet. It might deserve its own GitHub issue.

Anything new here by chance?

@matsko i'd really appreciate if you could elaborate more on the issue...probably current behaviour, expected behaviour, and what you finally want to achieve?

Hello.
What I have in mind is to have a directory that is part of a project or package where you can do:
npm run srcbook -p 5555 -d ./books

Then it will load all the books within the books directory which can then import files from the same project and run them. All the books are then persisted in the books/ directory.
The usecase here is for projects to have notebooks that show how their code runs.

Hey. Any progress? I'd very much like to use srcbook in my monorepo project with all the book files persisted within.

authors: Lokendra-sinh jirpok matsko nichochar

repo: srcbookdev/srcbook


text:
project not found

Hey there :wave: and thanks for this amazing action.
Sadly, I am getting this error when running this action:
Run srggrs/assign-one-project-github-action@1.2.0
/usr/bin/docker run --name srggrsassignoneprojectgithubaction120_2c2dc5 --label c27d31 --workdir /github/workspace --rm -e GITHUB_TOKEN -e INPUT_PROJECT -e INPUT_COLUMN_NAME -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/[org/repo/repo]":"/github/workspace" srggrs/assign-one-project-github-action:1.2.0  "https://github.com/[org/repo]/projects/1" ""
jq: error (at <stdin>:4): Cannot index string with string "html_url"
No project was found.
jq: error (at <stdin>:4): Cannot index string with string "name"
INITIAL_COLUMN_ID is not found.

I have no other actions in the repo defined. I c&p your example, so my action looks like this:
name: Auto Assign to Project(s)

on:
  issues:
    types: [opened, labeled]
  pull_request:
    types: [opened, labeled]
env:
  GITHUB_TOKEN: ${{ secrets.GithubToken }}

jobs:
  assign_one_project:
    runs-on: ubuntu-latest
    name: Assign to Project
    steps:
    - name: Assign NEW issues and NEW pull requests to [project] project (project 1)
      uses: srggrs/assign-one-project-github-action@1.2.0
      with:
        project: 'https://github.com/[org/project]/projects/1'

Trying to use column_name without a value gives the same error and further an error is shown in the github ui when editing the action.
Note: I used [] for placeholders for real values, e.g. in the project url ;-)

I'm not sure what is going on in your case... but as you can see in this Issue, the action worked as expected, and assign your opened issue to the project Towards Usability as mentioned in the notifications above github-actions bot added this to To do in Towards Usability 2 days ago.
Have a look at my workflow file in here.
I suggest to check:

the right url of your project
the token, especially for repo owned by an organisation

Let me know how it goes! :smile:

@srggrs thanks for the reply. I double checked again and found that the GITHUB_TOKEN is a predefined action token, like mentioned here About GITHUB_TOKEN.
Now everything is working fine :+1:

@GRBurst I am having the same issue, I was wondering what you did to resolve it?

@gracetangg sorry, being off the radar lately. Do you still face the issue? The solution for me was to use the mentioned GITHUB_TOKEN instead of defining my own one.

@GRBurst Your good, I did that and it worked. Thanks!

@GRBurst @gracetangg @srggrs  I'm trying to do the same thing what you guys were saying.
name: Auto Assign to Project(s)
on:
issues:
types: [opened]
env:
MY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Assign NEW issues to Kanban
uses: srggrs/assign-one-project-github-action@1.2.1
if: github.event.action == 'opened'
with:
project: 'https://github.com/users/saideep2000/projects/2'
column_name: 'Backlog'
I make sured that the project link is correct and even the cloumn name is correct and also using MY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} for my predefined token to generate.
But still I'm getting the error, can you point me where I'm going wrong with this. I also saw the documentation but I don't way to actually see to solve this.
jq: error (at :4): Cannot index string with string "html_url"
No project was found.
jq: error (at :4): Cannot index string with string "name"
INITIAL_COLUMN_ID is not found.

authors: GRBurst gracetangg saideep2000 srggrs

repo: srggrs/assign-one-project-github-action


text:
Clarification on methodology used

Parameters of Cost function as per regularization
i. What is reg alpha?
ii. Why do we need n_examples?

5. Batch Gradient Descent
	a. If batch_size=1, it becomes stochastic gradient descent
	b. Aim : to reduce the cost
	c. Why don't we use the normal weight and intercept instead of the regularized gradient? Explain the formula

d. When we are defining n iters = 10, why are we getting epoch in 1000s? FYI check the print statement

e. What is the optimal batch size we should use?
f. Gradient descent should stop at:
i. Max 1000 iterations
ii. Step size = 0.01
iii. Where are we specifying these conditions?

repo: srikhetramohanty/Data-Science-Portfolio


text:
Unable to use auto assigned USB Ethernet Adapter named enx with MACVLAN in Links

Running containerlab 0.53.0 on a Debian 12 system using the default naming schema for USB network devices.
When attempting to setup links the MACVLAN with the default interface name of enxa0cecc8dfd0f the Link will fail to be built and the only error received is:
ERRO[0004] failed to deploy links for node "router1": device or resource busy
link example of failed link:
endpoints: ["router1:eth3", "macvlan:enxa0cecc8dfd0f"]
Workaround:
Use udev to rename the network interface to something like ethusb0

Nevermind. I believe this was due to the fact there was a bridge running on the interface Docker was attempting to macvlan.

repo: srl-labs/containerlab


text:
create crpd license dir before copying the lic file

Hi @chadell
this PR addresses the issue with license copying that we discussed
can you give it a try by downloading a beta build like this:
docker run --rm -v $(pwd):/workspace ghcr.io/oras-project/oras:v0.12.0 pull ttl.sh/clab-fd91decd:1d

thanks @hellt , it worked like a charm.

nice, the license is copied to /config/license/safenet/junos_sfnt.lic file as was suggested by jrokeach, I hope this path works for eval image as well

authors: chadell hellt


text:
Python Greeter App

This is the Python Greeter app that can be used has a main example about how to write SRL agent in Python.
The Greeter app demonstrates how agent can interact with the whole state and config tree of SR Linux using local gNMI access and the NDK.
It subscribes to configuration using the NDK.
It retrieves the "name" from the configuration notification and update the uptime status with a hardcoded value of 8:00 using a telemetry client.
It gets the uptime using gNMI. The gNMI client is locally connecting using Unix Domain Socket.
It logs "Hello myname, my uptime is 8:00".
@hellt, can you look at it please thanks.

@sebastien-guay can you also apply black formatting to the code if not already?

@sebastien-guay can you also apply black formatting to the code if not already?

Yes I already did it.

Cancelling the pull request. I will add testing and rpm pakage.

@hellt @alexandrehassan I brought the PR back to life. I added some changes for the rpm package and added Robot tests.

Thanks @hellt for your comments. I pushed the modifications.

Thanks @sebastien-guay
I made a few corrections in the last commits and will merge it. Additional improvements we will tackle in subsequent PRs

authors: hellt sebastien-guay

repo: srl-labs/ndk-dev-environment


text:
Add node_modules to gitignore

Been burned by this one too many times and I can't think of a reason not to add it.

Seems like an easy PR to merge

Seems like an easy PR to merge

Seems like an easy PR to merge

Seems like an easy PR to merge

Seems like an easy PR to merge

authors: christianbundy staltz

repo: ssbc/secure-scuttlebutt

license: mit


text:
What would happen if I have 1000 component type?

Hi,
I have a question.
I saw in the base class, Entity has a IComponent[] array which has the exact length of the total component classes count
so what would happen if I made a lot of component types (like 1000), would it impact the performance badly?
Thanks

Not really. We currently have a total of 1.7k components in our project with 800 in the largest context. So far we don't have any problems.

@zsydeepsky it would affect the memory footprint per entity, but not really the runtime performance. Entities will be reused, so once created you won't allocate the array again and again. If you want to know the exact numbers, you can can calculate numComponents * sizeOf ref to get the memory consumption of the component arrays

OK, thanks for the answers guys :)

Not really. We currently have a total of 1.7k components in our project with 800 in the largest context. So far we don't have any problems.

just for curiosity
is your project targeted on mobile? especially on some old phone models like iPhone 6?

Yes, we support the current version up to iPhone 6, but we also plan to support 5s.

Yes, we support the current version up to iPhone 6, but we also plan to support 5s.

Cool~
I have no problems then
Thanks for your info~

You are welcome pal

@StormRene How many system u have? Are remain all the systems together all the time or u load different set of systems based on scene?

@optimisez Around 3,5k systems. Mostly reactive. Yes they all stay together all the time - loaded on start of app.

@StormRene do try to keep the parent systems as flat as possible to reduce method calls, or are you clean with tons of sub parent systems?

tons of sub parent systems :-D

@StormRene Awesome. What's the target frame rate of your game? 60 fps?

We create a city builder game with tower defense elements so 30 fps is enough. More is nice to have.

@StormRene I see. Thanks for sharing your experience.

@StormRene out of curiosity, what does you folder structure and organization strategy look like for components and systems? I imagine with that many components/systems organization is critical since you might forget what a component/system is for eventually and therefore forget where to go to update something or accidentally create another component type that is meant for the same purpose as a component that already exists, for example.

The structure looks like the following:
->Client
-->UIFeatures
-->ActionFeatures
-->InputFeatures
-->Services
-->Factories
->Simulation
-->CoreFeatures
--->DayFeature
---->MorningFeature
----->MorningComponent
----->SomeMorningSystems...
-->MetaFeatures
-->CommandFeatues
-->Services
-->Factories
Folder == Feature - Each folder needs a feature class.
Of course it happens that logic is written twice, or it is forgotten that there are already components. I assume this happens with every big software project. Communication and documentation is the key.

True that. Cool, thank you for sharing. Organization with ECS architecture is something I've been struggling with.

authors: StormRene optimisez sschmid sudall zsydeepsky

repo: sschmid/Entitas-CSharp


text:
Installing the helm chart with argocd results in RepeatedResourceWarning

Describe the bug
RepeatedResourceWarning
Resource admissionregistration.k8s.io/MutatingWebhookConfiguration//connaisseur-webhook appeared 2 times among application resources.

To reproduce:

Install ArgoCD
Apply this file (kubectl apply -f )

project: default
source:
  repoURL: 'https://sse-secure-systems.github.io/connaisseur/charts'
  targetRevision: 1.4.3
  helm:
    parameters:
      - name: deployment.replicasCount
        value: '1'
  chart: connaisseur
destination:
  server: 'https://kubernetes.default.svc'
  namespace: connaisseur
syncPolicy:
  syncOptions:
    - CreateNamespace=true
    - PruneLast=true

@gigi206 besides the error message what happens to the connaisseur resources? does anything spin up? do you see any errors?

This issue is most likely due to helm.sh/hooks. Argo should change them to argo hooks, but seems it's not the case, hence, it tries to install the webhook twice.
If you can change the helm chart, since there's not way to configure it yet on the original one, just change the hooks for PreSync and PostSync as well fix the hook for deletion after completion. Should work just fine.
Keep in mind that the "duplicated" resource is necessary according to the ADR-5, in which the hook is in a "disarmed" state after removing resources, meaning that it doesn't have to admit himself. The webhook is then "rearmed" after the helm update.

"duplicated" resource is necessary according

It works very well but has this message in ArgoCD and I would to know if this is a problem with the chart ;)
But it seems an ArgoCD issue with hook :(

@williamokano-dh is there any change from Connaisseur-side required to improve rollout with ArgoCD?

Hi @xopham , technically ArgoCD should convert the helm hooks into ArgoCD hooks but they mention on their page that they don't support post-delete hooks, so I suppose it doesn't translate to any ArgoCD hooks, and there's no effect on the Chart.
I saw somewhere in the docs that there's a flag for Azure Container Registry, since it has different behaviour, but I couldn't find this flag on the values.yaml file.
I suppose that adding a flag to the values.yaml, such as isArgoCD, or similar, could alleviate the problem, but can cause some vendor-locking/manual configuration that could be unnoticed. I'm not quite sure how to properly address this issue.
I hardcoded the argo hooks on a copy of the charts and I'm using on my staging environment for a few time and it's working just fine.
Just for the sake of the example, I updated it to use the flag from the values.yaml as well.
https://github.com/williamokano-dh/connaisseur/blob/williamokano-dh-patch-1/helm/values.yaml#L4
https://github.com/williamokano-dh/connaisseur/blob/williamokano-dh-patch-1/helm/templates/certificate_webhook-conf.yaml
What do you think? Would be ok to do like this?

authors: gigi206 williamokano-dh xopham

repo: sse-secure-systems/connaisseur


text:
docs: improve readability by replacing small images into attractive badges 📛✨

Close #1013
Screenshot

Please merge this PR @panwar8279

repo: ssitvit/Games-and-Go


text:
节点数据较多时画布显示不全

大佬报个问题，当节点数据量比较大的时候，默认的画布（我看好像是20000x20000)显示不全，最顶上的被截断了，类似下面这样，节点数1093个：

当出现上面的情况时，在不点击缩小按钮的情况下，就无法拖动画布显示上面缺少的内容了；
如果点击缩小按钮可以让画布显示全部的数据，但缩小后背景颜色好像有些不对，上面和下面的部分缺少bgcolor，类似这样的，两部分（上部和中部）背景色不一致：

总结就是两个点：

数据量大时，画布显示不全，无法拖动显示全部数据；
数据量大时，缩小后回出现背景色不一致的地方；

不知道这两个问题好改不......

应该是直接加大画布就完事了，但是真的有这么多节点的思维导图吗😂

我试过直接加大画布，从20000改到200000，但好像还是不行，我是直接在生成的页面里面改的css文件，不知道是否生效；
至于这个需求，我是想用来管理整个项目的全部需求细节，所以设想数据量会比较大

直接改的话应该只会加大下方和右方，生成逻辑里也要改一点，有定位相关的问题

初始化的时候要是可以接受一个参数就完美了

您好，我也遇到这个问题了。和楼主一模一样，请问可以提供一个从外部的解决方案吗

您好，我也遇到这个问题了。和楼主一模一样，请问可以提供一个从外部的解决方案吗

不介意的话可以透露一下是什么场景需要这么大的思维导图吗？

authors: Mikuu SSShooter kitABAB ssshooter

repo: ssshooter/mind-elixir-core


text:
Create CONTRIBUTING.md file

Closes #5
Changes

Created CONTRIBUTING.md file for contributors

Maybe separate the Johns? John.O and John.R


text:
Logical Id's always generating a string at the end of json template

Hello,
I am trying to migrate from serverless framework to sst, in order to do so I need exact logical Id's in both stacks (for a dynamo table migration), but the cfn template generated from sst always has some additional text at the end even when I try to overwrite with the cdk prop e.g:
 const table = new Table(stack, 'blah', {
    cdk: {
      id: 'lukaszTable',
      table: {
        tableName: 'lukaszTable',
        timeToLiveAttribute: 'ttl',
        removalPolicy: RemovalPolicy.RETAIN,
      },
    },
...

in the cfn json output I have lukaszTableD7B5F0C3, when the expected should be lukaszTable, can this be done in full to generate the logical id's myself, as I need to match it with the serverless framework dynamoDb table id.
Cheers.

Hmm I think there might be a workaround here. Can you start a new thread in #help on Discord. I think there might be some other migration related questions as well.

We are transition this repo to https://github.com/sst/v2 and are closing this issue for now. If it is still relevant please reopen it there - sorry for the trouble

authors: jayair lukiwlosek thdxr

repo: sst/sst


text:
Add filter extension

Adding filter extension. Also making changes to other extensions to make it easier to dynamically build the conformance classes from the implemented extensions.

This also closes #159 by adding conformance classes to the landing page.

Thanks for checking! I realized later that my venv somehow had the
stac-fastapi packages installed in it, so I think those were being used
instead of the source.
On Thu, Jul 8, 2021 at 4:03 AM Richard Smith @.***>
wrote:

@.**** commented on this pull request.
In stac_fastapi/types/stac_fastapi/types/core.py
https://github.com/stac-utils/stac-fastapi/pull/165#discussion_r665963815
:

@@ -141,6 +157,7 @@ def landing_page(self, **kwargs) -> LandingPage:
id=self.landing_page_id,
title=self.title,
description=self.description,

       conformsTo=self.list_conformance_classes(),

yes:
[image: image]
https://user-images.githubusercontent.com/22395703/124885448-2c542800-dfcb-11eb-87d7-9f463f056c1d.png
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/stac-utils/stac-fastapi/pull/165#discussion_r665963815,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA6QRFVJYK6TG4DHZFV2P3TWVLT7ANCNFSM47R4KB5Q
.

Making sure I understand - this PR adds a filter extension that implements the queryables routes, but does not implement any of CQL "filter" property on the Search object, correct? So it's up to backends to implement the actual CQL filtering, but this PR adds the necessary top level routes that are added by the extension? If I'm getting that correct, this seems like a good change that will set up the next stage of work which is to add CQL support to the pgstac and sqlalchemy backends.
@rsmith013  Can you merge in the latest master, and I'll take a closer look next week? Thanks!

@lossyrob Yes, that was the plan.

Looking good; going to leave this off of the 2.0.0 release because there's a TODO around implementing the Async core client.

@lossyrob I didn't realise you were that close to a release. Added the Async base and merged master. Should be good to go

Thanks! We decided to pop one off since it had been so long. Let use kick the tires for the CI-based publishing as well. There's a few issues so I'm sure we're going to have to fix up soon so I'm expecting a 2.1 release in the next week or so

authors: geospatial-jeff lossyrob philvarner rsmith013

repo: stac-utils/stac-fastapi


text:
missing UTM grid info!

https://github.com/stac-utils/stac-sentinel/blob/608b495d59ab5aafc099eb35e3b07c279571dec1/stac_sentinel/sentinel.py#L46-L49

I was confused for a minute, because this is being used by Earth-search, which does have sentinel:utm_zone
Turns out I'm using the develop branch:
https://github.com/stac-utils/stac-sentinel/blob/develop/stac_sentinel/sentinel.py#L44
I'll be spending some time getting this up to date in the next couple weeks, and getting the open PR merged.  Probably will make a release, but then will be integrating this into stactools.

authors: matthewhanson vincentsarago

repo: stac-utils/stac-sentinel


text:
[C++][Bug] Avoid confusion between joint and body methods in se3::Model.

se3::Model::getBodyId was used to retrieve joint id in parsers.
Implement new methods to retrieve joint ids.
Fix body methods.

@jcarpent @fvalenza Could someone please check whether the clang build error is a false positive?
Seems to me like clang crashed during build, but I don't know why.

@aelkhour
Hello Antonio, we have some problems with travis currently (see Issue #48 ) . This is due to the build environment running out of RAM when executing paralle builds. I will push a "fix" for it today. Otherwise the use of Travis will become compromised

OK thanks.

authors: aelkhour fvalenza

repo: stack-of-tasks/pinocchio


text:
Pushing to Habor within bake

Current situation
Pushing to habor is a step within the GH pipeline. Bake is just building and pushing to nexus
Wanted Situation
bake should be enabled to push to Habor too

bake --push --registry harbour.host should just work.

Fabulous :)

authors: Maleware razvan

repo: stackabletech/docker-images


text:
DeepSeek-V3 - Error when processing prompt with image

Describe the bug
Below error appears when attaching an image for design inspiration using the latest DeepSeek-V3 API and submitting the prompt. The prompt goes through, but then errors out after a few seconds. This happens on both deepseek-coder and deepseek-chat models. Only way to fix is to start a new chat.
"There was an error processing your request: An error occurred."
Link to the Bolt URL that caused the error
http://localhost:5174/chat/
Steps to reproduce

Integrate DeepSeek-V3 via API key
Start a new chat
Attach image for design inspiration and prompt Bolt to take inspiration from it for the code
Submit prompt as is or after optional enhancement

Expected behavior
API acknowledges image and adjusts code after analyzing image.
Screen Recording / Screenshot
No response
Platform

OS: macOS
Browser: Brave
Version: Version 1.73.104 Chromium: 131.0.6778.204 (Official Build) (arm64)](https://brave.com/latest/)

Provider Used
No response
Model Used
DeepSeek-V3, deepseek-chat
Additional context
No response

I am experiencing the exact same error when integrating with the DeepSeek V3 API. As soon as I have an image file attached to my prompt message, the problem "There was an error processing your request: An error occurred." starts to appear and doesn't go away until I create a new chat.

i'm experiencing the same issue

I'm having the same problem

i'm also having the same issue

I‘m having the same problem

same problem with simple texte even not image with DeepSeek V3 with Openrouter


text:
Bug

Describe the bug:

Link to the blitz that caused the error
https://stackblitz.com/github/webpack/webpack.js.org/tree/master/examples/getting-started?file=webpack.config.js&terminal=
Steps to reproduce:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior:

Version of webcontainer:
Hash: 70a1ff62a0f0131ac0df3c30faf487fef744ac90
Screenshots:

Desktop (please complete the following information):
Browser name  = Chrome
Full version  = 93.0.4544.0
Major version = 93
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4544.0 Safari/537.36 Edg/93.0.936.0
performance.memory = {
  "totalJSHeapSize": 74566356,
  "usedJSHeapSize": 70636560,
  "jsHeapSizeLimit": 4294705152
}

Additional context:

Closing this issue as it's unclear what goes wrong and none of the required details are filled in. Feel free to open a new issue and fill in all the necessary details so we have enough information to have a look ourselves. The more information we have, the better we can help you 🙏 .

repo: stackblitz/webcontainer-core


text:
An exception is thrown when executing jest.

Describe the bug
When I run jest on a stackblitz nodejs, I get the following error
this does not happen with local nodejs.
TypeError: 'getOwnPropertyDescriptor' on proxy: trap returned undefined for property 'jest-symbol-do-not-touch' which is non-configurable in the proxy target

Link to the blitz that caused the error
https://stackblitz.com/edit/node-ked4s2
Steps to reproduce
I looked into it as much as I could, but it seems that if you add properties to a global object defined in node-vm by Object.defineProperties, it crashes when you access it.
Here is a small piece of code to reproduce it.
const { runInContext, createContext } = require('vm');

const context = createContext();
const global = (this.global = runInContext('this', context));

Object.defineProperties(global, {
  'jest-symbol-do-not-touch': {
    enumerable: false,
    value: global.Symbol,
    writable: false
  }
});

console.log(global['x']); // success
console.log(global['jest-symbol-do-not-touch']); // error
Object.keys(global); // error

Expected behavior
the reproduced code above works fine locally, so it should also work fine on stackblitz.
Screenshots

Platform

OS: macOS
Browser: Chrome
Version: 92.0.4515.131

Additional context
No response

I think this is related to how "Proxy" is implemented inside of WebContainers node.
jest relies on Proxy as you can see here: https://github.com/facebook/jest/blob/bc50e7f360ab1845abbaa0b3ad788caead0d3174/packages/jest-util/src/createProcessObject.ts
So if the implementation of Proxy is broken inside of WebContainers node, that might be the reason.

Maybe related with:
https://github.com/nodejs/node/issues/30985
https://github.com/nodejs/node/issues/17465

A workaround is, to set configurable to true when its not defined.
test/test-environment.js
const defineProperties = Object.defineProperties;
Object.defineProperties = function(obj, props) {
  Object.values(props).forEach(prop => {
    if (typeof prop.configurable === 'undefined') prop.configurable = true;
  });
  return defineProperties(obj, props);
};

module.exports = require('jest-environment-node');

package.json
...
  "jest": {
    "testEnvironment": "./test/test-environment.js"
  }
...

Thanks for the kind reply!
I have confirmed that jest 27 will run with the solution you suggested.
https://stackblitz.com/edit/node-qsuzv8
since my issue has been solved, I will close this issue.

This still looks like a bug that shouldnt happen imo. I would not close it as such a bug can cause alot of different bugs.
It should definitely be investigated.

Note: This has been fixed. So no workaround anymore needed!

authors: MSakamaki freehuntx


text:
Create draft release when change on master

Solves #112
Description
I configured travis to create a draft release on each merge to a branch (I suspect that will be master).
Resulting draft release: https://github.com/stackbuilders/dotenv-hs/releases/tag/untagged-102599435dcc9f6e17c9
Note: I just need to change the branch name, currently it's deploying when something is merged in this branch for testing).
TODO:

[ ] Change the Github API key (it's using mine now)
[ ] Change create-static-binary-linux-64 to master

I closed this PR just for testing the travis deployment. It seems that it skips deploy when the branch is in a PR.

@sestrella It seems that travis runs the deploy job along with the other jobs. Therefore, I think the deployment condition is necessary.

repo: stackbuilders/dotenv-hs


text:
Error on install: fails on npm run build step

Here is the full output when I enter the command:
sudo npm install -g shader-school
npm WARN deprecated rework-inline@0.2.0: deprecated in favor of rework-import

fsevents@0.2.1 install /usr/local/lib/node_modules/shader-school/node_modules/glslify-live/node_modules/chokidar/node_modules/fsevents
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found
npm WARN optional dep failed, continuing fsevents@0.2.1
\

fsevents@0.3.5 install /usr/local/lib/node_modules/shader-school/node_modules/beefy/node_modules/chokidar/node_modules/fsevents
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found
npm WARN optional dep failed, continuing fsevents@0.3.5

canvas@1.2.1 install /usr/local/lib/node_modules/shader-school/node_modules/gl-axes/node_modules/vectorize-text/node_modules/canvas-browserify/node_modules/canvas
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found
npm WARN optional dep failed, continuing canvas@1.2.1
npm WARN engine pngjs@0.4.0: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"2.5.0"})

stanford-dragon@1.1.1 postinstall /usr/local/lib/node_modules/shader-school/node_modules/stanford-dragon
npm run build

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: npm: command not found
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "shader-school"
npm ERR! node v0.10.33
npm ERR! npm  v2.5.0
npm ERR! code ELIFECYCLE
npm ERR! stanford-dragon@1.1.1 postinstall: npm run build
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the stanford-dragon@1.1.1 postinstall script 'npm run build'.
npm ERR! This is most likely a problem with the stanford-dragon package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build
npm ERR! You can get their info via:
npm ERR!     npm owner ls stanford-dragon
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /Users/corbmanj/npm-debug.log

I ran into some issues of my own while trying to run npm install -g shader-school. It looks like yours are a bit different, possibly the permissions are wrong on the NPM directories? That can happen if NPM has been run with sudo in the past. If this is the case, you might be able to fix it by changing your permissions. Just guessing here:
sudo chown -R [your-username] /usr/local/lib/node_modules

If that doesn't work, it's relatively easy to install a new Node environment with NVM. I switched from system Node to v0.10.31 and that fixed my problem. Might help in your case as well!

NVM did seem to work better. I have that running on my linux machine. This mac doesn't seem to like it as much. Thanks for the help.

authors: corbmanj donmccurdy

repo: stackgl/shader-school


text:
Split the PR actions of the vulncheck evaluator into a proper remediate action

The vulncheck evaluator does two things - checks the vulnerabilities and then performs an action based on the vulnerabilities found, like suggesting PR changes or commenting with a summary. This was all coded before we had remediations, but now that we do have a proper remediations engine we should split the actions part of the evaluator into a proper remediate module to avoid turning the vulncheck into spaghetti (esp visible once we started adding Pi support in addition to vulnerabilities)

When addressing this, please take comments in https://github.com/stacklok/minder/issues/1203 into account

repo: stacklok/minder


text:
ROX-13796: benchmark node analyze

The bash script is for creating RPM files and install RPM packages so we can benchmark node scanning analyze function on varieties of package list sizes.
The benchmark file is how to test the analyze function and collect data.

This looks nice, but we are missing a manual how to reproduce the results. Could you provide a readme at the pkg level or a block-comment (/* ... */) in the benchmark code with instructions? Imagine someone without a prior knowledge would like to reproduce the same experiments - which command they would need to run?

Can I suggest we time-box looking into automating this so it can be run as part of the "performance e2e" CI? If it's too much work, please, document how to run the test in a way that someone without context can.

Also, do you know how this script is supposed to be used? Is it run in the node itself? Or do we build the *.rpms locally and install them in the node another way?
Should we automate the steps to reproduce the test in our CI? Not a blocker. More like a follow-up. 😄
Also, a description in the PR would be great. It gives context to the change, helping people without context to understand it.

It would be a great idea if we can install RPM packages in CI and test this function. Perhaps we can create a phase 2 ticket for that.

@daynewlee Did you follow up on adding instructions how to reproduce your results?
I wasn't able to find them, and I wanted to try and reproduce your results.

authors: Maddosaurus daynewlee jvdm

repo: stackrox/scanner


text:
ROX-11587: Prevent port 0 from being used as a server

Description

Collector sometimes doesn't get the port number of some sockets, this may be due to it missing some syscall or the kernel simply not filling in the data. This last case most commonly happens with connectionless UDP messaging, where the kernel leaves the side that starts the communication empty.
In any case, we shouldn't be showing port 0 in the network graph, so this patch will make it so port 0 takes the least precedence, so it will only show up if both sides of the connection are 0.
User-facing documentation

[ ] CHANGELOG is updated OR update is not needed
[x] documentation PR is created and is linked above OR is not needed

Testing and quality

[x] the change is production ready: the change is GA or otherwise the functionality is gated by a feature flag
[ ] CI results are inspected

Automated testing

[x] added unit tests
[ ] added e2e tests
[ ] added regression tests
[ ] added compatibility tests
[ ] modified existing tests

How I validated my change

Added unit tests to ensure port 0 is not picked when using UDP.
Currently working on some changes for OCP Virt integration that make port 0 show up consistently, fixed with this change.

Please reenable the "Verify ports are greater than 0" test in qa-tests-backend/src/test/groovy/NetworkFlowTest.groovy.

I think the change looks fine. I understand that the ephemeral nature of the port has only influence on the direction of the connection - would that help not showing the 0 on the graph?

I'm currently working on integration with OCP Virt, when using UDP with some VMs I was getting port 0 everywhere, this change got rid of it altogether. Granted, it's not the exact error the user is having, but I believe it should fix it for them as well.
The only corner case this could cause is that we incorrectly show a client port as a server if we fail to get the port number for the server, but either way would be wrong and this is (only slightly) more correct, since we don't show a completely wrong port.

Thanks! Green from me, but you still need to look into that style-check that failed, I do not understand why it complains here about some scanner code - maybe a rebase is necessary?

Yeah, it was complaining about a test that I hadn't change, a rebase fixed it.

repo: stackrox/stackrox


text:
Adjust Rails stack

Problem
The Rails stack in the README uses ActiveRecord and other internal pieces of Rails to describe the stack, which to me is missleading, especially compared to the other stacks in the REAME
Solution
I've removed some of the internal Rails pieces and brought the stack more inline with what I believe to be similar to the other stacks.  Let me know if this isn't correct.

Thanks for the PR @thebadmonkeydev - we're taking the stacks in a bit more of a use-case / starter kit focused direction, to avoid getting into traps about what should belong where. Have a look at the README and see if that makes sense. Do you have a Rails starter that you like or is there a particular feature or type of Rails app that you could suggest tools around?

I mean if we're talking about more like a "starter-pack" approach, I'm a big fan of the stack that comes out of this post https://blog.heroku.com/a-rock-solid-modern-web-stack
It's basically the stack I turn to when setting up a new side-project...I have a rails template in progress if that's more the thing you're looking for.  I'll review the updated README and see if things are a bit clearer.
Thanks for the feedback @dzello!

@thebadmonkeydev Yes! That would be perfect to have!

@dzello just pushed an update against the newest README adding my interpretation of the stack mentioned above.  Let me know what you think and if there are any changes necessary.

Looks good 👍 Nice to have some Rails on the page. Thanks again!

authors: dzello thebadmonkeydev

repo: stackshareio/awesome-stacks


text:
🛑 Proxima/DNS Server is down

In 5611ecb, Proxima/DNS Server (http://proxima01.its-telekom.eu/livewatch.php) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Proxima/DNS Server is back up in 9325430.

repo: stamateas/upptime


text:
Iissue 1197 eigen methods for autodiff types

Summary
Uses Eigen's plugin system to add methods for extracting and manipulating the values/gradients from matrices of fvar and var.
For var:

.val() provides read-only access to the values
.adj() provides read and write access to the adjoints

For fvar<T>:

.val_() provides read and write access to the values
.d_()  provides read and write access to the tangents

This also works with mixed-mode variables, such as fvar<var> (e.g. .val_().val())
This requires that the header prim/mat/fun/Eigen.hpp be included before any other Eigen headers.
I had to modify the fvar struct to have a method for returning the type of the containing variable. Without this, another header file would have been needed (like ```partials_type``)`
Tests
fwd/mat/fun/determinant has been re-written to use the new methods
Side Effects
None
Checklist

[x] Math issue #1197

[x] Copyright holder: Andrew Johnson
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

[x] the basic tests are passing

unit tests pass (to run, use: ./runTests.py test/unit)
header checks pass, (make test-headers)
docs build, (make doxygen)
code passes the built in C++ standards checks (make cpplint)

[x] the code is written in idiomatic C++ and changes are documented in the doxygen

[x] the new changes are tested

I'll close this for now until the discussion in #1197 is resolved, no sense clogging up the queue!

repo: stan-dev/math


text:
'standard' on TypeScript generating incorrectly claiming symbols never used

I've tried setting up standard to process TypeScript files using typescript-eslint-parser and eslint-plugin-typescript as documented in the README.   It's given me some nonsensical errors claiming some of my imports are never being used, when it's plain they are.  For example, standard src/documenter.ts gives me these these messages:
standard: Use JavaScript Standard Style (https://standardjs.com)
  C:\code\tsdoc\src\documenter.ts:2:13: 'ts' is defined but never used.
  C:\code\tsdoc\src\documenter.ts:3:27: 'interfaces' is defined but never used.
  C:\code\tsdoc\src\documenter.ts:4:10: 'DocumenterOptions' is defined but never used.
  C:\code\tsdoc\src\documenter.ts:4:29: 'RunOptions' is defined but never used.

When in fact all four of these symbols are in use.   See source code here
standard version: 10.0.2
tsc version: 2.3.4

With the new code on master, not all of them are in use, but e.g. RunOptions still is, and has always been.

@samvv I just used this as an example.   The link I provided was to a particular commit, so updates to master on our example project won't get reflected in this use

Oh whoops, I see now, missed that.

This can be closed. Known typescript-eslint-parser issue:
https://github.com/eslint/typescript-eslint-parser/issues/77

authors: BurtHarris mightyiam samvv

repo: standard/standard


text:
Private Eval Datasets

One of the steps of the LLM competition will be adding some private eval datasets and I'm wondering if there are some known best practices to achieve this
What I had in mind right now was authoring a private fork of HELM and then running evals on that and then upstreaming my fork to core helm after the competition is over

There's a few options here, depending on where your data is. If only your data needs to be private and not your code, you could write a scenario that reads data files from a private S3 or GCS path, and then use AWS / GCS CLI login to allow helm-run to access your data on your machine only (while the rest of the world won't have access to it), and then you can make that path public after the competition is over. Or you could create a private Hugging Face dataset and use Hugging Face CLI login in the same way.
If your code also needs to be private, then a private fork of HELM would be the way to go.

I invited you to this private repo so you can see what we're planning so far https://github.com/llm-efficiency-challenge/datasets

Thanks, the datasets look good to me. I think it's best to write the new scenarios in a fork and upstream it later, since those scenarios look useful to general users. Let me know if you have other questions.

authors: msaroufim yifanmai

repo: stanford-crfm/helm


text:
fix(dspy): fix save/load for predict method

Allow the dump_state/load_state methods in dspy.Predict to include prefix and desc for all signature fields

Thank you so much @GFarnon ! If I understand correctly, this will not be backwards compatible with existing saved files?

Also looks like the ruff check is failing but that's more minor.

Hi @GFarnon , thanks for the PR! the ruff fix will be fixed once you merge with main.
@okhat I've tested the change with the intro.ipynb and it doesn't have any breaking changes - although it does not rely on save/load functionalities. Would the CoT.ipynb  be better to test this (although that does not have cache currently so it wouldn't break any repo-wide changes).
@GFarnon would this change impact ChainOfThought as well, given that there are extended_... fields added to the state? For context, ChainOfThought inherits from Predict but reconstructs the signature within its internals.

authors: GFarnon arnavsinghvi11 okhat

repo: stanfordnlp/dspy


text:
fixes _get_embeddings for ChromaDB

As described in #389 _get_embeddings is throwing an error when called via retriever(query): TypeError: Embeddings.create() got an unexpected keyword argument 'engine'.
This is a result of the unnecessary usage of model_args and api_provider. I removed both and now the function works as expected.

@lukaskuhn-lku, it seems like https://github.com/stanfordnlp/dspy/pull/400 update has wider scope changes.
Maybe this PR might not be necessary if the newer one (400) is reviewed and merged.

Thank you so much @lukaskuhn-lku ! I will merge #400 so I will close this, but I really appreciate your contribution.

authors: insop lukaskuhn-lku okhat


text:
🛑 Hacker News is down

In 4306687, Hacker News (https://news.ycombinator.com) was down:

HTTP code: 502
Response time: 276 ms

Resolved: Hacker News is back up in 56d3c57 after 9 minutes.


text:
Pull pre-build ex_doc from github for releases

This commit adjusts the release script to start pulling a pre-built ex-doc escript from elixir-lang's github
(i.e., https://github.com/elixir-lang/ex_doc/releases/tag/v0.31.0).
In addition, src, test, and mix.exs have been adjusted to reference and align with the escript name on ex-docs release artifiacts. Likewise, we also will now include the sha256sum in priv to be published along with the escript.

I can understand the "what" in this, which is the direction for my approval, but what's the "why"?

I can understand the "what" in this, which is the direction for my approval, but what's the "why"?

I suppose providing a synopsis on the why would have been useful here.
History : Originally when this plugin was discussed it was my thought that the ex_doc maintainers build and publish an escript and that this plugin simply leverage said pre-built escript, I can not remember why they did not want to do this at the time.  I think also at the time, I thought that this plugin should download the escript vs publishing it.
The why at this point in time is simply going with "cannon" if you will. It's arguable that it's probably also one less thing to have to do (mess up? 😄 ) as well.
There are no strong technical reasons other than that though, we could of course continue to build and publish the escript ourselves, after all, the updates from our end won't come any quicker since it is still up to us to pull in and publish the latest. The only thing that really would make a difference is : Which approach is more secure? That I suppose boils down do you trust one of our machines more than a github CI runner or the other way around?
Do you see any problems?

No problems, really. If it's just basically for security purposes, go for it.

authors: paulo-ferraz-oliveira starbelly


text:
Support release branches

Describe the feature

CREATE BRANCH for each minor release based on the latest patch tag for each minor
CREATE CHANGELOG on master branch that refers each minor version latest changeling on the relevant release branch
Make every release compatible with version bump (standardised setup.py and version.py)
Ensure master + release branches are tested on push
Ensure master + release branches are tested on pull request

Describe alternatives you've considered
No response
Who will benefit?
No response
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Currently dbt trino release workflow uses this github action. Unfortunately, this github action sets every release as latest, so while making backport and releasing 1.0.4, it would be set as latest github release. There is make_latest github API parameter which could be set to false, to avoid setting backported releases as latest ones. Unfortunately, this GH action doesn't support this parameter, and will never do, as this repository is archived.
So, it would require to manually change which version is latest after releasing backported version, or some refactor in a release workflow.
There is another gh action which I used in PyTrino release workflow, which has pending PR for addition of this parameter, maybe it could be used instead after adding this make_latest option there.

Unfortunately, this GH action doesn't support this parameter, and will never do, as this repository is archived.
So, it would require to manually change which version is latest after releasing backported version, or some refactor in a release workflow.

As discussed offline, let's not worry about this.

repo: starburstdata/dbt-trino