API: Update configs endpoints with new requirements

Technical Story

From #327, we came up with further requirements for the configs endpoints. This includes changes to the POST endpoint which includes changing the return body, functionality for loading alerts/thresholds, and for creating a ready flag property. Moreover, this ticket also includes the creation of a new endpoint which is responsible for marking a given config as done.
Description

The changes required to existing configs endpoints are described below:

[x] /configs POST returns the ID of the newly created config
- [ ] /configs POST loads the list of alerts/thresholds in the config, based on the basechain passed
[x] /configs POST creates a ready flag property within the config object

Moreover, the following endpoints must be created:
-  [ ] /configs/{config-id}/done PUT sets the ready flag to true for the given config This is no longer needed as we can use the already implemented v1/configs/{config-id} PUT endpoint without having to send the entire configuration.
Requirements

[ ] Add required logic/functions to cater for changes and additions as explained above
[ ] Modify /configs POST endpoint
- [ ] Add /configs/{config-id}/done PUT endpoint as explained above
[ ] Update configs family in swagger to cater for modifications/additions to the endpoints
[ ] Create/modify any unit tests as required

Blocked by

N/A
Acceptance criteria
Scenario: The API user wants to get ID of a new config
Given: API is running
When: I request /v1/configs by POST method
Then: I will create a a new config and its ID will be returned
Scenario: The API user wants to create a new config
Given: API is running
When: I request /v1/configs by POST method
Then: I will create a new config and it includes the ready flag property
Scenario: The API user wants to mark config as ready/done
Given: API is running and config was created
When: I request /v1/configs/{config-id} by PUT method
Then: The config with the given config ID is marked as done (ready prop is true)
Scenario: The API user wants to see API docs via swagger
Given: API is running
When: I access api-docs to see swagger API documentation
Then: Newly created/modified endpoints are properly detailed in swagger API documentation

We decided the following:

We will keep the v1/treshold-alerts and v1/severity-alerts endpoints along with their existing data structure
We need to create a basechains collection having all the basechains
The basechains collection will have a reference to the list of threshold and severity alerts along with their default values
We should implement the v1/basechains and v1/basechains/{basechain-id} endpoints
The config response should not show the severity and threshold alerts from the base chain structure to avoid having a huge object being sent to the UI

NOTE: 1-5 above will be tackled in other tickets


Add meta text

Migrated from GitLab: https://gitlab.com/meltano/handbook/-/issues/25
Originally created by @afolson on 2021-11-15 21:23:12

When linking some parts of the handbook on Slack/Twitter/etc, the meta text displays a section heading. This should probably display a description of the page/something more useful. This can be managed through frontmatter and added to our templates.

This is done! Anything added in a description: tag in the doc frontmatter will be used as meta text, otherwise the default meta text will just be a snippet of the doc body.


Forcing Reinstall

How I can ignore the already installed packages? Cuz when it reboots, boxstarter force reinstall the packages again and bootloop.. there's any way to ignore the installed packages?
My script: https://raw.githubusercontent.com/nibodev/machineSetup/master/Boxstarter.MachineSetup.ps1
Thx.

Duplicate of #264


this return type from arrow function as class method

try flow
class A {
  methodA(): this { return this; }
  methodB = (): this => this;
}

flow throws:
3:   methodB = (): this => this;
                   ^ Unexpected use of `this` type.

You should write it like this:
class A {
  methodA(): this { return this; }
  +methodB: () => this = () => this;
}

Thanks, but is there a reason that the normal arrow class annotations don't work?  Shouldn't this be considered a bug/improvement request?  Especially since you'd need to re-write, or at least oddly separate, all the arguments with that method.

Basically, this is only a valid type in a context of a class: class method or class property.


Update Nexthop strategies to limit the number of simultaneous host retries

Updates to Nexthop strategies to limit the number of simultaneous
transactions that will retry a parent once it's retry_time window
has elapsed.  The limiting prevents thundering retries on a parent
that is still failed and would cause many transactions to hang or
take much longer than necessary to use a good parent without the
limiting.  This PR mirrors the limiting added to Parent selection.
The maximum number of retriers is configured  with
'proxy.config.http.parent_proxy.max_trans_retries' which defaults to 2.

[approve ci]

@zwoop this should be cherry picked to 9.1 and 9.0

@jrushford Neither 9.0.x or 9.1.x cherry-pick's this cleanly... If we need these for those branches, either let me know what other PRs are needed (pre-reqs), or make new back port PRs. My preference is generally the former, identifying the dependencies.


Support for realms/contexts in deno_core (in preparation for ShadowRealm)

In JS, code execution is always tied to some realm (or "context" in V8 terminology), which provides a global object and a set of built-ins (Object, Array, Error, etc.) which is different from those of other realms. Multiple realms can share an event loop (= a thread), and those that do share one may be able to access objects from a different realm. In the web, a same-origin <iframe> is a different realm from the top-level page (iframe.contentWindow.Array !== window.Array). Currently there is no way to create realms or run code in them purely with JS built-ins, that's something that host environments (the web / Node.js / Deno) would have to provide, so it's fine for Deno to not support them.
But there is currently a stage-3 TC39 proposal called ShadowRealm that would allow creating realms, as a way of sandboxing untrusted code. This proposal is not close to shipping anywhere, and it's only now starting to get implemented in V8, but currently Deno assumes that there's a single V8 context available at all times, and it's better to start refactoring things to support realms with plenty of time to spare.
Since ShadowRealms are meant to be a sandbox primitive, there would be no way to make objects from the parent realm available inside the ShadowRealm and vice versa. This simplifies to some extent the requirements needed, because that way there is no need to comb through the JS code looking for wrong uses of instanceof. That said, these are the requirements that seem to be needed for ShadowRealm (and I'm sure I'm forgetting some):

