DataGrid with scrollbar blocks page scrolling by mousewheel

Package name(s)
Data Grid (@salt-ds/data-grid)
Package version(s)
Current
Description
While hovering over a DataGrid which itself has a scrollbar, all page scrolling is disabled.
Note, a separate issue exists to cover the issue of a DataGrid with no scrollbar from preventing page scrolling: #2064
Steps to reproduce

Hover your mouse/touchpad cursor above a DataGrid that has a scrollbar
Use the mousewheel (or equivalent - e.g. 2 finger swipe on touchpad) to scroll up or down

The DataGrid rows will scroll (as expected). However, once you've reached the start or end of the rows, and try scroll past them, nothing happens.
Expected behavior
Scrolling past the first or last row of the grid should probably make the page scroll up or down.
(Need to confirm with design team, but that is the usual behaviour for any kind of nested, scrollable region of a page)
Operating system

[X] macOS
[ ] Windows
[ ] Linux
[ ] iOS
[ ] Android

Browser

[ ] Chrome
[ ] Safari
[X] Firefox
[ ] Edge

Are you a JPMorgan Chase & Co. employee?

[X] I am an employee of JPMorgan Chase & Co.

Bug ranking score: 45 (using rubric v3)
Priority: high
========== BEGIN BUG RUBRIC SCORE DATA ===========
eyJ2YWx1ZXMiOnsiYWZmZWN0ZWRQZW9wbGVPcHRpb25zIjoyNS
wiYWZmZWN0ZWRDb21wb25lbnRzT3B0aW9ucyI6NywiZnJlcXVl
bmN5T3B0aW9ucyI6MTksImltcGFjdE9wdGlvbnMiOjExLCJhZm
ZlY3RlZERzT3B0aW9ucyI6MTcsInVyZ2VuY3lPcHRpb25zIjox
OSwieEZhY3Rvck9wdGlvbnMiOjE4fSwicnVicmljVmVyc2lvbi
I6M30=
=========== END BUG RUBRIC SCORE DATA ============


Added Physics.py

I hope I did it correct.

Looks Fine to me. I will add this to the running code when we have at least 50 physics questions. I have some of my own in a list as well.

I'll get some questions too


Remove unused labelled loop block in liq.rs

Continues from #23 which fixes non-liquid builds. see ad67877 to review this.
I'm doing this separately from my lint-fixes PR because I wasn't sure if this was supposed to be there or not.

Ah yeah I changed that continue to a throw.


modified client/index.html to show title and image in advance in sns …

modified title
added main image
adjusted text

I modified commit description. Please check and merge this request. :-)


SIG -> TAG text updates in various MD files

fixed a bunch of instances where we were still referring to the SIG, instead of the TAG.

I have added a few other reviewers who are Chairs because this does touch our charter document in the repo.

/lgtm
/approve


documentation?

This looks interesting!
Can you provide some simple documentation of an example use and the api?

Hi Max, are Keybase Merkle trees sorted in any way so as to provide non-membership proofs when looking up by username? Do you guys use a prefix tree or a BST?

We use a prefix tree, so it should also provide proof of non-membership.  The problem here is decidedly easier than CONIKS's because we're all public and out in the open with this data and aren't fearing spammers.


feat: test new release mode on beta

:tada: This PR is included in version 1.4.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


DownloadPackageV1 task version argument description improvement

In the Arguments section of this page change the description of the version argument from:
(Required) Version of the package.

to be:
(Required) Version of the package. Use `latest` to download the latest version of the package at runtime.

which is the help markdown from the DownloadPackageV1 task.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: ff8354ee-807f-0c1f-8e5b-9303c4591c60
Version Independent ID: 1fd42523-8504-76cf-deec-26c5fccd0109
Content: Download Package task - Azure Pipelines
Content Source: docs/pipelines/tasks/utility/download-package.md
Product: devops
Technology: devops-cicd-tasks
GitHub Login: @steved0x
Microsoft Alias: sdanie

Thanks for letting us know. This issue is fixed in our new task reference, which is generated using the task source code and includes all task inputs, including any aliases here:
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/download-package-v1?view=azure-pipelines
Please check it out and let us know what you think. Thank you.


Feature Request: Utils

https://partner.steamgames.com/doc/api/ISteamUtils has a bunch of random useful functions, which appear in https://docs.rs/steamworks/latest/steamworks/struct.Utils.html
Today, I'm particularly interested in the Steam Deck utilities, which were merged into https://github.com/Noxime/steamworks-rs/pull/119

That PR merged Feb 19, 2023, but, as I write this, steamworks-rs hasn't had a new release since version 0.9.0 in April 2022. 😳 I hope they release a new version soon, and that steamworks.js consumes it and exposes these functions.

steamworks.js is not tied to a specific version of steamworks-rs: https://github.com/ceifa/steamworks.js/blob/main/Cargo.toml
Because we are using the git version, it is already possible to implement these functions, PRs welcome!


Acknowledge Alerts

There is no way to acknowledge alerts in DBA Dash.
It's also not clear in the app how alerts get highlighted:
If a critical alert occurred in the last week, status is critical.
If another alert occurred in the last 3 days status is warning.
Critical alerts are message_id 822, 824, 825 or alerts with severity > 20.
A tooltip might be useful.  Maybe an option to configure.

Included in 2.37.0 🎉


Can't start bootstrap.py with pyqt

From contrebasse on 2014-07-02T02:28:25Z
Spyder Version:  2.3.0rc (3771: r404e2ec105b9 )
Python Version:  2.7.7
Qt Version    :  4.8.6, PyQt4 (API v2) 4.11 on Linux
pyflakes >=0.5.0:  0.5.0 (OK)
pep8 >=0.6      :  1.4.6 (OK)
IPython >=0.13  :  2.1.0 (OK)
pygments >=1.6  :  1.6 (OK)
sphinx >=0.6.6  :  1.2.2 (OK)
psutil >=0.3    :  2.1.1 (OK)
jedi >=0.8.0    :  0.8.0-final0 (OK)
matplotlib >=1.0:  1.3.1 (OK)
sympy >=0.7.0   :  0.7.5 (OK)
pylint >=0.25   :  1.2.1 (OK)
What steps will reproduce the problem?

Try to start spyder using python2 ./bootstrap.py --gui=pyqt 2. 3.

What is the expected output? What do you see instead?
I get the following error:
Executing Spyder from source checkout Revision 54e70aafa4dc :3784, Branch: default

Patched sys.path with /data/prog/spyderlib
and /data/prog/spyderlib/external-py2

Skipping GUI toolkit detection

Imported Spyder 2.3.0rc
[Python 2.7.7 64bits, Qt 4.8.6, PyQt4 (API v1) 4.11 on Linux]

Executing spyder.main()
Bootstrap completed in 00:00:00.2514
Traceback (most recent call last):
File "/data/prog/spyderlib/spyderlib/spyder.py", line 2333, in main
mainwindow = run_spyder(app, options, args)
File "/data/prog/spyderlib/spyderlib/spyder.py", line 2221, in run_spyder
main.setup()
File "/data/prog/spyderlib/spyderlib/spyder.py", line 785, in setup
from spyderlib.plugins.inspector import ObjectInspector
File "/data/prog/spyderlib/spyderlib/plugins/inspector.py", line 40, in <module>
from spyderlib.widgets.ipython import IPythonControlWidget
File "/data/prog/spyderlib/spyderlib/widgets/ipython.py", line 29, in <module>
from IPython.frontend.qt.console.rich_ipython_widget import RichIPythonWidget
File "/usr/lib/python2.7/site-packages/IPython/qt/console/rich_ipython_widget.py", line 15, in <module>
from IPython.external.qt import QtCore, QtGui
File "/usr/lib/python2.7/site-packages/IPython/external/qt.py", line 23, in <module>
QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
File "/usr/lib/python2.7/site-packages/IPython/external/qt_loaders.py", line 258, in load_qt
api_options))
ImportError:
Could not load requested Qt binding. Please ensure that
PyQt4 >= 4.7 or PySide >= 1.0.3 is available,
and only one is imported per session.
Currently-imported Qt library:   'pyqtv1'
PyQt4 installed:                 True
PySide >= 1.0.3 installed:       True
Tried to load:                   ['pyqt']

