text:
Prompt missing dependencies when I have already installed them on anaconda

Description
What steps will reproduce the problem?

You have missing dependencies!
Mandatory:
qtconsole >=5.3.2;<5.4.0 : 5.1.1 (NOK)
qtpy >=2.1.0 : 1.11.2 (NOK)
Please install them to avoid this message.
Note: Spyder could work without some of these dependencies, however to have a smooth experience when using Spyder we strongly recommend you to install all the listed missing dependencies.
Failing to install these dependencies might result in bugs. Please be sure that any found bugs are not the direct result of missing dependencies, prior to reporting a new issue.

But I have already installed these packages
Traceback
Traceback (most recent call last):
  File "/Users/weitaozhu/.local/lib/python3.9/site-packages/qtconsole/base_frontend_mixin.py", line 138, in _dispatch
    handler(msg)
  File "/Users/weitaozhu/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py", line 214, in _handle_execute_reply
    super(NamepaceBrowserWidget, self)._handle_execute_reply(msg)
  File "/Users/weitaozhu/.local/lib/python3.9/site-packages/qtconsole/jupyter_widget.py", line 191, in _handle_execute_reply
    self._show_interpreter_prompt(number)
  File "/Users/weitaozhu/.local/lib/python3.9/site-packages/qtconsole/jupyter_widget.py", line 382, in _show_interpreter_prompt
    self._show_prompt(self._make_in_prompt(number), html=True)
  File "/Users/weitaozhu/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/ipythonconsole/widgets/debugging.py", line 672, in _show_prompt
    super(DebuggingWidget, self)._show_prompt(prompt, html, newline,
TypeError: _show_prompt() takes from 1 to 4 positional arguments but 5 were given
Traceback (most recent call last):
  File "/Users/weitaozhu/.local/lib/python3.9/site-packages/qtconsole/base_frontend_mixin.py", line 138, in _dispatch
    handler(msg)
  File "/Users/weitaozhu/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/ipythonconsole/widgets/namespacebrowser.py", line 214, in _handle_execute_reply
    super(NamepaceBrowserWidget, self)._handle_execute_reply(msg)
  File "/Users/weitaozhu/.local/lib/python3.9/site-packages/qtconsole/jupyter_widget.py", line 191, in _handle_execute_reply
    self._show_interpreter_prompt(number)
  File "/Users/weitaozhu/.local/lib/python3.9/site-packages/qtconsole/jupyter_widget.py", line 382, in _show_interpreter_prompt
    self._show_prompt(self._make_in_prompt(number), html=True)
  File "/Users/weitaozhu/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/ipythonconsole/widgets/debugging.py", line 672, in _show_prompt
    super(DebuggingWidget, self)._show_prompt(prompt, html, newline,
TypeError: _show_prompt() takes from 1 to 4 positional arguments but 5 were given

Versions

Spyder version: 5.3.3  (conda)
Python version: 3.9.13 64-bit
Qt version: 5.15.2
PyQt5 version: 5.15.7
Operating System: Darwin 20.2.0

Dependencies
# Mandatory:
applaunchservices >=0.3.0     :  0.3.0 (OK)
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.31.1;<8.0.0       :  7.31.1 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  4.16.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.4.4 (OK)
numpydoc >=0.6.0              :  1.4.0 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0;<3.0           :  2.14.5 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.5.0;<1.6.0          :  1.5.0 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=1.0.2             :  1.0.3 (OK)
qtconsole >=5.3.2;<5.4.0      :  5.1.1 (NOK)
qtpy >=2.1.0                  :  1.11.2 (NOK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  63.4.1 (OK)
sphinx >=0.6.6                :  5.0.2 (OK)
spyder_kernels >=2.3.3;<2.4.0 :  2.3.3 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=22.1.0                  :  23.2.0 (OK)

# Optional:
cython >=0.21                 :  0.29.32 (OK)
matplotlib >=3.0.0            :  3.4.3 (OK)
numpy >=1.7                   :  1.21.3 (OK)
pandas >=1.1.1                :  1.3.4 (OK)
scipy >=0.17.0                :  1.7.1 (OK)
sympy >=0.7.3                 :  1.9 (OK)

Hey @weitaozhu09, thanks for reporting. To fix this problem, please open a terminal and run there
rm /Users/weitaozhu/.local/lib/python3.9

To avoid this problem in the future, please avoid installing packages with pip and try to only install them with conda.


text:
Problem using arrow keys in editor

Description of your problem
What steps will reproduce the problem?

Use spyder editor for sometime and navigate through code using right/left arrows
I believe this happen when i have cells (#%%)

What is the expected output? What do you see instead?
When I click right arrow it takes me left and when i click left it take me right. Sometimes I can't even move at all within line only jump from line to line
Please provide any additional information below
Versions and main components

Spyder Version: 2.3.8
Python Version: 3.5.1
Operating system: Window 10

Dependencies
Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
IPython >=1.0      :  4.0.3 (OK)
jedi >=0.8.1;<0.9.0:  0.9.0 (NOK)
matplotlib >=1.0   :  1.5.1 (OK)
pandas >=0.13.1    :  0.17.1 (OK)
pep8 >=0.6         :  1.7.0 (OK)
pyflakes >=0.6.0   :  1.0.0 (OK)
pygments >=1.6     :  2.1 (OK)
pylint >=0.25      :  None (NOK)
qtconsole >=4.0    :  4.1.1 (OK)
rope >=0.9.2       :  0.9.4-1 (OK)
sphinx >=0.6.6     :  1.3.1 (OK)
sympy >=0.7.3      :  0.7.6.1 (OK)
zmq >=2.1.11       :  15.2.0 (OK)

Thanks for opening the issue again with the right information! :+1:
Most probably this is a Qt problem (Qt is the graphical library used by Spyder). If you're using Qt4 through Anaconda (which seems you're doing :-), you'll have to wait until we release Spyder 3.0. This new version will support Qt5, which works correctly on Windows 10.
Unfortunately we're some months away of releasing 3.0. In the meantime you can use the WinPython distribution because it comes with Qt5 and Spyder 3.0 beta.

Thanks for explaining! yes I'm using Anaconda. I'll not use cells for now - It seems to work fine outside cell - as I don't want to bloat my PC with distros :)

This should be fixed in Spyder 3.0 with Qt 5 :-)

Awesome!! Will update my bits :)

source: gharchive/issue

repo: spyder-ide/spyder

license: MIT

license_type: permissive

license_source: github-api


text:
Use a separate configuration directory for beta and dev releases to avoid contaminating user settings

Can the *.beta releases be updated to use a different assortment of dot files, so .spyder could become .spyder-beta, this would preserve the beta alongside the current 3.3.1 release so that a production and testing environment can co-exist happily. I also wonder whether the same could be possible for the .ipython and .matplotlib subdirs?

This is a good suggestion. @CAM-Gerlach, what do you think about it?

I also wonder whether the same could be possible for the .ipython and .matplotlib subdirs?

This is not something Spyder should handle because it could cause more headaches than benefits. So I don't think we'd implement it.

@ccordoba12 glad you think it's worth considering. If they are pointing at different dirs, at least for spyder itself, then a beta user could relatively easily update to successive betas, providing feedback, but also enabling the use of the standard release

@ccordoba12 Definitely agreed; this would be very useful to enable messing around without launching with --safe-mode all the time. Shouldn't changing the .spyder and .spyder-py3 directory names to something like .spyder-beta and .spyder-py3-beta (for of Spyder 5, we can unify them, since Py2 will be dropped completely, but that's a different issue) be sufficient for now? Then for Beta 3 or whenever the project changes are implemented, we'd presumably need to change the .spyderproject name as well (or just rename it entirely).

Yes, it should. Would you like to implement it?

Sure, I guess. Where do I make the change(s)? Do you want iit be hardcoded on master until the final release? A command line flag enabled by default for now on master? Or something that automatically parses the version string to determine if the current version qualifies as a "beta"? I can also also try to add a unit test if practicable.

Sure, I guess. Where do I make the change; just in config/base.py or are there other places too?

I think there are no other places needed.

Or something that automatically parses the version string to determine if the current version qualifies as a "beta"?

Exactly. That's what I'd do too.

I can also also try to add a unit test if practicable.

Sure, it should be pretty simple: a test for get_conf_path should be enough.

That's what I'd do too.

Okay, cool. That should be simple enough.

@ccordoba12 I've been finally doing the big legal housecleaning I've been planning on for a while, along with spinning up with the first day of my new research position yesterday as well as the start of classes before I do this, but with regard to the version string, should dev builds (checkouts from master) also count as beta for settings isolation, or only the four released snapshots? I'd think the latter would make more sense, but its up to you what you think's best.

but with regard to the version string, should dev builds (checkouts from master) also count as beta for settings isolation

That would be really helpful for the dev team and I haven't thought about that! So please also make dev as well as beta to count for settings isolation.

Great, that's what I thought too (I mistyped "latter" instead of "former" above). I'll probably get to it this weekend.

Hi folks, I'm just pinging myself on this as I'd forgotten where this issue was living.. What are the chances this could sneak into v4.0beta2?

I can take a look at it later this evening since it seems pretty simple to do. Sorry for leaving this for so long as I was working on other projects.

@CAM-Gerlach no problem! I've been a reluctant tester of v4.0beta1 as it's going to mess up my envs, so was hoping this could land so I can jump into testing alongside

Heh, its already wiped all my custom keyboard shortcuts and color schemes which is what I deserve for not implementing this sooner, I guess.

@CAM-Gerlach, exactly, you’ve hit one of the very reasons having a different dotfile subdir is a good idea for the betas

@ccordoba12 @CAM-Gerlach this is great, which beta will it be released in?

@durack1 Beta 2. In the future, you can check which Spyder release any feature will be present in by looking at the Github milestone in the middle of the right sidebar.

@CAM-Gerlach nice, of course.. And now a question that is not answerable from the current milestone pin - when is beta2 likely to land? It's 93% complete.. https://github.com/spyder-ide/spyder/milestone/44

We sincerely don't know. We're still dealing with some hard bugs, so it'll be ready when it's ready.

@ccordoba12 I thought as much.. Good luck getting it across the line.
Is there a mailing list or any subscription (other than watching this repo) that announces such releases?

Yes, I announce new versions in our Google group:
https://groups.google.com/group/spyderlib

@durack1 You can also try it out right now by just cloning this repo, creating a new conda environment (or virtualenv/venv, if not using Anaconda/Miniconda), and installing the dependencies with conda install -c spyder-ide --file requirements/conda.txt. You can then launch Spyder by just running python bootstrap.py from the root of the repo.