[x] Add a Rust API to create V8 contexts associated with a JsRuntime and run scripts in them (similar to JsRuntime::execute_script), to simplify running tests. Modules can be left for later. denoland/deno#14019
[x] Make sure bindings and extension scripts are initialized correctly in the context, both when using snapshots and when not. This includes making sure the ops cache in different realms can't go out of sync. denoland/deno#14019
[x] Make sure any object return values of bindings and ops, as well as any exceptions they throw, are objects in the current realm (i.e. their prototype is not, say, a different realm's Object.prototype). denoland/deno#14750, denoland/deno#17050.
[x] Make sure async ops don't resolve a promise in the wrong realm. Originally landed on denoland/deno#14734, then reverted, now relanded in denoland/deno#17204.
[x] js_promise_reject_cb, js_uncaught_exception_cb and js_wasm_streaming_cb should probably be realm → callback (weak)maps. Originally landed on denoland/deno#15599, then reverted, now relanded in denoland/deno#17422.
[ ] Modules. Per the HTML spec, every realm has its own module map, although module fetches can be cached across realms.  denoland/deno#15760 denoland/deno_core#41

[x] Add Rust APIs to load modules in a context (similar to JsRuntime::load_main_module and JsRuntime::load_side_module).
[x] There should be a module map per realm, rather than one for the entire JsRuntime. (Should there be a single module loader, though? Blobs should probably not be cached across realms, but non-blob fetches probably should, so it's not clear what to do about denoland/deno#12458.)
[x] Make sure module evaluation in realms integrates with the event loop.
[X] Dynamic imports and import.meta.

[ ] Review every use of serde_v8::Value to make sure objects from a realm can't leak into another.
[ ] Implement the ShadowRealm constructor. denoland/deno#16211
[ ] Fix the inspector to properly support multiple realms. denoland/deno_core#353

@spolu the only way were workers quite some time, but deno crashes if you have open to much of them. i needed every http request to take a worker and (even with reusing them) had deno crash around 5k workers on a 8t/32GB machine.
Now it seems to support node:vm https://docs.deno.com/api/node/vm/
i switched to bun a while ago and use ShadowRealms there. Debugging is a pain, cause the error throwing is incompletely implemented, but the context separation from the main thread works perfectly.


caServer value does nothing

Do you want to request a feature or report a bug?
Bug
Did you try using a 1.7.x configuration for the version 2.0?

[ ] Yes
[x] No

What did you do?
Configured acme certificate generation to use the staging server so I don't hit the rate limit.
What did you expect to see?
I expect to see the caServer I define in the config actually be defined
What did you see instead?
The default is used at all times.
Output of traefik version: (What version of Traefik are you using?)
Version:      2.0.1
Codename:     montdor
Go version:   go1.13.1
Built:        2019-09-26T16:18:03Z
OS/Arch:      linux/amd64

What is your environment & configuration (arguments, toml, provider, platform, ...)?
[certificateResolvers.foor-bar.acme]
  email =<EMAIL_ADDRESS>  storage = 'acme.json'
  caServer = 'https://acme-staging-v02.api.letsencrypt.org/directory'
  [certificatesResolvers.foo-bar.acme.dnsChallenge]
    provider = "rfc2136"
    delayBeforeCheck = '15'
    resolvers = ["ns1.gratisdns.dk:53"]

If applicable, please paste the log output in DEBUG level (--log.level=DEBUG switch)
time="2019-10-05T06:09:54Z" level=info msg="Starting provider *acme.Provider {\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"acme.json\",\"keyType\":\"RSA4096\",\"dnsChallenge\":{\"provider\":\"rfc2136\",\"delayBeforeCheck\":15000000000,\"resolvers\":[\"ns1.gratisdns.dk:53\"]},\"ResolverName\":\"foo-bar\",\"store\":{},\"ChallengeStore\":{}}"

and it turns out my first certificateResolvers was missing an s to make it certificatesResolvers...


Debugger does not show "View Value in Data Viewer".

Environment data

VS Code version: 1.54.0-insider
Extension version (available under the Extensions sidebar): v2021.1.502429796
OS and version: Linux x64 5.10.4-051004-generic
Python version (& distribution if applicable, e.g. Anaconda): CPython
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pyenv
Relevant/affected Python packages and their versions: python-3.9.1, pandas-1.2.1
Relevant/affected Python-related VS Code extensions and their versions: Jupyter extension 2020.12.414227025
Value of the python.languageServer setting: Pylance

Expected behaviour
According to the January 2021 release, when debugging a python file, right-click on a dataframe should show "View in Data Viewer"
Actual behaviour
Right-click on dataframe variable does not show "View in Data Viewer"
Steps to reproduce:

Logs

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

> conda --version
> python3.7 ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3.6 ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3 ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python2 ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> conda info --json
Starting Pylance language server.
Python interpreter path: ~/.pyenv/versions/py39/bin/python
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/src/python-project-skeleton/notebooks/haha.py
cwd: ~/src/python-project-skeleton
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/src/python-project-skeleton/notebooks/haha.py
cwd: ~/src/python-project-skeleton
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/src/python-project-skeleton/notebooks/haha.py
cwd: ~/src/python-project-skeleton
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/src/python-project-skeleton/notebooks/haha.py
cwd: ~/src/python-project-skeleton
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/src/python-project-skeleton/notebooks/haha.py
cwd: ~/src/python-project-skeleton
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/src/python-project-skeleton/notebooks/haha.py
cwd: ~/src/python-project-skeleton
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/src/python-project-skeleton/notebooks/haha.py
cwd: ~/src/python-project-skeleton
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/src/python-project-skeleton/notebooks/haha.py
cwd: ~/src/python-project-skeleton
##########Linting Output - mypy##########
##########Linting Output - flake8##########
Error 2021-02-12 18:18:23: Failed to get interpreter information for '/home/verdi/.pyenv/shims/python3.9' [Error: Command failed: "/home/verdi/.pyenv/shims/python3.9" "/home/verdi/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py" "/home/verdi/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/interpreterInfo.py"
pyenv: python3.9: command not found

The `python3.9' command exists in these Python versions:
  3.9.1
  3.9.1/envs/py39
  py39

Note: See 'pyenv help global' for tips on allowing both
      python2 and python3 to be found.

	at ChildProcess.exithandler (child_process.js:312:12)
	at ChildProcess.emit (events.js:315:20)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:443:11)
	at Socket.emit (events.js:315:20)
	at Pipe.<anonymous> (net.js:674:12)] {
  killed: false,
  code: 127,
  signal: null,
  cmd: '"/home/verdi/.pyenv/shims/python3.9" "/home/verdi/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py" "/home/verdi/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/interpreterInfo.py"'
}
##########Linting Output - flake8##########
##########Linting Output - mypy##########
Success: no issues found in 1 source file
> conda --version
> ~/.pyenv/versions/py39/bin/python ~/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/src/python-project-skeleton -s --cache-clear
cwd: ~/src/python-project-skeleton

Hi @verdimrc, which debug configuration are you using to debug your current Python file? I ask because in the screenshot above it says there are no configurations. Could you please try using the Python: Current File debug configuration from the Python extension and let me know if that works? Thank you!

Hi @joyceerhl, thanks for looking into this.
The screenshot was taken using the debug config you mentioned, "Python File, Debug the currently active Python file."

Hey @verdimrc! Would you mind sharing what your user settings.json has? You can open it by opening the command palette (View > Command Palette...) and running "Preferences: Open Settings (JSON)"
I'm particularly interested in knowing if you have a "python.experiments.optOutFrom" entry defined there.

Hi @luabud, settings.json attached, and it does not have python.experiments.optOutFrom.
It does set both python.experiments.enabled and workbench.enableExperiments to false. And I just experimented with both set to true, but still the debugger did not show the data viewer.

settings.json
{
    ///////////////////////////////////////////////////////////////////////////
    // HYPER-PERSONALIZED STANZA
    ///////////////////////////////////////////////////////////////////////////

    // Insider frequency: daily or weekly.
    "jupyter.insidersChannel": "off",
    "pylance.insidersChannel": "off",
    "python.insidersChannel": "off",

    // Python stuffs
    "python.pythonPath": "/home/verdi/.pyenv/versions/py39/bin/python",
    "python.envFile": "${workspaceFolder}/.vscenv",
    "terminal.integrated.env.osx": {
        "PYTHONPATH": "${workspaceFolder}/src:${env:PYTHONPATH}"
    },
    "terminal.integrated.env.linux": {
        "PYTHONPATH": "${workspaceFolder}/src:${env:PYTHONPATH}"
    },
    // To use binaries outside of environment, e.g., those installed by pipx
    "python.formatting.blackPath": "/home/verdi/.local/bin/black",
    "python.linting.flake8Path": "/home/verdi/.local/bin/flake8",
    "python.linting.mypyPath": "/home/verdi/.local/bin/mypy",
    "python.linting.pydocstylePath": "/home/verdi/.local/bin/pydocstyle",
    "python.sortImports.path": "/home/verdi/.local/bin/isort",

    // GUI: vscode
    "window.zoomLevel": 0,  // osx retina scaled: -1; lxqt 4k monitor: 1
    "debug.console.fontSize": 12,
    "editor.fontSize": 12,
    "terminal.integrated.fontSize": 12,
    "extensions.showRecommendationsOnlyOnDemand": true,  // Default to true; set false if you prefer.
     See https://github.com/Microsoft/vscode/issues/11314
    "terminal.integrated.rendererType": "experimentalWebgl",
    "terminal.integrated.sendKeybindingsToShell": true,
    "terminal.integrated.showExitAlert": false,

    // Extensions
    "autoDocstring.docstringFormat": "google",
    "aws.samcli.location": "/usr/local/bin/sam",
    "aws.profile": "profile:default",
    "gitlens.hovers.currentLine.over": "line",
    "markdown.extension.preview.autoShowPreviewToSide": true,
    "remote.SSH.defaultExtensions": [
        "bungcip.better-toml",
        "editorconfig.editorconfig",
        "mhutchie.git-graph",
        "donjayamanne.githistory",
        //"eamodio.gitlens",
        "ms-toolsai.jupyter",
        "yzhang.markdown-all-in-one",
        "davidanson.vscode-markdownlint",
        "christian-kohler.path-intellisense",
        "ms-python.vscode-pylance",
        "ms-python.python",
        "njpwerner.autodocstring",
        "2gua.rainbow-brackets",
        "stkb.rewrap",
        //"TabNine.tabnine-vscode",
        "gruntfuggly.todo-tree",
        "shardulm94.trailing-spaces",
        "visualstudioexptteam.vscodeintellicode",
        "redhat.vscode-yaml"
    ],
    "tabnine.experimentalAutoImports": false,
    "todo-tree.highlights.defaultHighlight": {
        "opacity": 0,
        "fontStyle": "italic",
        "fontWeight": "bold"
    },
    "todo-tree.highlights.customHighlight": {
        "TODO": {
            "foreground": "yellow"
        },
        "FIXME": {
            "foreground": "red"
        }
    },
    "todo-tree.tree.showScanModeButton": true,
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue"
}

@verdimrc just to confirm, after setting both python.experiments.enabled and workbench.enableExperiments to true and reloading VS Code to ensure that the change in settings is applied, are you still seeing the same behavior?

hi @joyceerhl,
indeed, I need to restart (after setting noth experiment flags to true), then the debugger shows the data viewer.
Regards,
Verdi

Hi @verdimrc it sounds like you were able to find 'View Value in Data Viewer' from the debugger context menu after removing your experiment opt out settings, so I will close this issue for now. If I misunderstood please feel free to reopen 😊

hi @joyceerhl, is there a plan to get this feature work when experiments disabled?

Eventually yes, but in the meantime you may be able to keep your other settings if you add this line to your settings.json:
  "python.experiments.optInto": ["pythonTensorboardExperiment"],

@joyceerhl  isn't it the "debuggerDataViewer" one?

Good catch thanks @luabud 😊

Hi I see this topci is closed. Quick question, in the current release of VS Code 1.58.0 and Python extension updated is it possible to see the "View Value in Data Viewer" option whn debugging a Jupyter notebook inside VS Code? I went through all the steps mentioned in this topic, related to experimental options and I still can't see it. Data Viewer is available in the normal run context but not in the variable context manu whn debugging. Do I need to use VS Code Insiders version?

@beralves That hasn't been implemented--feel free to open a feature request https://github.com/microsoft/vscode-jupyter/issues

@joyceerhl if I understood correctly, the feature to view a variable content with Data Viewer in debug mode is now in production, right? At least that's what I understood from https://visualstudiomagazine.com/articles/2021/01/22/vscode-python-jan21.aspx
Could the problem be related the the fact that I'm debugging a Notebook (.ipynb) and this feature would only be availeble when debugging .py files?

Having this same issue. Both the json settings mentioned above are set to true, but I am not seeing the 'view value in data viewer option'.

This feature was working earlier fine but it isn't working anymore I don't see "view value in data viewer" I tried different attributes on pandas dataframe object and numpy array. I am on vscode==1.59.0 my python language server is Pylance==v2021.8.1 and my default python extension Python==v2021.8.1105858891
Also, when debugging if you hover on a dataframe the debugger will just pause forever even when you request to continue or try to step over code.

Hi @S-Mann, this feature is enabled in conjunction with the Jupyter extension. You might need to reinstall it to have access to it again.
For the second problem you raised, would you mind filing a separate issue providing information on your environment as well as repro steps, so we can investigate? Thank you!

Hi @S-Mann, this feature is enabled in conjunction with the Jupyter extension. You might need to reinstall it to have access to it again.
For the second problem you raised, would you mind filing a separate issue providing information on your environment as well as repro steps, so we can investigate? Thank you!

Hey @luabud, thanks for the suggestion. I tried doing that. I also tried reinstalling/disabling pylance and python extension and no luck. But after updating to vscode==1.59.1 the issue just disappeared and the View Value in Data Viewer option now shows on the debug variables. If it helps I am using vscode server remote development. Also the other issue I stated disappeared after the update. I will report it if I see it any time in future.

Hi @S-Mann, this feature is enabled in conjunction with the Jupyter extension. You might need to reinstall it to have access to it again.

Hi @luabud! Can I please have some reference or docs that state which jupyter extension features might be essential to python development? For example, the debugger data-viewer is super cool to have, but I uninstalled all (including jupyter) but ten extensions to simplify as well as speed up the editor (I don't use notebooks).

@manojbaishya that makes sense! Most of the features that we believe to be interesting for Python developers from the Jupyter extension are in the Data Science section of our documentation.


FW-1418

AlphabetCharactersData, AlphabetCharactersPresentation

Extracted Data & Presentation components from branch FW-1234-v2
Moved .less to co-locate .css
Changed name from AlphabetListView to AlphabetCharacters*.  There is another component that is called AlphabetListView
Updated cypress tests to use new name

Hi @bronson-fpcc I opted to extract the Alphabet Data/Presentation components from the FW-1234-v2 branch instead of trying to merge all of the changes in one big PR. There's still a lot going on here so please message me with any questions!

@coakenfold can we hold off on merging this in today? thanks!

For sure @davidlacho, already discussed holding off with @bronson-fpcc


[Bug]: OdsTextField practically not usable as sizing or positioning constraints are not honored

Prerequisites

[X] I have searched the backlog for duplicate or closed feature requests

Your test device
Pixel 3 XL (whatever)
OS Version
Android 12 (any)
App version
0.15 (and previous)
Describe the issue
The implementation of OdsTextField prevent it to be used in a composition as another composable, as sizing or positioning constraints are not honored.
Examples:
@Preview(showBackground = true)
@Composable
fun SizingNotHonoredPreview() {
    OdsTheme(themeConfiguration = OrangeThemeConfiguration()) {
        Row {
            OdsTextField(
                modifier = Modifier.weight(1F),
                value = "Hey, my width is constrained to half of the screen",
                onValueChange = {}
            )
            OdsTextBody1(modifier = Modifier.weight(1F), text = "..., but you cannot see me!")
        }
    }
}

@Preview(showBackground = true, device = "spec:parent=pixel_5,orientation=landscape")
@Composable
fun PositionNotHonoredPreview() {
    OdsTheme(themeConfiguration = OrangeThemeConfiguration()) {
        Box(modifier = Modifier.fillMaxSize()) {
            OdsTextField(
                modifier = Modifier.align(BottomEnd),
                value = "I could have been at the bottom end, but I'm not",
                onValueChange = {}
            )
        }
    }
}

Indeed, in the implementation, no constraint from the modifier has been transferred to the root composable (a Column)
Expected Behavior
OdsTextField should honor sizing and positioning constraints passed to its modifier

@paulinea  how can this be tested?

@B3nz01d You can't, this is linked to a usage of the component by code...

Can't find a way to re-open the issue, but the fix was not applied to OdsPasswordTextField, which cannot be constrained by the caller as well.

Can't find a way to re-open the issue, but the fix was not applied to OdsPasswordTextField, which cannot be constrained by the caller as well.

Sorry, I missed it. I'll fix that quickly!


Ambiguous "Remove Linked Account" dialog

Gitea Version
1.15.6
Operating System
Windows 10 21H1
Browser Version
Firefox 94.0.1
Can you reproduce the bug on the Gitea demo site?
Yes
Description
(I choose Yes above because I have to chose one, but I did not test because I cannot link an account)
When I try to unlink a linked account, the "Remove Linked Account" is ambiguous.
The dialog shows a big trash can at the top center, and we have two buttons to choose from: a red "No" with a trash can and a green "Yes" with a check mark.
It took me a few seconds to figure out that the green "Yes" with the check mark is the delete button and the red "No" with the trash can is the cancel button.
Screenshots

I already fixed that in #17537.
1.15.7 won't have this issue anymore.


release rai-core-flask 0.3.0

Description
Release rai-core-flask 0.3.0 to pypi.
Changes since 0.2.5 release:
https://github.com/microsoft/responsible-ai-toolbox/commits/main/rai_core_flask

update several required dependencies
Pin markupsafe and itsdangerous to unblock gates
upgrade pytest to 7.0.1, remove mock and updgrade pytest-mock to 3.6.1
remove deprecated codecov parameter
add retry logic to codecov step and only upload results for one python version

Areas changed

npm packages changed:

[ ] responsibleai/causality
[ ] responsibleai/core-ui
[ ] responsibleai/counterfactuals
[ ] responsibleai/dataset-explorer
[ ] responsibleai/fairness
[ ] responsibleai/interpret
[ ] responsibleai/localization
[ ] responsibleai/mlchartlib
[ ] responsibleai/model-assessment

Python packages changed:

[ ] erroranalysis
[ ] raiutils
[ ] raiwidgets
[ ] rai_core_flask
[ ] responsibleai

Tests

[ ] No new tests required.
[ ] New tests for the added feature are part of this PR.
[ ] I validated the changes manually.

Screenshots (if appropriate):
Documentation:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

Codecov Report

Merging #1361 (a1ee80d) into main (4d2ff0a) will decrease coverage by 3.44%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1361      +/-   ##
==========================================
- Coverage   83.87%   80.43%   -3.45%
==========================================
  Files          54       18      -36
  Lines        2698      322    -2376
==========================================
- Hits         2263      259    -2004
+ Misses        435       63     -372

Flag
Coverage Δ

unittests
80.43% <ø> (-3.45%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

raiwidgets/raiwidgets/explanation_dashboard.py

...idgets/raiwidgets/responsibleai_dashboard_input.py

erroranalysis/erroranalysis/version.py

...dgets/raiwidgets/error_analysis_dashboard_input.py

raiwidgets/raiwidgets/error_handling.py

raiwidgets/raiwidgets/fairness_dashboard.py

raiwidgets/raiwidgets/__init__.py

raiwidgets/raiwidgets/responsibleai_dashboard.py

...s/erroranalysis/_internal/error_report/__init__.py

erroranalysis/erroranalysis/__init__.py

... and 26 more

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 4d2ff0a...a1ee80d. Read the comment docs.


Make e2e tests facebase-independent

Still one spec file to finish

@robes should I assign this to @chiragsanghvi ?

@hongsudt sure I think that makes sense to assign to Chirag.


Computing influence on a CNN

Hello,
I want to find the most influential training images for a CNN I created. Is there a way to accomplish this without reproducing my layer structure in your code and then retraining?
I was thinking about just copying the weights in the calculation process of the influence, but could not work out how to do this.
I would be very grateful if someone could get me a hint. Thanks in advance!

Have you done it? Could you share how you do it?

Sure. You will have to change the ig4_rbf_vs_inception.ipynb to include a CNN. They already included a CNN (all_CNN_c.py) which you can just use. In order to use your own CNN you have to change the inference function in all_CNN_c. The structure is just a basic tensorflow graph, you can look up the structure in your online tutorial of choice.
You may also have a look at my fork of the project in which I changed the code in order to fit my CNN.


Touch up refunds

#118

Fixes an error in the Refund documentation
Fixes a bug in processing unlinked refund items

@sandervanhooft hi Sander, what I am missing in the docs is how the rest of the refunds is going.
I understand that Mollie sends back a status once it is processed, to the webhook. I see that the package then sends a RefundProcessed event.
The customer also needs a credit invoice. Is this created automatically? In the views I only see the receipt.blade.php which does not include any 'credit invoice' text.
Maybe good to put this in the docs as well.
Thanks for this great package.

Hi @ixperiencenl ,
Good one. Generating the credit order and invoice is handled automatically once the refund is completed. I'll touch up the docs a bit in a moment.
Next time, please open a new issue ticket instead of replying on an existing PR/issue, especially when it's closed :) .

You're absolutely right, but I hate cluttering up the issues list with these kind of things. Anyway, thanks again!

NP, docs should be updated now


Check for invalidated files within dataset

Sometimes, files will become invalidated on DBS, but because we persist the io_mapping, we'll retain the invalid files and keep trying (and failing) to run on them. It's particularly tricky since these files would be embedded in condor jobs running on, say, 5 files, so we need to surgically remove them. An example script that I have been plopping into the task directory (and updating the dataset name to requery) is below. However, it would be nice (and easier, actually) to just do this check inside the CMSSWTask object.
import pickle
from metis.Sample import DBSSample

sample = DBSSample(dataset="/DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer17MiniAOD-92X_upgrade2017_realistic_v10-v1/MINIAODSIM")

with open("backup.pkl") as fhin:
    data = pickle.load(fhin)

already = set(sum([io[0] for io in data["io_mapping"]],[]))
current = set(sample.get_files())
to_remove = already - current

print "removing", to_remove

for fname in to_remove:
    for ioutput in range(len(data["io_mapping"])):
        if fname in data["io_mapping"][ioutput][0]:
            inps = data["io_mapping"][ioutput][0]
            out = data["io_mapping"][ioutput][1]

            inps = [inp for inp in inps if inp.get_name() != fname.get_name()]
            out.set_nevents(sum(inp.get_nevents() for inp in inps))

            data["io_mapping"][ioutput] = [inps,out]
            print data["io_mapping"][ioutput]

with open("backup.pkl", "w") as fhout:
    pickle.dump(data, fhout)

This is rare enough to not warrant a specific feature.

Uh, yeah, not rare


Fix viewAnsible permissions

These permissions where changed here: https://github.com/ManageIQ/manageiq/pull/19949
and as such, the Ansible playbook results would not be displayed.
Changing to use "service_view" permission since the manageiq-ui-classic uses "service" (level above), and this is only displaying the view, so this should be the only permission required.
Links

PR that removed the previous permission in jansa/kasparov/lasker`: https://github.com/ManageIQ/manageiq/pull/19949
PR that added the permissions back: https://github.com/ManageIQ/manageiq/pull/21065

QA steps
Directions for reproduction and testing of fix can be found in this gist:
https://gist.github.com/NickLaMuro/98878456f03d499c3d2acba736e8f63a
@miq-bot add-labels jansa/yes?,kasparov/yes?,lasker/yes?

@miq-bot assign @kavyanekkalapu
@kavyanekkalapu I have added a gist and steps to reproduce in a gist in the PR description.


Fix code coverage

Current coverage is 72.38% (diff: 100%)

Merging #254 into master will not change coverage

@@             master       #254   diff @@
==========================================
  Files            86         86
  Lines          4686       4686
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           3392       3392
  Misses         1294       1294
  Partials          0          0

Powered by Codecov. Last update 0673909...96d93e2


Italian tanslation

Translating our app to work with Italian. Presets first, then keyboard layout and functionality.

Listing here a todo to track progress

[ ] MVP Categories

[ ] General
[ ] Basic Needs
[ ] Personal Care
[ ] Conversation
[ ] Environment

[ ] Backlog

[ ] Feelings
[ ] Questions
[ ] Time
[ ] People
[ ] Numbers
[ ] Months

[ ] Error states
[ ] Alert modals
[ ] Empty states
[ ] Misc

MVP CATEGORIES

BACKLOG

ERROR STATES

ALERT MODALS

Empty States

Misc

Generali
Bisogni primari
Cura personale
Conversazione
Ambiente

Emozioni
Domande
Tempo
Persone
Numeri
Mesi

I've been working on the Italian translation and I am facing an interesting challenge. In Italian adjectives and nouns are gender-specific (this might be the case also for other languages) and I've been exploring how we can accommodate this in the UI. I've drafted a couple of options that we could take into account, looking forward to hearing your thoughts @sgordon1024 and team!
Option A
We could default to a specific gender and add an option to set the gender in the preferences. This approach might save us space in the UI but requires an extra step during setup. I drafted a possible direction for the preferences pane too (new menu item "genere" that means gender"). I like the immediacy of the current app, with basically no onboarding, and opting for this might be a drawback. In your experience what's the most common use case regarding setup?

Option B
We could display both gender-specific strings (male and female) side by side, but it seems a bit too repetitive and might squish the text too much in some cases.

Option C
Finally, we could opt for an approach similar to what they do in forms and surveys. Using the male version followed by /a to indicate the female version. This might be ok in some cases but might be repetitive in others, see the following screens.

Updated Option A based on the latest specs. Just as a reminder, this is the option where we would add a new setting item where you could pick your gender. This approach would make enable us to  save space in the UI for longer strings.

@aminalhazwani I like Option A personally as that allows for a larger variety of sayings, but I'll run these by the design team and the project team and see what everyone says.


makeDerivationParallel: Argument list too long

I'm getting the following error after successfully build around of 1000 makeDerivations (those are all the derivations that need to be run )
while setting up the build environment: executing '/nix/store/x0dcb2rxlzf32g0ddfkqqz1sfcyx4yay-bash-4.4-p23/bin/bash': Argument list too long

Apparently all the derivations were built since I got cache for the derivations,
however I cannot find the origin of this problem since I can't identify the command and the arguments that generate the error (I need help with this).
(Maybe the parallel derivation need as parameters all those nested derivations to generated the nix/store/...... ?)
The problem appears when "make-derivation-parallel" is being built, this is the function that evaluated all lazy functions that were built.

makeDerivationParallel is implemented as:
makeDerivation {
  env = {
    envDependencies = dependencies;
  };
  builder = "echo $envDependencies > $out";
  name = "make-derivation-parallel-for-${name}";
}

the command evaluates to: echo a b c d e ... > $out
given linux has a limit for the number of arguments that can be passed to a syscall then you get Argument list too long
we can make something like `cat $depsFile > $out, which only needs 1 argument for N dependencies

https://github.com/fluidattacks/makes/pull/315


Make it allow multiple pieces of audio to play

Use case: For when you want to play sound effects while a piece of music is playing
Desired behavior: Allow PLAY commands to spawn multiple concurrent audio threads so that more than one piece of audio can play at once
Current workaround: Manually mix the audio outside of JVN-DP, which may not align with user actions and might cause a desync.

Already works, I just wasn't listening hard enough.


How do I create bindings for devices I don't own?

I currently own a Vive Cosmos, but would like my software to support all SteamVR devices.
For the Vive Cosmos I've been able to make and publish bindings (by clicking on the "Replace default bindings button". Since I don't own other devices, I can't access the replace button. So I've edited the json bindings files that the SteamVR plugin creates.
When I try to use these bindings on a user's PC (users have tested with Rift S and Quest 2 through Oculus Link), SteamVR tells me it hasn't found any bindings. Although the json files are in the StreamingAssets folder, as they're supposed to be. I have attached my actions file and a couple of bindings files.
I'm using SteamVR plugin 2.7.3 and Unity 2019.4.21f. Image shows how the bindings show up in the UI.
If you need more information from me, please do ask. Or check the GitHub repo.

actions.json
{
  "actions": [
    {
      "name": "/actions/default/in/Pose",
      "type": "pose"
    },
    {
      "name": "/actions/default/in/SkeletonLeftHand",
      "type": "skeleton",
      "skeleton": "/skeleton/hand/left"
    },
    {
      "name": "/actions/default/in/SkeletonRightHand",
      "type": "skeleton",
      "skeleton": "/skeleton/hand/right"
    },
    {
      "name": "/actions/default/in/HeadsetOnHead",
      "type": "boolean",
      "requirement": "optional"
    },
    {
      "name": "/actions/default/in/Grip",
      "type": "boolean",
      "requirement": "mandatory"
    },
    {
      "name": "/actions/default/in/Trigger",
      "type": "boolean",
      "requirement": "mandatory"
    },
    {
      "name": "/actions/default/in/RotateRight",
      "type": "boolean"
    },
    {
      "name": "/actions/default/in/RotateLeft",
      "type": "boolean"
    },
    {
      "name": "/actions/default/out/Haptic",
      "type": "vibration"
    }
  ],
  "action_sets": [
    {
      "name": "/actions/default",
      "usage": "single"
    }
  ],
  "default_bindings": [
    {
      "controller_type": "vive_controller",
      "binding_url": "bindings_vive_controller.json"
    },
    {
    	"controller_type": "vive_cosmos_controller",
    	"binding_url": "bindings_vive_cosmos_controller.json"
    },
    {
      "controller_type": "oculus_touch",
      "binding_url": "bindings_oculus_touch.json"
    },
    {
      "controller_type": "knuckles",
      "binding_url": "bindings_knuckles.json"
    },
    {
      "controller_type": "holographic_controller",
      "binding_url": "bindings_holographic_controller.json"
    },
    {
      "controller_type": "vive",
      "binding_url": "binding_vive.json"
    },
    {
      "controller_type": "vive_pro",
      "binding_url": "binding_vive_pro.json"
    },
    {
      "controller_type": "rift",
      "binding_url": "binding_rift.json"
    },
    {
      "controller_type": "holographic_hmd",
      "binding_url": "binding_holographic_hmd.json"
    },
    {
      "controller_type": "vive_tracker_camera",
      "binding_url": "binding_vive_tracker_camera.json"
    }
  ],
  "localization": [
    {
      "language_tag": "en_US",
      "/actions/default/in/HeadsetOnHead": "Headset on head (proximity sensor)",
      "/actions/default/in/Pose": "Pose",
      "/actions/default/in/SkeletonLeftHand": "Skeleton (Left)",
      "/actions/default/in/SkeletonRightHand": "Skeleton (Right)",
      "/actions/default/out/Haptic": "Haptic",
      "/actions/default/in/Grip": "Grip",
      "/actions/default/in/Trigger": "Trigger",
      "/actions/default/in/RotateRight": "Rotate Right",
      "/actions/default/in/RotateLeft": "Rotate Left"
    }
  ]
}

binding_vive_cosmos_controller.json This is a known good bindings file
{
	"/actions/buggy": {
		"chords": [],
		"poses": [],
		"haptics": [],
		"sources": [],
		"skeleton": []
	},
	"/actions/default": {
		"chords": [],
		"poses": [
			{
				"output": "/actions/default/in/pose",
				"path": "/user/hand/left/pose/raw"
			},
			{
				"output": "/actions/default/in/pose",
				"path": "/user/hand/right/pose/raw"
			}
		],
		"haptics": [
			{
				"output": "/actions/default/out/haptic",
				"path": "/user/hand/left/output/haptic"
			},
			{
				"output": "/actions/default/out/haptic",
				"path": "/user/hand/right/output/haptic"
			}
		],
		"sources": [
			{
				"path": "/user/hand/left/input/trigger",
				"mode": "button",
				"inputs": {
					"click": {
						"output": "/actions/default/in/trigger"
					}
				}
			},
			{
				"path": "/user/hand/left/input/grip",
				"mode": "button",
				"parameters": {
					"click_activate_threshold": "0.8",
					"click_deactivate_threshold": "0.7",
					"force_input": "force"
				},
				"inputs": {
					"click": {
						"output": "/actions/default/in/grip"
					}
				}
			},
			{
				"path": "/user/hand/right/input/trigger",
				"mode": "button",
				"inputs": {
					"click": {
						"output": "/actions/default/in/trigger"
					}
				}
			},
			{
				"path": "/user/hand/right/input/grip",
				"mode": "button",
				"parameters": {
					"click_activate_threshold": "0.8",
					"click_deactivate_threshold": "0.7",
					"force_input": "force"
				},
				"inputs": {
					"click": {
						"output": "/actions/default/in/grip"
					}
				}
			},
			{
				"path": "/user/hand/left/input/joystick",
				"mode": "dpad",
				"parameters": {
					"sub_mode": "click"
				},
				"inputs": {
					"east": {
						"output": "/actions/default/in/rotateright"
					},
					"west": {
						"output": "/actions/default/in/rotateleft"
					}
				}
			},
			{
				"path": "/user/hand/right/input/joystick",
				"mode": "dpad",
				"parameters": {
					"sub_mode": "click"
				},
				"inputs": {
					"east": {
						"output": "/actions/default/in/rotateright"
					},
					"west": {
						"output": "/actions/default/in/rotateleft"
					}
				}
			}
		],
		"skeleton": [
			{
				"output": "/actions/default/in/skeletonlefthand",
				"path": "/user/hand/left/input/skeleton/left"
			},
			{
				"output": "/actions/default/in/skeletonrighthand",
				"path": "/user/hand/right/input/skeleton/right"
			}
		]
	},
	"/actions/platformer": {
		"chords": [],
		"poses": [],
		"haptics": [],
		"sources": [],
		"skeleton": []
	},
	"controller_type" : "vive_cosmos_controller",
	"description" : "",
	"name" : "vive_cosmos_controller"
}

bindings_oculus_touch.json This is a known bad bindings file
{
  "/actions/buggy": {
    "chords": [],
    "poses": [],
    "haptics": [],
    "sources": [],
    "skeleton": []
  },
  "/actions/default": {
    "chords": [],
    "poses": [
      {
        "output": "/actions/default/in/pose",
        "path": "/user/hand/left/pose/raw"
      },
      {
        "output": "/actions/default/in/pose",
        "path": "/user/hand/right/pose/raw"
      }
    ],
    "haptics": [
      {
        "output": "/actions/default/out/haptic",
        "path": "/user/hand/left/output/haptic"
      },
      {
        "output": "/actions/default/out/haptic",
        "path": "/user/hand/right/output/haptic"
      }
    ],
    "sources": [
      {
        "path": "/user/hand/left/input/trigger",
        "mode": "button",
        "inputs": {
          "click": {
            "output": "/actions/default/in/trigger"
          }
        }
      },
      {
        "path": "/user/hand/left/input/grip",
        "mode": "button",
        "parameters": {
          "click_activate_threshold": "0.8",
          "click_deactivate_threshold": "0.7",
          "force_input": "force"
        },
        "inputs": {
          "click": {
            "output": "/actions/default/in/grip"
          }
        }
      },
      {
        "path": "/user/hand/right/input/trigger",
        "mode": "button",
        "inputs": {
          "click": {
            "output": "/actions/default/in/trigger"
          }
        }
      },
      {
        "path": "/user/hand/right/input/grip",
        "mode": "button",
        "parameters": {
          "click_activate_threshold": "0.8",
          "click_deactivate_threshold": "0.7",
          "force_input": "force"
        },
        "inputs": {
          "click": {
            "output": "/actions/default/in/grip"
          }
        }
      },
      {
        "path": "/user/hand/left/input/joystick",
        "mode": "dpad",
        "parameters": {
          "sub_mode": "click"
        },
        "inputs": {
          "east": {
            "output": "/actions/default/in/rotateright"
          },
          "west": {
            "output": "/actions/default/in/rotateleft"
          }
        }
      },
      {
        "path": "/user/hand/right/input/joystick",
        "mode": "dpad",
        "parameters": {
          "sub_mode": "click"
        },
        "inputs": {
          "east": {
            "output": "/actions/default/in/rotateright"
          },
          "west": {
            "output": "/actions/default/in/rotateleft"
          }
        }
      }
    ],
    "skeleton": [
      {
        "output": "/actions/default/in/skeletonlefthand",
        "path": "/user/hand/left/input/skeleton/left"
      },
      {
        "output": "/actions/default/in/skeletonrighthand",
        "path": "/user/hand/right/input/skeleton/right"
      }
    ]
  },
  "/actions/platformer": {
    "chords": [],
    "poses": [],
    "haptics": [],
    "sources": [],
    "skeleton": []
  },
  "controller_type" : "oculus_touch",
  "description" : "",
  "name" : "oculus_touch_default",
}

I ran into this exact issue myself while developing my SteamVR game. I only own a Rift S so the only controllers it let me customize were the HTC Vive, Valve Index, and Rift S. Because of this I was unable to create an Input Binding for the Vive Cosmos and Windows Mixed Reality.
In one of the SteamVR Hub Patch Notes it specifically mentions "Allowed bindings for Windows Mixed Reality Controller to be edited even if a controller isn't present." Despite all my searching, I was unable to find a way to show it or the Vive Cosmos controllers.
My solution was to manually edit the input binding files for those two. The Rift S Controller and the Vive Cosmos controllers share the same button mappings so I copied the relevant parts from the Rift S binding into the index controller bindings and it worked like a charm.
My issue was creating a binding for the Windows Mixed Reality Gen 1 controllers. It's similar to the HTC Vive controllers but I still don't have a proper binding for it. However, the HP Reverb G2 also has a similar layout to the Rift S so I basically did the same thing as I did for the Cosmos to the holographic controller binding.
I've had no issues with players using those bindings after I manually created them. Still seems like there should be an easier method to do this for controllers you don't own.

Thanks for your input @AlkalineDevelopment! As far as I can tell, I did the exact same thing as you did. But it didn't work for me. So I suspect there is some other issue on my end.

Have both Steam and SteamVR open.
SteamVR status window > Menu (top left corner) > Settings > Controllers > Show Old Bindings UI > Select Your App > In the "Current Controller" box click on the controller name > In the "Current Bindings" box click edit.
(You can also reach this from within Unity via: Window > SteamVR Input > Open binding UI.)
Once the bindings are configured click "Export Binding File. You will still need to copy the files (or sections of the files) back in to the project in Asserts > StreamingAssets > SteamVR.
NOTE: This only works for the controllers. Bindings for headset inputs (e.g. user presence on binding_index_hmd.json) still need to be manually edited as far as I can tell.
NOTE: The SteamVR package ships with only Index and Holographic (a.k.a WIndows Mixed Reality) headset presence bindings. When I figure out what (if anything) to do about Oculus headsets I'll post again.


global name 'verifyssl' is not defined

when running
st2 run packs.install packs=ansible repo_url=https://github.com/StackStorm/st2contrib.git
action output contains this error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/st2actions/runners/python_action_wrapper.py", line 116, in <module>
    obj.run()
  File "/usr/lib/python2.7/dist-packages/st2actions/runners/python_action_wrapper.py", line 61, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/packs/actions/pack_mgmt/download.py", line 23, in run
    abs_local_path = self._clone_repo(repo_url, branch=branch)
  File "/opt/stackstorm/packs/packs/actions/pack_mgmt/download.py", line 40, in _clone_repo
    if not verifyssl:
NameError: global name 'verifyssl' is not defined

vagrant install
st2 <IP_ADDRESS>
Vagrant 1.7.2
VirtualBox 4.3.28

This has been fixed a while ago (#1450), but it looks like the fix hasn't been backported into the 0.9.x series yet.
I will make sure we backport the fix into 0.9.x ASAP. In the mean time, you can try it out using v0.10dev version where this should be fixed.
Sorry for the inconvenience and I will let you know once the fix has been backported.

@justquick Just wanted to let you know that v0.9.2 with this fix has been released.
You can install it on Ubuntu by using this script  - http://downloads.stackstorm.net/releases/st2/0.9.2/debs/st2_deploy.sh

Closing as this is now fixed.


yarn build failed on Windows

I'm following the steps in the Readme. I'm trying to build the project on Windows using yarn build.
But I get the following error.
$ node -r babel-register node_modules/.bin/webpack --progress --colors
C:\Users\zsd19\workspace\markdown-plus\node_modules\.bin\webpack:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Module._extensions..js (module.js:580:10)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\zsd19\workspace\markdown-plus\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)

I don't use Windows myself. You might have to node -r babel-register node_modules/.bin/webpack.bat --progress --colors.

I have this problem too, when i run yarn watch, I got the same error.

Same. Is it getting fixed anytime soon? I had similar errors with other projects, and it was caused by software conflicts. Try moving to a new computer with only 1 version of MSVC and 1 version of python installed.

I don't use Windows. Have you tried the suggestions above? Replace node_modules/.bin/webpack with node_modules/.bin/webpack.bat or similar. I think windows has different executable entry files.

Yep, I tried everything.
I built it in Mac at last.

Anything new to run on Windows?

@clarkzsd @emorywang @tylerlong
I have found solution for this on Window 10
Edit file package.json in parent folder and change node_modules/.bin/webpack to the path of webpack.js
"build": "node -r babel-register node_modules/webpack/bin/webpack.js --progress --colors",

@t2hv33 Thx,it worked.

Thx a lot!


[bug] HTML characters should be allowed inside of no-useless-fragment

Describe the bug
The following code produces an error but is a false positive:
function Foo() {
	return <> </>;
}

Reproduction
No response
Expected behavior
An error should not be reported in this case.
Platform and versions
Node 20.18.0
@eslint-react 1.15.0

Stack trace
No response
Additional context
No response

Any more reproduction?
With React 18.3+ and TypeScript 5.4+, it is possible to return a string in a Component now. Your current reproduction can be simplified to:
function Foo() {
	return ' ';
}

@SukkaW no, unfortunately that won't work.   is a reserved character in HTML. React handles strings for us. It's the same reason we can't return '
Hello, world
'. We wouldn't expect that to work! Here's a codesandbox.

function Foo() {
  return ' ';
}

Then it would be:
function Foo() {
  return ' ';
}


[SYSTEMML-692] Added initial version of DML generator for Caffe proto

Updated the interface to match the Caffe specification as per @bertholdreinwald 's suggestion.
Added support for fine-tuning.
Added support for explain, statistics and gpu.

Demonstrates fine-tuning and prediction

# Download the MNIST dataset
from mlxtend.data import mnist_data
import numpy as np
from sklearn.utils import shuffle
X, y = mnist_data()
X, y = shuffle(X, y)
num_classes = np.unique(y).shape[0]
img_shape = (1, 28, 28)

# Split the data into training and test
n_samples = len(X)
X_train = X[:int(.9 * n_samples)]
y_train = y[:int(.9 * n_samples)]
X_test = X[int(.9 * n_samples):]
y_test = y[int(.9 * n_samples):]

# Download the Lenet network
import urllib
urllib.urlretrieve('https://raw.githubusercontent.com/niketanpansare/model_zoo/master/caffe/vision/lenet/mnist/lenet.proto', 'lenet.proto')
urllib.urlretrieve('https://raw.githubusercontent.com/niketanpansare/model_zoo/master/caffe/vision/lenet/mnist/lenet_solver.proto', 'lenet_solver.proto')

# Train Lenet On MNIST using scikit-learn like API
from systemml.mllearn import Caffe2DML
lenet = Caffe2DML(sqlCtx, solver='lenet_solver.proto').set(max_iter=500, debug=True).setStatistics(True)
print('Lenet score: %f' % lenet.fit(X_train, y_train).score(X_test, y_test))

# Save the trained
lenet.save('lenet_model')

# Fine-tune the existing trained model
new_lenet = Caffe2DML(sqlCtx, solver='lenet_solver.proto', weights='lenet_model').set(max_iter=500, debug=True)
new_lenet.fit(X_train, y_train)
new_lenet.save('lenet_model')

# Use the new model for prediction
predict_lenet = Caffe2DML(sqlCtx, solver='lenet_solver.proto', weights='lenet_model')
print('Lenet score: %f' % predict_lenet.score(X_test, y_test))

Show prediction using ResNet:

from systemml.mllearn import Caffe2DML
from pyspark.sql import SQLContext
import numpy as np
import urllib, os, scipy.ndimage
from PIL import Image
import systemml as sml

# ImageNet specific parameters
img_shape = (3, 224, 224)

# Downloads a jpg image, resizes it to 224 and return as numpy array in N X CHW format
url = 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/MountainLion.jpg/312px-MountainLion.jpg'
outFile = 'test.jpg'
urllib.urlretrieve(url, outFile)
input_image = sml.convertImageToNumPyArr(Image.open(outFile), img_shape=img_shape)

# Download the ResNet network
import urllib
urllib.urlretrieve('https://raw.githubusercontent.com/niketanpansare/model_zoo/master/caffe/vision/resnet/ilsvrc12/ResNet_50_network.proto', 'ResNet_50_network.proto')
urllib.urlretrieve('https://raw.githubusercontent.com/niketanpansare/model_zoo/master/caffe/vision/resnet/ilsvrc12/ResNet_50_solver.proto', 'ResNet_50_solver.proto')

resnet = Caffe2DML(sqlCtx, solver='ResNet_50_solver.proto', weights='/home/biuser/model_zoo/caffe/vision/resnet/ilsvrc12/ResNet_50_pretrained_weights').set(input_shape=img_shape)
resnet.predict(input_image)

@bertholdreinwald @dusenberrymw @mboehm7 @prithvirajsen

To try above code, please use following command:
git clone https://github.com/niketanpansare/incubator-systemml.git
cd incubator-systemml/
git checkout caffe_new_cleanup
mvn -Djcuda.scope=compile clean package
cd src/main/python/
cp -R ../../../scripts/staging/SystemML-NN/nn .
~/spark-2.1.0-bin-hadoop2.7/bin/pyspark --driver-class-path ../../../target/SystemML.jar --jars ../../../target/SystemML.jar --driver-memory 40g --conf spark.driver.maxResultSize=0

Adding @frreiss

As an FYI, I am planning to change the name of API from Barista to Caffe2DML. Will update the PR with the change soon.

I would recommend keeping it as "Barista".  That way, we could extend it to support Keras another libraries.

@mboehm7 @nakul02 @bertholdreinwald @deroneriksson @asurve @dusenberrymw  I plan to merge this PR once 0.14 RC is approved to give us enough time to perform testing before 1.0 release.

All tests passed.


Remove branchprotection from capi-env-pool

This repo is used for a concourse pool resource (https://github.com/concourse/pool-resource) and is not packaged with capi-release or cf-deployment, so branch protection is not needed.

cc @tcdowney @moleske @sethboyles


I need Autobuild !!

Please answer these questions before submitting your issue. Thanks!
Also, remember that to restart gocode, you have to run gocode close.
What version of Go are you using (go version)?
1.13
What operating system and processor architecture are you using (go env)?
Arch ARM
What is the debug output of gocode?
Nope.
Run gocode close and then run gocode -s -debug to restart gocode in debug mode.
Try to complete once again from your editor, and paste the output printed by gocode here.
What (client-side) flags are you passing into gocode?
Please note here if you are using -source, -builtin, -ignore-case, -unimported-packages, or -fallback-to-source.
What editor are using?
Anyway, nsf/gocode has this future, but this version is not available . So that I can't get Completion suggestions in time when I just modify and save a file.

As stated in the README, this version of gocode is currently in maintenance mode, so new features will not be added. gopls operates on files as they change, even if they are not saved, so I suggest you try that as an alternative.


Stability AI does not produce observability metrics

When I generate images with OpenAI, I can see the metrics for those generations in the Actuator's metrics endpoint. But not when generating images with Stability AI. A quick search through the Stability AI code suggests that observability has not been introduced into that model yet.

Hello whats up?! i think it maybe help, an friend of mine had that same issue, to address this issue, observability needs to be integrated into the Stability AI model to track image generation metrics, similar to how OpenAI's model metrics are visible in the Actuator's metrics endpoint.
Steps to Enable Observability for Stability AI Image Generation
Implement Metrics Logging:
Add custom metrics logging for Stability AI image generation requests. This involves defining key performance indicators (KPIs) such as generation time, number of requests, errors, and other relevant metrics to track.
Use a monitoring framework like Micrometer or Prometheus, which can be configured to expose metrics through the Actuator’s metrics endpoint.
Integrate with Actuator's Metrics Endpoint:
Update the Stability AI service code to push these metrics to the Actuator's metrics endpoint. Ensure that these metrics are tagged appropriately (e.g., stability-ai.image-generation) to distinguish them from other services.
Test Observability:
Once observability is implemented, verify that Stability AI image generation metrics appear correctly in the Actuator's endpoint. This will involve generating test images with Stability AI and confirming that metrics data is recorded and visible in your monitoring dashboard.
Documentation Update:
Update the project documentation to include the new metrics being tracked and instructions on accessing them. Specify any new configuration steps required for enabling observability in the Stability AI service.
By following these steps, you can monitor image generation metrics from Stability AI in a way that aligns with the existing observability setup for OpenAI, providing a comprehensive view of performance across both models.
i hope it can helps


Issue1334

any paginable link or form uses paginable-action selector to avoid conflicting with other wider selectors. DMPRoadmap/roadmap#1334

@briri, I'm merging this proposal but tagging you in case you want to add some comments

ah ok. This will be a better solution long term. Thanks for updating.


Keyboard shortcut conflicts: Control-Shift-U

Normally, with KDE Plasma 5 on FreeBSD (probably also on Linux), key chords Control-Shift-U and Shift-Control-U can be used for Unicode character composition. For example:
Control-Shift-U 2 0 2 6 Spacebar = …
– the ellipsis character.
When Refined GitHub is enabled, Control-Shift-U and Shift-Control-U seem to be misinterpreted as prompts to present a File Upload dialogue.

If you're willing to sacrifice the Upload button and just rely on drag-drop, you can now disable it+shortcut in the options. Add upload-button to the Disabled features.


Integrate FCM 22.0.0.

What
Where/Who

JIRA Issue
N/A

People Involved
Just me

Notes on PR descriptions
Background
firebase-messaging 22.0.0 deprecates the FirebaseInstanceId class, which is used by LeanplumFcmProvider. This causes a crash in apps that implement firebase-messaging 22.0.0 together with Leanplum 5.7.0.
Implementation
This PR implements firebase-messaging 22.0.0 by changing the references to FirebaseInstanceId in LeanplumFcmProvider to FirebaseMessaging.
Testing steps
All tests should still pass, including LeanplumPushServiceTest. Moreover, this change successfully sets a push token for our device, visible on Leanplum's web client. We also receive push notifications as expected.
Is this change backwards-compatible?
Unfortunately, this change is not backwards-compatible with versions of firebase-messaging before 22.0.0. Please let me know if you want to accommodate for that, and the preferred way of doing so. I will try to implement your suggestions.

@JayShortway, thank you for your PR. We are aware of the change that needs to be done, but the latest FCM package, supporting these new methods, is still not old enough to require our clients to update to it. Check my PR #454. Currently we support FCM up to 21.1.0.
We'll update it to use the new methods in several months.


precacheAndRoute should return a promise

Welcome! Please use this template for reporting bugs or requesting features. For questions about using Workbox, the best place to ask is Stack Overflow, tagged with [workbox]: https://stackoverflow.com/questions/ask?tags=workbox
Library Affected:
workbox-sw
Browser & Platform:
all browsers
Issue or Feature Request Description:
precacheAndRoute should return a promise.
So that precacheAndRoute(...).then(()=> self.skipWaiting()) is possible.

Hi there,
Workbox is moving to a new engineering team within Google. As part of this move, we're declaring a partial bug bankruptcy to allow the new team to start fresh. We realize this isn't optimal, but realistically, this is the only way we see it working. For transparency, here're the criteria we applied:

For PRs, we closed everything that doesn't target the current v7 branch.
For Issues, we closed everything that was created before 2024.

Thanks, and we hope for your understanding!
The Workbox team

Off topic but it's very interesting to see the idea of bug bankruptcy.

It's not unheard of. At Google, we declare bug bankruptcy when an unmanageable amount of bugs have piled up. In this case, because the repo wasn't super actively maintained for a while… As a developer myself, I agree that the situation is less than ideal. Sorry.


Doing 5 damage to Flier

When doing a genocide route, I set all my stats to<PHONE_NUMBER>999999999999 and gave myself friendliness pellets and yet I still do 5 damage to flier, did I set the values to high or is this a bug? [[NOTE]] I set myself to LV.20 but then I killed a Flier I went to LV.21.

So, you set your stats very high, killed a Flier immediately, advanced to LV21 and then were dealing 5HP damages to Fliers? If so, then no, that's not a bug: the game must have reset all your stats to 0 because it can't find any stats for LV21. Can you load your save into the editor again and check your stats? Also, can you send you save file here, too?

That was the problem, there is no values except defense at LV.21, thank you!
[[It's not letting me send .sav files.]]

Also, something cool/weird that happened was it put me back on a pacifist route I did before the reset, so I guess Save02.sav was my genocide path.

Closing this as completed, since the original issue seems to be resolved.


Fix AttributeError: 'ParsedRequirement' object has no attribute 'req'

I took the liberty to cast the fix proposed by nahimilega into a pull request.

Fixes issue #7

please merge this pull request.
there are another solution also.
    try:
        return [str(ir.req) for ir in reqs]
    except:
        return [str(ir.requirement) for ir in reqs]

ref: https://stackoverflow.com/questions/62114945/attributeerror-parsedrequirement-object-has-no-attribute-req


Mixed BLS

Motivation
We want a stable BLS - Job Wait Time metric, ideally it should be < 100ms consistently
Description

Write a BlsMixedVerifier to send batchable bls jobs to worker threads and non-batchable ones to main thread
It's not likely we want to try using singleThreadVerifier, so change the flag to useMultiThreadVerifier, default to false
More explanation on #3792

Closes #3792

Test result in contabo-18 (250 validators) for ~16h (previously it's tuyen/gossip_penalize_peer branch)

BLS job wait time is improved

Thanks for that gossip validation time is improved

Gossip Block Processed delay has been great since we deploy this branch, even through we verify gossip blocks' signatures in the main thread

Looks like it's a good trade-off. Also @dapplion I notice the "gossip validation gap" issue in previous branch (tuyen/gossip_penalize_peer), which hasn't happened in this branch so far. At least we know that issue is not specific to ssz-v2 branch.

Some feedback items

Remove BlsMixed class, just add and if inside the BlsMultiThread class

  async verifySignatureSets(sets: ISignatureSet[], opts: VerifySignatureOpts = {}): Promise<boolean> {
    if (opts.useMainThread) {
      return verifySignatureSetsMaybeBatch(
        sets.map((set) => ({
          publicKey: getAggregatedPubkey(set),
          message: set.signingRoot.valueOf() as Uint8Array,
          signature: set.signature,
        }))
      );
    }

Verifying blocks on mainthread during sync will be a performance issue. Add a flag in the block processor {blsVerifyMainThread: true}, and set to true only on gossip handler and unknown block sync

To clean-up the flags I think we should have

--blsVerifyAllMainThread default false. In BeaconChain constructor uses the BlsSingleThread class
--blsVerifyAllMultiThread default false. Ignores the useMainThread flag in the BlsMultiThreadWorkerPool

Add a metric that counts total CPU time spent verifying signatures on the main thread. Just an incremental gauge of seconds using process.hrtime.bigint()

with #3812, gossip p7 penalty (broken IWANT promises issue) is avoided most of the time so this PR is less important
also in hetzner-test0 (with >900 validators), BLS Job wait time is consistently low

with #3812, gossip p7 penalty (broken IWANT promises issue) is avoided most of the time so this PR is less important

I want to revert #3812 (see https://github.com/ChainSafe/lodestar/pull/3815), so I think we should merge this PR.


Grant more rights to users with AL privileges (seeing other users jobs / ability to set session to other user)

Use case:
As a CrateDB user with admin privileges on cluster level I want to be able to run certain commands like setting a session to another user with SET SESSION AUTHORIZATION username, as I already have the ability to basically drop, recreate and login as this user anyway. Also changing the password of an existing user should be possible, for pretty much the same reason. This might be needed to stop a long running job (e.g. import of large datasets)
Feature description:
Allow the following Statements for users with AL privileges:

SET [ SESSION | LOCAL ] SESSION AUTHORIZATION username
This should also make it possible to run KILL ALL for jobs started by username through the logged in user.

Further users with AL privileges should be able to see all running jobs within sys.jobs (maybe except of superuser crate), to identify long running jobs and have a general picture - as admin user - what is happening in the cluster.

If https://github.com/crate/crate/issues/16033 gets implemented, would you still think that AL ought to be able to impersonate users or see all jobs?

If https://github.com/crate/crate/issues/16033 gets implemented, would you still think that AL ought to be able to impersonate users or see all jobs?

I would probably tend to stick with PostgreSQL and keep it a superuser privilege:

PG Docs
The session user identifier can be changed only if the initial session user (the authenticated user) had the superuser privilege. Otherwise, the command is accepted only if it specifies the authenticated user name.


Error when processing

report errors
Redeploy, still reporting an error
getwud/wud:latest
2024 — WUD (version latest)
Error when processing (Error: Client network socket disconnected before secure TLS connection was established
Error when processing some containers (Cannot read properties of undefined (reading 'tag'))

log
WUD (2).txt
WUD (3).txt

Weird.
Where are your images from?  Docker Hub?
Do you have any networking stuff that could prevent wud from performing Https requests to public registries?

Yes, it is.
It's all pulled from Docker Hub.
It still fails after the update, I'm connecting through a proxy. The network should be fine. Other containers also access through this proxy without any problems, access is fine.

WUD.txt
docker create
--name WUD
--privileged
-v "/var/run/docker.sock:/var/run/docker.sock"
-v "/volume1/docker/WUD/":/store
-p 30003000
-e TZ="Asia/Shanghai"
-e WUD_AUTH_BASIC_chong_USER=""
-e WUD_AUTH_BASIC_chong_HASH=""
-e WUD_TRIGGER_SMTP_QQ_HOST=""
-e WUD_TRIGGER_SMTP_QQ_PORT=""
-e WUD_TRIGGER_SMTP_QQ_USER=""
-e WUD_TRIGGER_SMTP_QQ_PASS=""
-e WUD_TRIGGER_SMTP_QQ_FROM=""
-e WUD_TRIGGER_SMTP_QQ_TO=""
-e WUD_TRIGGER_SMTP_QQ_ONCE="false"
-e WUD_WATCHER_LOCAL_CRON="0 10 * * "
-e WUD_TRIGGER_SMTP_QQ_SIMPLETITLE="容器《${name}》有新版本${semver}，请更新。"
-e WUD_TRIGGER_SMTP_QQ_SIMPLEBODY="容器《${name}》有新版本${semver}，请更新。可以从版本：${local} 。更新到版本：${remote}"
-e WUD_REGISTRY_HUB_LOGIN=""
-e WUD_REGISTRY_HUB_PASSWORD=""
--restart unless-stopped
-e HTTP_PROXY=http://...:**
-e HTTPS_PROXY=http://...:***
getwud/wud:latest

I'm not sure that the http client configured to query the registry automatically handles the HTTP_PROXY HTTPS_PROXY env vars 🤔 ; I need to check.

I checked; the HTTPS_PROXY env var is taken account.
What kind of proxy is it?
A Squid?
Or a proxy performing some kind of SSL Man In The Middle?

I'm using a plugin in the OpenWrt router system with the name: OpenClash
Don't know much about the specifics


Call to runtimeType raises exception in generated js, checking type with IS or == misbehaves

After upgrading to version 1.21.0, dart2js started misbehaving in a weird manner. I'll try to explain the situation, but it's still unclear to me what's happening. The only thing I can claim for sure is that reverting back to 1.20.1 fixes the issue.
I have a class with noSuchMethod which I make use of to create dynamic getters and setters. When an object of any type is returned from such a getter (in reality, from noSuchMethod) it misbehaves. For example if a null is returned and, say, is assigned to an x variable then:

x == null evaluates to false
while x is Null evaluates to true.

If a String is returned, then

x is String and x is Null would both be true
while x == null would be false.

Additionally, calling x.runtimeType causes an exception.
It seems the issue only manifests itself when the value is returned from noSuchMethod, regular variables, methods and literals are unaffected. And this is only in compiled js. Dart code works fine. Once again, reverting to 1.20.1 solves the issue.

It doesn't reproduce for me in in a simple example (https://dartpad.dartlang.org/a003a1828aecd3886973c0cbf3091b00).
Are you using the "trust type annotations" option?
Do you have a small example that shows the problem?

Are you using the "trust type annotations" option?
Do you mean the -c option from https://webdev.dartlang.org/tools/dart2js#options? If that's the one you mean, then yes, I tried both with it and without. Same result.

Do you have a small example that shows the problem?
Not at the moment. I'm not surprised you cannot reproduce it, I'm not sure myself this misbehavior is due to noSuchMethod. I was trying to isolate the issue, but haven't managed to do so. I'll be happy to provide a simple example that reproduces the problem, but it'd be nice if you or someone else could maybe come up with some ideas as to what might possibly be the cause of that.

I have a rather big (but relatively well written) lib code in which the problem manifests itself, let me know if it'd be helpful for you to look at it, I'll point you in all the right places.

Any repro would currently help, even if it's big. Ideally, we would prefer working from sources, but if necessary, we could also try to debug the (unminified) dart2js output. It's not clear if that would give us enough information to diagnose the problem, but I/we could give it a shot.

Thank you Florian.
Here's where you should be looking: https://github.com/snitko/nest_ui/blob/master/lib/component.dart#L389
https://github.com/snitko/dart-attributable/blob/master/lib/attributable.dart#L114
I tried testing the Null/String values inside both of those methods, they work fine. Only when they are returned from noSuchMethod it seems that there's a problem. Additionally, I made sure that the values returned from prvt_noSuchGetterOrSetter are the ones that I get a problem with - they are. That is, nothing in between seems to be interfering.
I'll be working on isolating the problem tonight and will let you know if I can reproduce the issue with a simpler piece of code outside of the library. Please let me know if you get any ideas yourself. Thanks a lot for your help, I hope we can narrow this bug down.

Do you have a way to trigger the problem?
I tried to run test/behaviors_test.dart and that one worked for me (with trunk).

I still can't reproduce.
My latest attempt looks as follows:
import 'package:attributable/attributable.dart';

class T extends Attributable {

  final List attribute_names = ['caption', 'color', 'enabled'];

  final Map attribute_callbacks = {
    'default' : (attr_name, self) => print("Attribute $attr_name now has a new value: ${self.attributes[attr_name]}"),
    'caption' : (attr_name, self) => print("Caption is now '${self.caption}'"),
    'enabled' : (attr_name, self) => print("Enabled is now set to '${self.enabled}'")
  };

  noSuchMethod(Invocation i) {
    try {
      return prvt_noSuchGetterOrSetter(i);
    } on NoSuchAttributeException {
      super.noSuchMethod(i);
    }
  }
}

main() {
  var o = new T();
  o.caption = "New caption";
  o.enabled = true;
  o.color = 'green';
  o.enabled = null;
  print(o.enabled == null);
  print(o.enabled is Null);
  print(o.color is String);
  print(o.color is Null);
  print(o.color == null);

Which (compiled with dart2js 1.21) results in:
Caption is now 'New caption'
Enabled is now set to 'true'
Attribute color now has a new value: green
Enabled is now set to 'null'
true
true
true
false
false

This looks like the expected output.

I was able to create a more or less isolated example (attached). The problem seems to be within nest_ui lib and not attributable. In the attachment you'll find files compiled with both 1.20.1 and 1.21.0. The latter clearly evaluates incorrectly and then an exception is raised when runtimeType is called. I hope having two compiled javascript files will help, although running diff on them wasn't useful to me, it just spewed complete nonsense.
To make the Dart version work, make sure you run pub get --packages-dir first.
dart_test.zip
Below is the dart code from which the files were compiled:
library myapp;
import 'package:nest_ui/nest_ui.dart';
import 'package:attributable/attributable.dart';

class MyComponent extends Component {

  List attribute_names = ["name", "login", "email"];

  noSuchMethod(i) {
    try {
      return prvt_noSuchGetterOrSetter(i);
    } on NoSuchAttributeException {
      super.noSuchMethod(i);
    }
  }

  MyComponent() {
    print(!(this.name is Null));
    print(this.name != null);
    print(this.name.runtimeType);
  }

}

main() {
  var app = new NestUIApp(app_library: 'myapp');
}

Thanks. I can reproduce now.
Interestingly the dart 1.21 from here doesn't exhibit the problem. This must have been added shortly after the first 1.21 dev release.
https://storage.googleapis.com/dart-archive/channels/dev/release/1.21.0-dev.0.0/sdk/dartsdk-linux-ia32-release.zip

My installation of Dart is done with apt-get, the exact version is 1.21.0-1.

I continued to investigate:
The 1.20 code produces:
      MyComponent$0: function() {
        P.print(!J.getInterceptor(this.get$name(this)).$isNull);
        P.print(this.get$name(this) != null);
        P.print(J.get$runtimeType$(this.get$name(this)));
      },

The 1.21 code produces:
      MyComponent$0: function() {
        this.get$name(this);
        P.print(false);
        this.get$name(this);
        P.print(true);
        var t1 = this.get$name(this);
        P.print(t1.get$runtimeType(t1));
      },

Somehow the compiler infers a non-null type for name...
I will continue to investigate (and then pass it on to someone on the dart2js team).

You should also try assigning non-null types to the attribute, then printing it. As stated in the original post, even String values react inadequately to is Null returning true instead of false.

This bug was introduced with bdeb6023afc02c15e6a660823c3308c977022c26
@johnniwinther : could you have a look?
Also: this, seems to be unrelated to #28220.

I'll take a look.

I have committed a fix in https://github.com/dart-lang/sdk/commit/12491d4ab869b903870b0783c5fd715e8307b47d
This will be part of 1.22. Until then you can use this work-around: The compiler needs to see a direct instantiation of the class in question, that is, not only through mirrors. In the repo this can be done by adding:
class MyComponent {
  MyComponent() {
    if (false) new MyComponent();
    ...
  }
}

The call will be recognized as dead code and not be part of the output, but it will trigger a registration of a direct instantiation of the class, bypassing the erroneous code.


UAADB Housekeeping

We are running a large CloudFoundry deployment and found several housekeeping issues:

expiring_code_store: even that a expiresat column exists in that table, expired one-time passcodes get never deleted; over time, that table will get bigger and bigger. In one of our internal test systems we already see 151,000 entries.
oauth_code: If - for whichever reason - the OAuth2 authorization code was never exchanged for a token, entries in that table are not deleted also. Even worse, we do not have an expiration date in that table at all. In an internal test system, we can see already 173,000 most of them will never be used. Can we introduce an expiration into this table for this code (e.g. the duration that a token would be valid - I don't think that the authentication code should be valid for a longer period), so we have a chance to clean that up some time?
For postgreSQL, I have never seen database maintenance scripts like VACUUM running. Do we have administration recommendations documented to do that manually, or should we have code to do that automatically?

For the first two bullets, we could either by having a regular maintenance job, e.g. started by CRON, or doing housekeeping during runtime, e.g. when creating a new oauth_code entry, we could first delete all expired oauth_code entries. This should not harm, as it will be only a few deleted rows during normal processing.

Thanks for the report, let me address them by bullet

expiring_code_store - that's a bug - currently the table only deletes expired rows when a code is retrieved. We should extend this to when a code is created too

oauth_code - known issue - that should expire for sure. even tokens have expirations on them, so the code

Database maintenance - The UAA is only a consumer of the DB. While we create the schemas and maintain the data in there, the responsibilities of keeping the DB running would still fall on the DBA. If we automate it, are we potentially starting actions that would cause the DB to fail or fail to perform?

Fixed via https://www.pivotaltracker.com/story/show/98149612


Exception when trying to add/remove files to/from F# Azure Functions projects

Describe the bug
I receive the below error in Forge's output in VS Code when trying to add/remove files from a new Azure Functions app created with the Azure Functions extension:
C:\Users<USER>.vscode\extensions\ionide.ionide-fsharp-4.0.6\bin_forge\Forge.dll add file -n c:\Users<USER>\Desktop\MyFunctionApp\MyHttpTrigger.fs --no-prompt
Unhandled error:
Object reference not set to an instance of an object.
To Reproduce
Steps to reproduce the behaviour:

Install the Azure Functions VS Code extension
Set "azureFunctions.projectLanguage": "F#" in your USER settings
Run "Azure Functions: Create New Project"
Change the template filter to "All" to unlock F# templates
Select HttpTrigger and then the default for the rest of the options
Currently the .fs file for the HttpTrigger is not included in the fsproj by default (debatable whether that's a feature or a bug) so to add it, open the file, then run "F#: Add Current File to Project"
Observe the error above in the Output window with Forge selected

Expected behaviour
HttpTriggerFSharp.fs is added to the fsproj file
Environment (please complete the following information):

OS: Windows 10 1903
Ionide version: 4.0.6
VSCode version: 1.36.1 (user setup)
dotnet SDK version: 3.0.100-preview6-012264
mono / .Net Framework version: N/A

Additional context
Testing against F# console apps created with Forge in VS Code and with dotnet new worked fine so the problem seemed unique to the Azure Functions template.
I downloaded the latest Forge source to debug and get more context on the nullref exception and believe the issue is with the additional items the Azure Functions templates add to the fsproj, namely:
  <ItemGroup>     <None Update="host.json">       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>     </None>     <None Update="local.settings.json">       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>       <CopyToPublishDirectory>Never</CopyToPublishDirectory>     </None>   </ItemGroup>
If I remove this ItemGroup, everything works as expected.
I think I tracked it down to the code here which accepts "None" elements as SourceFiles and assumes/expects they have an "Include" attribute which these don't (it doesn't use the try* pattern as subsequent lines do). This cascades later into the below NullReferenceException when trying to get the value of the "Include" attribute which doesn't exist here.
The fix is to remove the assumption that all SourceFile elements in an fsproj have an "Include" attribute or change the definition of what a SourceFile-compatible fsproj element is based on how the Azure Functions templates work.
{System.NullReferenceException: Object reference not set to an instance of an object.    at Forge.XLinq.XAttr.value(XAttribute xattr) in C:\Users\<USER>\Desktop\Forge\src\Forge.ProjectSystem\XLinq.fs:line 127    at Forge.XLinq.XElem.getAttributeValue[a](String name, a xelem) in C:\Users\<USER>\Desktop\Forge\src\Forge.ProjectSystem\XLinq.fs:line 187    at Forge.ProjectSystem.SourceFile.fromXElem(XElement xelem) in C:\Users\<USER>\Desktop\Forge\src\Forge.ProjectSystem\ProjectSystem.fs:line 383    at Forge.ProjectSystem.srcTree@1118.Invoke(XElement arg00) in C:\Users\<USER>\Desktop\Forge\src\Forge.ProjectSystem\ProjectSystem.fs:line 1118    at Microsoft.FSharp.Collections.Internal.IEnumerator.map@74.DoMoveNext(b& curr)    at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()    at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)    at Forge.ProjectSystem.FsProject.fromXDoc(XDocument xdoc) in C:\Users\<USER>\Desktop\Forge\src\Forge.ProjectSystem\ProjectSystem.fs:line 1113    at Forge.ProjectManager.Furnace.loadFsProject(String projectPath) in C:\Users\<USER>\Desktop\Forge\src\Forge.Core\ProjectManager.fs:line 59    at Forge.Commands.addFile@559-1.Invoke(String _arg1) in c:\Users\<USER>\Desktop\Forge\src\Forge\Commands.fs:line 573    at Forge.Commands.addFile@558.Invoke(Unit unitVar) in c:\Users\<USER>\Desktop\Forge\src\Forge\Commands.fs:line 558    at Forge.Prelude.MaybeBuilder.Delay[T](FSharpFunc`2 f) in C:\Users\<USER>\Desktop\Forge\src\Forge.ProjectSystem\Prelude.fs:line 217    at Forge.Commands.addFile(ParseResults`1 results) in c:\Users\<USER>\Desktop\Forge\src\Forge\Commands.fs:line 557    at Forge.Commands.processAdd@622-1.Invoke(ParseResults`1 results) in c:\Users\<USER>\Desktop\Forge\src\Forge\Commands.fs:line 622    at Forge.Commands.execCommand[a,b](FSharpFunc`2 fn, String[] args) in c:\Users\<USER>\Desktop\Forge\src\Forge\Commands.fs:line 491    at Forge.Commands.processAdd(String[] args) in c:\Users\<USER>\Desktop\Forge\src\Forge\Commands.fs:line 622    at Forge.Commands.check@915-2.Invoke(String[] args) in c:\Users\<USER>\Desktop\Forge\src\Forge\Commands.fs:line 915    at Forge.Commands.check@908.Invoke(ParseResults`1 res) in c:\Users\<USER>\Desktop\Forge\src\Forge\Commands.fs:line 924}

Great investigation, was googling for the same error on an Azure Functions F# project, and found this post. I can confirm that removing the None Update items is a workaround, however better to preserve those items ...
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
    <None Update="proxies.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
	    <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    </None>

Found a workaround - change Update to Include
See also https://github.com/Azure/Azure-Functions/issues/1177


Cocoa: Ignore monitors which are mirroring another

Currently monitors which are mirroring another one are returned by glfwGetMonitors but their ns.screen is NULL. Some functions like glfwGetMonitorContentScale and glfwGetMonitorWorkarea assert that ns.screen is not NULL. Since mirrored monitors are logically the same we should only consider the primary monitor and ignore the non-primary ones.
The alternative to this would be to make the mirrored monitor have the same ns.screen as the primary.

The alternative to this would be to make the mirrored monitor have the same ns.screen as the primary.

My main concern with doing it this way is that it will confuse imgui's multi viewport support and any other software that assumes each GLFWmonitor has a unique screen.
Also, the caller has no way of knowing that the monitors ns.screen is null. If they try to call glfwGetMonitorWorkarea they will get the _glfwInputError but if they don't abort we continue down the function and use the null ns.screen object.
It seems simpler to consider mirrored displays as a special situation that glfw does not care about and only have glfw care about the primary displays.

Are there any advantages to also reporting mirrored screens? In many cases, their properties will differ from the screen that's the source of the content. This would require two different ns.screens (not that I read the source code). As long as the image of the source screen is being mirrored, is there ever any advantage to knowing the properties of the target? Or otherwise being able to tell that there is a screen being mirrored?

In many cases, their properties will differ from the screen that's the source of the content.

The monitor properties like physical relative position and size yet, but in macOS it seems like there is a single NSScreen object which is the same resolution and workarea between them.
I'm not sure about other platforms, maybe there are some where you can have different resolutions on each of the mirrored monitors?

This would require two different ns.screens (not that I read the source code).

ns.screens is the underlyingNSScreen object provided by macOS, I'm not sure you can create a second one manually.

As long as the image of the source screen is being mirrored, is there ever any advantage to knowing the properties of the target? Or otherwise being able to tell that there is a screen being mirrored?

I could see some applications wanting to know which monitors are being mirrored (I can't think of a specific application but I could imagine someone wanting it). I think this would require a new public api and I have no idea what the cross platform monitor mirroring situation looks like.

Looking through the commit history this commit might be relevant: https://github.com/glfw/glfw/commit/1b6d8a6ed6375ec37ebc6f209fe1a75d689ec908
@ elmindreda do you know if there is any risk to ignore mirrored monitors?

As long as the image of the source screen is being mirrored, is there ever any advantage to knowing the properties of the target? Or otherwise being able to tell that there is a screen being mirrored?

I could see some applications wanting to know which monitors are being mirrored (I can't think of a specific example but I could imagine someone wanting it). I think this would require a new public api and I have no idea what the cross platform monitor mirroring situation looks like.

@elmindreda suggests adding glfwGetMirroredMonitor  in https://github.com/glfw/glfw/issues/212#issuecomment-56364845

ns.screens is the underlying NSScreen object provided by macOS, I'm not sure you can create a second one manually.

Quartz Display Services can be used:
CGGetOnlineDisplayList
The Discussion  section for the documentation of that function mentions an important use case for distinguishing between the source and target screen of a mirroring process, and managing both explicitly.
If the framebuffer hardware is connected, a display is considered connected or online.
When hardware mirroring is used, a display can be online but not active or drawable. Programs that manipulate display settings (such as gamma tables) need access to all displays, including hardware mirrors, which are not drawable.

Some functions like glfwGetMonitorContentScale and glfwGetMonitorWorkarea assert that ns.screen is not NULL.

glfwGetMonitorContentScale can be rewritten to:
void _glfwGetMonitorContentScaleCocoa(_GLFWmonitor* monitor,
                                      float* xscale, float* yscale)
{
    @autoreleasepool {

    const CGDisplayModeRef mode = CGDisplayCopyDisplayMode(monitor->ns.displayID);

    if (xscale)
        *xscale = (float) (CGDisplayModeGetPixelWidth(mode) / CGDisplayModeGetWidth(mode));
    if (yscale)
        *yscale = (float) (CGDisplayModeGetPixelHeight(mode) / CGDisplayModeGetHeight(mode));

    CGDisplayModeRelease(mode);

    } // autoreleasepool
}

For glfwGetMonitorWorkarea, CGDisplayIsInMirrorSet could potentially be used in conjunction with other methods to discover the mirroring source screen, get its NSScreen object, and then use that for the work area.


Create common BlobFlobContainer property in context for commands

Many commands in explorers use a BlobFlobContainer or similar object for certain things, like refreshing single items rather than the entire data table. We should consider factoring this out to the context, since there's nothing unique the commands initialize it with.

Blob explorer has been moved and I removed all Blob commands' dependency on BlobFlobConaitner.

@JasonYeMSFT This is less about BlobFlobContainer specifically, and more about refactoring similar behavior in commands to the base command class. If most commands initialize and use some kind of object that represents the container, that behavior would be better suited for the command base class so that all commands can make use of it.


[FR]: Add support for --test_filter flag

What is the current behavior?
Not supported
Describe the feature
When --test_filter is set, Bazel will encode its value in the TESTBRIDGE_TEST_ONLY environment variable (see Test Encyclopedia). rules_jest should read this value if it is set and filter test specs accordingly.

A possible solution is to pass into https://jestjs.io/docs/cli#--filterfile something like:
const jestTestFilter: Filter = async testPaths => {
  if ('TESTBRIDGE_TEST_ONLY' in process.env) {
    const issuesFilterRegexp = new RegExp(process.env.TESTBRIDGE_TEST_ONLY!)
    const filteringFunction = (testPath: string) => issuesFilterRegexp.test(testPath)

    const allowedPaths = testPaths.filter(filteringFunction).map(test => ({
      test,
      message: `This test suite was selected by value --test_filter=${process.env.TESTBRIDGE_TEST_ONLY}`
    }))

    return {
      filtered: allowedPaths
    }
  } else {
    return {
      filtered: testPaths.map(test => ({ test }))
    }
  }
}

module.exports = jestTestFilter

// taken from @jest/core
type Filter = ( testPaths: Array<string> ) => Promise<{ filtered: Array<FilterResult> }>

type FilterResult = {
  test: string
  message?: string
}

However, we should not enable sharding when --test_filter= is used. Is it possible to set shard_count to zero when --test_filter contains a non-default value? Or the only way to go is always to pass  --test_sharding_strategy=disabled?

@Wenqer what was the reason for not using sharding when tests are filtered?

@jbedard Specifying the test filter usually means that we will execute much fewer suite files. In most situations, it is used to test only a single suite, and in such cases, all other shards will return exit code 1 because spawned with an empty suites list.


Adds test for QuantizedMLP

The model.onnx comes from running the QuantizedMLP_basic test in torch-mlir with the onnx config.
With changes in torch-mlir PR#3089, this test with --torchtolinalg flag still fails due to issues with mixed signedness of quantized matmul arguments. See torch-mlir#3090.

Okay, to check in small model.onnx into git. For large models, let us use azure storage.

Git LFS is a reasonable option for a middle ground between regular git and general cloud storage ( < 100 MB). The iree_tests folder has been using git lfs.