Please provide any additional information below
.
It works fine with pyside or python3.
I tried to delete ~/.spyder2 but I got the same error.
The command ipython2 qtconsole works (I don't know if it uses pyside or pyqt)
Also, I just updated the default branch, bitbucket said I was 27 commits behind before sync.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1879

From ccordoba12 on 2014-07-02T06:40:57Z
Labels: MS-v2.3

From ccordoba12 on 2014-07-02T07:59:31Z
This issue was closed by revision c2a549e37fb9 .
Status: Fixed

From<EMAIL_ADDRESS>on 2014-07-02T08:38:25Z
I'd reopen this until this hack is replaced with proper fix. See discussion at https://bitbucket.org/spyder-ide/spyderlib/commits/226c8cc50cb


Uno R4 Minima upload doesn't work

CURRENT: upload_protocol = dfu
CURRENT: upload_protocol = dfu
"C:\Users\Max\.platformio\packages\tool-dfuutil\bin\dfu-util" -d 0x2341:0x0069,0x2341:0x0369 -a 0 -s 0x4000:leave -D "C:\Users\Max\Desktop\ren\example\.pio\build\uno_r4_minima\firmware.bin"
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...
Device ID 2341:0369
Device DFU version 0101
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...

Download        [                         ]   0%            0 bytes

Then it hangs forever.
Likely this is becuase

The wrong dfu-util version is used, it really really needs that one referenced in https://downloads.arduino.cc/packages/package_index.json ("version": "0.11.0-arduino5", "name": "dfu-util"). PlatformIO built in one has problems on some systems (https://github.com/maxgerhardt/platform-renesas/issues/2)
-Q flag is not given for final reset

It also stands that the build script should not add a DFU suffix to the output, becasue the Arduino IDE doesn't do that too.

For refernece: Verbose Upload log from my platform:
CURRENT: upload_protocol = dfu
"C:\Users\Max\.platformio\packages\tool-dfuutil\dfu-util" -d 0x2341:0x0069,0x2341:0x0369 -a 0 -Q -D "C:\Users\Max\Desktop\ren\example\.pio\build\uno_r4_minima\firmware.bin"
dfu-util 0.11-arduino4

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...
Device ID 2341:0069
Run-Time device DFU version 0101
Claiming USB DFU (Run-Time) Interface...
Setting Alternate Interface zero...
Determining device status...
DFU state(0) = appIDLE, status(0) = No error condition is present
Device really in Run-Time Mode, send DFU detach request...
Device will detach and reattach...
Opening DFU USB Device...
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...

DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
<lambda>(["upload"], [".pio\build\uno_r4_minima\firmware.bin"])
============== [SUCCESS] Took 15.56 seconds ==============

Hi @maxgerhardt, many thanks for your feedback. I've pushed some fixes to the dev branch, it would be great if you could test out the updated version.

Works.
CURRENT: upload_protocol = dfu
"C:\Users\Max\.platformio\packages\tool-dfuutil-arduino\dfu-util" -d 0x2341:0x0069,0x2341:0x0369 -a 0 -Q -D "C:\Users\Max\Desktop\ren\example\.pio\build\uno_r4_minima\firmware.bin"
dfu-util 0.11-arduino4
[...]
Download        [======================== ]  99%        69952 bytes
Download        [=========================] 100%        70240 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
============== [SUCCESS] Took 23.17 seconds ==============


Add support for use with macOS Catalyst (14.0+)

Fixes #33.
This adds macOS 11 as a platform (== macCatalyst v14.0), which prevents linking failures, and marks the classes as available from macCatalyst 14.0+ which prevents compile failures.
A #available directive cannot be used, as a swift package is compiled and linked regardless of the importing project's target SDK.

Thank you!


Bugfix/home page typo

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: ricardoalexandre-dev sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Update LAB[PL-200]_M06L04_Adv_Business_Rules.md

Module: 00
Lab/Demo: 00
Fixes # .
Changes proposed in this pull request:

Submitted by ParamRamki on behalf of MOC Labs Review

I applied this change to the Jan_2022_scrub branch and will merge this evening. Thanks!


cherry pick missing absl transitive dependency

This change is

Why do we need this in v0.4.x? Are we planning on cherry-picking another commit that upgrades absl?


Search feature

Updated the chatbot to use Redis Stack as the vector store. Removed unused codes.

Bug fix for Python data loader available. Will close this request and open another request with corresponding update.


Should use top level defaultLogger, not static member

Swift development snapshot 09-12 cannot compile Evergreen, as it is confused about which defaultLogger it should use.

thanks for the fix 👍


multiline strings are collapsible and don't collapse with their parent

VS Code version
1.62.1
Extension version
2021.11.1422169775
OS type
Windows
OS version
10
Python distribution
python.org
Python version
3.10
Language server
Pylance
Expected behaviour

Actual behaviour

Steps to reproduce

create a .py file with the following
def foo() -> None:
    print(1)
    bar = """
asdf"""
    print(2)

move your mouse to the side and observe the collapse button incorrectly appearing on line  4

click the collapse button on line 1

Logs
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Going through old issues. This is fixed. My guess is it has worked since https://github.com/microsoft/pylance-release/issues/3085 was fixed in 2022.8.41.


Text Controls don't lose highlighting when unselected (TextBox / RichEditBox)

Describe the bug
Selecting text highlights the text, but unselecting it still maintains the highlighted background colour.
Interestingly foreground colour doesn't persist after unselection.
This weird behaviour only occurs after the first visual row, which behaves normally.
Only multiline selections that include the first row  behave normally.
This is a problem in both TextBox and RichEditBox.
All highlighting is lost when the control regains focus. (As expected)
Steps to reproduce the bug
Loaded the normal WinUI 3 app template.
Added a RichEditBox and a TextBox.
Highlight some text after the first visual row. (it doesn't matter if done by the keyboard or mouse)
Highlighted some other text to clicked elsewhere,  the highlighting background colour still persists in the now unselected text.
No custom styling has been applied.  Light/Dark theme doesn't change anything.
This bug occurs with both the default and newest WASDK
Expected behavior
Selected text should lose its highlighting if unselected.
This should happen no matter what line it is.
Screenshots

NuGet package version
WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response

Further testing.
Partial success

If I locally set the text background to another background colour via  (this.Background as SolidColorBrush)?.Color ?? Colors.Transparent;
ITextRange.CharacterFormat.BackgroundColor   selection highlighting doesn't persist.

Failures

Calling InvalidateArrange() in a SelectionChanged event has no positive effect.
Setting the RichEditBox Background property doesn't change anything
Putting this in my Loaded event doesn't work,  var myFormat = Document.GetDefaultCharacterFormat();       myFormat.BackgroundColor = (this.Background as SolidColorBrush)?.Color ?? Colors.Transparent;

The same problem with WASDK 1.6.241106002.

The same problem with WASDK 1.6.241106002.

Urgh, I won't be able to update or release anything until this is fixed.  Text input is pretty much essential to any app.

I have found a partial fix with only a small amount of jumping of the scrollerviewer if the text box is inside of a scrollerviewer.
you need to hookup to the selectionchanged event, i left in the some old code of stuff that does not work or work well
private bool WasFullTestSelected = false;
private void FullTextBox_SelectionChanged(object sender, RoutedEventArgs e)
{
if (sender is TextBox textBox)
{
bool isSelected = textBox.SelectionLength > 0;
    if (isSelected is true)
    {
        if (WasFullTestSelected is true)
        {
            //is selected true && was selected true

            //no change

            if (false)
            {
                //cant run this because it will not work for a mouse move selection to continue
                //but when dragging froward then backwards the issue will be on those chars
                //that where selected then deselected

                var horizontalOffset = FullTextBoxScroll.HorizontalOffset;
                var verticalOffset = FullTextBoxScroll.VerticalOffset;

                FullTextBox.Visibility = Visibility.Collapsed;
                FullTextBox.Visibility = Visibility.Visible;
                FullTextBox.Focus(FocusState.Keyboard);
                FullTextBoxScroll.ChangeView(horizontalOffset, verticalOffset, null, true);
            }
        }
        else
        {
            //is selected true && was selected false

            //now selected
        }
    }
    else
    {
        if (WasFullTestSelected is true)
        {
            //is selected false && was selected true

            //lost selection (the issue)
            if (false)
            {
                //FullTextBoxScroll.InvalidateArrange();//does not work
            }
            if (false)
            {
                //FullTextBox.InvalidateArrange();//does not work
            }
            if (false)
            {
                //FullTextBox.InvalidateMeasure(); //does not work
            }
            if (false)
            {
                //does not work
                //var horizontalOffset = FullTextBoxScroll.HorizontalOffset;
                //var verticalOffset = FullTextBoxScroll.VerticalOffset;
                //FullTextBoxScroll.ChangeView(horizontalOffset, verticalOffset, null, true);
            }
            if (false)
            {
                //works but buggy
                //var horizontalOffset = FullTextBoxScroll.HorizontalOffset;
                //var verticalOffset = FullTextBoxScroll.VerticalOffset;
                //var selectionStart = FullTextBox.SelectionStart;
                //var selectionLength = FullTextBox.SelectionLength;

                //FullTextBox.SelectAll();
                //FullTextBoxScroll.ChangeView(horizontalOffset, verticalOffset, null, true);
                //FullTextBox.Select(selectionStart, selectionLength);
                //FullTextBoxScroll.ChangeView(horizontalOffset, verticalOffset, null, true);
            }

            //works but jumps when it clears the selection can tolerate
            //least buggy of what i found.
            FullTextBox.Visibility = Visibility.Collapsed;
            FullTextBox.Visibility = Visibility.Visible;
            FullTextBox.Focus(FocusState.Keyboard);
        }
        else
        {
            //is selected false && was selected false
            //not selected
        }
    }
    WasFullTestSelected = isSelected;
}

}

I just met this bug with a RichEditBox, Windows App SDK 1.6.241114003, Windows 10 22H2
I quickly tested this workaround, similar to what @ReneeHuh posted, but not sure if it is sufficient...
        reb1.SelectionChanged += (sender, args) =>
        {
            var reb = (RichEditBox)sender;
            var childElement = FindChildElementByName(reb, "ContentElement");
            if (childElement != null)
            {
                var sw = (ScrollViewer)childElement;
                var h = sw.HorizontalOffset;
                var v = sw.VerticalOffset;
                sw.ChangeView(h, v + 1, 1.0f, true);
                sw.ChangeView(h, v, 1.0f, true);
            }
        };

with :
    #nullable enable
    private Microsoft.UI.Xaml.DependencyObject? FindChildElementByName(Microsoft.UI.Xaml.DependencyObject? tree, string sName)
    {
        for (int i = 0; i < Microsoft.UI.Xaml.Media.VisualTreeHelper.GetChildrenCount(tree); i++)
        {
            Microsoft.UI.Xaml.DependencyObject child = Microsoft.UI.Xaml.Media.VisualTreeHelper.GetChild(tree, i);
            if (child != null && ((Microsoft.UI.Xaml.FrameworkElement)child).Name == sName)
                return child;
            else
            {
                Microsoft.UI.Xaml.DependencyObject? childInSubtree = FindChildElementByName(child, sName);
                if (childInSubtree != null)
                    return childInSubtree;
            }
        }
        return null;
    }
    #nullable disable


ARC Issues in AQGridView

When trying to convert my project to ARC the following warnings are generated:
AQGridViewCell.m (line 97)
Method possibly missing a [super dealloc] call
AQGridViewUpdateInfo.m (line 67)
Method possibly missing a [super dealloc] call
Adding these two method calls makes AQGridView pass the ARC conversion check.

This is because the grid view already uses ARC.
On Mar 7, 2012, at 1:40, idevtech
<EMAIL_ADDRESS>wrote:

When trying to convert my project to ARC the following warnings are generated:
AQGridViewCell.m (line 97)
Method possibly missing a [super dealloc] call
AQGridViewUpdateInfo.m (line 67)
Method possibly missing a [super dealloc] call
Adding these two method calls makes AQGridView pass the ARC conversion check.

Reply to this email directly or view it on GitHub:
https://github.com/AlanQuatermain/AQGridView/issues/118

Since AQGridView in in my project it prevents me from converting my project
since it does not pass the ARC conversion test. What should I do?
Thanks
Chris
On Tue, Mar 6, 2012 at 6:34 PM, Evadne Wu <
<EMAIL_ADDRESS>
wrote:

This is because the grid view already uses ARC.
On Mar 7, 2012, at 1:40, idevtech
<EMAIL_ADDRESS>wrote:

When trying to convert my project to ARC the following warnings are
generated:
AQGridViewCell.m (line 97)
Method possibly missing a [super dealloc] call
AQGridViewUpdateInfo.m (line 67)
Method possibly missing a [super dealloc] call
Adding these two method calls makes AQGridView pass the ARC conversion
check.

Reply to this email directly or view it on GitHub:
https://github.com/AlanQuatermain/AQGridView/issues/118

Reply to this email directly or view it on GitHub:
https://github.com/AlanQuatermain/AQGridView/issues/118#issuecomment-4358876

The best thing to do is to include it as a static library then you can
toggle ARC on or off independently.
On Mar 7, 2012, at 8:42, idevtech
<EMAIL_ADDRESS>wrote:

Since AQGridView in in my project it prevents me from converting my project
since it does not pass the ARC conversion test. What should I do?
Thanks
Chris
On Tue, Mar 6, 2012 at 6:34 PM, Evadne Wu <
<EMAIL_ADDRESS>
wrote:

This is because the grid view already uses ARC.
On Mar 7, 2012, at 1:40, idevtech
<EMAIL_ADDRESS>wrote:

When trying to convert my project to ARC the following warnings are
generated:
AQGridViewCell.m (line 97)
Method possibly missing a [super dealloc] call
AQGridViewUpdateInfo.m (line 67)
Method possibly missing a [super dealloc] call
Adding these two method calls makes AQGridView pass the ARC conversion
check.

Reply to this email directly or view it on GitHub:
https://github.com/AlanQuatermain/AQGridView/issues/118

Reply to this email directly or view it on GitHub:
https://github.com/AlanQuatermain/AQGridView/issues/118#issuecomment-4358876

Reply to this email directly or view it on GitHub:
https://github.com/AlanQuatermain/AQGridView/issues/118#issuecomment-4359767


Add bower.json

Fixes #97

Created bower.json in project root.
main is set to standalone/react-tooltip.js to allow tools like wiredep to automatically locate the correct distribution file
React and ReactDOM moved to dependencies as Bower does not have peerDependencies

@mikkelvagn Cool, really thanks, I will merge this asap. I suppose that I should also publish this to bower, right?

Yeah, that would be great -- I'm not actually sure if it is necessary, but it sure wouldn't do any harm.

Thanks, looks it is already on the Bower


undefined variable in specials page when no specials exists

this was tested on commit de0e97d15d43ac6a9a6cfb2847134a82a0148f2b from Nov 24, 2016 - commit #3000
when you delete all special deals, and go to the specials admin page, you'll get an error similar to this:

[28-Apr-2017 17:04:21 Europe/Oslo] PHP Notice:  Undefined variable: sInfo in /srv/http/honningas/butikk.honningas.no/catalog/admin/specials.php on line 268

i guess a quick-fix would be to replace if (is_object($sInfo)) {  in line 268 of https://github.com/osCommerce/oscommerce2/blob/de0e97d15d43ac6a9a6cfb2847134a82a0148f2b/catalog/admin/specials.php#L268  with if (isset($sInfo) && is_object($sInfo)) {  (haven't actually tested it, thus "just a guess")

Thank @divinity76 ,
until specials.php will be rewrited to native codebase your fix is a perfect solution


Add git options (commit, stage, and no git repository)

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Problem/Feature
Please include a description of the problem or feature this PR is addressing.
Description of Changes:

Allow users to create a new project with the following Git options: init repo + commit the changes, init repo + stage the changes, proceed without creating a git repo
Create git flag to allow for the same options as in the interactive UI
Update the docs to include the new git flag

Checklist

[X] I have self-reviewed the changes being requested
[X] I have updated the documentation (check issue ticket #218)

I am pretty sure the workflow is failing because I added the extra flag --git and it will just not do anything since it expects a UI response otherwise. I pinpointed the file .github/workflows/generate-linter.yml where the action is being run. Would it be okay if I added --git none to fix the issue?

@tomasohCHOM  You need to update the workflow because a new flag was introduced, and that is the reason why the workflow is failing
matrix:
        framework:
          [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo]
        driver:
          [mysql, postgres, sqlite, mongo, redis, none]
        git:
          [commit, stage, skip}
        advanced:
          [htmx, githubaction, websocket]

 - name: build templates
        run: script -q /dev/null -c "go run main.go create -n ${{ matrix.framework }} -f ${{ matrix.framework}} -d ${{matrix.driver}}  -g ${{matrix.git}}  --advanced true --feature ${{ matrix.advanced }}" /dev/null

Action will run the updated workflow on your PR.

@Ujstor for sure, I'll do that right now!

Damn it seems that adding those three more flag options will exceed the 256 matrix size limit it seems.

Hmm, interesting. I didn't know what a final limit is. Maybe we can constrain the maximum parallel jobs? Not sure if this would work, but let's give it a try.
jobs:
  framework_matrix:
    strategy:
      max-parallel: 128
      matrix:
        framework:
         [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo]
        driver:
          [mysql, postgres, sqlite, mongo, redis, none]
        advanced:
          [htmx, githubaction, websocket]
        git:
          [commit, stage, skip]

No luck with that unfortunately. It says in the GitHub documentation:

"A matrix will generate a maximum of 256 jobs per workflow run. This limit applies to both GitHub-hosted and self-hosted runners."

If we somehow can break it into multiple workflows, it might work. The flag that I added however does not contribute anything to the templates themselves, so if it is not 100% necessary, we could add a placeholder flag in build templates to at least make the workflow run, like:
- name: build templates
        run: script -q /dev/null -c "go run main.go create -n ${{ matrix.framework }} -f ${{ matrix.framework}} -d ${{matrix.driver}}  -g skip  --advanced true --feature ${{ matrix.advanced }}" /dev/null

No luck with that unfortunately. It says in the GitHub documentation:

"A matrix will generate a maximum of 256 jobs per workflow run. This limit applies to both GitHub-hosted and self-hosted runners."

If we somehow can break it into multiple workflows, it might work. The flag that I added however does not contribute anything to the templates themselves, so if it is not 100% necessary, we could add a placeholder flag in build templates to at least make the workflow run, like:
- name: build templates
        run: script -q /dev/null -c "go run main.go create -n ${{ matrix.framework }} -f ${{ matrix.framework}} -d ${{matrix.driver}}  -g skip  --advanced true --feature ${{ matrix.advanced }}" /dev/null

Breaking it into two pieces was also on my mind. For now, your proposal is okay, but better change flag to commit, that way, we can catch bugs and also remove max-parallel.

Got it, let me add that for now. Thank you!

Thank you!! Will add it in just a second 👍

@tomasohCHOM  Check also README.md file and add the --git commit flag in the appropriate places.

@Ujstor Ok I added the --git commit option for each of the snippets that needed it. I put the flag at the end of each snippet because it's the option that appears last in the UI. I also ensured that docs was updated with the new flag and it is through docs/creating-project/project-init.md

I reran them manually, and now they are passing. More often than not, there is an issue with actions.


Add Hubspot tracking code

Description
We would like to add the Hubspot tracking code to the app. The attempt to do so, broke the tests (#344).
Expected Behavior

The Hubspot tracking code is part of the app
User activity is visible in Hubspot
Tests are not broken

My naive approach in #344 might not even work. The Portal is a single page application, and the Hubspot tracking code might not work as expected.

When we're at it, make it configurable (turn on / off and when on provide the hubspot script number)

@tobru what would you like to make configurable? Hubspot allows for a lot of configuration already on their side, e.g. only use it on certain pages: https://knowledge.hubspot.com/reports/customize-your-cookie-tracking-settings-and-privacy-policy-alert#deactivate-cookies-on-certain-pages
Is there any use case they don't support you'd like to have?
(the cookie consent banner is already hidden during the e2e tests by setting a cookie that tells Hubspot the user has opted out, see PR #344 )

I'd say that's good enough for now, no need for further configuration options. Thanks for checking :+1:


Transform XML - Backend issue - Logic App Standard / Consumption

Describe the Bug with repro steps
Intro
If you add the "Transform XML" action in a Logic App workflow adding more than one 'TransformOptions' breaks the transformation.
Description
When using the 'Transform XML' action you get by default the response with a byte order mark (BOM). This is default behaviour as mentioned in the documentation. However this might cause issues further on in the workflow and can be resolved with 'transformOptions'. Just activate 'disableByteOrderMark' as mentioned in the example in the documentation:

However we not only want to have the BOM removed from the output we also want the 'ApplyXsltOutputAttributes' from the 'transformOptions' being activated. So we select both in the designer and save the workflow:

Selecting these options results in the following code:
"transformOptions": "DisableByteOrderMark,ApplyXsltOutputAttributes"
However when we try to run the mapping we get the following error:

On Logic App Standard if we do a KQL query on the Application Insight logs we get the same backend error on the 'Transform XML' action:
The provided transform options 'DisableByteOrderMark, ApplyXsltOutputAttributes' are not valid. Can not apply XSLT ouput attributes with disable byte order mark or generate text output options.
This issue is thus present in Consumption as well as Standard.
Repro steps

Add a "Transform XML" action in a Logic App Standard workflow
Add 'TransformOptions' in code on the 'Transform_XML' action:
"Transform_XML": { "type": "Xslt", "inputs": {  "content": "@triggerBody()",  "map": {    "source": "LogicApp",    "name": "mapping_test.xsl"  },  "transformOptions": "DisableByteOrderMark,ApplyXsltOutputAttributes" }, "runAfter": {} }
This is not possible with designer in the portal as addressed in this issue. However should work on the backend just like on Consumption, as mentioned here.
Run the workflow and get an error on the 'Transform XML' action being either 'ActionFailed.' on the old UX or 'undefined. undefined' on the new UX (an issue already mentioned here).
Do a KQL query on the Application Insight logs to get the backend error on the 'Transform XML' action and get the following error:
The provided transform options 'DisableByteOrderMark, ApplyXsltOutputAttributes' are not valid. Can not apply XSLT ouput attributes with disable byte order mark or generate text output options.
It's possible to run the flow with only 'ApplyXsltOutputAttributes' or 'DisableByteOrderMark' but not both at the same time.

Closing remarks
Knowing that 'Transform XML' by default adds a BOM to the output there's no way to use the other options available yet we need both. In the interface in Consumption the options are presented as checkboxes in order to select multiple options and the code generated makes it clear that this should work in a combined manner.
What type of Logic App Is this happening in?
Standard (Portal)
Are you using new designer or old designer
New Designer
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
No response
Screenshots or Videos
No response
Browser
Latest Chrome or Mozilla Firefox
Additional context
No response
AB#25139432

This actually looks like it might be a backend manifest issue or a runtime issue on the connector. Moving to the backend repo


[Bug Report] confirm with dangerouslyUseHTMLString=true cannot use like

Element UI version
2.15.1
OS/Browsers version
chrome 89.0.4389.128
Vue version
2.6.12
Reproduction Link
https://codepen.io/sfengx/pen/NWdEMwL
Steps to reproduce
click button
What is Expected?
one
What is actually happening?
two

Here's the notification/src/main.vue source code:
<slot>

{{ message }}

 </slot>

If you use the tag like
1

Its output is
1

If you use v-html like
<template>

</template>

Its output is
1
v-html uses innerHTML, so when I try it, I find its output is same as v-html.
I go to MDN to find the answer, it says

both the starting and ending tag are mandatory.

DON'T USE  SINGLY ANY MORE!!

Thank you for response.


[5.4] Custom Intermediate (Pivot) Models not instantiable

Laravel Version: 5.4.9
PHP Version: 7.1
Database Driver & Version: MySQL 5.7.16

Description:
When trying to use a custom intermediate model (a model that extends from Illuminate\Database\Eloquent\Relations\Pivot) as a regular model (Pivot extends from Model), it fails, because is not able to create an instance.
Too few arguments to function Illuminate\Database\Eloquent\Relations\Pivot::__construct(), 0 passed
I checked the commit but did not found anything would help on this: 4439576c9a9da5d6dcf8d4fd3ab4210576450eb6
Steps To Reproduce:
Create a model that extends from Pivot instead of Model directly:
...
use Illuminate\Database\Eloquent\Relations\Pivot;
...
class CustomIntermediate extends Pivot
{
    ......
}

Then try to use the model for some specific functions like all(), with(), query(), etc.
Route::get('test', function() {
    return CustomIntermediate::all();
});

Please post your entire custom class code.

Hello @GrahamCampbell,
I just checked it again on a fresh Laravel project: composer create-project laravel/laravel testing 5.4
Then, created a Test model: php artisan make:model Test
Modified the Test to extends from pivot:
<?php

namespace App;

use Illuminate\Database\Eloquent\Relations\Pivot;

class Test extends Pivot
{
    //
}

Then on the web.php routes issued this:
Route::get('/', function () {
    return App\Test::all();
});

Then going to my browser obtained this:
Type error: Argument 1 passed to Illuminate\Database\Eloquent\Relations\Pivot::__construct() must be an instance of Illuminate\Database\Eloquent\Model, none given, called in {somePath}\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php on line 335

Reason for wanting to instantiate a custom pivot model on its own?
My understand is it's for use within a relationship with the ->using() method on your relationship definition. You may as well extend Model?

If you check the definition of Illuminate\Database\Eloquent\Relations\Pivot it extends from eloquent Model, so in my understanding it still being a regular model.
The custom pivot model acts, as as you said, like a pivot AND is a model too I should be able to use it directly or to resolve the many to many relationship through it.
Maybe I am misunderstanding something here  but it does not seem logic for me to use a custom pivot model and not be able to use it as a regular model as well.
Possibly @pstephan1187 can give us some orientation for this?

I see your logic, it may extend Model but doesn't mean it completely reflects the same behaviour.
https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Eloquent/Relations/Pivot.php#L47
Looks like the Pivot requires a parent model, and this is provided when the relationship builds that pivot here:
https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php#L378
I might be wrong so i would be interested too. I think the idea is so you can define some further logic on your custom pivot model. Eg when updating a property your might want to use a mutator or maybe define some helper methods on that pivot model which you couldn't do before.

Yeah, it is possible that it does not need to reflects the same behaviour but so it should not extends directly from model but from a modified model or similar.
Let see if someone can clarify this for us.
Thanks for commenting.

Is there any progress? Getting this issue as well.

@dees040 Unfortunately not. It seems like a not important issue yet.
I decided to do not use it for now and use the conventional old approach.
Hopefully, later this will be treated.

I have the same issue and error. The docs aren't really clear about the purpose of the $relation->using('model') functionality.
For example is it possible to do something like this with that functionality:
users

id
belongsToMany posts

posts

id
belongsToMany users

post_user

id
post_id
user_id
hasMany roles (post_user_role)

post_user_role

id
post_user_id
role

$user->load('posts.pivot.roles');
That would be awesome, but can't get it to function.

@rsdrsd you need to load in post_user_role field on the pivot table:
function posts(){
    return $this->belongsToMany(\App\Post::class)->withPivot('post_user_role');
}

I think the document should show a practical example using intermediate table.

You are probably right. I would like to add an example to the documentation, but it seems like it does not work like I think it does, so may is a matter of time.

Guys, agreed, some documentation would be nice, but after toying with it, here's how it works.
Let's say M-M for User and Books. And you're also adding a 'store_id' attribute to the pivot table. How can you get that Store model based on the store_id?
// User.php

public function books()
{
    return $this->belongsToMany(Book::class)
                ->withPivot('store_id')
                ->using(BookUser::class);
}

So now when you hit $user->books->first()->pivot you're getting the BookUser model. Remember, $user->books returns a collection. You want a Book from the collection to make use of BookUser. (...so above i just used -first())
// BookUser.php

public function store()
{
    return $this->belongsTo(Store::class);
}

Bingo. Now.... ``$user->books->first()->pivot->storeyields the Store ofstore_id`.
So now you might use it for something like this...
@foreach ($user->books as $books)
  Store name: {{ $book->pivot->store->name }}
@endforeach

Yes, it is the expected behavior here.
In your example, you should be able to use the BookUser model as the pivot, that is good. In fact, when you use the pivot property it returns an instance of BookUser, but when you want to directly create an instance of BookUser instead of go trough the other models, it just fails.

Yes, BookUser can't be instanced directly. Remember it extends Pivot class, not Model.
It's 'intermediary' and we just need to use it that way. It's very useful.

@cjaoude Yes, it is a Pivot class, wich extends from Model.
Check the definition of here. It extends directly from Model.
If you think about that is the reason why you can obtain an instance when using the pivot property.
I clearly understand that Pivot is like a "special model," but it is extending from Model and should provide the same behavior expected from a regular model. In another case, it should extend from another kind of "Model."
That is, in fact, the main reason for the discussion here.

I understand what you mean. My posts are to answer how to use a It which some people have asked about

Yes, you are right. Surely that will be very helpful for all.
💯 :)

Hello guys, I've tried on @cjaoude  example, and helped me understand the logic of this problem.
In my case, I need a hasMany method on my pivot Model.
Instead of,
public function store() { return $this->belongsTo(Store::class);}
I need
public function store() { return $this->hasMany(Store::class);}.
I've tried to retrieve the collection like this :
user->books->first()->pivot->store
but it doesnt returns anything. Can anyone help me ?

I have, a M-M relationship for Status and Jobs. A status has many Jobs and a Job is splitted into many statuses. Now, I need to retrieve the Status_job_items which belongsTo Status_Job Pivot model.
How can I, create a custom pivot model with hasMany method in it ?

How how can we eagerload the intermediate table?
$foo->with('bar.pivot.baz'); doesn't work since pivot relation doesn't exists.

I spend at least one week trying to find that question @rdpascua.
Anyways, after a long efford I tried a threeway pivot and works just fine. I don't know if it helps you.

I've created a concerete class instead of using the pivot :/
Sent from my iPhone
On 27 Apr 2017, at 1:56 PM, DiakosavvasN <notifications<EMAIL_ADDRESS>wrote:
I spend at least one week trying to find that question @rdpascuahttps://github.com/rdpascua.
Anyways, after a long efford I tried a threeway pivot and works just fine. I don't know if it helps you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/laravel/framework/issues/17770#issuecomment-297619189, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACYexmwQCiEz90tyu4ZwAsiENI0RUgV9ks5r0C4YgaJpZM4L3VWH.

@Dreambox13@rdpascua can you provide an example of how you solved the problem of eager loading the intermediate table?

i haven't, I just created a new model name based on the relation
Sent from my iPhone
On 11 Jun 2017, at 6:35 AM, Danny Herran <notifications<EMAIL_ADDRESS>wrote:
@Dreambox13https://github.com/dreambox13 @rdpascuahttps://github.com/rdpascua can you provide an example of how you solved the problem of eager loading the intermediate table?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/laravel/framework/issues/17770#issuecomment-307594147, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACYexvhBV1vaNTZPuaDF2RA3VvFy2zMZks5sCxpJgaJpZM4L3VWH.

I face similar issue but it's expected behavior because Pivot constructor needs some values indeed. Would be nice if we can use it as normal Model.

Faced same issue recently.

This proposal solved it for me @decadence @a-komarev :
https://github.com/laravel/internals/issues/175
Read the comments all the way through. It explains the changes required to eager load a pivot model relationships on 5.4.

@dherran Thanks for pointing to the solution.

@dherran thanks. But would be nice to have this out of box.

i'm having the same issue, i can't instantiate a pivot model, here's my structure and the use case
posts (belongsToMany tags)

id
name

tags  (belongsToMany posts)

id
name

post_tag (pivot)

id
post_id
tag_id
votes_count

votable (polymorphic)

id
votable_id
votable_type

and as the tables explain by themselves, you can vote for a post_tag just like the likedin tag recommandation feature
the api would be something like : POST /post-tag/{post_tag}/likes
And inside this something like
$post_tag = PostTag::find($id);
$post_tag->votes()->save(new Vote)

But this doesn't work because you can't instantiate, the only thing i can do now is
POST /post/{post}/tag/{tag}/likes
$post = Post::find($id);
$post_tag = $post->tags()->find($tag)->pivot;
$post_tag->votes()->save(new Vote);

that's so much cumbersome

Take a look at https://stackoverflow.com/a/44932979/2723301
I've implemented in a better way.

@brunocascio the solution in your link doesn't make the pivot model instantiable sinc the pivot are gotten from the related query Banner
What we want here is BannerRegion to be in instantiable (based on your link)

Merged in 5.5.

Awesome! Thank you @BertvanHoekelen

@JuanDMeGon +1 for posting. I've gone hunting for this a couple of times; glad to see it make its way into the 5.5 release. Can anyone confirm if this addition to 5.5 will also allow for eager loading?
eg, @rdpascua's example: $foo->with('bar.pivot.baz');

@cjaoude  How can I return data relate with pivot table to json without loop?

I don't clearly understand why this issue gets to long in comments. I mean AFAIK following the Liskov substitution principle the behavior this was is not correct. Now I'm looking a way to go workaround with this in 5.4. I have a MorphPivot class and I need it to relation with another class. But I can't. Any idea?
BTW I know this isn't the proper place to ask the question, but I bet some of you guys had facing the same problem


Support for loading symbols from virtual modules

Adds support for loading symbols from virtual modules in Orbit by doing the following steps:

Add a function that can create ModuleInfo by reading the ELF file from a buffer, instead of a file
Changing the /proc/<pid>/maps parsing code to consider all executable maps at first. When creating ModuleInfo objects, we will filter out all maps that aren't mapped ELF files in memory. Handling of file-backed maps stay the same. They are still read from filesystem
Extend SymbolHelper to allow considering the .dynsym section as a fallback symbol source.
Add function OrbitApp::RetrieveVirtualModuleFromRemote which can load virtual modules by using the ReadProcessMemory gRPC call which is currently used for the disassembly view as well. The resulting ELF will be written into the symbol cache and can be considered a regular ELF file from that point on.
Wire all those extra functions into the normal LoadSymbols-code path.

the only reservation I have is timeouts, otherwise lgtm.

So what do we consider a gRPC message size that does not produce timeouts? What is our limit?

the only reservation I have is timeouts, otherwise lgtm.

So what do we consider a gRPC message size that does not produce timeouts? What is our limit?

If I had to guess I would say Mbytes are very risky, hundreds of kilobytes is something to be avoided. single digit kilobytes are fine.
Another thing here. If we go with file transfer we do not have to impose size restrictions on the user. Files can be large.
I suggest we merge it as is now but revisit soon (create a follow-up bug?)

the only reservation I have is timeouts, otherwise lgtm.

So what do we consider a gRPC message size that does not produce timeouts? What is our limit?

If I had to guess I would say Mbytes are very risky, hundreds of kilobytes is something to be avoided. single digit kilobytes are fine.
Another thing here. If we go with file transfer we do not have to impose size restrictions on the user. Files can be large.
I suggest we merge it as is now but revisit soon (create a follow-up bug?)

We have file transfer already in place so I don't know if this makes sense, but the gRPC-only way to do it is a streaming RPC.

Okay, thanks. I'm out right now, but I can take of this PR in an hour or so.

Closing this for now, since the same is achieved by Davide's change as well. I don't see a lot of additional benefit in this solution, at least when the virtual ELF file has no debug information or whatsoever.


Prototype integrating into Konveyor

This is to track work on the first iteration of integration work for Analyzers <-> Konveyor. Mainly things I am looking at is passing stuff coming from the Hub as an input to analyzers and pushing back results as a JSON back into the Hub.

@djzager I'd like to get your help on this. We want to limit the scope of the addon for  the first iteration.

You'll probably want to have a look at:
https://github.com/konveyor/tackle2-addon-windup/blob/main/cmd/main.go

I am closing this issue here as it's being addressed by Jeff in another repo.


chore: remove redundant react-anonymous-display-name in Babel configs

Overview

Removed redundant react-anonymous-display-name in Babel configs now that it's in the Codecademy preset.

📬Published Alpha Packages:@codecademy/gamut-icons@4.3.2-alpha.4a6c33.0@codecademy/gamut-kit@0.2.35-alpha.4a6c33.0@codecademy/gamut-labs@13.1.5-alpha.4a6c33.0@codecademy/gamut@29.4.3-alpha.4a6c33.0@codecademy/markdown-overrides@0.5.13-alpha.4a6c33.0<EMAIL_ADDRESS>
🚀 Styleguide deploy preview ready!https://605c9d07920653305b1d2877--gamut-preview.netlify.appDeploy Logs


Added a Dockerfile to run the api

I took the liberty to create a Dockerfile to run the API.
For it to work, the Flask app needs to listen on all interfaces (<IP_ADDRESS>). So, instead of modifying your code, this line gets modified when building the image.

Thanks for contributing

No problem. Great project by the way.

Thanks


[Event Grid] Reinstall native dependencies failing in nightly runs

Event Grid nightly test runs are failing with:

Stack trace:
gyp ERR! node-gyp -v v9.3.1
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm WARN enoent ENOENT: no such file or directory, open 'D:\a_work\1\s\common\temp\node_modules.pnpm<EMAIL_ADDRESS>npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No README data
npm WARN<EMAIL_ADDRESS>No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR<EMAIL_ADDRESS>install: node-gyp rebuild
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      C:\npm\cache_logs\2023-02-23T12_41_21_542Z-debug.log

For more details check here:

https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2337467&view=results

This may be transient. In the same run there's also successful Windows build. I will keep an eye on it.

the pipeline has been green recently


Unable to create interactive window, existing notebooks are shown as json files

Applies To

[X] Notebooks (.ipynb files)
[X] Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?
I am currently not able to see interactive play elements on my run.py file.
My .ipynb files open as JSON.
I have Python as well as Jupyter extensions installed which are distributed by Microsoft.

VS Code Version
Version: 1.91.1 Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:07:46.768Z (2 days ago) Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0
Jupyter Extension Version
v2024.6.0
Jupyter logs
Visual Studio Code (1.91.1, undefined, desktop)
Jupyter Extension Version: 2024.6.0.
Python Extension Version: 2024.10.0.
Pylance Extension Version: 2024.7.1.
Platform: darwin (arm64).
Workspace folder ~/github/trading/algotrading, Home = /Users/abhisheksoni
14:18:14.169 [warn] No interpreter with path ~/github/trading/algotrading/.venv/bin/python3 found in Python API, will convert Uri path to string as Id ~/github/trading/algotrading/.venv/bin/python3
14:18:14.170 [info] Starting interactive window for resource '' with controller '.jvsc74a57bd070e568023ce40db8e86ad6511b69d121cd7702522e8997b095adf0103a97d48a./Users/~/github/trading/algotrading/.venv/python./Users/~/github/trading/algotrading/.venv/python.-m#ipykernel_launcher (Interactive)'
14:18:14.218 [warn] The following kernels use interpreters that are no longer valid or not recognized by Python extension, Kernels startUsingPythonInterpreter:'id=.jvsc74a57bd070e568023ce40db8e86ad6511b69d121cd7702522e8997b095adf0103a97d48a./Users/~/github/trading/algotrading/.venv/python./Users/~/github/trading/algotrading/.venv/python.-m#ipykernel_launcher'(interpreterId='~/github/trading/algotrading/.venv/bin/python') and valid interpreter ids include /Users/~/.pyenv/versions/3.10.4/bin/python, /Users/~/github/trading/algotrading/.venv/bin/python3, /usr/bin/python3

Coding Language and Runtime Version
No response
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local

Any update on this @rebornix?

Anyone, any updates? :)

Hi @abhisheksoni27, I'm not sure this is actually the problem, but given there's an error message related to the Python environment you're trying to use, maybe you can try creating a new virtual environment? It may be helpful to run the "Python: Create Environment" command and then select "venv". Then make sure to select this new environment by running the "Python: Select Interpreter" command before you open the interactive window.

It sounds like the .ipynb support built in extension isn't activating, you could search the extensions sidebar for @builtin .ipynb to confirm.
Can you open the dev tools after trying to open a notebook and check the console for any errors from activating that extension? (command Developer: Open Developer tools)


Add template files

For governance reasons. Except the README, all files are taken from the main kcp repo.
/assign @xrstf

/ok-test
/approve
/lgtm


Parse command line args

We don't have an argparser for the command line yet, which you could help us to implement.  It would be easier to use a small (preferred single heder or a maximum of 2 source files) library than writing one yourself from scratch.
https://github.com/cofyc/argparse seems good to me (I haven't used or tested it before), or something else you know might be great, but for License compatibility, we're only using MIT licensed or public domain libraries in pocketlang.
Here is an expected example usage message (feel free to come up with your own one).
usage: pocket [option] ... [-c cmd | file | -] [arg] ...
  -c cmd          Evaluate and run the passed string.
  -d, --debug     Compile and run a debug version.
  -h, --help      Prints this help message and exit.
  -q, --quiet     Don't print version and copyright statement on REPL startup
  -v, --version   Prints the pocketlang version number and exit.

CC @xSavitar

Part 1 of the argparse will be coming soon. I used the repo you suggested as a submodule to our repo. In addition, it's in the thirdparty subdirectory of the cli/ directory. So you'll need to run git submodule update to fetch it down.

Great, but adding a submodule requires someone to perform a  recursive clone, one of our goals here is simplicity. Adding submodules breaks that. We never should add a submodule.
I'd like it to be added like other third-party libraries (see cwalk). Copy only the source files and the license (argparse.c, argparse.h, ICENSE)
And don't forget to include the argparse.c in the thirdparty.c

thirdparty.c
// This file will include all thirdparty source files from the thirdparty sub
// directories here into a single file. That'll make it easy to compile with
// the command gcc cli/*.c ... instead of having to add every single sub
// directory to the list of source directory.

Makes sense! Thank you!


Program crashes after finding 201,000 posts

The error message:
Found 201000 posts
Error: Connection Error
Caused by:
0: error decoding response body: expected value at line 1 column 1
1: expected value at line 1 column 1
I'm curious about the purpose of pre-finding the posts because it makes the command take a few minutes to start downloading with tags that have a large amount of posts, and if it's over 200,00 it just crashes apparently

Hmm, very curious about why it's getting a decode error with such an arbitrary number of posts, can you post here the full command so I can try to uncover this?
About the "pre-finding" of posts it's because after I made a giant refactor of the code (the purpose was to separate the actual CLI app from the library that does all the heavy-lifting), some functionalities are still not fully adapted to the new code, namely the ability to download posts while searching pages.

What I posted was pretty much the whole thing, but here's the entire output of two commands I just ran:
imageboard_downloader -i "rule34" "Yaoi"
Found 201000 postsError: Connection Error
Caused by:
0: error decoding response body: expected value at line 1 column 1
1: expected value at line 1 column 1
imageboard_downloader -i "rule34" "Futanari"
Found 201000 postsError: Connection Error
Caused by:
0: error decoding response body: expected value at line 1 column 1
1: expected value at line 1 column 1

I tested your command and what seems to happen is that rule34's api is rate-limiting you while the program prescans the posts.
So, in order to make this work without the website limiting the calls, I'll need some time to rebuild part of the queue management. Maybe I can make it till 0.28 😅
Meanwhile, I'm setting a hard limit of 100 pages per run on track 0.27 just to not mini-ddos the imageboard.
If your use-case demands it, I recommend you to temporarily use any version before 0.27.0, since they don't have this issue.

I did something different. Aside from the limit, you can now specify in what page you start. So, you can download the first 50 pages then run again starting from page 51, etc.
Just a piece of advice: try to download more specific tag combinations. Downloading this many posts at once is probably going to get your IP banned from the website

I didn't mention it earlier but I actually didn't want to download anywhere near 200,000 posts.
I always limit the downloads to around 1,000-10,000 with the download limiter every run.
The command I ran to show the error was intentionally minimal without any extra flags.
It's just that I couldn't download ANY AMOUNT because it had to scan all the posts with the tag on the website first, and it crashed before the scan finished.

No worries, I'm still in the process of adapting the lib to these situations. Soon I will finish the part that completely fixes this problem

Give it a shot on latest main starting from tag 0.27.4
It now should only prescan until the set limit.
In my tests it seemed to work fine

As far as I can tell, everything is working perfectly on the latest commirt from the queue_refactor branch

I just found out that on the latest commit of the queue_refactor branch, when using simultaneous downloads, such as 10, almost all of the downloads randomly freeze for a few seconds & don't resume until the ones that aren't frozen finish. What's that about?

Yeah, I noticed that too. Might be something related to tokio or IO buffering(?). I will try to spawn a thread per download and see what happens then

Give it a try on latest queue_refactor.
I fixed the stuttering problem (at the expense of some more ram usage).

Also, there's a possibility that the website is limiting the number of concurrent connections...
E621 downloads fine up to ~30 sim downloads
Rule34 the downloads start to freeze around 7-10 sim downloads

Everything appears to be working perfectly now, is there anything else you have left to do for the queue_refactor branch?

Just finishing the placement of some debug messages and moving all text printing outside of the lib, then 0.28 should be finally released


Update Readme.md

Pull Request Test Coverage Report for Build 20

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 19.141%

Totals

Change from base Build 18:
0.0%

Covered Lines:
1

Relevant Lines:
1

💛  - Coveralls


Will this work as an 'external' service in a kubernetes context?

@minrk  ... thanks for putting this tool together.
I'm trying to use it in the following context, but having difficulties in getting it working properly.
I have my own app which authenticates against firebase using JWT tokens.  It includes functionality requiring connecting to jupyterlab, and I wanted to avoid a user having to login twice to two separate systems and so the nullauthenticator fits my needs well, in that sense.
In my case, jupyterhub is using a similar set-up to the zero-to-jupyterhub-k8s and runs on Google's GKE infrastructure. I have been able to setup nbviewer and nbdime as external services to the hub in this context, but setting up nullauthenticator the same way is not working and I can't figure out why.  This is my set-up as an external service in the jupyterhub_config.py:
c.JupyterHub.services = [{
            'name': 'login',
            'admin': True,
            'url': 'http://' + os.environ['LOGIN_SERVICE_HOST'] + ':' + os.environ['LOGIN_SERVICE_PORT'],
            'api_token': os.environ['LOGIN_JHUB_TOKEN']
        }]

I have also tried setting things up as an internal service, but that is somehow also failing.
c.JupyterHub.services = [{
            'name': 'login',
            'admin': True,
            'command': [sys.executable, '/srv/login-service.py'],
            'url': 'http://<IP_ADDRESS>:4202',
        }]

In an effort to get the internal service working, I have hard-coded the env variable lookup in the login-services.py directly, since it's easier this way than trying to pass them to the kubernetes environment, for now at least.
env = {'JUPYTERHUB_API_URL':'http://<IP_ADDRESS>:8081/hub/api', 'JUPYTERHUB_BASE_URL': 'http://myhubserver.com/hub/', 'JUPYTERHUB_SERVICE_URL': 'http://<IP_ADDRESS>:4202', 'JUPYTERHUB_API_TOKEN': 'some-fixed-token'}
I continue to get a combination of 403 and 302 errors.
[I 2018-02-18 19:54:02.463 JupyterHub app:1528] Hub API listening on http://<IP_ADDRESS>:8081/hub/
[I 2018-02-18 19:54:02.467 JupyterHub app:1538] Not starting proxy
[I 2018-02-18 19:54:02.467 JupyterHub app:1544] Starting managed service login at http://<IP_ADDRESS>:4202
[I 2018-02-18 19:54:02.468 JupyterHub service:266] Starting service 'login': ['/usr/bin/python3', '/srv/login-service.py']
[I 2018-02-18 19:54:02.475 JupyterHub service:109] Spawning /usr/bin/python3 /srv/login-service.py
[I 2018-02-18 19:54:02.911 JupyterHub app:1551] Adding external service nbdime at http://<IP_ADDRESS>:9000
[I 2018-02-18 19:54:03.049 JupyterHub app:1551] Adding external service nbviewer at http://<IP_ADDRESS>:8080
[I 2018-02-18 19:54:03.071 JupyterHub app:1581] JupyterHub is now running at http://10.7.xxx.xxx:80/
[W 2018-02-18 20:05:04.928 JupyterHub base:351] Failed login for unknown user
[W 2018-02-18 20:05:04.955 JupyterHub log:122] 403 GET /hub/login?next=%2Fhub%2Fuser%2Fmccoole%2F%3Ftoken%3Dsome-fixed-token (@<IP_ADDRESS>) 28.62ms
[I 2018-02-18 20:05:36.646 JupyterHub log:122] 302 GET / \u2192 /hub (@<IP_ADDRESS>) 0.70ms
[I 2018-02-18 20:05:36.959 JupyterHub log:122] 302 GET /hub \u2192 /hub/login (@<IP_ADDRESS>) 0.70ms
[W 2018-02-18 20:05:37.272 JupyterHub base:351] Failed login for unknown user
[W 2018-02-18 20:05:37.273 JupyterHub log:122] 403 GET /hub/login (@<IP_ADDRESS>) 1.84ms
[W 2018-02-18 20:05:37.898 JupyterHub log:122] 405 POST /q.php (@<IP_ADDRESS>) 1.46ms
[W 2018-02-18 20:05:38.521 JupyterHub log:122] 405 POST /s.php (@<IP_ADDRESS>) 1.43ms
[W 2018-02-18 20:05:39.144 JupyterHub log:122] 405 POST /wuwu11.php (@<IP_ADDRESS>) 1.43ms
[W 2018-02-18 20:05:39.766 JupyterHub log:122] 405 POST /slider.php (@<IP_ADDRESS>) 1.50ms
[W 2018-02-18 20:05:40.389 JupyterHub log:122] 405 POST /sheep.php (@<IP_ADDRESS>) 1.61ms
[W 2018-02-18 20:05:41.013 JupyterHub log:122] 405 POST /q.php (@<IP_ADDRESS>) 1.75ms
[W 2018-02-18 20:05:41.637 JupyterHub log:122] 405 POST /xx.php (@<IP_ADDRESS>) 1.51ms
[I 2018-02-18 20:07:00.796 JupyterHub log:122] 302 GET /hub/user/mccoole/?token=mccoole-token \u2192 /hub/login?next=%2Fhub%2Fuser%2Fmccoole%2F%3Ftoken%3Dsome-fixed-token (@<IP_ADDRESS>) 1.21ms
[W 2018-02-18 20:07:00.833 JupyterHub base:351] Failed login for unknown user
[W 2018-02-18 20:07:00.835 JupyterHub log:122] 403 GET /hub/login?next=%2Fhub%2Fuser%2Fmccoole%2F%3Ftoken%3Dsome-fixed-token (@<IP_ADDRESS>) 1.93ms

Looking at those logs above, none of them show the base url .. just the part /hub/login.... ... could it be that this base url part is not getting captured?
Does this solution somehow require that the port 4202 is exposed externally to the internet, or is it enough that it is just exposed internally within the kubernetes infrastructure?  Could that be the reason it is failing ... even to redirect me to the login.html page?

How does your service manage JupyterHub authentication? NullAuthenticator means that users can never make requests directly to the Hub itself (as in BinderHub) They will all fail with 403. Binder uses NullAuthenticator because a separate service (BinderHub) manages users and tokens and uses the Hub only for process management. You must bypass all Hub requests by users if you are using NullAuthenticator.
I suspect the 405s are because your login service isn't handling the fact that it has to run on a url prefix of /services/login. Those requests are for /q.php, when they must be for /services/login/q.php.
Rather than using NullAuthenticator, you may want to write your own Authenticator that talks to your firebase service with auto_login=True. That way hitting the jupyterhub login page only does a redirect to the login service.

@minrk ... thanks.  I have someone helping me with authentication, as it's not my forte ... but as I understand it, he wanted to get things working in conjunction with a firebase-generated JWT token ... so that once a user logged into my app for a specified period of time, we would action a login via the nullauthenticator in order to get a generated jupyterhub token that would then get persisted back to firebase for subsequent use against the jupyterhub instance.  I'm going to see if I can get him on this thread to better articulate the set-up he envisages.  I know he also experimented with using the jwtauthenticator, but somehow that didn't suit.
As regards it not finding a /services/login prefix ... not sure why that is, as I have set things up similar to an nbviewer set-up that works.
nbviewer:
  serviceName: "nbviewer"
  apiUrl: "http://hub:8081/hub/api"
  baseUrl: "http://myjupyterhubserver.com"
  servicePrefix: "/services/nbviewer/"
  apiToken: "555876c099f34f1f12cfef2e5fd0f903edc86b94a464ba6xxxxxxxxxxx"

login:
  serviceName: "login"
  apiUrl: "http://hub:8081/hub/api"
  baseUrl: "http://myjupyterhubserver.com"
  servicePrefix: "/services/login/"
  apiToken: "2a0f05fbebad9fb3289d2fd9c7d77335f87e05d9f72f7d76bxxxxxxxxxxxxx"

When you say:

Rather than using NullAuthenticator, you may want to write your own Authenticator that talks to your firebase service with auto_login=True. That way hitting the jupyterhub login page only does a redirect to the login service.

So in my app, assuming my browser has a relevant hub token, I'm using an iframe to bring a spawned notebook server functionality back within my app ... so I want to have been able to silently get that hub token in place ahead of time.  I'm not familiar with this auto_login=True you mention above.  How would that work?

As regards it not finding a /services/login prefix

You need to make sure that links in the HTML pages it serves respect the URL prefix. This requires template logic in the files provided by the server to ensure the links are correct. There should be no absolute path URLs in your links (i.e. never hardcode /q.php, always something like {base_url}/q.php).

I'm not familiar with this auto_login=True you mention above. How would that work?

Assuming requests arrive at the Hub authenticated with a jwt token in a cookie, you may want to look at RemoteUserAuthenticator which registers a custom login handler that checks headers (you may check a cookie for the jwt token). That sets login cookie assuming login info has been retrieved and recorded by another service.

Regarding the above @minrk . One of the main use cases for using a separate authenticator was that we would like to authenticate the browser of a user logging in our platform onto our Jupyterhub instance also.
The main way in which our users would be accessing the Jupyterhub front end is by using Iframes to specific URL's.
From my understanding, you can't use IFrame's and headers at the same time unless you do a prefetch or something similar which is why we stemmed away from the RemoteUser authenticator that you mentioned.
So I guess that question would be is there an existing authenticator that will allow us to easily authenticate the IFrame's we are using to access Jupterhub + Services.
Ideally, we want to use the JWT generated by Firebase to do all authentication with.
The other question regarding an authenticator would also relate to how we onboard these users to Jupyterhub. And is the only way to this if there is no existing authenticator that is relevant to build a custom authenticator for our needs?

The model of REMOTE_USER can be used no matter where the information comes from - query parameters, headers, cookies. Not the REMOTE_USER implementation itself, which assumes specific apache behavior, but writing your own Authenticator with a similar pattern, tailored to however you identify users, e.g. jwt from firebase.

@minrk Thanks for explaining that and clarifying!


Legend

Transform from greyscale
Explore legend location - Horizontal or vertical
Dependent on #206

The legend is accomplished a slightly different way from suggested here, so closing this issue. See #207


-L shorthand is not working for list command

Describe the bug
gh version: gh version 2.15.0 (2022-09-06)
gh extensions list | grep actions-cache: gh actions-cache        actions/gh-actions-cache        v1.0.1
-L shorthand is not working for the list command
Steps to reproduce the behavior

Execute this command gh actions-cache list -R developer-guy/buildg -L 100
View the output Error: unknown shorthand flag: 'L' in -L
Then run _ gh actions-cache list --help_
You will notice that the output says you can use the -L shorthand for the --limit flag.

Expected vs actual behavior
It should accept the -L shorthand for the --limit flag.
Logs
Paste the activity from your command line. Redact if needed.

Thanks @developer-guy for bringing this up, it is definitely a bug.
Thanks @devenes from raising a quick PR for the same. Will review it shortly.

Thanks @developer-guy for opening this issue and bringing up.
Thanks @kotewar for your quick replies and efforts.
The pull request (#34) aimed to resolve this bug was successfully merged.

I'm closing this due to it's fixed by #34


Compiling Yosys's abc from source tarball

Hi,
I can't clone a github repo due to IT policy. I downloaded Yosys 0.19 and build it successfully but when it comes to building abc, Yosis makefile tries to download abc github repo when abc directory is not present which does not works.
Is it possible to add releases with tarballs also for Yosys's abc ?
Note that abc does not have releases either and I see Yosys's abc is 38 commit ahead from berkely's one so better using Yosy's one.
Thanks
Chris

Work now done as on master at https://github.com/YosysHQ/yosys/commit/bc012995b44ca9a68524ae3a1ecb4b871d1436c9 will be supported from next release

Now abc.tar.gz it is now part or release https://github.com/YosysHQ/yosys/releases/tag/yosys-0.20
First unpack yosys and then unpack abc in underneath directory and build as usual.

@mmicko Gunaxf! Jul qb lbh rapelcg gur zrfffntrf va gur znxrsvyr?

@titan73  :) messages are stored that way so it prevents grepping for messages to match when there is no actual error, but just executing that block of commands

@mmicko Ah ok. Makes sense. It makes the makefile less readable though. Souldn't something like below more practical?
echo "ERR: ABC directory is ..." | sed 's/RR/RROR/'


[WIP] distributed training

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Bug

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

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

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.
When I click on the levels one and do it it just trys to change my grade

If you put the level into the box where it asks you to set your grade it will make that number your level but its not permanet


refactor: move validator api endpoints to standalone functions

Motivation

Make the code readable and maintainable.
This will help to maintain over 1000 lines of Validator API code.
In next phase we need do a quite a refactoring in block production flow this refactor will make it easy to review and maintain.

Description

Extract Validator API endpoint implementation to separate functions

Steps to test or reproduce

Run all tests

i think we can have file splits functionalty wise i.e. attestations related, synccommittee related, block related (produce and publish, and hence please no function renaming, also build on top of this PR: #6236 as this and its base PR: #6227 are high priority and need to be in the next milestone for deneb release)
boiler plate build... wrapper isnt too much imo but yea we don't need to go a super deep endpoint level split

If I spin up there is tons of literature on the topic, but the basic rule of thumb have a global agreement.
More readable code is more maintainable code.
And readability of a 1000 lines of single function nested upto 4-5 levels is less than of a 100 lines of function. Consider the fact that here we are not taking about index.ts file as 1000 lines, rather getValidatorApi of 1000 lines function.
Few references: A very common used practices is Airbnb Style Guide, which suggest 50 lines per function  and 300 lines per file. An other industry best practices guide for Ruby even go strict and suggest to have 10 lines per method. If I remember correctly Bob Martin author of  Clean Code suggested to have it upto 100 lines per function.
So we can debate on number of lines but bloating a function to unlimited number lines is not something even debatable.
Git history is well preserved and can be traced back even if code is moved to different files, you just have to follow a different tree path on some level. If we really make git history a blocker for refactoring, then we can't really improve any product.
The other reference point to split by behavior is not gonna work because each team member may have different understanding of it. So splitting per endpoint is straight forward for everyone to understand. And having idiomatic smaller higher order functions have a lot of text book benefits that I don't want to list here.

rather getValidatorApi of 1000 lines function

That's not a single function, you could use a class instead and would achieve the same result. If indentations are a concern could use a class + methods which would reduce the depth by one but honestly better to review each function see if improvements can be done there.

Few references

I don't think either of those are helpful for this argument.

So we can debate on number of lines but bloating a function to unlimited number lines is not something even debatable.

I am not debating this, my points are

more boilerplate code (less maintainable)
git history lost for no good reason
weak reasoning behind refactoring: "Make the code readable and maintainable", I would argue it is less readable if you want to review the validator api as you have to navigate through a bunch of files.

Git history is well preserved and can be traced back even if code is moved to different files

Just look at the git diff of this PR (+1,193 −937), it's not reviewable. I would have to trust that you properly copy-pasted the code and made no mistakes.

If we really make git history a blocker for refactoring, then we can't really improve any product

Again, not part of my argument, never said it is a blocker but there should be strong reasoning to move code around like that which this PR does not have.

This is my subjective opinion which can probably only be changed if there is a good and objective argument for this refactoring which I think is something we should have for every proposed code change.

As a contributor who recently picked up the validator api code, let me put in my two cents. I think while it seems large and overwhelming (>1000 lines of code), its organization is good but a little messy.
Something I observed:

There are some "utility" functions like getGenesisBlockRoot and notOnOptimisticBlockRoot and they are mixed with the endpoint functions.
Some endpoint functions are directly defined in the return statement, some are defined in variables and later be fed inside the return statement (eg. produceBlockV3)

For 1, I think they can be managed separately and they are trivial enough that losing git history might not be a big deal compare to endpoint functions. (I could be wrong). ValidatorEndpointDependencies makes sense to me and the extra amount of boilerplates doesn't impact too much of readability and reviewability.
For 2, it is not clear to me why some are defined in the former way and some are defined in the latter way. My thought was functions with complex logic like produceBlockV3 warrants a separate variable. But then getProposerDuties which looks complex to me, is directly defined in the return statement.
My humble suggestion is moving forward, any new endpoint with complex logic should be placed in a standalone file under endpoints folder as illustrated in this PR. New endpoints with simple logic can be directly defined in the return statement in index.ts. Existed endpoints should be left as is to avoid sudden large change to the codebase, and loss of git history.
For the purpose of this PR, I think produceBlockV3 can be the first endpoint to be placed in a standalone file to set an example for the future complex endpoints. And the loss of git history might be mild since it's one of the newer endpoints.

Moving everything that is defined before the return statement out of the file would be a good first step. Everything block production related could definitely deserve it's own file, not a big fan of endpoints folder for that but maybe just a produceBlock.ts file in the same folder?
What I don't like in this PR are cases were we add 12 lines of boilerplate code for 1 line of actual code.
https://github.com/ChainSafe/lodestar/blob/f6907c2ddc13f4da8fa9dca98805a9b908526b14/packages/beacon-node/src/api/impl/validator/endpoints/submitBeaconCommitteeSelections.ts#L9-L11
Previously, the api impl type was also inferred when updating the route definition, now it requires a manual step to pick the correct type and clue it together in index file.
And the last thing is that the validator impl now deviates from how we define other routes, do we move the others into separate file as well and why is it not part of this PR then?
I feel like moving everything into separate files should be a last resort if all other attempts of refactoring failed or are insufficient.

Strongly in favour of keeping git history and not moving existing code around

I don’t work with the codebase as much as you guys but would like to see a decision about it today if possible. There should be a decision on how to organize the existing functionality in which @dapplion is strongly against and also a decision on how to organize this going forward. Some of the newer guys opinions should give a fresh perspective here on what to do.

My 2 cents: generally in favor of improving readability. What could improve it in this specific scenario is having shorter functions, supported by extracted utility functions. It would also help with improving code comprehension (and removing the need for some comments) and testability.
No strong opinions on having one file per endpoints. git history is generally important in old enough codebase but might also be an indication of poor code readability :)

I've pulled the code locally to give a fair review. Tried to navigate and weigh the pros and cons here and in unstable.
I tend to agree with Nico and Lion for the reasons they mentioned.
I don't really read this file as "a single 1000 line function", rather the file is an implementation of a single interface, routes.validator.Api. I tend to read the file as a list of functions, the functions related to the validator namespace of the beacon-apis. The structure we have now is like a prototypical class, with the chain, metrics, etc acting as the class state.
I think some of the utility functions could be pulled out, and either made pure or pulled into methods.
As far as how we should structure code going forward, whether to combine functionality in a single file or move things across files is, imo, somewhat subjective, and shouldn't necessarily be reduced to "smaller file is more readable, so smallest file is most readable".
Some questions I think about:

What is the conceptual unit of code in this file? A conceptual unit may exist at the code level, as an interface or practical grouping, at the application level, as some domain-specific idea.
How is this function / module used? Are there multiple consumers of this function / module? If not, what other concept is this code related to?
How can this conceptual unit of code be simplified or its purpose highlighted? Is there a way to simplify the algorithms? More or better documentation?

Block production may warrant its own file, given the importance in the application. It seems that this was also the original catalyst for this PR.

A bit tangential, but relevant IMO:
I want to comment on a common trend in JS community which is the phobia to long files. Long may indicate opportunities to split code, but they are not intrinsically bad. Splitting a long file because it's long doesn't always help the overall project.
I past example I personally fought to keep as long file is the gossipsub/index.ts file (https://github.com/ChainSafe/js-libp2p-gossipsub/blob/master/src/index.ts). Splitting it always resulted in harder to follow code. We have been doing just fine with it.

Closing this PR now. Feel free to open a PR to refactor utility functions and / or a PR to refactor the block production code.


Test Issue created at Thu, 30 Dec 2021 02:25:04 GMT

Test issue body  Thu, 30 Dec 2021 02:25:04 GMT

Comment on issue at Thu, 30 Dec 2021 02:25:06 GMT


Fix LXD forkmount with liblxc 3.1

Somehow jenkins still looks unhappy. ;(

@brauner yeah because liblxc is busted when inserting a mount for a file instead of a dir...
I provided details on IRC, short version is: https://paste.ubuntu.com/p/SpsZmMkzBb/

So we'll need this to get fixed in liblxc and likely have the fix introduce an API extension so we can check for that rather than the original one and detect whether liblxc will actually do what we want, otherwise fallback to the old code.

As unfortunately the 3.1 release is broken, so we'll need to skip this code when running on an unpatched version of it.

@brauner preference on the name? mount_injection1? mount_injection_file?
Once we pick a name, I can update my branch to look for that, which will fix LXD, then we can fix liblxc and have LXD use that codepath again.

All that should be needed on LXC is remove instead of unlink.

@brauner hmm, the unlink isn't what's failing, the mknod call is

@brauner anyway, this branch should be good to go, then the readme one can go since it's not touching code and my third branch needs a retry but should then be fine


[CCXDEV-12623] Display name added to DVOObject

Description
Adding display name to DVOObject, updating UTs and updating OpenApi spec
Fixes # (issue)
Type of change

New feature (non-breaking change which adds functionality)
Unit tests (no changes in the code)

Testing steps
Tested in ephemeral
Checklist

[ ] make before_commit passes
[ ] updated documentation wherever necessary
[ ] added or modified tests if necessary
[ ] updated schemas and validators in insights-data-schemas in case of input/output change

btw, please change, in description:
Fixes # (issue) -> Fixes CCXDEV-12623.


User phone number doesn't always work

The webhook post message has an wa_id and from parameters to get the user's phone number. However, from time to time this parameters are invalid, and sending a message to those numbers doesn't always work.
Maybe this is an issue caused by using the bot's test phone number, since it's limited to 5 specific testers phone numbers, which might not match with the wa_id. When I get the time and a spare number to check if this is the reason, I will update this issue.

Turns out this is actually a "bug" from the test mode. After setting a real phone number the bot is working perfectly.


v23.0.0 - Add: In repository Settings page Edit Social preview

https://github.com/Ruben-Arushanyan/guide-open-source/releases/tag/v23.0.0


Weather data downloads not always working

Due to recent changes in the NREL Developer APIs for WIND Toolkit and NSRDB downloads, some weather file download functionality in SAM has stopped working. For example:
https://sam.nrel.gov/forum/forum-general/3063

Note new NSRDB archive at https://nsrdb.nrel.gov/data-sets/archives.html -- need to check NSRDB API endpoints for legacy data downloads.

Potential issue with time zone: https://sam.nrel.gov/forum/forum-general/3083


[Notebook Issue] lab06 Task 5 and 6

Content Link
lab06
Issue Description
It is not clear that the interact tool in Task 6 uses k as the parameter for the function. Some students are using rank as the argument name in the function definition in Task 5, but Task 6 expects k.
Solution
Since the previous task utilizes rank, make it clear that k should be used for the "kth" row rather than the 5th row.

[ ] Change example prior to Task 5 to use k, instead of rank.
[ ] Specify in Task 5 to use k as the one parameter value.
[ ] Rebuild notebooks.
[ ] Check for clarity.
[ ] Push changes to students' repo.


Implement rpc command to get the latest raw chainlock sig

Modify RPC command getbestchainlock to have parameter includeSignature which if set returns a JSON representation including:

the block hash associated with the best local chainlock
the block height...
the BLS signature...
field indicating if this block is known locally

Example:
{
  "blockhash": "000001263b3be21214d7490c2b3f572fa225db0b56378b225e27ad552a8e5978",
  "height": 381686,
  "signature" : "somefancyhex",
  "known_block": true
}

~- [ ] Implement ZMQ notification zmqpubrawchainlocksig which pushes the BLS signature associated with a chainlock when a new chainlock is received~ Already implemented
Requested by platform team

Resolved by https://github.com/dashpay/dash/pull/3718


[ci] add RAYCI_BISECT_TEST_TARGET env key to postmerge pipeline

I plan to reuse the postmerge pipeline to create a build that can run one test target (for bisecting purpose). Add an env variable I can pass down to a step to run only a single test target.

added a test that postmerge needs to have RAYCI_BISECT_TEST_TARGET build env


Ontology question

Hi Adnan,
I'm just now creating a number of flavonol oxoanions, and I see that existing ones either have the relationship
is a flavonoid oxoanion (CHEBI:60038), others
is a  flavonol oxoanion (CHEBI:58588).
I'm in doubt when to use which as I'm not quite sure what the difference between them are.
Cheers,
Kristian

Flavonoids are natural products derived from 2-phenylchromen-4-one (flavone - CHEBI:42491). Flavonols are a subclass of flavonoids that contains a hydroxy group at position 3 (see https://en.wikipedia.org/wiki/Flavonols).
I have now fixed the ontology so that a 'flavonol oxoanion is_a flavonoid oxoanion'.


Filter out galactic plane post-imsub

Temporary progress for #938

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 84.622%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
11160

Relevant Lines:
13188

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 84.622%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
11160

Relevant Lines:
13188

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 84.622%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
11160

Relevant Lines:
13188

💛  - Coveralls


Does this work with request-promise-native

How does this library work with the promise based version of the request library.
https://github.com/request/request-promise-native
Because i want to be able to use async and await.

Closing this as it is not planned to be implemented at this time.


Add longConverter for German

https://github.com/allegro/tradukisto/wiki/How-to-start-contributing
It would be good, if we will have support for long number conversion for German. Currently it is not implemented.
Integer and Money converters for German were implemented in https://github.com/allegro/tradukisto/pull/8.
Additional context
Remember to add unit tests :)

Hello!!! I'm a new coder. I'd like to do this assignment. I'll await for your allowance.

Hi, I am really happy to see you here as new coder. I will assign you to this task :) If you will need some help, ask here and we will try to guide you.


Add emulator.getEmulator and emulator.launch to daemon

@devoncarew This adds support to the daemon for listing and launching emulators. It was based on the devices code in there. I couldn't find many tests for getDevices but I copied what I did see and amended for emulators.
Something we might not have considered with daemon is versioning - should a client be able to tell whether a daemon will support listing emulators, for example? (in this case we can just send it and see if it errors, but if we ever want to make more breaking changes that might not be possible).
Note: for some reason to make daemon_client.dart work, I had to change this:
- import 'package:flutter_tools/src/base/io.dart';
+ import 'dart:io';

Otherwise stdout is null and it crashes. I did not commit that change as I don't understand the cause; but it may be a bug that should be fixed.
Related to:

#14822
Dart-Code/Dart-Code#490
#13379

Will review shortly; this change:
- import 'package:flutter_tools/src/base/io.dart';
+ import 'dart:io';

is likely due to the fact that this tool is only run manually, and hasn't run since a batch replace of dart:io references to our indirection layer. We do want dart:io here however; the indirection layer is for better testability of flutter_tools and makes sense for the code in lib/.

We do want dart:io here

Ok, I've committed and pushed that too.


Fix typo about the AccessKey Chinese translation

What's the purpose of this PR
I had made a little mistake with the AccessKey Chinese translation.
It seems should use 密钥 than 秘钥.
And other parts have already used 密钥, only here have a typo.
@nobodyiam
It should also update some screen snapshot images and the wiki if accept this PR. (But for some limitation, I cannot commit.)
Which issue(s) this PR fixes:
None
Brief changelog
Just one Chinese typo
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Read the Contributing Guide before making this pull request.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit tests to verify the code.
[x] Run mvn clean test to make sure this pull request doesn't break anything.

Codecov Report

Merging #3325 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #3325      +/-   ##
============================================
- Coverage     51.47%   51.46%   -0.01%
- Complexity     2303     2305       +2
============================================
  Files           442      442
  Lines         13738    13738
  Branches       1398     1398
============================================
- Hits           7071     7070       -1
- Misses         6176     6179       +3
+ Partials        491      489       -2

Impacted Files
Coverage Δ
Complexity Δ

...ework/apollo/internals/RemoteConfigRepository.java
86.25% <0.00%> (-3.13%)
24.00% <0.00%> (-1.00%)

...ervice/service/ReleaseMessageServiceWithCache.java
85.88% <0.00%> (+1.17%)
24.00% <0.00%> (+1.00%)

.../framework/apollo/spring/property/SpringValue.java
89.47% <0.00%> (+1.75%)
21.00% <0.00%> (+1.00%)

...rk/apollo/spring/property/SpringValueRegistry.java
88.88% <0.00%> (+5.55%)
11.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 849ad71...f4c860d. Read the comment docs.

Thanks, the wiki is updated.


Add length property to Delayed

[ ] Closes https://github.com/dask/distributed/issues/4493
[ ] Tests added / passed
[ ] Passes black dask / flake8 dask

Accessing ._length resulted in issues in functions like _rebuild. This was triggered indirectly by the Distributed test suite. FWICT this fixes the test failure seen in Distributed.
cc @crusaderky

This PR won't solve the issue, which is caused by the _length attribute for some reason being expunged from the __dict__.
I can't reproduce the test failure to begin with...

From testing it locally it seemed to fix it. Though if you have an alternative way to solve it, am not attached to this approach

Thanks @jakirkham @crusaderky for surfacing and helping on this issue!
I ran the distributed test suite against both these PRs and tests pass (except for known flaky tests) in both cases (xref https://github.com/jrbourbeau/distributed/runs/1863749698, https://github.com/jrbourbeau/distributed/runs/1865167876). Additionally both PRs result in the tests added over in https://github.com/dask/dask/pull/7194 passing.
I'm inclined to go with https://github.com/dask/dask/pull/7194 as if we add a new length property, it could conflict with a delayed object which has its own length attribute or method. Thoughts?

Yep fine with me. Not opinionated about the solution. Was just putting up something that worked for me last night. Happy to close


Add pre-built win32 executables as releases

Building stuff (especially in Windows) can be a PITA, so pre-built executables would be greatly appreciated.
I found that there was a period of win32 release in the middle. But unfortunately it was not provided in the latest release.
If a release version of win32 could be provided, it would be greatly appreciated.

Building stuff (especially in Windows) can be a PITA

It's true. Furthermore, in order to publish a new release, project maintainers not only need to build binaries, but also to test them with different versions of JDK on different Windows versions in different configurations, then take additional steps to ensure binaries are not blocked by SmartScreen etc. Given high maintenance overhead and low popularity of 32-bit Java on Windows, we decided to discontinue providing 32-bit builds of jattach.
You may still build binaries yourself. As mentioned above, it's not the biggest problem. In fact, it's just a matter of a single command (assuming MSVC environment variables are set), e.g.
cl.exe /O2 /D_CRT_SECURE_NO_WARNINGS /DJATTACH_VERSION=\"2.2\" /Fobuild/jattach.obj /Febuild/jattach32.exe src/windows/jattach.c advapi32.lib /link /SUBSYSTEM:CONSOLE,5.02

Alternatively, you may take one of the previous 32-bit builds.
The last one is from the release 2.1 - there were not too many changes since then.

Thank you very much for your reply.
I will try to compile using the above command.


Clarify the documentation.

This pull request clarifies the documentation in README.md such as the description of this app, installation, and usage.

Thank you for your kindness! :laughing: :sparkles:


Appstudio update test-component-pac-aeas

Pipelines as Code configuration proposal

Pipelines as Code CI/test-component-pac-aeas-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
42 seconds
appstudio-init

✅ Succeeded
30 seconds
clone-repository

✅ Succeeded
24 seconds
appstudio-configure-build

✅ Succeeded
1 minute
build-container

✅ Succeeded
34 seconds
show-summary

Pipelines as Code CI/test-component-pac-aeas-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
7 seconds
appstudio-init

✅ Succeeded
9 seconds
clone-repository

✅ Succeeded
14 seconds
appstudio-configure-build

✅ Succeeded
39 seconds
build-container

✅ Succeeded
6 seconds
show-summary

Pipelines as Code CI/test-component-pac-aeas-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
7 seconds
appstudio-init

✅ Succeeded
9 seconds
clone-repository

✅ Succeeded
14 seconds
appstudio-configure-build

✅ Succeeded
39 seconds
build-container

✅ Succeeded
6 seconds
show-summary