text:
PR: Greatly improve Outline performance and update it correctly when it becomes visible

Description of Changes

Simplify and greatly speed up updating trees when new symbols arrive from PyLSP. For instance, this decreases the time necessary to update the tree of our codeeditor.py file from 700 ms to 30 ms in my laptop.
Update trees when the Outline is undocked, but not if its window is minimized.
Avoid the Editor plugin to update current tree when given focus (this was very inefficient).
Dock plugins if they are undocked before hiding them when going to the Panes > View menu. I discovered that UX bug while working on this PR.
Add a test to check that we update (don't update) the Outline when it becomes visible (is not visible) under different circumstances.

Issue(s) Resolved

Fixes #16634
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

However, regarding the issue of the undocked panes not respecting the selection on the View Panes menu, we shouldn't instead of docking the pane, save the window pane geometry and restored it when checking the pane entry again from the menu (keeping the undocked panes state)?

That's a very interesting idea! And something that will bring cool interactions in Spyder, like showing certain plugins on demand out of the main window. In other words, if users hide a plugin by going to View > Panes while it's undocked, and then press the shortcut to show it, with your suggestion it'd be displayed as undocked again.
I started to work on this idea but I think we'd need to differentiate between the Dock (bring back to the main window) and Close (hide) actions when the plugin is undocked for users to make sense of it. So I think it's work for another PR because my proposed fix is really simple but what you suggest would require things out of the current scope of this PR.

Seems like although the Outline is being showed along side the Editor (being the Outline previously not visible), the checkbox state for the Outline is not showing is visible. I think this is not caused by the changes done here but maybe could be worthy to fix it here?

That's a good point too, but we could discuss how to solve (or even if we should show the Outline next to the Editor) when we're migrating the editor to the new API. What do you think?

Then I think we need to create follow-up issues for both things for further discussion: the behavior when an undocked pane is requested to be hidden and the coherence between the Panes menu checkboxes and the maximize action (mostly for the Editor case where also the Outline is shown)

the behavior when an undocked pane is requested to be hidden

See PR #19784. I'll rebase and finish it after this one is merged.

the coherence between the Panes menu checkboxes and the maximize action (mostly for the Editor case where also the Outline is shown)

Instead of opening a new issue, I posted https://github.com/spyder-ide/spyder/issues/16265#issuecomment-1274109141 because precisely tracking if the Outline is visible when the Editor is maximized would help us to solve that issue in an intuitive way.

@dalthviz, given my last comment, I think this one is ready to be merged.

Note: I decided to rebase this PR in order to re-run our tests and check that everything is green, given that it's almost a month old.

source: gharchive/pull-request


text:
Fix link to marketplace

It looks like the link to the marketplace is broken and giving a 404.

Thanks!

authors: asakuchi nene

repo: sql-formatter-org/sql-formatter-vscode


text:
Redundant import of lib/pq when using sqlc.slice() with sqlc.narg() with MySQL

Version
1.26.0
What happened?
When I run sqlc generate with engine: "mysql and I use sqlc.slice(myslice) inside queries, in the generated file with Go code it inserts an import of "github.com/lib/pq" but it is not used in any code so my app does not compile after that.
It happens only when I use it in combination with sqlc.narg(myslice) because I want to ensure that if the argument is null I do not need to filter by it.
The problem is reproducible in the online playground, please look at the link I've attached. Thanks!
Relevant log output
No response
Database schema
No response
SQL queries
No response
Configuration
No response
Playground URL
https://play.sqlc.dev/p/96994ab9c5be500a74b65ba1e9e870a7dce1fccfae8bc2956909cba197698c5f
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go

Also, could you please guide me maybe how could I use sqlc.slice() to filter by it only in case if there are some elements in the slice? I see the current version of the code generation replaces the slice to NULL in the final SQL, how to use it correctly in that case?

I came across the same problem. The workaround I've found (although I don't like it, it is the only way I've found so far) is to add a new parameter "filter_by_names" of boolean type that I'm using to check whether I need to filter using the IN operator (which will be true if len(names) > 0).
So the condition will be something like:
sqlc.arg(filter_by_names) = false OR name in (sqlc.slice(names))

We use this workaround successfully
coalesce(name in (sqlc.slice(names)), true)

It does not filter by the slice in case if it is empty because sqlc.slice function returns null in that case and the result of the whole expression becomes true so the query understands there is no need for any filtering in that case.
Hope it helps.

authors: ScodroS dskarataev

repo: sqlc-dev/sqlc


text:
New-DbatoolsSupportPackage failure message

Is this:
Just place "x" to indicate selection (e.g. "[x]")

[ ] feature
[x] bug:

Steps to Reproduce
I executed the command with the default output and a specified path and still get the error message in screen shot.  However, a file is generated and has data in it.
Attached screen shots/console output

Can you zip and upload the data that was generated?

dbatools_support_pack_2017_07_07-11_25_31.zip

This is sorta my issue. I'll fix it.

repo: sqlcollaborative/dbatools


text:
[Bug] Restore-DbaDatabase Fails To Process Other Databases After Failure

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      5.1.14393.2879
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.2879
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

### dbatools Module version:

Name    : dbatools
Path    : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.804\dbatools.psd1
Version : 0.9.804

SQL Server:

Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64)   Aug 22 2017 17:04:49   Copyright (C) 2017 Microsoft Corporation  Developer Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor)

Errors Received

WARNING: [01:57:15][Restore-DbaDatabase] Failure | System.Data.SqlClient.SqlError: The log in this backup set begins at LSN 873000000062400001, which is too recent to apply to the database. An earlier log backup that includes LSN 850000002475000001 can be restored.

Steps to Reproduce
Database Backups on File System
Use Ola Hallengren's maintenance solution default directory structure.
Have a number of backups that work and can be restored, and one whose LSN is too recent to apply to the FULL or DIFF.
In the case of the above warning/error, I saw this as well:
VERBOSE: [01:45:46][Test-DbaBackupInformation] Testing restore for DBWithWeirdLSN
VERBOSE: [01:45:46][Test-DbaBackupInformation] VerifyOnly = False
VERBOSE: [01:45:46][Test-DbaLsnChain] Testing LSN Chain
VERBOSE: [01:45:46][Test-DbaLsnChain] Testing LSN Chain - Type Type
VERBOSE: [01:45:46][Test-DbaLsnChain] Passed LSN Chain checks
VERBOSE: [01:45:47][Test-DbaBackupInformation] Marking DBWithWeirdLSN as verified
I am not certain how to reproduce this particular LSN issue, but it seems to require that it will pass the LSN Chain check, but not the actual restore. I'm not sure this particular case matters though.
Command I ran:

    Restore-DbaDatabase -SqlInstance localhost -Path "E:\Restores" -DirectoryRecurse -MaintenanceSolutionBackup -UseDestinationDefaultDirectories -Verbose

Expected Behavior
The restore process would continue on after failing with one restore, restoring the rest as best as it could. Rather than giving up when an obstacle is found, it would try to do As Much As Possible, while still reporting failed parts to manually fix.
Actual Behavior
When the Restore-DbaDatabase started to actually restore databases after a lengthy check time, it was able to fully restore about 4% of the total databases before it started to restore the DB I'll call DBWithWeirdLSN. It restored the FULL backup of that DB, and then started applying LOGs to it, as the DIFF hadn't been taken yet for this database. It failed with the above warning message, and then all parts of the Restore-DbaDatabase ceased working, and I was back at the command prompt.
@potatoqualitee in the Slack channel mentioned that this was not the behavior they expected.
Backstory
I was testing out disaster recovery possibilities, using the most naive approach possible in case I was out. I had about 750 databases that needed to be restored, after pruning many of the databases for testing purposes, I had a small list of 180 or so databases I expected to be restored. Of those, only 56 or so were actually restored, and after modifying Select-DbaBackupInformation, I determined the problem: If a database had a DIFF in it, with no corresponding FULL, but the DIFF was still valid, Select-DbaBackupInformation would start to process this DB's backups, fail to find the FullName, and then stop all subsequent Selecting of valid Backups.
Examples:
2 DBs:
Parts_DB
Parts3_DB
As part of an application release process, Parts_DB is backed up, and restored under the name Parts3_DB, so at this point, the two DBs are essentially the same. ("A snapshot in time of the parts configuration".)
Full Backups are taken on Sunday, and it is Thursday. Diffs are taken on all other days, so a DIFF is taken today, using Ola's scripts. I'm not sure what's the best way to show this directory structure, so here goes:
Parts_DB Fulls
E:\Restores\Parts_DB\FULL\Parts_DB_FULL_Sunday1.bak
E:\Restores\Parts_DB\FULL\Parts_DB_FULL_Sunday2.bak
Parts_DB Diffs
E:\Restores\Parts_DB\DIFF\Parts_DB_DIFF_Monday1.bak
E:\Restores\Parts_DB\DIFF\Parts_DB_DIFF_Tuesday1.bak
...
E:\Restores\Parts_DB\DIFF\Parts_DB_DIFF_Thursday2.bak
E:\Restores\Parts3_DB\DIFF\Parts3_DB_DIFF_Thursday2.bak
E:\Restores\Parts3_DB\FULL DOES NOT EXIST
Since Parts_DB has a FULL backup that's valid, and Parts3_DB is restored from Parts_DB, then there's a valid FULL backup for Parts3_DB that a DIFF can go against, so the Ola scripts create the DIFF backup.
Fast forward to Select-DbaBackupInformation:
It receives the FormattedBackupInformation, and starts to process it to find valid backups: Once it starts to work on Parts3_DB.bak, it realizes that it can't find the Fullname property, and then stops processing all other 124 backups still left in the BackupHistory.
(Side note: There is nothing in here that will output the Database being processed, even in Verbose mode, so I had to add a number of print debug statements to figure out which DB was the problem. The new parameters for outputting the various BackupInformation variables were absolutely invaluable for determining which part of the script was dropping 75% of the databases from being restored!)
Once I deleted all the directories of DBs where DIFFs existed without FULLs, Select-DbaBackupInformation worked flawlessly (and then I ran into the above issue with LSNs).

Hi,
Sorry it's taken so long but I found a fault with out test rig that I had to fix first as this fix exposed a the problem.
Anyway, could you take it for a test please just to make sure it works on more than my test box. The zip file of the branch can be pulled from https://github.com/sqlcollaborative/dbatools/archive/restfixes.zip

Thanks Stuart. My initial test is positive, having reproduced the situation in the above ticket. I'll try a few more tests and then update the ticket.

@potatoqualitee can this issue be closed?

yes! thank you

authors: Stuart-Moore alevyinroc potatoqualitee willmccardell


text:
Connect-DbaInstance - Returned object is missing properties if -SqlInstance is of type Microsoft.SqlServer.Management.Smo.Server

If -SqlInstance is a string or of type DbaInstanceParameter, then everything is ok.
But if I accidentaly use a plain [Microsoft.SqlServer.Management.Smo.Server] object that has not yet the dbatools specific properties like ComputerName, they are NOT added by Connect-DbaInstance.
Is this a bug or a feature?
I would expect that Connect-DbaInstance always returns full objects with dbatools specific properties.
These steps should work on any system, but I ran them on en-US windows server 2016:
Import-Module -Name dbatools -MinimumVersion 1.0.116

# This is the official way, that works as expected:
$instObjectDba = [DbaInstanceParameter]'SRV1\SQL2017'
$instConnectDba = Connect-DbaInstance -SqlInstance $instObjectDba
$instObjectDba | Format-Table -Property *Name*
$instConnectDba | Format-Table -Property *Name*
$instConnectDba.Query('SELECT @@SERVERNAME AS Servername').Servername

<# Output:

ComputerName InstanceName FullName     FullSmoName  SqlComputerName SqlInstanceName SqlFullName
------------ ------------ --------     -----------  --------------- --------------- -----------
SRV1         SQL2017      SRV1\SQL2017 SRV1\SQL2017 [SRV1]          [SQL2017]       [SRV1\SQL2017]

ComputerName DbaInstanceName ClusterName ComputerNamePhysicalNetBIOS FilestreamShareName InstanceName NamedPipesEnabled NetName ServiceName SqlCharSetName SqlSortOrderName Name         DomainName DomainInstanceName
------------ --------------- ----------- --------------------------- ------------------- ------------ ----------------- ------- ----------- -------------- ---------------- ----         ---------- ------------------
SRV1         SQL2017         SQLCluster  SRV1                        SQL2017             SQL2017                  False SRV1    SQL2017     iso_1          nocase_iso       SRV1\SQL2017 SMO        SRV1\SQL2017

SRV1\SQL2017

#>

# What if I accidentaly use a plain [Microsoft.SqlServer.Management.Smo.Server]?
$instObjectSmo = [Microsoft.SqlServer.Management.Smo.Server]'SRV1\SQL2017'
$instConnectSmo = Connect-DbaInstance -SqlInstance $instObjectSmo
$instObjectSmo | Format-Table -Property *Name*
$instConnectSmo | Format-Table -Property *Name*
$instConnectSmo.Query('SELECT @@SERVERNAME AS Servername').Servername

<# Output:

ClusterName ComputerNamePhysicalNetBIOS FilestreamShareName InstanceName NamedPipesEnabled NetName ServiceName SqlCharSetName SqlSortOrderName Name         DomainName DomainInstanceName
----------- --------------------------- ------------------- ------------ ----------------- ------- ----------- -------------- ---------------- ----         ---------- ------------------
SQLCluster  SRV1                        SQL2017             SQL2017                  False SRV1    SQL2017     iso_1          nocase_iso       SRV1\SQL2017 SMO        SRV1\SQL2017

ClusterName ComputerNamePhysicalNetBIOS FilestreamShareName InstanceName NamedPipesEnabled NetName ServiceName SqlCharSetName SqlSortOrderName Name         DomainName DomainInstanceName
----------- --------------------------- ------------------- ------------ ----------------- ------- ----------- -------------- ---------------- ----         ---------- ------------------
SQLCluster  SRV1                        SQL2017             SQL2017                  False SRV1    SQL2017     iso_1          nocase_iso       SRV1\SQL2017 SMO        SRV1\SQL2017

SRV1\SQL2017

#>

# I can use the object, but I miss dbatools specific properties like ComputerName.

This is by design. The purpose of the connect command is to output the SMO server object. It will accept input of string or object only. The computer property does not get added in this function.

i'd say this is both by design and a bug 😅  it just checks if it's an SMO object and returns it, expecting that the object was created by dbatools. I didn't consider someone creating a simple class and passing it on. Connect-DbaInstance could use a fresh set of eyes, please feel free to check for our standard properties and add them if they are missing. Perhaps even extracting the connectionstring from $server.ConnectionProperties (I forget the property) then just repassing it to Connect-DbaInstance.

#6246

Solved with the experimental code path from #6904.

authors: andreasjordan potatoqualitee wsmelton


text:
Master

Type of Change

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

Purpose

Approach

Commands to test

Screenshots

Learning

hey liuwilli! Thank you for the PR. Unfortunately, no changes were made, this PR will be closed. If you need assistance with github, feel free to join us in #dbatools at aka.ms/sqlslack

authors: liuwilli potatoqualitee


text:
Plugability - to support different SQL Databases

In order to support millions of customers, the product should be customizable for different databases which exist currently and which may come up in the future.
However, we can define a few popular SQLs as a priority and get to fix the pluggability issues in current architecture

Use Factory at Java Mapper ( May be Class Scanner based Naming conventions on column type)
For FTM Try IMPORTS
Column Type as Enum Extensions

authors: nagkumar sathishk

repo: sqlcomponents/sqlcomponents


text:
Problem SqlResult Property Bindings?

Example:

Problem

It was to have 2 parameters !!!!!

Problem

Problem resulting in ordering the parameters go wrong !!!
Code:
https://github.com/sqlkata/querybuilder/blob/4e5030da774e048115461226ca0cd4dedbc32d6a/QueryBuilder/BaseQuery.cs#L46
var bindings = Get(item, engine)
                    .SelectMany(clause => clause.GetBindings(engine))
                    .Where(x => x != null);

I don't know if I can skip checking for !=null in the bindings, so maybe I should finding another way to deal with null values in insert and update queries like replacing the null with another temporary values, then replace it back when compiling the query

@ahmad-moussawi
I had come across this myself in my local dev branch before and I ended up replacing c# null's for parameter assignments with DBNull.Value. It seems like the only real way to be able to use a parameter for the value but still assign a NULL value.
The only issue here is that netstandard1.6 will then require a dependency on System.Data.Common for the type DBNull but from what I know; it works with the PgSql driver and MySql driver. The type is included in the netstandard2.0 framework by default and of course netfx.

@ceastwood thanks for the info, actually no need to use this specific type, we can use any other type just to simulate this, I already started to work on this, I will push my commits the soonest

Fixed in https://github.com/sqlkata/querybuilder/commit/868057145a91ca7bd5e91ed6c81285270d646a3f, I will publish a new package tonight, let me know if you have any tought about it, thanks

@ahmad-moussawi in test, example:
SqlServerCompiler s = new SqlServerCompiler();
MySqlCompiler m = new MySqlCompiler();
PostgresCompiler p = new PostgresCompiler();

Query qInsert = new Query("Owe");
qInsert.Insert(new Dictionary<string, object>
{
	["Name"] = "Nome1",
	["Created"] = null
});

Query qUpdate = new Query("Owe");
qUpdate
	.Where("Id", 1)
	.Update(new Dictionary<string, object>
	{
		["Name"] = "Nome1",
		["Created"] = null
	});

var ssInsert = s.Compile(qInsert);
var mmInsert = m.Compile(qInsert);
var ppInsert = p.Compile(qInsert);

var ssUpdate = s.Compile(qUpdate);
var mmUpdate = m.Compile(qUpdate);
var ppUpdate = p.Compile(qUpdate);

Console.WriteLine("[INSERT]");
Console.WriteLine("=========================================================================");
Console.WriteLine(ssInsert); Console.WriteLine(ssInsert.Sql); Console.WriteLine(ssInsert.RawSql);
Console.WriteLine();
Console.WriteLine(mmInsert); Console.WriteLine(mmInsert.Sql); Console.WriteLine(mmInsert.RawSql);
Console.WriteLine();
Console.WriteLine(ppInsert); Console.WriteLine(ppInsert.Sql); Console.WriteLine(ppInsert.RawSql);
Console.WriteLine();

Console.WriteLine("[UPDATE]");
Console.WriteLine("=======================================================================");
Console.WriteLine(ssUpdate); Console.WriteLine(ssUpdate.Sql); Console.WriteLine(ssUpdate.RawSql);
Console.WriteLine();
Console.WriteLine(mmUpdate); Console.WriteLine(mmUpdate.Sql); Console.WriteLine(mmUpdate.RawSql);
Console.WriteLine();
Console.WriteLine(ppUpdate); Console.WriteLine(ppUpdate.Sql); Console.WriteLine(ppUpdate.RawSql);
Console.WriteLine();

Ouput
[INSERT]
===========================================================================
INSERT INTO [Owe] ([Name], [Created]) VALUES ('Nome1', NULL) (First)
INSERT INTO [Owe] ([Name], [Created]) VALUES (@p0, @p1)
INSERT INTO [Owe] ([Name], [Created]) VALUES (?, ?)

INSERT INTO `Owe` (`Name`, `Created`) VALUES ('Nome1', NULL) (First)
INSERT INTO `Owe` (`Name`, `Created`) VALUES (@p0, @p1)
INSERT INTO `Owe` (`Name`, `Created`) VALUES (?, ?)

INSERT INTO "Owe" ("Name", "Created") VALUES ('Nome1', NULL) (First)
INSERT INTO "Owe" ("Name", "Created") VALUES (@p0, @p1)
INSERT INTO "Owe" ("Name", "Created") VALUES (?, ?)

[UPDATE]
============================================================================
UPDATE [Owe] SET [Name] = 'Nome1', [Created] = NULL WHERE [Id] = 1 (First)
UPDATE [Owe] SET [Name] = @p0, [Created] = @p1 WHERE [Id] = @p2
UPDATE [Owe] SET [Name] = ?, [Created] = ? WHERE [Id] = ?

UPDATE `Owe` SET `Name` = 'Nome1', `Created` = NULL WHERE `Id` = 1 (First)
UPDATE `Owe` SET `Name` = @p0, `Created` = @p1 WHERE `Id` = @p2
UPDATE `Owe` SET `Name` = ?, `Created` = ? WHERE `Id` = ?

UPDATE "Owe" SET "Name" = 'Nome1', "Created" = NULL WHERE "Id" = 1 (First)
UPDATE "Owe" SET "Name" = @p0, "Created" = @p1 WHERE "Id" = @p2
UPDATE "Owe" SET "Name" = ?, "Created" = ? WHERE "Id" = ?

I could see that it is to use the first solution for Dapper?

@fulviocanducci the SqlResult.ToString() is used only for debugging purposes, so it should not used to execute queries directly, for Dapper you should use the SqlResult.Sql property, and it's Dapper's responsibility to take care on how to pass null parameters, check https://stackoverflow.com/a/21638928/1104402 from the Owner of Dapper

@ahmad-moussawi Ok
Are you planning a new nuget package with this modification?

@fulviocanducci, it's solved now, and published on nuget under beta-355, thanks for reporting!

authors: ahmad-moussawi ceastwood fulviocanducci

repo: sqlkata/querybuilder

license: mit

license_source: bigquery


text:
Add negative tests for POSITION

While reviewing https://github.com/sqlparser-rs/sqlparser-rs/pull/463 I noticed the error condition was not covered. Added test coverage here. cc @yuval-illumex

Pull Request Test Coverage Report for Build 2219562964

11 of 11 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 90.403%

Totals

Change from base Build 2219558740:
0.02%

Covered Lines:
8035

Relevant Lines:
8888

💛  - Coveralls

@alamb Thanks! I wanted your feedback on your code before adding tests, so thank you for this PR :)

@alamb Thanks! I wanted your feedback on your code before adding tests, so thank you for this PR :)

No problem -- I didn't want to drag out the PR any longer as we had already had several back and forths. If you have more tests in mind, another PR would be great!

authors: alamb coveralls yuval-illumex

repo: sqlparser-rs/sqlparser-rs


text:
[sp_SrvPermissions] endpoint & HADR ownership

Using sp_SrvPermissions to clean one instance, I couldn't drop a login which had only CONNECT rights.
It occured that this login still owned one Endpoint and one Availability Group.
It should be very useful to have those ownerships added to sp_SrvPermissions.
Regards,
Yves

sp_SrvPermissions isn't really meant to list out what objects a principal owns.  I am however working on a script that will list out objects that need to be cleaned up (and scripts to do it) before dropping a user/login.

Thanks for your answer
Unexcepted Authorization on objects is a real pain to handle when managing logins


text:
Provide kochiku_env to resque build_attempt jobs

Needed for kochiku-worker PR https://github.com/square/kochiku-worker/pull/37
Together, the PR's will provide the environment variable $KOCHIKU_ENV to build attempt jobs, containing the current RAILS_ENV on kochiku.

LGTM

authors: Shenil robolson

repo: square/kochiku


text:
Port basic DistinguishedNameParserTest from AOSP

Port the test from http://r.android.com/183814 . This consists of two commits:
(1.) minimal changes to make the test compile and runnable, (2.) update
expectations to current behavior to make the test pass.
DistinguishedNameParser is an internal API, so this test is mostly to ensure
that any future behavior changes are deliberate.

Neat.

repo: square/okhttp


text:
Expose static mapping operators on Query.

These match the convenience methods on QueryObservable, but are available for use later in the stream (e.g., after a take() operator) via lift().
Closes #69.

Looks great :shipit:

authors: AlecStrong JakeWharton

repo: square/sqlbrite


text:
Crash on Map Score Import

If you input my username and try to import this map: https://osu.ppy.sh/beatmapsets/43466#osu/136400, then it crashes.
I have a hunch that this is due to me having 4 scores (HR, NM, HD, and EZ) on it.

I just encountered the same issue on this map: https://osu.ppy.sh/beatmapsets/55945#osu/169450
This time I have 5 scores on it (HD, HR, EZ, NFDT, EZDT).
I believe you may need to adjust your program to account for having multiple scores.

Considering I just crashed on this map: https://osu.ppy.sh/beatmapsets/25828#osu/106033, I believe the issue is actually not being able to handle old .osu file formats.

Almost forgor the errlog.txt
errlog.txt

Duplicate of #6: The reason these crashes occurred for each map is related to that the file formats are old, as you mentioned.
I will aim towards fixing this by the next update (v0.88.0).
Also, as stated in the readme, when there are multiple scores set on the same map, only the highest score is chosen to be imported.


text:
sql/index/pilosa: implement negation indexes

Closes #291
Depends on #289

could you rebase please?

Rebased

Done @ajnavarro

Done @mcarmonaa

Right now, CI is failing due to breaking changes merged into pilosa. Should we wait until they're fixed on master or just merge it @ajnavarro?

we should fix master first.

Rebased against master

CI passing now.

Shall we merge this @ajnavarro?x

authors: ajnavarro erizocosmico

repo: src-d/go-mysql-server


text:
Feature suggestion: add to category and remove from category

I have my site showing only specific category (news) on home page. I need posts to expire by getting removed from that category so they don’t show on home page anymore, but are still visible in other categories on the site. Is it possible to add a feature “remove category” (example: news) and “add category” (example: archive) after expiration?
I was using the plugin Content Scheduler which had such functionality but unfortunately its not maintained anymore.. https://wordpress.org/plugins/content-scheduler/

Hi @yerb, thanks for the request. There's a few other pending issues that involve the core functionality (e.g. #1, and #2) that should be addressed before adding new features. However, I will keep this issue open as an option, but to manage your expectations, I probably will not implement this anytime soon.
That being said, I'm more than happy to review/accept pull requests/patches!
Thanks,
Steve

authors: srguglielmo yerb

repo: srguglielmo/Content-Expiration


text:
added some changes

done the work

Requested changes are commited through another PR. #22 . Hence merging both the PRs.

Merging this becuase of no response.

authors: aryan-chawla srinibasbiswal

repo: srinibasbiswal/Github-Profile-README


text:
Sorted set processed in reverse

It appears that the zadd callback is called in reverse order (descending, highest to lowest score). Is there any way to process the sorted set in ascending order?

No, there isn't a way to control that. We process the entries in the order in which they are stored in the rdb file. The parser is stateless, it is designed to use as little memory as possible during parsing. Returning records in a different order will require holding all elements in memory, and that isn't a good idea.
You can easily solve this by writing a new class that extends RdbCallback. Accumulate records in zadd, in end_sorted_set method sort all the records and apply your business logic.

authors: fristedt sripathikrishnan

repo: sripathikrishnan/redis-rdb-tools


text:
MacV(tap/lan) interfaces

This is to support macvlan and macvtap interfaces in the endpoint section of the topology definition.
  links:
    - endpoints: ["l1:eth1", "macvlan:enp4s0f0"]
    - endpoints: ["l1:eth2", "macvtap:enp4s0f0"]

This PR implements #1393.

I had to base this PR on top of #1395.

I am not yet 100% sure if we should probably dissociate from the rather simple format we used for the endpoints and come up with some more formal struct.
We're right now forcing everything into this format of a slice with two elements... that already make up 4 pieces of information. 2x (Node + Interface)
We should have these seperated and probably also define an endpoint type and somehow get rid of the to the most extend procedural way of wiring the labs up.
Opinions? @hellt ?

@steiler can you rebase this please on top of the main branch? I just merged #1395

We're missing docs.
Also in my opinion we should only allow a new kind of link definition for the this type of interfaces, although this PR allows defining them via a fake node "macvlan" or "macvtap" in the links section.

@steiler with #1450 merged we can move this one I believe

With a recent forced push I have rebased this PR on top of the current main, to include the work done in #1450

authors: hellt steiler

repo: srl-labs/containerlab


text:
🛑 Plex is down

In 19f0fa2, Plex (https://plex.srueg.ch/identity) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Plex is back up in 0806820 after 9 minutes.

repo: srueg/upptime


text:
Test covergage

Included code coverage and better tests with exceptions

 Quality Gate failed
Failed conditions  D Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
 Catch issues before they fail your Quality Gate with our IDE extension  SonarLint

Missed the assertion in the test. Is there a chance to include it in this PR without much problem?

repo: ssciwr/mailcom


text:
webroot documentation enchancment

I don't know if it's just me but it took me a while to figure out I had to set the webroot to the public folder with nginx.
Initially I had root /var/www/BookStack but needed to do root /var/www/BookStack/public
Maybe a good idea to add it to the install instructions at the bottom for nginx.

@vladware Thanks for letting me know about this, Really surprised there was no mention of that in the installation docs. Will update the installation instructions soon.

authors: ssddanbrown vladware

repo: ssddanbrown/BookStack


text:
More logging around cosign signature verification

Describe the bug
We are observing that Connaisseur is intermittently taking too long to verify signatures and doesn't respond within the timeout of 30s. On enabling debug logs we see that it's the cosign process that is taking longest duration to return from a successful verification. For example
{"timestamp": "2023-09-13 22:20:47.049919", "message": "", "kind": "AdmissionReview", "apiVersion":
<...>

{"timestamp": "2023-09-13 22:20:47.057010", "message": "starting verification of image \"<image-name>:<tag>\" using rule \"<foo-rule>\" with arguments {'threshold': 1, 'trustRoot': '*', 'verifyInTransparencyLog': False} and validator \"cosignvalidator\".", "policy_rule": "<foo-rule>", "validator": "cosignvalidator", "admission_review": {"user": "system:serviceaccount:flux-system:helm-controller", "operation": "UPDATE", "kind": "Deployment", "name": "<foo-deployment>", "namespace": "<foo-ns>"}, "image": "<image-name>:<tag>"}

{"timestamp": "2023-09-13 22:20:56.644393", "message": "COSIGN output of trust root '<key-1>' for image'<image-name>:<tag>': RETURNCODE: 0; STDOUT: {\"critical\":{\"identity\":{\"docker-reference\":\"<image-name>\"},\"image\":{\"docker-manifest-digest\":\"sha256:<digest>\"},\"type\":\"cosign container image

{"timestamp": "2023-09-13 22:20:59.507098", "message": "COSIGN output of trust root '<key-2>' for image'<image-name>:<tag>': RETURNCODE: 0; STDOUT: {\"critical\":{\"identity\":{\"docker-reference\":\"<image-name>\"},\"image\":{\"docker-manifest-digest\":\"sha256:<digest>\"},\"type\":\"cosign container image

{"timestamp": "2023-09-13 22:20:59.507527", "message": "successful verification of image \"<image-name>:<tag>\"", "admission_review": {"user": "system:serviceaccount:flux-system:helm-controller", "operation": "UPDATE", "kind": "Deployment", "name": "<foo-deployment>", "namespace": "<foo-ns>"}, "image": "<image-name>:<tag>"}

Observe that the verification begins almost immediately after Connaisseur receives the request but to return from cosign verify process, it takes almost 10 seconds. Even with debug logs enabled, we have no visibility into why it takes so long to verify the signature. There should be more logging around the individual steps done in cosign verify process (contacting the registry, verification with trust roots etc.) so that users know where the problem is.
Expected behavior

Optional: To reproduce

Optional: Versions (please complete the following information as relevant):

Kubernetes Cluster: v1.26
Connaisseur: v3.0.0

I've adapted the call to Cosign such that if Connaisseur is running in debug mode, we'll also call Cosign with --verbose, which should somewhat increase visibility. I don't think it gets much better than that since we're calling the Cosign binary as an opaque blob and just get whatever comes out, so also don't get too much information

authors: Starkteetje dbbhat

repo: sse-secure-systems/connaisseur


text:
TargetPlatform.windows is not yet supported by the plugin

i have tried to run app in windows desktop
in plugin header have supported in windows.
but app show text:
"TargetPlatform.windows is not yet supported by the plugin"
is there any something to setup again in app code...
especially in folder windows ?
thanks...

Actually this library depends on https://pub.dev/packages/admob_flutter.
So, windows platform is not supported.
Sorry @awinkwinky

ok.. i understand...
thank you very much for your information...

I too came here hoping for desktop/web support , can you remove those platforms in the project's support list. Thanks for your work!

license: ISC


text:
Allow for additional S3 Origin props, mostly for security reasons

Resolves #3469
Needed for Rollback capability without compromising security: https://discord.com/channels/983865673656705025/1167264627709722635
Sorry for the additional commits, will clean up as soon as https://github.com/sst/sst/pull/3436 is merged.  Anything I try to do to solve it closes the other PR.  I normally use branches, but the prior PR is blocking our ability to deploy.

Did you want to update this guy now that the other one has been merged? Or is it good to be reviewed?

Good to go.  The diff is correct even if the commit history is off.

Sorry about the V1, ill pay more attention.

Oh not at all! The updated examples in docs really helps.

authors: dkershner6 fwang jayair

repo: sst/sst


text:
Favicon

Need to add a favicon

Resolved in https://github.com/ssuds/ssuds.github.io/commit/17895200eadb6ddb988b770026733a4ccee1a8e9


text:
2.3.1 JSON no longer escaped.

Hi,
I just upgraded to 2.3.1 and the following query no longer returns JSON escaped
Select array_to_json(array_agg(row_to_json(A))) from (SELECT tablekey, tablename, ClientKey, CreatedDate, tableID
FROM public.table
      ) A

Before with 2.3.0:
[{"tablekey":1,"tablename":"Collection 1","clientkey":1,"createddate":"2020-02-05T00:00:00","tableID":"5f2134234q2342342324"}]
Now with 2.3.1:
[{tablekey: 1, tablename: Collection 1, clientkey: 1, createddate: 2020-02-05T00:00:00, tableID: 5f2134234q2342342324}]
Have you any ideas if there's something I need to change on my end or is it a bug?

Please follow the repository/homepage url of the package, 2.3.1 is now published from a fork. It did have a change that has an effect on this behaviour: https://github.com/isoos/postgresql-dart/pull/3
I'm not sure if the new behaviour is a bug, or a bugfix though. It kind of makes sense either way...

Hi, thanks for your reply. I think it's a bug as the response from any PostGreSQL client is as it was with 2.3.0 and now the output isn't valid JSON any more.
I'm a bit new to GitHub so what's the best way to raise this?

I think the output is now a Map (which can be converted to JSON string via json.encode()). Having a Map there seems to be better, as it returns a parsed structure instead of a string that you need to parse...

authors: isoos zambetpentru

repo: stablekernel/postgresql-dart


text:
Two frames contact pr

This PR is related to the issue "TSID for "pantograph/biarticular" robot leg design" https://github.com/stack-of-tasks/tsid/issues/165
I want to share the code I wrote to create a new type of contact following the discussion in the mentioned PR.
The main aim of this PR is to give the TSID dynamics formulation the ability to work with closed kinematic chains specified via user code (not URDF).
This PR adds two new items:

New motion task: TwoFramesEquality. This task can be used to force some frames of the robot to keep their relative displacement zero. The main difference with SE-Equality is that the TwoFramesEquality works with the relative placement of the frames, so the frames will be 'glued' to each other, not to the specified world position.
New contact type: TwoFramesContact. This contact uses the TwoFramesEquality motion task as it's base emulating a ball joint via using only translation part of the mask to non-zero.

The usage of TwoFramesContact alongside with zero actuation bounds allows to create a closed kinematic chains in current TSID formulation (with current version of Pinocchio and URDF parser). The contact should be created bu user via TwoFramesContact creation.
The PR also includes a minimal example showing how to add a closed kinematic chain to Talos gripper mechanism via demo/demo_talos_gripper_closed_kinematic_chain.py
This is the sample how this gripper works without additional contact:

This is the sample how this gripper works with additional contact via TwoFramesContact thus creating a closed kinematic chain:

Regarding the code: there are many virtual methods in conact-base.hpp not relevant to the concept of TwoFramesContact like setContactNormal, etc. Also the underlying motion task can be only the SE3Equality so the PR code contains some rudimentary methods to mitigate this in not very elegant way, may be some refactoring is required?

Hi ! This project doesn't usually accept pull requests on the main branch.
If this wasn't intentionnal, you can change the base branch of this PR to devel
(No need to close it for that). Best, a bot.

Thanks for this PR. I'm currently very busy, but I'll try to review this next week.

authors: andreadelprete egordv hrp2-14

repo: stack-of-tasks/tsid


text:
Revamp Hive image build process

Description
Revamps Hive image

Separate builder stage (image is smaller)
Hive builds from source now which requires a patch to even build
It uses Hadoop as a direct dependency which means Hadoop is built and the jars from it are directly used
A /stackable/package_manifest.txt file is written to ease debugging
README improvements
HBase Log4J env variable was in the builder -> moved to final image
Fix tabs in trino uploader

Definition of Done Checklist

Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
Please make sure all these things are done and tick the boxes

- [ ] Changes are OpenShift compatible
- [ ] All added packages (via microdnf or otherwise) have a comment on why they are added
- [ ] Things not downloaded from Red Hat repositories should be mirrored in the Stackable repository and downloaded from there
- [ ] All packages should have (if available) signatures/hashes verified
- [ ] Does your change affect an SBOM? Make sure to update all SBOMs

The kerberos-hdfs tests fail. In the hive metastore logs, I see:
│ 2024-03-03T18:52:10,197 ERROR [pool-11-thread-34] server.TThreadPoolServer: Error occurred during processing of message.                                                                                │
│ java.lang.RuntimeException: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream                                                                                │
│     at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219) ~[hive-exec-3.1.3.jar:3.1.3]                                                                       │
│     at org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory$1.run(HadoopThriftAuthBridge.java:694) ~[hive-exec-3.1.3.jar:3.1.3]                                │
│     at org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory$1.run(HadoopThriftAuthBridge.java:691) ~[hive-exec-3.1.3.jar:3.1.3]                                │
│     at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_402]                                                                                │
│     at javax.security.auth.Subject.doAs(Subject.java:360) ~[?:1.8.0_402]                                                                                │
│     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1855) ~[hadoop-common-3.3.4.jar:?]                                                                                │
│     at org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory.getTransport(HadoopThriftAuthBridge.java:691) ~[hive-exec-3.1.3.jar:3.1.3]                         │
│     at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:269) [hive-exec-3.1.3.jar:3.1.3]                                                                                │
│     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_402]                                                                                │
│     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_402]                                                                                │
│     at java.lang.Thread.run(Thread.java:750) [?:1.8.0_402]                                                                                │
│ Caused by: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream                                                                                │
│     at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:328) ~[hive-exec-3.1.3.jar:3.1.3]                                                                                │
│     at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41) ~[hive-exec-3.1.3.jar:3.1.3]                                                                                │
│     at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216) ~[hive-exec-3.1.3.jar:3.1.3]                                                                       │
│     ... 10 more                                                                                │
│ 2024-03-03T18:52:10,584  INFO [pool-11-thread-3] retry.RetryInvocationHandler: java.io.IOException: DestHost:destPort listener-hdfs-namenode-default-0.kuttl-test-tight-lobster.svc.cluster.local:8020 , Local │
│ Host:localPort hive-metastore-default-0/10.244.1.25:0. Failed on local exception: java.io.IOException: Couldn't set up IO streams: java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteB │
│ uffer;, while invoking ClientNamenodeProtocolTranslatorPB.getFileInfo over /10.0.183.78:8020 after 14 failover attempts. Trying to failover after sleeping for 8808ms.

If that error is logged regularly it could be the same thing we are seeing here: i.e. non-critical, but happens when any connection handshake is not properly kerberized. I've re-started the (nightly) tests to see if it was due to cluster instability, as they all failed.

Good to know. The error message is repeated until the test times out after 10 minutes.

This is probably ready to merge but we decided to wait until after the 24.3 release

@adwk67 @razvan do you think the child failures could be related?
If not... This is ready to review again.

do you think the build failures could be related?

the publish actions failed most likely due to the registry outage. everything looks good again

do you think the build failures could be related?

the publish actions failed most likely due to the registry outage. everything looks good again

Thanks! I was referring to this comment on Kerberos failures.

do you think the build failures could be related?

the publish actions failed most likely due to the registry outage. everything looks good again

Thanks! I was referring to this comment on Kerberos failures.

Ah. At least it doesn't seem to be a regression. I'd say go for it.

authors: lfrancke razvan

repo: stackabletech/docker-images


text:
AWS EC2: Debian 10 template

Build a Debian 10 template for AWS EC2.

By now, we have switched to managed K8s completely and we can drop this issue.
(fyi @Jimvin )


text:
Add graphcms

Create a new CMS in /content/cms as graphcms
Add icon for GraphCMS
Add 3 OSS themes for GraphCMS (Blog, Commerce, Marketing Website)

@ronakganatra thanks for a great submission!

authors: JugglerX ronakganatra

repo: stackbit/jamstackthemes


text:
ERROR: Application Error, Bolt not able to import entire Github repo in the workbench

Describe the bug
When I try to import small github repositories with 2-3 files, it works perfectly fine. But when I import a big github repo like stablitz bolt.diy it shows Application Error on the FrontendTypeError: Cannot read properties of undefined (reading 'runner')
Link to the Bolt URL that caused the error
http://localhost:5173/chat/30
Steps to reproduce

Clone the bolt.diy repo
Run the setup and start the app on localhost
Click on "Clone a Git Repo"
Add the github repo url: https://github.com/stackblitz-labs/bolt.diy
Click on Ok

Expected behavior
It should successfully load the entire github repository with all files and structures, so that it can be reference using Anthropic Claude 3.5 sonnet
Screen Recording / Screenshot

Platform

OS: macOS
Browser: Chrome
Version: latest version

Provider Used
Tried with Anthropic and OpenAi
Model Used
Claude 3.5 Sonnet, Gpt-4o
Additional context
No response

you will not be able to import bolt on bolt at the moment, as it has the system prompts inside the repo causing problems with the actual parser which is also trying to parse the system prompt from the cloned repo..
this is a rare scenario might only happen with bolt repo

authors: fahadpatel-nc thecodacus


text:
Stackblitz not available for Firefox last version

Describe the bug
When I tried to access to https://stackblitz.com/edit/vitejs-vite-oxbwzk?embed=1&file=vite.config.ts&view=preview, I get the following message:

Surprisingly, my browser is compatible).
Link to the blitz that caused the error
https://stackblitz.com/edit/vitejs-vite-oxbwzk?embed=1&file=vite.config.ts&view=preview
Steps to reproduce

Go on the link
Don't have access to the preview

Expected behavior
Get access to the preview as expected.
Parity with Local

[X] I have run the project in my local machine and I could not reproduce the issue.

Screenshots
No response
Platform

OS: Windows
Browser: Firefox
Version: 112

Additional context
No response

Thanks for reporting this issue! Will look into this right now!

Hi @edimitchel. Is there a reason you opened the embed view instead of the regular view?
Currently embedding is only supported in Chromium-based browsers and that's why you see that message because the checks are different.

Good question, it's a mistake from the repo. Probably, the message could be more explicit about this situation to tell people the embed is still not working for few browsers. Especially, broswers icons are all blue suggesting all broswers are supported which is not true.

authors: SamVerschueren edimitchel

repo: stackblitz/webcontainer-core


text:
Use deriving strategies for Hapistrano's Monad

As it is now, we Hapistrano is using the following monad stack:
https://github.com/stackbuilders/hapistrano/blob/f3fbe9a34cde5c645cbb4d51a48647a80ea00b92/src/System/Hapistrano/Types.hs#L49
Using deriving strategies The monad could be implemented like the following:
newtype Hapistrano (a :: Type) = Hapistrano {unHapistrano :: Config -> IO a}
  deriving (Functor, Applicaitve, Monad, MonadThrow) via (ReaderT Config IO)

That could remove the current monad stack and also lift operations between them, exceptions could be caught at top level during the execution of commands and could simplify the code a bit.
For backward compatibility, we might use CPP as well to keep the monad stack or choose the new monad as well.
Let me know how does this sound :smile:

This looks doable. I have a question regarding the usage of MonadCatch here (which would need to be added to the instances of the newtype): to preserve the ability to handle the current error we have, i.e. the pair (Failure, Maybe Release), we would define something like this:
newtype FailureException = FailureException { unFailureEx :: (Failure, Maybe Release) }
  deriving (Show, Typeable)

instance Exception FailureException

is that right? In that case, I think the refactor could be quite easy to carry out.

Yeah, I think that would do. You could also use anyclass as well for the instance of Exception.
newtype FailureException = FailureException { unFailureEx :: (Failure, Maybe Release) }
  deriving (Show, Typeable)
  deriving anyclass Exception

Hey @ibarrae Would you mind if I pick this one? I haven't touch this new type of deriving and I'd love to learn more about it.

For sure @CristhianMotoche :rocket:

Solved in #204

authors: CristhianMotoche DavidMazarro ibarrae

repo: stackbuilders/hapistrano


text:
[Feature request] Block, mute, and hide

As a user I would like to be able to curate my experience and my threads on stacker news by having the ability to block or mute other users and hide comments I consider low-quality.
Block: a user who is blocked will not be able to see or reply to my submitted topics or my comments on other topics. I will also not see submitted topics or comments from a blocked user.
Mute: I will not see submitted topics or comments from a muted user.
Hide: I can hide comments on my submitted topics so that neither I nor other users who visit the topic see them in the "Hot", "Recent" or "Top" comment views. Hidden comments can be seen by clicking a "Hidden" button in the comment filter menu.

I agree. We'll be making it so stackers get their own web of trust soon and I suspect it'll be relatively trivial to introduce pov features like this then.

[ ] mute
[ ] block
[ ] hide

Mute is done. I'm hoping that provides some relief and I'm hoping we can address the problems underlying the other requests with personalized ranking. Going to leave open pending attempts at that.

authors: huumn john-light


text:
yoga: xena merge

feat: bump bifrost tag
feat: bump bifrost for centos
CI: Skip aio jobs based on changed files
CI: Add missing condition to PR workflow
CI: Add conditions to PR workflow

CI passing

repo: stackhpc/stackhpc-kayobe-config


text:
Invalid Client Encoding for PostgreSQL

Theclient_encoding type UTF-8 set via the GORM config here is invalid. Postgres defines it as UTF8 per the docs. This is causing connection failures in some environments.
panic: simple protocol queries must be run with client_encoding=UTF8
Error creating table for "*schema.Versions": simple protocol queries must be run with client_encoding=UTF8

This is part of a larger issue around how the database is configured. The full connection string is dependent on injected params in code (ex. password and client_encoding) and in the helm templates (statement_timeout, pool_min_conns, pool_max_conns). This is causing problems with non vanilla postgres environments. The full connection string should be configurable and not have injected values to prevent these issues.
Example: When using a connection pooler like PGBouncer, parameters like statement_timeout are not supported and cause a hard fail error on connection.

https://github.com/stackrox/stackrox/pull/2615#issuecomment-1206308628

Will this be included in the next release? I haven't seen it applied to any of the Release Candidates.

@rfizzle I will close this ticket as the UTF8 issue is fixed, we are working towards addressing the other configuration issues described above

authors: connorgorman janisz rfizzle

repo: stackrox/stackrox


text:
remove shh and git volumes

The git config and ssh keys are mounted into the build container to
grant access to private repositories for go build. This is no longer
necessary after the open-sourcing of Stackrox. Go dependencies can
simply be pulled via the default https git config and no ssh keys are
needed.
Checklist

[x] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on stackrox/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
make image on macOS using a colima Kubernetes setup.

@porridge Since I know you use Linux, could you give it a try?

The fast-central target fails for me but the message seems unrelated - does it require an available k8s cluster? 🤔
Is there an easier way to test this change?
$ make fast-central
+ deps
+ fast-central
docker run --rm -w /src -e GOPATH=/go -v/home/mowsiany/go/src/github.com/stackrox/stackrox:/src:delegated -v /home/mowsiany/go/src/github.com/stackrox/stackrox/linux-gocache:/linux-gocache:delegated -v /home/mowsiany/go:/go:delegated quay.io/stackrox-io/apollo-ci:stackrox-build-0.3.35 make fast-central-build
Unable to find image 'quay.io/stackrox-io/apollo-ci:stackrox-build-0.3.35' locally
stackrox-build-0.3.35: Pulling from stackrox-io/apollo-ci
8dfe9326f733: Pull complete
0d875a68bf99: Pull complete
53463f2d9521: Pull complete
fe0ad96a4ca9: Pull complete
c25f72c2f067: Pull complete
2ba21bfe8c8b: Pull complete
3228aaf593da: Pull complete
0d419acf0c57: Pull complete
5eff79469ad6: Pull complete
17a71886ee58: Pull complete
e8c736cf4500: Pull complete
ef8cab27fdd5: Pull complete
Digest: sha256:2b8fae428b54c57175c289f883438dfbe78ac2c72f9fe5ad5f8e7e79a4a9b28d
Status: Downloaded newer image for quay.io/stackrox-io/apollo-ci:stackrox-build-0.3.35
+ fast-central-build
/src/scripts/go-build.sh central
CGO_ENABLED is not 0. Compiling with -linkmode=external
Compiling Go source in ./central to bin/linux/central
go: downloading golang.org/x/net v0.0.0-20220325170049-de3da57026de
go: downloading github.com/stackrox/scanner v0.0.0-20220408151911-460993206ee4
go: downloading google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf
go: downloading cloud.google.com/go/storage v1.22.0
go: downloading google.golang.org/api v0.74.0
go: downloading k8s.io/kubelet v0.22.8
go: downloading golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886
go: downloading github.com/PagerDuty/go-pagerduty v1.5.0
go: downloading google.golang.org/protobuf v1.28.0
go: downloading github.com/stretchr/testify v1.7.1
go: downloading cloud.google.com/go/iam v0.3.0
go: downloading github.com/googleapis/gax-go/v2 v2.2.0
go: downloading github.com/googleapis/go-type-adapters v1.0.0
go: downloading github.com/spf13/cobra v1.4.0
go: downloading k8s.io/apiserver v0.22.8
go: downloading github.com/magiconair/properties v1.8.6
Unable to connect to the server: dial tcp: lookup api.jephilli-4-11-04-21-0636.devcluster.openshift.com on 192.168.192.1:53: no such host
Unable to connect to the server: dial tcp: lookup api.jephilli-4-11-04-21-0636.devcluster.openshift.com on 192.168.192.1:53: no such host
make: *** [Makefile:180: fast-central] Error 1

Ah, it must be the pod killing script that runs after the build. So LGTM

authors: porridge stehessel


text:
Add Central DB support to the operator

Description
I refactored this to add a target.pvc.stackrox.io to specify an object to target. That will allow us to ensure 1 pvc is owned for each target (Central and Central DB)
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
Will do more testing, need to test against a connection string passed and ensure connectivity

/test

/test all

/test all

/retest


text:
ROX-19956: Build roxctl container images with RHTAP

Description
This PR onboards the roxctl container image build to RHTAP.
For that, it:

adds Tekton pipelines for pull requests and pushes
adds a .containerignore file to mount .git and other directories that are required for a clean make tag.
adds a multi-stage rhtap.Dockerfile for roxctl
adds a check to scripts/ci/jobs/check-generated.sh to ensure .dockerignore and .containerignore stay in sync

Checklist

[ ] Investigated and inspected CI test results
[x] Unit test and regression tests added
~[ ] Evaluated and added CHANGELOG entry if required~
~[ ] Determined and documented upgrade steps~
~[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)~

If any of these don't apply, please comment below.
Testing Performed

Build on RHTAP succeeds, resulting images' roxctl version output
Integration tests on RHTAP succeed with expected failure in Enterprise Contract "Red Hat" due to non-hermetic build
All existing CI is passing

Reminder for reviewers
In addition to reviewing code here, reviewers must also review testing and request further testing in case the
performed one does not seem sufficient. As a reviewer, you must not approve the change until you understand the
performed testing and you are satisfied with it.

Related doc https://docs.google.com/document/d/1Wjrg435kGRIvh4MC7eke5WCQ5Kitl_q6kZlk7cTRKdo/edit?usp=sharing

Haven't started to review .tekton/* files. Will do that next.
99% of the .tekton/* files are generated by RHTAP and added in https://github.com/stackrox/stackrox/pull/7982/commits/3c982d801f4a4e7082343d358b53d4f922835735.

It'd make sense to review my changes to those pipelines with git diff 3c982d801f4a4e7082343d358b53d4f922835735 .tekton from the tip of the "rhtap-roxctl-onboarding" branch.

/retest

The GitGuardian findings are test data merged from master into this branch: https://github.com/stackrox/stackrox/pull/7982/commits/11cac29c276f0ab1b587292c626318ef0054710c.
That is according to the comments:

// Sample ID token generated from JWT.io with issuer https://stackrox.io.
// Example token taken from: https://pkg.go.dev/github.com/golang-jwt/jwt/v5#example-ParseWithClaims-CustomClaimsType.

Pipelines follow-up https://github.com/stackrox/stackrox/pull/8324

authors: msugakov tommartensen


text:
Gaia in my Synology NAS

How can I install Gaia in my own Synology NAS? Is it possible?

Question was answered so closing the issue.

authors: criadoperez victorsnk

repo: stacks-network/gaia


text:
🛑 ReportPortal Server is down

In 71ccec2, ReportPortal Server (https://reporting.its-telekom.eu/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: ReportPortal Server is back up in eb5b4ae.

repo: stamateas/upptime


text:
🛑 Proxima/DNS Server is down

In f11cdf2, 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 1eb01ae.


text:
🛑 Proxima/DNS Server is down

In 182321d, 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 3b07a1a.


text:
⚠ GitLab Server has degraded performance

In 7ac65c3, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 6880 ms

Resolved: GitLab Server performance has improved in 582f4d6.


text:
⚠ GitLab Server has degraded performance

In 87cedbc, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 9430 ms

Resolved: GitLab Server performance has improved in 3190952.

Resolved: GitLab Server performance has improved in 3190952.


text:
Report false positive

How to report false positive or delist IP/domains

you can either write it down in this kind of an issue or you can report it privately to me via miroslav.stampar(at)gmail.com

authors: hb-cl stamparm

repo: stamparm/ipsum

license: Unlicense


text:
return_type and scalar_type are misleadingly named

Description
The result of return_type_t<T1, ..., TN> is not, in general, the return type of the function being defined, it's the promotion of all the internal scalars.   It is the return type of an lpdf or lpmf, but we can't generalize to other functions because they don't all return simple real values.
The result of scalar_type_t<T1> is going to be confusing because when we have complex numbers, we're going to pull out the underlying value type (of the real and imaginary components), not the complex scalar itself.
I'm not sure what the right thing is to do here.
Current Version:
v3.1.0

Sounds like a duplicate of #1734.

authors: bob-carpenter mcol

repo: stan-dev/math


text:
Rewrite LDLT code

Summary:
The LDLT code is non-idiomatic relative to the Stan code-base. It constructs an object that isn't valid and it's on the caller to verify that it's correct. This leads to more difficult testing and maintenance than necessary.
Description:
I'm finding it very difficult to test behavior of this function. We should rewrite it.
Additional Information:
The code is pretty fast. Whatever we do, we don't want to give up the speed.
Current Version:
v2.12.0

Where exactly is this LDLT code and what should the behavior be?  Do you want it to test internally and throw exceptions so that any returned result is guaranteed to be valid?

The code is here:

stan/math/rev/mat/fun/LDLT_alloc.hpp
stan/math/rev/mat/fun/LDLT_factor.hpp

The pattern is different from the way almost all of the math library code works. It can be constructed in a state where it shouldn't be usable and the client to the code needs to check an error condition to see if it was constructed correctly. I'd prefer failure on construction because there's really no recovery from that error.
So yes:

I want it to test internally
I want it to throw exceptions
I want a constructed LDLT thing to be valid and usable.

Is that closer to actionable?

authors: bob-carpenter syclik


text:
Feature/issue 512 log

Submisison Checklist

[x] Run unit tests: ./runTests.py src/test/unit
[x] Run cpplint: make cpplint
[x] Declare copyright holder and open-source license: see below

Summary
Implements a logger interface described here on the wiki.
This does not change the behavior of the output. All output is currently sent to info.
Intended Effect
This pull request is meant to split out messages meant for the interfaces to report into a logger with different levels.
This pull request puts all the messages at the same level, info. I didn't want to make decisions on what are debug vs warn vs info vs error vs fatal for the time being.
I will follow up with pull requests to CmdStan, RStan, and PyStan that will implement loggers.
Note: after implementing this, I believe having the logger implement operator<<() will be more trouble than it's worth. If we implemented it that way, we would need to check on every call to flush. I think the right level is whole lines and we'll need the interfaces to determine what to do with each line.
How to Verify
Tests. These things all have new tests.
Side Effects
This will affect CmdStan, RStan, and PyStan. We'll need to work out the upstream changes.
Documentation
Doxygen doc included for the new classes.
Reviewer Suggestions
@sakrejda, @ariddell, @seantalts
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Stan Group
By submitting this pull request, the copyright holder is agreeing to 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/)

This is ready for review. The upstream test requires CmdStan branch feature/issue-554-log; @seantalts, what's the procedure for having the upstream branch be something other than develop?
There are now pull requests on all the interfaces that are ready to go once this is in Stan:

CmdStan: stan-dev/cmdstan#555
RStan: stan-dev/rstan#419
PyStan: stan-dev/pystan#346

Thanks.
Regarding flushing: it's up to the implementation. We could write a logger that queues everything up and flushes at once. The stream_logger just implements existing behavior.

On Jun 1, 2017, at 9:59 AM, Krzysztof Sakrejda notifications@github.com wrote:
@sakrejda approved this pull request.
Looked at the design, replaced code, and most of the tests. I guess we're flushing all the time defensively s.t. we don't have a segfault with un-flushed messages(?) I'm ok with that. It really is a mess of output streams but you're trying to maintain current behavior so there's not much to do about it. Looks good to me if it passes tests.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@syclik re: testing upstream - I think it might be the same way as before (?) - Go to the Stan Pull Request - Upstream - CmdStan, click Build with Parameters, and put in the appropriate stan_sha ("origin/pr/2317/merge" in this case) and cmdstan_branch ("origin/feature/issue-512-log"). It's running now: http://d1m1s1b1.stat.columbia.edu:8080/job/Stan Pull Request - Upstream - CmdStan/516
I don't think that will integrate into the github API appropriately to change the checkbox on the PR, though. Not sure if we can do much about that.

Couple of design questions:

You asked me to look at using operator<< and I guess I'm not sure why that wouldn't work? It seems like both PyStan and RStan use the default logger implementation that internally takes streams and <<s stuff to them. This is a fairly simple example allowing << with levels: http://www.drdobbs.com/cpp/logging-in-c/201804215?pgno=1 .
I think a lot of logging frameworks are implemented with a global logger precisely because logging is often a very orthogonal, cross-cutting and global concern. It has the nice practical benefit that it lets one avoid passing a logger to literally everything. More broadly, is there a reason we don't use an existing logging framework? Boost comes with one, for example: http://www.boost.org/doc/libs/1_64_0/libs/log/doc/html/index.html These things are often set up with battle-tested macros that elide much of the work done accumulating logs and concatenating strings if the level isn't high enough to eventually produce them.

That said, what you have here is great and pretty unobjectionably an improvement over the existing, I would say. So I'm definitely not trying to hold this back, more just giving food for thought.

Jenkins, retest this please.

@sakrejda and @seantalts, thanks! I'll merge when the tests pass. Doesn't look like there's anything that needs to be fixed.

You asked me to look at using operator<< and I guess I'm not sure why that wouldn't work? It seems like both PyStan and RStan use the default logger implementation that internally takes streams and <<s stuff to them. This is a fairly simple example allowing << with levels: http://www.drdobbs.com/cpp/logging-in-c/201804215?pgno=1 .

It's not that it can't work. It's just that I couldn't think about how to get it done efficiently. In RStan, there's usually a string that prefixes each line that indicates what chain the message comes from. So far, the message unit is a line, not a chunk. So if we wanted to use something like a stream operator with std::endl as a marker for the end of the line, RStan's logger would need to inspect the stream as it comes in and decide how to break apart lines. I'm probably over-valuing existing behavior and we could change that in the future.

I think a lot of logging frameworks are implemented with a global logger precisely because logging is often a very orthogonal, cross-cutting and global concern. It has the nice practical benefit that it lets one avoid passing a logger to literally everything. More broadly, is there a reason we don't use an existing logging framework? Boost comes with one, for example: http://www.boost.org/doc/libs/1_64_0/libs/log/doc/html/index.html These things are often set up with battle-tested macros that elide much of the work done accumulating logs and concatenating strings if the level isn't high enough to eventually produce them.

Ah ha. I had originally searched through the different reasonable C++ logging libraries including Boost, Apache's log4cxx, log4cpp, and Pantheios. They all had their issues and for now, I thought our logging needs are fairly simple. We can either replace it after it gets in or write implementations of the logger with one of these libraries.
Here are some of the reasons I didn't use Boost.Log:

Adds yet another dependency. It's not included in R's bh package, so it would have been more pain for RStan.
It's not header only. We'd have to build a library for CmdStan, RStan, and PyStan. And for Stan just to test. We haven't used a non-header-only library from Boost yet, so I didn't feel like it's a good enough reason to figure out the build process and integrate that into Stan for this process.

Otherwise, I would definitely have used an existing logging interface!

I'm moving further design discussion back to
http://discourse.mc-stan.org/t/logging-in-stan-services/300/3

authors: bob-carpenter seantalts syclik

repo: stan-dev/stan


text:
Update wanted ebooks list

Hume's Enquiry Concerning Human Understanding has been approved twice as a first production and abandoned. It seems like it'd be an appealing one for a new producer

Thanks!

authors: acabal erinendrei

repo: standardebooks/web


text:
Can't success run demos of text-to-image evaluation when following HEIM Quick Start Docs

Hi,
Thank you for publishing this amazing work!
I am trying to use HEIM to benchmark text-to-image generation model, and I was following the quick start guide of HEIM in docs/heim.md and ran into this error message: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 3009: invalid start byte
I tested the installation by running the quick start guide in HELM and it is working properly.
The run_specs file I am using for HEIM looks like this:
entries: [{description: "i2p:model=huggingface/stable-diffusion-v1-4,category=hate,max_eval_instances=4", priority: 1}]
I encounter the error message when running HEIM because UnicodeDecodeError in i2p and mscoco dataset, others not tried yet. Could you give some insights of what may be the cause of this error and possible solutions to it?
Thank you!
This is the full error message:

main {
  Reading tokenizer configs from /home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/config/tokenizer_configs.yaml...
  Reading model deployments from /home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/config/model_deployments.yaml...
  Read 1 run entries from run_heim.conf
  1 entries produced 1 run specs
  run_specs {
    RunSpec(name='i2p:category=hate,model=huggingface_stable-diffusion-v1-4,max_eval_instances=4', scenario_spec=ScenarioSpec(class_name='helm.benchmark.scenarios.image_generation.i2p_scenario.I2PScenario', args={'category': 'hate'}), adapter_spec=AdapterSpec(method='generation', global_prefix='', global_suffix='', instructions='', input_prefix='', input_suffix='', reference_prefix='A. ', reference_suffix='\n', output_prefix='', output_suffix='', instance_prefix='\n', substitutions=[], max_train_instances=0, max_eval_instances=4, num_outputs=8, num_train_trials=1, num_trials=1, sample_train=True, model_deployment='huggingface/stable-diffusion-v1-4', model='huggingface/stable-diffusion-v1-4', temperature=1, max_tokens=0, stop_sequences=[], random=None, multi_label=False, image_generation_parameters=ImageGenerationParameters(output_image_width=None, output_image_height=None, guidance_scale=None, diffusion_denoising_steps=None)), metric_specs=[MetricSpec(class_name='helm.benchmark.metrics.image_generation.aesthetics_metrics.AestheticsMetric', args={}), MetricSpec(class_name='helm.benchmark.metrics.image_generation.clip_score_metrics.CLIPScoreMetric', args={}), MetricSpec(class_name='helm.benchmark.metrics.image_generation.efficiency_metrics.EfficiencyMetric', args={}), MetricSpec(class_name='helm.benchmark.metrics.image_generation.fractal_dimension_metric.FractalDimensionMetric', args={}), MetricSpec(class_name='helm.benchmark.metrics.image_generation.nsfw_metrics.NSFWMetric', args={}), MetricSpec(class_name='helm.benchmark.metrics.image_generation.nudity_metrics.NudityMetric', args={}), MetricSpec(class_name='helm.benchmark.metrics.image_generation.watermark_metrics.WatermarkMetric', args={}), MetricSpec(class_name='helm.benchmark.metrics.basic_metrics.BasicGenerationMetric', args={'names': []}), MetricSpec(class_name='helm.benchmark.metrics.basic_metrics.BasicReferenceMetric', args={}), MetricSpec(class_name='helm.benchmark.metrics.basic_metrics.InstancesPerSplitMetric', args={})], data_augmenter_spec=DataAugmenterSpec(perturbation_specs=[], should_augment_train_instances=False, should_include_original_train=False, should_skip_unchanged_train=False, should_augment_eval_instances=False, should_include_original_eval=False, should_skip_unchanged_eval=False, seeds_per_instance=1), groups=['i2p'])
  } [0.0s]
  Running in local mode with base path: prod_env
Looking in path: prod_env
  AutoTokenizer: cache_backend_config = SqliteCacheBackendConfig(path='prod_env/cache')
  AutoClient: file_storage_path = prod_env/cache
  AutoClient: cache_backend_config = SqliteCacheBackendConfig(path='prod_env/cache')
  AutoTokenizer: cache_backend_config = SqliteCacheBackendConfig(path='prod_env/cache')
  Found 1 account(s).
  Created cache with config: SqliteCacheConfig(path='prod_env/cache/ModerationAPI.sqlite')
  0%|                                                                                | 0/1 [00:00<?, ?it/s]  Running i2p:category=hate,model=huggingface_stable-diffusion-v1-4,max_eval_instances=4 {
    scenario.get_instances {
    } [12.193s]
    89 instances, 0 train instances, 4/89 eval instances
    DataPreprocessor.preprocess {
    } [0.0s]
    GenerationAdapter.adapt {
      4 instances, choosing 0/0 train instances, 4 eval instances
      Adapting with train_trial_index=0 {
        Sampled 0 examples for trial #0.
        Parallelizing computation on 4 items over 4 threads {
                                                                                Created cache with config: SqliteCacheConfig(path='prod_env/cache/openai.sqlite')                   | 0/4 [00:00<?, ?it/s]
          Created cache with config: SqliteCacheConfig(path='prod_env/cache/openai.sqlite')
          Created cache with config: SqliteCacheConfig(path='prod_env/cache/openai.sqlite')
          Created cache with config: SqliteCacheConfig(path='prod_env/cache/openai.sqlite')

  0%|                                                                                | 0/4 [00:00<?, ?it/s]

        } [0.077s]
      } [0.077s]
    } [0.077s]
  } [12.275s]
  0%|                                                                                | 0/1 [00:12<?, ?it/s]
} [12.547s]
Error in sys.excepthook:
Traceback (most recent call last):
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/linecache.py", line 47, in getlines
    return updatecache(filename, module_globals)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/linecache.py", line 137, in updatecache
    lines = fp.readlines()
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 3009: invalid start byte

Original exception was:
Traceback (most recent call last):
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/runner.py", line 242, in run_all
    self.run_one(run_spec)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/runner.py", line 307, in run_one
    request_states: List[RequestState] = adapter.adapt(instances, self.executor.execution_spec.parallelism)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/common/hierarchical_logger.py", line 104, in wrapper
    return fn(*args, **kwargs)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/adaptation/adapters/in_context_learning_adapter.py", line 63, in adapt
    self._adapt_trial_index(all_train_instances, train_trial_index, eval_instances, parallelism)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/adaptation/adapters/in_context_learning_adapter.py", line 86, in _adapt_trial_index
    results: List[List[RequestState]] = parallel_map(
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/common/general.py", line 235, in parallel_map
    results = list(tqdm(executor.map(process, items), total=len(items), disable=None))
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/tqdm/std.py", line 1181, in __iter__
    for obj in iterable:
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
    yield fs.pop().result()
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/adaptation/adapters/in_context_learning_adapter.py", line 83, in generate_requests_for_training_trial
    return self.generate_requests(eval_instance, train_trial_index, training_instances)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/adaptation/adapters/generation_adapter.py", line 37, in generate_requests
    prompt: Prompt = self.construct_prompt(
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/adaptation/adapters/in_context_learning_adapter.py", line 242, in construct_prompt
    prompt = self._make_prompt_fit(prompt)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/adaptation/adapters/in_context_learning_adapter.py", line 323, in _make_prompt_fit
    truncated_text = self.window_service.truncate_from_right(text, self.adapter_spec.max_tokens)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/window_services/image_generation/clip_window_service.py", line 8, in truncate_from_right
    result: str = self.decode(self.encode(text, truncation=True, max_length=self.max_request_length).tokens)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/window_services/local_window_service.py", line 45, in encode
    response: TokenizationRequestResult = self.service.tokenize(
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/window_services/tokenizer_service.py", line 23, in tokenize
    return self._service.tokenize(self._auth, request)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/proxy/services/server_service.py", line 153, in tokenize
    return self.tokenizer.tokenize(request)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/proxy/tokenizers/auto_tokenizer.py", line 72, in tokenize
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/proxy/retry.py", line 72, in <lambda>
    return lambda f: lambda *args, **kwargs: _retrying.call(f, *args, **kwargs)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/retrying.py", line 256, in call
    if not self.should_reject(attempt):
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/retrying.py", line 237, in should_reject
    reject |= self._retry_on_exception(attempt.value[1])
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/proxy/retry.py", line 60, in print_exception_and_traceback
    hlog("".join(traceback.format_exception(type(exception), exception, exception.__traceback__)))
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/traceback.py", line 120, in format_exception
    return list(TracebackException(
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/exceptiongroup/_formatting.py", line 96, in __init__
    self.stack = traceback.StackSummary.extract(
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/traceback.py", line 366, in extract
    f.line
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/traceback.py", line 288, in line
    self._line = linecache.getline(self.filename, self.lineno).strip()
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/linecache.py", line 16, in getline
    lines = getlines(filename, module_globals)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/linecache.py", line 47, in getlines
    return updatecache(filename, module_globals)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/linecache.py", line 137, in updatecache
    lines = fp.readlines()
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 3009: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/taas/anaconda3/envs/crfm-helm/bin/helm-run", line 8, in <module>
    sys.exit(main())
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/common/hierarchical_logger.py", line 104, in wrapper
    return fn(*args, **kwargs)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/run.py", line 320, in main
    run_benchmarking(
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/run.py", line 129, in run_benchmarking
    runner.run_all(run_specs)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/helm/benchmark/runner.py", line 247, in run_all
    hlog(f"Error when running {run_spec.name}:{traceback.format_exc()}")
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/traceback.py", line 167, in format_exc
    return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain))
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/traceback.py", line 120, in format_exception
    return list(TracebackException(
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/site-packages/exceptiongroup/_formatting.py", line 96, in __init__
    self.stack = traceback.StackSummary.extract(
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/traceback.py", line 366, in extract
    f.line
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/traceback.py", line 288, in line
    self._line = linecache.getline(self.filename, self.lineno).strip()
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/linecache.py", line 16, in getline
    lines = getlines(filename, module_globals)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/linecache.py", line 47, in getlines
    return updatecache(filename, module_globals)
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/linecache.py", line 137, in updatecache
    lines = fp.readlines()
  File "/home/taas/anaconda3/envs/crfm-helm/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 3009: invalid start byte

cc @teetone for HEIM
The most likely cause is that you may have a corrupted file in your scenarios download. Could you try deleting your downloaded scenario files and try re-running helm-run? In the case of i2p, the files will be in ./benchmark_output/scenarios/i2p/.

Closing this due to staleness; feel free to reopen if you have further questions.

authors: BITWN yifanmai

repo: stanford-crfm/helm