[openssl-windows] Added feature option to build openssl with no-pinshared flag

Change in "openssl-windows" portfile
Context
In cases you have an exe project that loads dynamically a DLL via LoadLibrary() and the DLL has OpenSSL statically linked, OpenSSL prevents the DLL from being unloaded dynamically via FreeLibrary().
More details can be found on OpenSSL GitHub:
https://github.com/openssl/openssl/issues/7598
https://github.com/openssl/openssl/pull/7647
The official solution to this scenario is to build OpenSSL with the no-pinshared flag set.
Problem:
If you are installing "openssl-windows" via vcpkg, it is not build with this flag.
Solution
Because in the most cases this build flag is not needed or even dangerous, I've added an vcpkg feature option to install OpenSSL with no-pinshared optionally.
Example
Optionally you can now install openssl-windows like this
openssl-windows[no-pinshared]:x64-windows-static

Hi @Sofapriester
Thanks for this PR.
Have you tested the feature no-pinshared and if it can work well on all platforms?
Please make sure that it at least works on x86-windows, x64-windows, x64-windows-static and x64-linux.

Hi @Sofapriester
Thanks for this PR.
Have you tested the feature no-pinshared and if it can work well on all platforms?
Please make sure that it at least works on x86-windows, x64-windows, x64-windows-static and x64-linux.

Hi @NancyLi1013
As this PR only effects openssl-windows ports, I think testing its functionality on Windows platforms is enough, isn't it?

Yes, you're right. You only need to test the features on the platforms or triplets that the ports supported. For openssl-windows, testing on Windows platform  is enough.

Have you tested the feature no-pinshared and if it can work well on all platforms?

I've tested it on the following configurations:
openssl-windows:x64-windows-static: Ok
openssl-windows:x86-windows-static: Ok
openssl-windows[no-pinshared]:x64-windows-static: Ok
openssl-windows[no-pinshared]:x86-windows-static: Ok
openssl-windows:x64-windows: Ok
openssl-windows:x86-windows: Ok
openssl-windows[no-pinshared]:x64-windows: Ok
openssl-windows[no-pinshared]:x86-windows: Ok

@NancyLi1013 There was suddenly a test failing. Unfortunately I have no idea what happens there. Do you haven an idea?

@Sofapriester
Thanks for your update for the feature results.
Sorry, I'm not clear about what you mean There was suddenly a test failing.  Is the failure on x64-osx in current CI test?

@NancyLi1013

Sorry, I'm not clear about what you mean There was suddenly a test failing. Is the failure on x64-osx in current CI test?

Yes, the failure on CI x64_osx.

@Sofapriester
Currently the regressions on CI are not related with this PR. So you can ignore it.
I will rerun this PR once these are fixed.

Hi @NancyLi1013 ,
I am done with all my changes. Do you need anything else? Or can this pull request be accepted and merged?
Best regards,
Stefan

/azp run

/azp run

Hi @Sofapriester
Could you please merge master commits to this PR?
The current regression caused by qwt cannot be resolved by /azp run.
-- Downloading https://downloads.sourceforge.net/project/qwt/qwt/6.1.3/qwt-6.1.3.zip...
-- Downloading https://downloads.sourceforge.net/project/qwt/qwt/6.1.3/qwt-6.1.3.zip... Failed. Status: 7;"Couldn't connect to server"
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:175 (message):

      Failed to download file.
      If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
      variables to "https://user:password@your-proxy-ip-address:port/".
      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
  scripts/cmake/vcpkg_from_sourceforge.cmake:114 (vcpkg_download_distfile)
  ports/qwt/portfile.cmake:1 (vcpkg_from_sourceforge)
  scripts/ports.cmake:73 (include)

@Sofapriester
Could you please resolve the conflicts?

Hi @NancyLi1013 ,
is there anything left for me to do in order to bring that PR to microsoft:master?
Best regards.

Thanks for your kindly reminder.
LGTM now, nothing needs to be done. Let's just wait for it merged.

Hi @Sofapriester, thanks for the PR!
Could the DLL not simply use the recommended runtime method?

Applications can suppress running of the atexit() handler at run time by using the OPENSSL_INIT_NO_ATEXIT option to OPENSSL_init_crypto().

(According to my read of the thread, the DLL will need to call OPENSSL_cleanup() before unloading as well).
It also looks like there may be residual issues to file on OpenSSL to fix this in a better way that doesn't require dangerous behavior: https://github.com/openssl/openssl/pull/7647#issuecomment-439454231.
Finally, this introduces a "mode" which is not what features are intended to model -- they only correctly model additive APIs/functionality. The best available option for exclusive modes like this would be to look for a variable expected to be set in the triplet (which is included at the top of every portfile, so you can simply use if(DEFINED OPENSSL_USE_NOPINSHARED) in the port).

Hi @ras0219-msft ,
Thanks for your reply and your recommendation.
But first to your questions:

Could the DLL not simply use the recommended runtime method?

Applications can suppress running of the atexit() handler at run time by using the OPENSSL_INIT_NO_ATEXIT option to OPENSSL_init_crypto().

You are absolutely right. This is how you would "avoid" the cleanup automation in openssl and with it the pinning. But in order to have this feature activated and working, you need to have it build with no-pinshared. Without having it build like that, you can call OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT, nullptr), but nothing happens (DLL stays pinned until process exit).

(According to my read of the thread, the DLL will need to call OPENSSL_cleanup() before unloading as well).

Also this is correct, as can be also read here.
My suggestion is, that we concentrate in this PR on how to make this official OpenSSL feature available through vcpkg. In my opinion it should be discussed in the OpenSSL project if this OpenSSL feature is good, bad or dangerous.
Now to your nice suggestion:

Finally, this introduces a "mode" which is not what features are intended to model -- they only correctly model additive APIs/functionality. The best available option for exclusive modes like this would be to look for a variable expected to be set in the triplet (which is included at the top of every portfile, so you can simply use if(DEFINED OPENSSL_USE_NOPINSHARED) in the port).

I have actually added this section to the portfile.cmake:
if(DEFINED OPENSSL_USE_NOPINSHARED)
    set(CONFIGURE_OPTIONS ${CONFIGURE_OPTIONS} no-pinshared)
endif()
Now you could create your own triplet like this:
# build-openssl-nopinshared-triplet.cmake
set(OPENSSL_USE_NOPINSHARED ON)
And call it f.e. like this:
vcpkg.exe install openssl-windows:build-openssl-nopinshared-triplet --overlay-triplets=PATH_TO_MY_TRIPLETS_FOLDER
I have already updated my PR. Could you please check and tell me, if this is how you suggested?

/azp run

Hi @ras0219 and @strega-nil ,
I have done all requested and suggested changes.
Is there anything left before this PR could be merged?
Best regards,
Stefan


Bootrr add sa8155p board v2

Fixed the review comments received from Nico on v1.

I think you should update boards/qcom,sm8150-mtp in the first patch instead of the 2nd patch. the 2nd patch can stay to add the ADP.


Ensure clients connecting to Kestrel's dispatch pipe are listeners

#1182
@cesarbs @pakrym @davidfowl

I plan to make a version of this PR for rel/1.0.2, but there are a bunch of restore errors like  Unable to resolve 'Microsoft.AspNetCore.Hosting (>= 1.0.1)' for '.NETCoreApp,Version=v1.0'.. It seems like these packages are not in the aspnetcore-rel-1-0-3 myget used by that branch.

@davidfowl updated.

:shipit:

This was pushed to rel/1.1.0 first and merged into dev.


MOR 733: Implement OpenAPI-based client for new v3 api

Adds a new client API for accessing morgen-backend APIs via a TypeScript interface based on an updated OpenAPI spec
Updates the SDK to use the client
Updates the SDK to inject the client code into the global scope of the user's script

This part is a little bit hacky because it involves replacing generated TypeScript module references with global references. To do this properly would involve writing the build process as part of the workflow upload which is de-scoped for this version.

Adds several examples to showcase the API client and educate (but there's no real documentation yet)

Most of the diff is generated code 😉

Will merge when V3 is deployed


Document anti-pattrens regarding props

I think we should document anti-patterns. I would be fine with making a PR for those but first we need to list them.

Taking String, instead of Cow<'static, str> as props.
What else?

From https://github.com/yewstack/yew/pull/1834#issuecomment-835493612, as requested by @siku2

For a beginner (like me) who also doesn't have any significant frontend / react experience some more general "dos & and don'ts" would also be really helpful. Questions I am uncertain about include stuff like:

How much data should/could I pack into props: like 10000 structures that get rendered as a list/child elements?
How do I enable a component to fetch data (e.g. via an agent)?
When should I put stuff into the props, and which kind of objects should I maintain in the actual component struct?
Hth

A section about anti-patterns/what not to do on the Properties page would be enough.

A section about anti-patterns/what not to do on the Properties page would be enough.

In #2402, it seems like the consensus was to use some form of Rc<str> instead of String/Cow<'static, str> (which clone String's too often)
It seems to me that the yew::virtual_dom::AttrValue type does the job well, and the ergonomics (implicit conversions) seem to be in place. The only issue I see is that this type is exported by the virtual_dom module, which implies it isn't intended for general use as a property type.
Is using AttrValue for component properties (that the end-user may supply a static or non-static string for) worthy of mention in the new docs, or is it also an anti-pattern, and if so, what is the better alternative?

@finnbear AttrValue is the type of properties that eventually end up as attributes of html elements. That is the intended application, although in its current form, it serves quite well as a general Rc<str>.
Using it generally for attributes of type Rc<str> leaves a bit of a sour taste. A better alternative is proposed in #2563, i.e. implicit_clone::unsync::IString. AttrValue might do extra work, since the string will likely end up in javascript land, and a lot of attributes have a fixed set of values: It might make sense in the future to intern the value during reconciliation.

@WorldSEnder I'm pretty sure AttrValue is almost 100% identical to IString. When I made it I ended up with almost the exact same code. The only difference back then is that AttrValue had a variant for String which I removed in #2447 because it wasn't useful and less performant than Rc<str>.
My recommendations on props:

It's important for performance reasons to avoid cloning because the detection of changes is called very often. That's the whole point of #2563.
Everything that you put in Props should be cheap to clone (repeating myself sorry)... (:thinking: come to think of it... maybe this could be enforced the same way that Copy enforce all the fields of a struct to be Copy?)
Larger structures should be wrapped in Rc (so they become cheap to clone)
Props initialization (when you create the value) of big structure should be placed in the fn create() method and you should avoid to create them in fn view() method. Especially things that allocates (Vec, HashMap, etc...)
Callbacks should be created in the fn create() method too: this is because if you create them in view() and pass them as prop, it will be identified as a different value every time the component checks for update (got bitten by that recently)

Unfortunately I haven't work much with functional component yet (I did some react hooks for a client a year ago though) but I think some of the issues with full components are better handled with the hook mechanism. Maybe someone more experimented with functional components in Yew can detail this and compare with the list of recommendations I just did for full components?
One last recommendation I have in a more general way: if you worked with React you will be tempted to solve problems the way you usually did with React. Sometimes those solutions don't work at all with Rust and you need to take a step back and think more of the Rust way. For example, in JS we use objects (hashmaps) a lot but in Rust it often makes little sense. (I, for one, almost never use hashmaps.)
(Main reason I didn't hook with the hook is because I already had a big code base and lots of habits :sweat:)


python310Packages.pygtkspellcheck: 5.0.0 -> 5.0.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.pygtkspellcheck is: "A Python spell-checking library for GtkTextViews based on Enchant"
meta.homepage for python310Packages.pygtkspellcheck is: "https://github.com/koehlma/pygtkspellcheck"
meta.changelog for python310Packages.pygtkspellcheck is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
Warning: a test defined in passthru.tests did not pass
found 5.0.1 with grep in /nix/store/24b0bks1mcgvdxy4s6gy8iwaby0b5c5c-python3.10-pygtkspellcheck-5.0.1
found 5.0.1 in filename of file in /nix/store/24b0bks1mcgvdxy4s6gy8iwaby0b5c5c-python3.10-pygtkspellcheck-5.0.1

Rebuild report (if merged into master) (click to expand)

5 total rebuild path(s)

5 package rebuild(s)

First fifty rebuilds by attrpath
python310Packages.pygtkspellcheck
python310Packages.skytemple-ssb-debugger
python39Packages.pygtkspellcheck
python39Packages.skytemple-ssb-debugger
skytemple

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/24b0bks1mcgvdxy4s6gy8iwaby0b5c5c-python3.10-pygtkspellcheck-5.0.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python310Packages.pygtkspellcheck https://github.com/r-ryantm/nixpkgs/archive/6fe17a5b8c0b67cdb5a9032db25f4b6f6b3c5be9.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/24b0bks1mcgvdxy4s6gy8iwaby0b5c5c-python3.10-pygtkspellcheck-5.0.1
ls -la /nix/store/24b0bks1mcgvdxy4s6gy8iwaby0b5c5c-python3.10-pygtkspellcheck-5.0.1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

5 packages built:

python310Packages.pygtkspellcheck
python310Packages.skytemple-ssb-debugger
python39Packages.pygtkspellcheck
python39Packages.skytemple-ssb-debugger
skytemple

Maintainer pings
cc @xfix for testing.

Result of nixpkgs-review pr 192989 run on x86_64-linux 1

5 packages built:

python310Packages.pygtkspellcheck
python310Packages.skytemple-ssb-debugger
python39Packages.pygtkspellcheck
python39Packages.skytemple-ssb-debugger
skytemple


Graphic card promo: card and button should not be clickable at the same time

When there is a button, the card should not be clickable and it shouldn't change on mouse over.
If there is NO button, then card can be clickable and reacts when hovering.
https://ilo-ui-react.netlify.app/?path=/story/components-content-card--graphic-promo-card&args=link:

@inesdgomes I don't think we should prevent users from making both the card and button clickable. We should simply make it so that the card doesn't have a hover effect if the card doesn't have a link prop.

@justintemps I see this ticket is assigned to me but it's also 'closed'. From what I see here, it has not been completed yet: https://twig.ui.ilo.org/?path=/docs/components-card--promo-card


koordlet: revise sysctl initialization of the group identity

Ⅰ. Describe what this PR does

Fix the sysctl initialization of the cgroup identity since the /proc/sys/kernel/sched_group_identity_enabled may be not allowed to reset in some versions of the Anolis os.
Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist

[x] I have written necessary docs and comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in make test

/lgtm
/approve


[Feature]: Better fuzzy matching for icon sets (i3, bspwm)

Checklist

[X] I have read the appropriate section in the contributing guidelines
[X] I believe this issue is a problem with polybar itself and not a misconfiguration on my part
[X] I have searched for other open and closed issues that may have already reported this problem
[X] I have checked the known issues page for this problem.
[X] I have followed the debugging guide to narrow down the problem to a minimal config.

Steps to reproduce

run a polybar config with the i3 module
include ws-icon layout from the minimal config
conflict

Minimal config
[module/i3]
type = internal/i3

pin-workspaces = true
strip-wsnumbers = true
index-sort = true
enable-click = true
enable-scroll = false
wrapping-scroll = false
reverse-scroll = false

fuzzy-match = true

ws-icon-0 = "1;"
ws-icon-1 = "2;"
ws-icon-2 = "3;"
ws-icon-3 = "4;"
ws-icon-4 = "5;"
ws-icon-5 = "6;6"
ws-icon-6 = "7;"
ws-icon-7 = "8;"
ws-icon-8 = "9;"
ws-icon-9 = "10;💬"
ws-icon-default = 💬

format = <label-state> <label-mode>

Polybar log
no warnings or errors

Expected behavior
the icon for workspace 10 should be 💬.
Actual behavior
The icon for workspace 10 is the same as the first one, which is ws-icon-0
Window Manager and Version
i3-gaps
Linux Distribution
EndeavourOS
Polybar version
polybar 3.6.3

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/polybar/src=/usr/src/debug -flto=auto -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wsuggest-override
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wall -Wextra -Wpedantic -Wsuggest-override  -Wall -Wextra -Wpedantic -Wsuggest-override

Additional Context / Screenshots

This is the same bug as https://github.com/polybar/polybar/issues/2095, which appears to have already been resolved, but, as mentioned by others is still sometimes occurring.
Thank you!

Can you post the output of i3-msg -t get_workspaces when this happens?
Also, does this happen when you turn fuzzy matching off?

Can you post the output of i3-msg -t get_workspaces when this happens?
Also, does this happen when you turn fuzzy matching off?

I get this
[{"id":94240379053248,"num":1,"name":"1:","visible":true,"focused":true,"rect":{"x":0,"y":0,"width":1920,"height":1060},"output":"eDP1","urgent":false},{"id":94240379066080,"num":2,"name":"2:","visible":false,"focused":false,"rect":{"x":0,"y":0,"width":1920,"height":1060},"output":"eDP1","urgent":false},{"id":94240379072496,"num":3,"name":"3:","visible":false,"focused":false,"rect":{"x":0,"y":0,"width":1920,"height":1060},"output":"eDP1","urgent":false},{"id":94240379036512,"num":4,"name":"4:","visible":false,"focused":false,"rect":{"x":0,"y":0,"width":1920,"height":1060},"output":"eDP1","urgent":false},{"id":94240379260288,"num":9,"name":"9:","visible":false,"focused":false,"rect":{"x":0,"y":0,"width":1920,"height":1060},"output":"eDP1","urgent":false},{"id":94240379078912,"num":10,"name":"10:💬","visible":false,"focused":false,"rect":{"x":0,"y":0,"width":1920,"height":1060},"output":"eDP1","urgent":false}]

which I've just reformatted as this
[
    { "id":<PHONE_NUMBER>3248, "num": 1, "name": "1:", "visible": true, "focused": true, "rect": { "x": 0, "y": 0, "width": 1920, "height": 1060 }, "output": "eDP1", "urgent": false },
    { "id":<PHONE_NUMBER>6080, "num": 2, "name": "2:", "visible": false, "focused": false, "rect": { "x": 0, "y": 0, "width": 1920, "height": 1060 }, "output": "eDP1", "urgent": false },
    { "id":<PHONE_NUMBER>2496, "num": 3, "name": "3:", "visible": false, "focused": false, "rect": { "x": 0, "y": 0, "width": 1920, "height": 1060 }, "output": "eDP1", "urgent": false },
    { "id":<PHONE_NUMBER>6512, "num": 4, "name": "4:", "visible": false, "focused": false, "rect": { "x": 0, "y": 0, "width": 1920, "height": 1060 }, "output": "eDP1", "urgent": false },
    { "id":<PHONE_NUMBER>0288, "num": 9, "name": "9:", "visible": false, "focused": false, "rect": { "x": 0, "y": 0, "width": 1920, "height": 1060 }, "output": "eDP1", "urgent": false },
    { "id":<PHONE_NUMBER>8912, "num": 10, "name": "10:💬", "visible": false, "focused": false, "rect": { "x": 0, "y": 0, "width": 1920, "height": 1060 }, "output": "eDP1", "urgent": false }
]

So what happens is, ws-icon-* tries to match the name of the workspace. When the module tries to find the right icon for the workspace named 10:💬, none of the mappings match exactly so it tries to find a substring match. ws-icon-0 matches and is thus used for the workspace.
The fuzzy matching mechanism could probably be improved to select a "best" match, right now it just takes the first match.
The length of the match would probably be a good measure to determine the best match.
I'll mark this as a feature request since this is technically not a bug (fuzzy matching works as documented). PRs are welcome.
To anyone wanting to work on this, the logic for fuzzy matching is entirely limited to src/drawtypes/iconset.cpp and there is a small test suite at unit_tests/drawtypes/iconset.cpp.

I'll try and contribute to this!

Ok I just PRd my implementation! #2831


Not full metrics list

Good day.
I use prometheus_fastapi_instrumentator, version 6.0.0.
I create test application:
from prometheus_fastapi_instrumentator import Instrumentator

Instrumentator().instrument(app).expose(app)

# My app

and i see all metrics in Prometheus.

But when I use this code in big productive application (with the same structure), I not see some metrics, for example http_requests_total.

In test app:

In productive app:

Prometheus sees both sources:

Can you help me?

Ok, probability prometheus_fastapi_instrumentator version 6.0.0 incompatible with FastAPI version 0.80.0. It's working with FastAPI 0.101.1.


Handle Kubernetes node event and cond.

Move checking the manager pod status after checking Kubernetes node status and not check the manager pod status if Kubernetes node status is not ready.
longhorn/longhorn#1449

ref: https://github.com/longhorn/longhorn/issues/1449#issuecomment-1319574678

According to https://github.com/longhorn/longhorn/issues/1449#issuecomment-1319574678
Close this PR.


Cannot load Llama 3.1 8B Instruct

I'm trying to load the new Llama 3.1 8B Instruct model, but it's saying it doesn't exist:
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit",
    max_seq_length = 3072,
    dtype = None,
    load_in_4bit = True,
)

RuntimeError: Unsloth: `unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit` is not a base model or a PEFT model.
We could not locate a `config.json` or `adapter_config.json` file.
Are you certain the model name is correct? Does it actually exist?

Do I have to refresh my local HuggingFace cache or something? I can see the model here and the name is correct.
I have the latest version of unsloth:
unsloth @ git+https://github.com/unslothai/unsloth.git@a96d16e44ba2a07f5b6cdc10919286c23a984fe1

Hello @freddyouellettetui
You're experiencing transcript error. It seems your query would be best dealt with by the support team.
I'll have to refer you to the official support Requests team with the ticket ID BNB07638
Please see the link below to our dedicated support line:
BNB Support Requests
Note; Click on the live chat icon at the bottom corner of the page to initiate chat

update transformers

Thanks @mf-skjung it worked, I just ran
pip install --upgrade transformers

Glad that worked!


Teams files are duplicated in AVD

We are encountering a problem that files from teams channels are duplicated after editing in AVD.
The Teams channels are synced via OneDrive to an AVD host equipped with FS logix. OneDrive and FS Logix are the latest versions.
User 1 opens file from explorer \company\filename. As soon as user 2 does this, a file is created with a GUID-like name (many characters). The time of this temporary file is no longer updated. After closing the file, this temporary file is converted to a duplicate with the extension of the AVD host

Github issues are reserved for issues with our documentation. Please open a support case so we can properly troubleshoot the issue.


KAFKA-4544: Add system tests for delegation token based authentication

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
This change adds some basic system tests for delegation token based authentication:

basic delegation token creation
producing with a delegation token
consuming with a delegation token
expiring a delegation token
producing with an expired delegation token

New files:

delegation_tokens.py: a wrapper around kafka-delegation-tokens.sh  - executed in container where a secure Broker is running (taking advantage of automatic cleanup)
delegation_tokens_test.py: basic test to validate the lifecycle of a delegation token

Changes were made in the following file to extend their functionality:

config_property was updated to be able to configure Kafka brokers with delegation token related settings
jaas.conf template because a broker needs to support multiple login modules when delegation tokens are used
consule-consumer and verifiable_producer to override KAFKA_OPTS (to specify custom jaas.conf) and the client properties (to authenticate with delegation token).

Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@viktorsomogyi , @omkreddy can you take a look?

@viktorsomogyi  thanks for the review. I will add an extra check that tests renewal too (however, a lot of these things are already tested by unit tests, see DelegationTokenManagerTest). To do this, I will add functions to wrap the describe and renew options of kafka-delegation-tokens.sh.

@viktorsomogyi thanks for the review!
@omkreddy, @junrao can you take a look at the new delegation token system tests? I believe all previous review comments are now addressed.

@asasvari  I am getting below error. Also can you run few tests related console consumer, verifiable producer to make sure we are not breaking any existing tests.
[INFO:2018-11-29 09:07:01,572]: RunnerClient: kafkatest.tests.core.delegation_token_test.DelegationTokenTest.test_delegation_token_lifecycle: FAIL: Expected producer to still be producing.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ducktape/tests/runner_client.py", line 132, in run
    data = self.run_test()
  File "/usr/local/lib/python2.7/dist-packages/ducktape/tests/runner_client.py", line 185, in run_test
    return self.test_context.function(self.test)
  File "/opt/kafka-dev/tests/kafkatest/tests/core/delegation_token_test.py", line 120, in test_delegation_token_lifecycle
    err_msg="Expected producer to still be producing.")
  File "/usr/local/lib/python2.7/dist-packages/ducktape/utils/util.py", line 36, in wait_until
    raise TimeoutError(err_msg)
TimeoutError: Expected producer to still be producing.

@omkreddy thanks. I could not reproduce the TimeoutError you ran into so far. Can you please upload the logs to speed up the troubleshooting process? Can you share more details about your test environment?
Executed the following console consumer and verifiable producer tests:
kafkatest.sanity_checks.test_console_consumer tests:

SESSION REPORT (ALL TESTS)
ducktape version: 0.7.1
session_id:       2018-11-30--002
run time:         8 minutes 57.509 seconds
tests run:        8
passed:           8
failed:           0
ignored:          0
================================================================================================================================================================================
test_id:    kafkatest.sanity_checks.test_console_consumer.ConsoleConsumerTest.test_lifecycle.sasl_mechanism=PLAIN.security_protocol=SASL_SSL
status:     PASS
run time:   1 minute 14.052 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_console_consumer.ConsoleConsumerTest.test_lifecycle.sasl_mechanism=SCRAM-SHA-256.security_protocol=SASL_SSL
status:     PASS
run time:   1 minute 23.398 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_console_consumer.ConsoleConsumerTest.test_lifecycle.sasl_mechanism=SCRAM-SHA-512.security_protocol=SASL_SSL
status:     PASS
run time:   1 minute 19.390 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_console_consumer.ConsoleConsumerTest.test_lifecycle.security_protocol=SASL_PLAINTEXT
status:     PASS
run time:   1 minute 5.853 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_console_consumer.ConsoleConsumerTest.test_lifecycle.security_protocol=SASL_SSL
status:     PASS
run time:   1 minute 13.041 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_console_consumer.ConsoleConsumerTest.test_version
status:     PASS
run time:   42.017 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_console_consumer.ConsoleConsumerTest.test_lifecycle.security_protocol=PLAINTEXT
status:     PASS
run time:   56.351 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_console_consumer.ConsoleConsumerTest.test_lifecycle.security_protocol=SSL
status:     PASS
run time:   1 minute 2.784 seconds

kafkatest.sanity_checks.test_verifiable_producer tests

SESSION REPORT (ALL TESTS)
ducktape version: 0.7.1
session_id:       2018-11-30--003
run time:         3 minutes 1.954 seconds
tests run:        5
passed:           5
failed:           0
ignored:          0
================================================================================================================================================================================
test_id:    kafkatest.sanity_checks.test_verifiable_producer.TestVerifiableProducer.test_simple_run.producer_version=<IP_ADDRESS>
status:     PASS
run time:   36.906 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_verifiable_producer.TestVerifiableProducer.test_simple_run.producer_version=<IP_ADDRESS>
status:     PASS
run time:   35.557 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_verifiable_producer.TestVerifiableProducer.test_simple_run.producer_version=<IP_ADDRESS>
status:     PASS
run time:   37.032 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_verifiable_producer.TestVerifiableProducer.test_simple_run.producer_version=<IP_ADDRESS>
status:     PASS
run time:   34.818 seconds
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_id:    kafkatest.sanity_checks.test_verifiable_producer.TestVerifiableProducer.test_simple_run.producer_version=dev
status:     PASS
run time:   37.199 seconds

I re-executed ./ducker-ak test ../kafkatest/tests/core/delegation_token_test.py ../kafkatest/sanity_checks/test_verifiable_producer.py ../kafkatest/sanity_checks/test_console_consumer.py on a clean CentOS 7.4.1708 installation using Docker version 1.13.1, all these tests have passed.

@asasvari Thanks for the results. let me rerun the tests.

@omkreddy thanks for rerunning tests. Please let me know if you find anything.

@asasvari There was an issue with my test environment. Now tests are passing . Thanks.


Removed self-hosted YAML Serializer

What was the end-user problem that led to this PR?
It is not compatible with YAML spec of the standard library of Ruby.
I did revert a feature in last year: https://github.com/ruby/psych/pull/336
What was your diagnosis of the problem?
YAMLSerializer was introduced from https://github.com/bundler/bundler/commit/bfd4be3756fa6bb43c263e303df2995ab0e7ace9
I'm not sure why that was required.
What is your fix for the problem, implemented in this PR?
Removed YAMLSerializer. and use YAML provided by pyched_yaml.

It is required since YAML is in a gem, and we load the list of plugins & settings before Bundler.setup, so using the Psych gem will mean no Bundler users can choose what version of pysch they use

I know the problem that psych activation problem. But Bundler already uses psych directly. Users couldn't specify its version.

I thinking, what @segiddins said makes sense. But what @hsbt says makes sense too. Even though we have our own YAML implementation in order to not interfere with yaml / psych loading, we were actually activating psych. Shouldn't we use our custom implementation everywhere instead of using the default gem?

FYI: https://bugs.ruby-lang.org/issues/13847


A convenient way to renew domains.

Manually renew a domain every 6 months is just inconvenient. If you want somebody to confirm he still alive and needs that domain, it should be as easy as sending NMC to some address, not opening the program and clicking buttons or messing with the daemon. And the term must be at least a year because six months is just too fast.

This is multiple issues.  I've created an issue for the renewal period: https://github.com/namecoin/meta/issues/16 (we were already talking about this, for reason it didn't wind up as a GitHub ticket).
As for your other issue, I don't understand.  How is "sending NMC to some address" easier than "opening the program and clicking buttons or messing with the daemon"?  The latter is required to do the former.  There is some ongoing work to allow you to delegate renewal permissions to a third party if that's what you want.  There's also ongoing work to allow automatically renewing domains if the client stays open (or is opened periodically).  Other than that, I have no idea what exactly you're proposing.  Can you elaborate?

Can you elaborate?

People are lazy and in order for them to adopt new technology it must be as easy as possible. The way I renew my clearnet domains: I send money to a registrar every year. Not clicking any buttons, not even going to a registrar website. The same is doing many people I know a lot of which are not tech-savvy. And even with that simplicity they're still running into a 'forget to pay' problem. It's obvious that people will lose their wallet.dat's also and there is not so much that can be done about that.
But it is possible for namecoin at least to keep the same simplicity and even to make the process more secrue. Use case I'm talking about is:
To renew a .bit domain user is going (or asking somebody to go) to an exchange site, buys NMC and withdraws it to a special address domains binded to. The network sees that there was some activity on that addres, user is alive and still wants his domains, and renew the binded domains automatically.
That is as simple and reliable as possible. Also if the user has lose his wallet.dat (of course he will know it when there is a time comes to renew a domain, not earlier), he still can renew his domains to have some time to register a new domains, warn sites visitors, set a redirections, etc. This will make things both more secure and convenient.
Also (I don't know though maybe it's already implemented) it would be good to have some expiration period, a month or 1.5 month, because a lot of people are realizing that their domain is not paid only when their site stops working. If they'll lose domain that way they will blame the namecoin not themselves.

I think I understand your use case -- a user doesn't want his/her private keys to be required to renew a name.  The renewal delegation feature I mentioned previously would allow the renewal permission to be set to "anyone can spend".  This would basically mean that anyone who possesses some NMC could renew that name, including a web service.  I think this partially addresses your use case.  Actually making the renewal contingent on coins being sent to an arbitrary address would be quite a bit harder, I'm not sure if the script system can even handle such things.
I think we will add a feature which makes names stop resolving some time before the name expires -- this will give name owners a warning before they lose control of their name.  It's not a namecoind feature; this fits better as an NMControl feature.  (End users will see the same result -- domain names that are close to expiring will result in an error indicating that the name is about to expire, instead of the website loading.)
Does this address your concerns acceptably?

FYI, the proposal for making names stop resolving before they are expired is at https://wiki.namecoin.info/index.php?title=User:Biolizard89/ExpireWarning

Does this address your concerns acceptably?

Yes that definitely covers everything I'm concerned about right now. And thank you for making the internet a better place.

Sounds good -- and thank you for raising these concerns.


Support validations as property

For supporting subclassing (inheritance), it would be great to be able to define validations as a property rather than a POJO.

+1


feat: Make CurveType accessible within Base58PublicKey

Addresses #447. This makes it possible to access the curve type without directly accessing the Vec<u8> itself

I think also we should decide if the PublicKey type should be replaced with this, to avoid having multiple of the same type, similar to #448 changes. This can always be done in a separate issue I suppose. Also since we are making breaking changes would be nice to change error type to a concrete one

I think also we should decide if the PublicKey type should be replaced with this, to avoid having multiple of the same type, similar to #448 changes. This can always be done in a separate issue I suppose.

Yea let's do that in a separate issue/PR. Don't wanna snowball this one

Found while reviewing: https://github.com/near/near-sdk-rs/issues/458

@austinabell I added the changelog in #464. I think it be best to merge it into here first, then merge this completely


Unstick in responsive mode

How can I unstick sidebar in responsive mode. I tried destroy() method but it doesn't work.

I'm having the same issue. How did you get stickySidebar.destroy(); to work?

You don't need to call destroy() method at all. All you have to do is to provide a minWidth attribute so the stickySidebar will know when to become disabled. For example, if you want your sidebar to be static in devices narrower than 920px, you can simply do as follow:
var sidebar = new StickySidebar('#sidebar', {     minWidth: 920   });


Student Survey Card

ITS-Pro time category: https://its-pro.ucsd.edu/browse/MA-85
When logged in, students see the student survey card. The survey card has formatted text content. The student can respond with predefined choices, e.g. Yes or No.
On student response, the result is sent to an API.
Consideration: allow student to change their response within a set time period after selecting a choice.

prototype link: https://xd.adobe.com/view/ad9082c8-38ed-4ee7-b4f2-c12d99b62bc4-f8c3/
interactive version is available as well


not working with MSSQL

This is my query...

SELECT count(*) AS
c
FROM
(select * from (select [TEST].[id], [TEST].[TEST TEXT], [TEST].[TEST NUMBER], [TEST].[TEST BIT], [TEST].[TEST DATE], [TEST].[TEST BIGTEXT], [TEST].[created_at], [TEST].[updated_at] from [TEST]) as [TEST])
AS temp_count_table

now, this query is not working in mssql.
Here c and temp_count_table qouted with  `  that cause the issue.
If we remove ` from keys, its working fine, like this
SELECT count(*) AS
c
FROM
(select * from (select [TEST].[id], [TEST].[TEST TEXT], [TEST].[TEST NUMBER], [TEST].[TEST BIT], [TEST].[TEST DATE], [TEST].[TEST BIGTEXT], [TEST].[created_at], [TEST].[updated_at] from [TEST]) as [TEST])
AS temp_count_table
This query works fine
Do we have any filter function in laravel to remove ` from query ?
Regards,
Gaurang.

Latest release is now available:
https://packagist.org/packages/syamsoul/laravel-datatable-ssp#3.1.1
https://github.com/syamsoul/laravel-datatable-ssp/releases/tag/3.1.1


Extend support to Ruby 3.0

Blocked by https://github.com/mcmire/super_diff/issues/117

Blocked by https://github.com/mcmire/super_diff/issues/117

 Ruby 3.0 support

 Ruby 3.0 support


Feature Request - Switch easily to the last subscription

It will be good to have a feature where someone can run aztx - (something like cd -) and switch the previous subscription.

Update on this request, this is roughly implemented and I'm just going to add some tests to my code as a next step before release

Released in version 1.0.1 😄


Is there a way to walk a dissasembly graph?

Hello!
I intent to automaticaly analyze CFG graphs of binaries in order to find some properties of packers. The graph generated by simply running CFGFast() is not very easy to analyse as it's only a graph of addresess (as far as I cat tell). Is the a way to get this nice CFG representation in basic blocks, which is generated by plot_cfg(), and walk through it?
Thanks in advance!

Hi, sorry for my late answer!
The CFG generated by angr contains CFGNodes, which only contain the metadata for the basic blocks, but not the actual instructions. If you need the actual instructions, you need to ask angr to lift them for you.
Check the docs here:
https://docs.angr.io/core-concepts/toplevel#blocks
Here is how ang-utils does it ():
https://github.com/axt/bingraphvis/blob/master/bingraphvis/angr/content.py#L259
And here is the code, what calculates the parameters for the previous function, from a CFG node input:
https://github.com/axt/bingraphvis/blob/master/bingraphvis/angr/content.py#L216-L220
The same is true if you want to get back VEX instructions:
https://github.com/axt/bingraphvis/blob/master/bingraphvis/angr/content.py#L376
https://github.com/axt/bingraphvis/blob/master/bingraphvis/angr/content.py#L333-L338

Thanks!


Disable ingress creation in values file

Hello,
I'd like to use my own ingress configuration together with zeebe/zeebe-full deployed with dev profile from here.
Is there a way to disable/configure ingress creation in value files so I don't have to disable it every helm upgrade?

@igorinsky any reason not to go with the independent charts? If you want your own ingress probably you want to own your full chart and copy the bits that you need. The full chart depends on the zeebe-cluster and zeebe-operate charts that you can reuse.
Another option is to contribute with those flags for the full chart. I would recommend creating the issue in the right repo for that.

@igorinsky let me know if you want/need mentoring on how to do that, I am happy to guide and help to implement the change.

The new Camunda Platform 8 Helm Chart allows this.


[BUG]: Payment dialog for swish redirecting on cancel

What happened?
When cancelling a Swish payment with the dismiss button highlighted in the screenshot the stripe.confirmPayment() method never returns and instead the user is redirected to the specified return_url. What I expect is that the user remains on the same page and a "cancellation error" is returned similar to what happens when dismissing a Google Pay dialog etc.

Environment
No response
Reproduction
No response

Yes, by default this will redirect and you can check the payment status using the query parameters supplied.
If you want to avoid this, you can use redirect: 'if_required' in the confirmPayment options and inspect the payment intent in the result instead: https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect


Dendrogram example remarks

I have a couple of remarks regarding the dendrogram example.
(https://github.com/BlueBrain/NeuroM/blob/master/examples/dendrogram.py)
I've attached an example output.

The triangles near the soma need to be fixed in some way
The diameter have to show up much thicker. Ideally different scaling on x- and y-axes should be used (with an option to enable/disable it?).
Will this function become part of NeuroM api ? At the moment it's a bit difficult to use because I have to manually download the dendrogram.py file. Would be nice if it was a function of the NeuroM Neuron class.

Some details:

Maybe only show the colors that are actually used in the legend ?
Try to use a white instead of a grey figure background in matplotlib, looks much better
We need units on the y-axis (maybe we don't even need an axis if we would have x/y scale bars)
After calling 'dendrogram()' the figure window closes immediately if I don't put a pylab.show(). Maybe you can add an option as argument that enables/disables pylab.show() ?

The dendrogram is now inside NeuroM. You can use it on both trees and neurons. In case of neurons the soma representation appears as well as in the example dendrogram. On the contrary, the trees are now generated separately and joined together when plotted, thus the ugly triangles are now gone.
from neurom.ezy import load_neuron
from neurom.view import view
n = load_neuron(path)
view.dendrogram(n, show_diameters=True)
Please feel free to give more feedback in order to improve it!

@wvangeit is there anything left to discuss in this issue? If not, I will close it.

Hi,
The main points are solved. But still:

We need units on the y-axis (maybe we don't even need an axis if we would have x/y scale bars)
After calling 'dendrogram()' the figure window closes immediately if I don't put a pylab.show(). Maybe you can add an option as argument that enables/disables pylab.show() ?
(And a white background would also be nice, but I leave that up to you)

Thanks for the information. Could you make separate issues for those two points?

Done


Cannot control visibility of relationships and attributes from imported data models?

In this spec, I cannot hide the attributes of Agent - a class from an imported data model. The buttons are not there...

This functionality should be implemented as a black list.
By default all attributes are visible.


Value error regarding to "--max_length_generation"

Hi, I am running MBPP on llama-2 model. However, whatever "--max_length_generation" I set, the benchmark will fail.
My command to execute: CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 accelerate launch main.py --model meta-llama/Llama-2-7b-hf --tasks mbpp --precision bf16 --max_length_generation 1024 --allow_code_execution
The output failure message:
ValueError: Input length of input_ids is 1024, but max_length is set to 1024. This can lead to unexpected behavior. You should consider increasing max_length or, better yet, setting max_new_tokens.ValueError: Input length of input_ids is 1024, but max_length is set to 1024. This can lead to unexpected behavior. You should consider increasing ma x_length or, better yet, setting max_new_tokens.
It seems to me the length of input_ids is somehow increasing with the --max_length_generation? With that i am not able to conduct the benchmark for MBPP. Thanks!

It seems some of the prompts are long (they take all tokens of max_generation_length and then you have no room left for generation). Can you try setting it to a larger value such as 2048?


Clarify documentation of KeyType

From https://github.com/TBD54566975/web5-rs/pull/34 and a conversation with @decentralgabe , added documentation to clarify what I think may be confusing.
Feedback is more than welcome.

Reading these additional comments, in my opinion, make the purpose of it even more confusing 😅
I added a ticket in the backlog to refactor this into something that more resembles what we have in Kotlin: https://github.com/TBD54566975/web5-rs/issues/38
If others agree that this helps clarify, I'm all for adding. But to me, it's bringing in a concept (JWK kty) that consumers of the SDK don't really need to know about.

Closing this since it's covered in https://github.com/TBD54566975/web5-rs/issues/38


Update troubleshoot-changefeed-functions.md

Another scenario for "missing changes" that Anthony Chu helped me diagnose:
The Cosmos DB Trigger will look for ConnectionStringSetting in either the AppSettings or the ConnectionStrings.
But the scale controller (as of writing this) apparently only looks for the setting in AppSettings, and ignores any value in ConnectionStrings.

@StephenCleary : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Note that publishing in this repository is suspended until Tuesday, March 2. Merging will resume Tuesday. Authors can still review and sign off on PRs in the interim. Thanks.

@StephenCleary Thanks for the contribution, but isn't the problem on the Scale Controller and nothing the user can actually change in their code/Function? So the right course of action is that the Scale Controller correctly looks in the expected places.
The lookup of information in Connection String and Settings is a feature Functions did 3 years ago (https://github.com/Azure/azure-webjobs-sdk-extensions/pull/488). Once they fix the gap, then this issue would not happen anymore.
Being a bug that will get fixed, I am not sure if we would leave a permanent documentation about it.

I'm fine with either solution.
The Azure Function docs say to place the connection string in AppSettings, where it would work fine with the scale controller (the WebJobs examples unfortunately say to place the connection string in ConnectionStrings), so you could say it's just a documentation thing. And this PR would act as clarification in that case.
Or you could say it's a Scale Controller bug because the controller should behave the same as the Functions Host (trigger). I can see it going either way.
If this is treated as a Scale Controller bug, then I agree this documentation PR should not be merged in.

For me, it is a Scale Controller bug, it should behave as the Trigger, especially since that is the approach that the Functions team took on the original PR. Once the Scale Controller fix is deployed, it will work regardless of where it is 😄

@StephenCleary Hope the Azure functions team will fix this bug soon. As it wouldn't make sense to document this issue in this doc, we will close this PR.
#please-close

Related issue to fix ScaleController - https://github.com/Azure/Azure-Functions/issues/1857


hetzner-k3s delete does not remove worker pool placement groups

Hi! When running hetzner-k3s delete, it uses the wrong names when it refers to the names of the worker pool placement groups that were created. On creation, the placement groups get named name-X, where X is a number. That number is not being used during the deletion process, so the placement groups remain and need to be deleted by hand using the cloud console.
So for example, with a config snippet as follows:
worker_node_pools:
- name: small-static-1
  instance_type: cax11
  instance_count: 2
  location: nbg1
  labels:
    - key: purpose
      value: k3s-worker
- name: small-static-2
  instance_type: cax11
  instance_count: 2
  location: nbg1
  labels:
    - key: purpose
      value: k3s-worker

During creation, the output confirms the creation like this:
Creating placement group k3s-playground-masters...done.
Creating placement group k3s-playground-small-static-1-1...done.
Creating placement group k3s-playground-small-static-2-1...done.

And deletion fails like this:
Deleting placement group k3s-playground-masters...done.
Placement group k3s-playground-small-static-1 does not exist, skipping.
Placement group k3s-playground-small-static-2 does not exist, skipping.

Hi, yeah I'm aware of this and it's on my list of things to fix for the next release. Placement groups don't cost money nor cause any problems so I haven't given this higher priority.

Ref. project card https://github.com/users/vitobotta/projects/4/views/1?filterQuery=placement&pane=issue&itemId=59546489

Not sure this is the right place to comment as this is about placement groups, but: I have set up a project and ran create/delete repeatedly (very cool stuff :) ).  I also went through the README and found:
NOTE: at the moment instances created by the cluster autoscaler, as well as load balancers and persistent volumes created by deploying your applications must be deleted manually. This may be addressed in a future release.
I would actually say that not deleting the LB  can be quite a nice behaviou.  When combining it together with something like Cloudflare DNS it avoids reconfiguring the IP in CF.  I guess the default should be to delete it as people may run into unexpected costs, but perhaps this behaviour (not deleting the LB) could be supported through a flag.

Not sure this is the right place to comment as this is about placement groups, but: I have set up a project and ran create/delete repeatedly (very cool stuff :) ). I also went through the README and found:
NOTE: at the moment instances created by the cluster autoscaler, as well as load balancers and persistent volumes created by deploying your applications must be deleted manually. This may be addressed in a future release.
I would actually say that not deleting the LB can be quite a nice behaviour. When combining it together with something like Cloudflare DNS it avoids reconfiguring the IP in CF. I guess the default should be to delete it as people may run into unexpected costs, but perhaps this behaviour (not deleting the LB) could be supported through a flag.

The README doesn't expand on this but the idea is to ask the user for a confirmation before deleting load balancers and persistent volumes, so you can choose :)

Closing since placement groups are now managed properly in v2, which will be released probably next weekend.


develop figures depicting ocean temperature profiles over time (space?)

Opted for two types of graphs:

shows the transmitted data as a bar graph (series of geom_rect) with varying colors for temperature and date along the x axis. To make the bars more visible, I expanded the time 4 hours in each direction
shows an interpreted grid of temperature at depth over time. used the Akima spline for interpretation based on this example. might look into other options (e.g. interp::interp())

#31 closes this issue


Doesn't work with VS 2013 after update from 2.5.0

Description
After I updated the extension from 2.5.0 to 2.5.6, all features stopped working. The option page in Tools > Options is visible. Disabling the other extensions didn't help. Starting Visual Studio with the /log switch didn't reveal anything. I also tried to install this extension on another machine with VS 2013 and I can observe the same behavior.
Repro steps
Use this extension with VS 2013, apparently.
Expected behavior
Everything that is enabled in the options should work.
Actual behavior
Syntax highlighting, rename refactoring, F12 and everything else doesn't work at all.
Known workarounds
Downgrade to 2.5.0.
Related information

OS: Windows 7
Extension version: starting with 2.5.2
Visual Studio version: 12.0.40629.00 Update 5
Other extensions installed in Visual Studio:

EditorConfig
Productivity Power Tools 2013
SubwordNavigation
And those that come with VS 2013

I've just tried to enable the "Diagnostic Mode", but I don't get any output in the output pane with 2.5.2, while 2.5.0 prints some information.

Faced same issue with above workaround.

I think we won't be supporting any version prior 2017. Actually I hope this project will be merged with Visual F# Tools soon.

I think we won't be supporting any version prior 2017

That's really sad. F# tooling is pretty much non-existent in vanilla VS and I'm stuck on 2013 until my company decides to upgrade to VS 2017, or even the next one. I'm sure there are lots of people who are in a similar situation.
But if this is the way forwards, I think there should be a last working version of VFPT which doesn't prompt for broken updates.

@inosik @vasily-kirichenko Having a stable VS2013/15 branch which an interested group of people could support over the next couple of years would be great.

OK, VS 2013 users should use 2.5.0.


Change MultiHateClassification to use dataset_transform

Change MultiHateClassification to use dataset_transform istead of overloading load_dataset.
As discussed with @KennethEnevoldsen in https://github.com/embeddings-benchmark/mteb/pull/545

Thanks both! And yes, indeed I did run the evaluation, the results come out all the same.

set to auto merge


Upgrade to log4j 2.17.0

+1 although I’m not sure if we perform thread context lookups anywhere we
definitely want to avoid StackOverflowError.
Thanks
On Tue, Dec 21, 2021 at 04:27 Sebastian Nagel @.***>
wrote:

You can view, comment on, or merge this pull request online at:
https://github.com/apache/nutch/pull/719
Commit Summary

719d6ec
https://github.com/apache/nutch/pull/719/commits/719d6ec798d23fe6841995862608560054b14a2d
Upgrade to log4j 2.17.0

File Changes
(1 file https://github.com/apache/nutch/pull/719/files)

M ivy/ivy.xml
https://github.com/apache/nutch/pull/719/files#diff-d571fae60d753ab001a6b973e986ec559a7e178604b56ffb4904a66854392121
(6)

Patch Links:

https://github.com/apache/nutch/pull/719.patch
https://github.com/apache/nutch/pull/719.diff

—
Reply to this email directly, view it on GitHub
https://github.com/apache/nutch/pull/719, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAI4TF4QK5Z2GAMJQNKKU6DUSBXDRANCNFSM5KQBU7SQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
http://home.apache.org/~lewismc/
http://people.apache.org/keys/committer/lewismc


How to optimize the performance of modsecurity?

Hello :
I am here Environment nginx + modseurity2.9
After loading rules, site opens speed greatly affected, but the impact is very slow to refresh the site.
Ask the next. How to optimize the performance of modsecurity.
Thank you

https://github.com/SpiderLabs/ModSecurity/wiki/ModSecurity-Frequently-Asked-Questions-(FAQ)#will-using-a-large-amount-of-negative-filtering-rules-impact-performance


Build wheels for the 3.13 free-threaded build of CPython

Related to #407.
FYI running cibuildwheel for manylinux locally successully built a wheel for free-threaded 3.13.

I see there are no numpy cp313t nightly wheels for Windows, so I will disable building them here too. Tracking issue numpy/numpy#26157.

Makes sense.


transport/grpc: add support for GAE standard

We should automatically use the appengine/socket.Dialer.

Can you elaborate?

To use any gRPC backed Cloud package, the user must do something like this:
	dialOpt := cloud.WithGRPCDialOption(grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
		return socket.DialTimeout(ctx, "tcp", addr, timeout)
	}))
	client, err := datastore.NewClient(ctx, projectID, dialOpt)

We should do this for them.

How are you going to thread the ctx into there?

We should take the ctx from the NewClient function.
On GAE standard, users are creating a new Client for every incoming request.

That approach is probably fine. I thought you were suggesting doing this in the grpc-go package

Oh, no. Unfortunately gRPC's Dial doesn't take a context as a parameter, so that's not possible.

https://code-review.googlesource.com/#/c/5050/


Transpiler translates CX gate which is already in the target basis - resulting in high gate count

Information

Qiskit Terra 0.16.4:
Python 3.8.5:
OS Ubuntu 20.04:

What is the current behavior?
In some cases, the transpiler translates CX gate which is in the supplied target basis ['id', 'rz', 'sx', 'x', 'cx'] using two iSWAP gates. Then, the iSWAPs are replaced again using 2 CX gates leading to one CX being translated into multiple single-qubit and 4 CX gates. This results in a high number of unnecessary CX gates in the transpiled circuit. For example, a SWAP includes 12 CX gates instead of only 3 due to this translation.
Steps to reproduce the problem
I have attached an example QASM file (sample.txt) which is showing this behavior. I have also included a transpile.log for further investigation if needed. For example, at Line # 740 of the transpile.log, you can see how the CX gate is translated, and at Line # 1565 you can find the SWAP translation to 12 CX gates. An MWE to reproduce the problem is below:
import logging
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.compiler import transpile
from qiskit.test.mock import FakeAthens

logging.basicConfig(
    filename='transpile.log',
    filemode='w',
    format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
    datefmt='%H:%M:%S',
    level=logging.DEBUG
)

circ = QuantumCircuit()
circ = circ.from_qasm_file("sample.txt")

circ_transpiled = transpile(
    circ,
    backend=FakeAthens(),
    basis_gates=['id', 'rz', 'sx', 'x', 'cx'],
    routing_method='sabre'
)

What is the expected behavior?
The gates that are already in the target basis should not be translated in the basis_translator.py.
Suggested solutions
Although a more scientific solution would be identifying why a gate in the target basis is getting translated, I can suggest 3 stop-gap solutions that will check if the gate is already in the target basis and will simply ignore the gate.
Solution # 1
Add a check here (https://github.com/Qiskit/qiskit-terra/blob/0950594c8d3e6aed637a47255a8a429b64c69874/qiskit/transpiler/passes/basis/basis_translator.py#L255) as following. This will skip finding equivalence for gates that are already in the target basis.
for gate_name, gate_num_qubits in current_basis:
        if gate_name in target_basis: # new-line
            continue # new-line
        equivs = equiv_lib._get_equivalences((gate_name, gate_num_qubits))

Solution # 2
Remove translation of gates that are already in the target basis from the return here https://github.com/Qiskit/qiskit-terra/blob/0950594c8d3e6aed637a47255a8a429b64c69874/qiskit/transpiler/passes/basis/basis_translator.py#L247
for idx, (gate_name, gate_num_qubits, params, equiv) in enumerate(rtn):
    if gate_name in target_basis:
        del rtn[idx]
    else:
        logger.debug('%s/%s => %s\n%s', gate_name, gate_num_qubits, params, equiv)
return rtn

Solution # 3
Add a check in the _compose_transforms method here https://github.com/Qiskit/qiskit-terra/blob/0950594c8d3e6aed637a47255a8a429b64c69874/qiskit/transpiler/passes/basis/basis_translator.py#L339

add target_basis as an argument in the _compose_transforms.

for node in doomed_nodes:
    if node.op.name in target_basis:
        continue

Thanks for investigating this @ashsaki ! Agree this is a bug, and your proposed Solution #1 seems like the best fix. If a gate is already in the basis, there's no need to consider it as a possible translation step (this should speed up the search somewhat as well).

@kdk @ashsaki Is anybody working on this?

@kdk @ashsaki Is anybody working on this?

I am not working on this. I can fork and create a pull request with the proposed solution - 1.

Sounds good. I ran some simple benchmarks on my local system.

Over multiple runs, I got an average depth of 613 and an average time of 24s using main. Making your solution-1 above I got an average depth of 136 in a time of 8s. That's a pretty significant improvement.
I also remembered seeing #6122. I ran that circuit and though the output varies, I found that without the change, the transpiler found the shortest circuit of depth 4, 20% of the time in 80s. With the change it found it 33% of the time in 36s. Again a good improvement.
In addition I ran the CI transpiler auto-tests and they passed with the change. Interestingly there was no difference in execution time with or without the change, which probably means there are no tests currently that test the problem above. I think there ought to be a couple of tests added, perhaps your circuit above and the one from #6122, modified to work in the CI environment.

Is there any update on this? I was hoping to get this bugfix backported and included in the pending 0.17.2 bugfix release (which will be released today or tomorrow, which would require a PR opened ASAP)

@mtreinish @enavarro51 I have created the pull request. (This is my first PR with Qiskit. Please check if anything is missing).

@ashsaki awesome, I just reviewed the PR and it lgtm. Thanks for pushing it up.
@enavarro51 the PR doesn't include explicit test coverage for this issue, which given the time crunch for the 0.17.2 I think is ok (just so we can have the fix backported in time). If you wanted to push a follow up PR adding test cases based on the example here and in #6122  that would be great.


feat: introduce pre-commit and configure most existing linters in it

Explanation
This is toward #114 . This introduces the pre-commit tool which is configured to run all hooks that we previously ran locally via standard shell scripts.
This MR also runs the hooks on all files resulting in some being touched up.
SuperLinter (used in CI) still provides some checks that we do not cover here yet. This also updates the Dockerfile to symlink the pip installation to /usr/bin to support some tools that expect to find pip installed there.
Reading Guide
Most changes in this MR are source reflows from the linters. The exceptions are

deleted .githooks
introduced .pre-commit-config.yaml
modified Dockerfile and Makefile
updated some Docker/venv/getting-started docs
run pre-commit as a CI step in .github/workflows/pre-merge.yml

Limitations
Setting up the hooks in the Docker environment is a bit awkward because the user first has to install git and then trust the DGP repo. We could do this as part of the Dockerfile, but that would mean installing git. I did not move to install git in this work.
The usual concern of people running a virtual environment with a Python version different than what we use in CI persists.

This change is

Thanks, will merge now so everyone can use it! Tail-end work will have me replace the last linters from SuperLinter with hooks in pre-commit, and then we'll have single-entrypoint linting!


Dashboard no longer working - needs older bokeh version

After installing, ktdashboard -demo tests/test_cache_1000.json  fails with an error in bokeh:
  File "/home/powersensor/.pyenv/versions/3.11.3/lib/python3.11/site-packages/bokeh/core/has_props.py", line 368, in _raise_attribute_error_with_matches
    raise AttributeError(f"unexpected attribute {name!r} to {self.__class__.__name__}, {text} attributes are {nice_join(matches)}")
AttributeError: unexpected attribute 'plot_height' to figure, similar attributes are outer_height, height or min_height

This looks like a breaking change in bokeh 3.0: https://stackoverflow.com/questions/74280959/attributeerror-unexpected-attribute-plot-width-to-figure-similar-attributes
If you want to make the dashboard work with bokeh 3.0, I can pick up fixing this.

That would be great @loostrum !


Function calling using the assistants API is partially broken

Confirm this is an issue with the Python library and not an underlying OpenAI API

[X] This is an issue with the Python library

Describe the bug
when using the assistants api, with the function calling tool enabled, and the call request is received in the step_details.tool_calls list,  I get a dictionary instead of a FunctionToolCall object for function, this seems to be related to the fact that the dict/json's "function"  sub dictionary is missing the output  field, but I'm not sure.
To Reproduce
I'm using openai==1.6.1
just run the minimalistic script I wrote to reproduce the probem.
you'll end up with the following exception:
Traceback (most recent call last):
  File "/home/user/Documents/dev/perso/gpt-api-tests/run-test.py", line 65, in <module>
    if (tool.type == "function"):
        ^^^^^^^^^

Code snippets
from openai import OpenAI
import os

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

assistant = client.beta.assistants.create(
    name="Doc",
    instructions="You are Doc, a personal assistant. You can write code and execute it to to help the user. You can also help the user using your knowledge base, you can send email with the function tool",
    tools=[
        {"type": "code_interpreter"},
        {"type": "retrieval"},
        {"type": "function", "function": {
            "name": "send_email",
            "description": "Send an email to the recipient",
            "parameters": {
                "type": "object",
                "properties": {
                    "recipient": {
                        "type": "string",
                        "description": "The recipient email address"
                    },
                    "subject": {
                        "type": "string",
                        "description": "The email subject"
                    },
                    "body": {
                        "type": "string",
                        "description": "Body of the email"
                    }
                }
            }
        }}
    ],
    model="gpt-4-1106-preview",
)

thread = client.beta.threads.create()

message = client.beta.threads.messages.create(
    thread_id=thread.id,
    role="user",
    content="Hello, using python, generate the first 100 fibonacci numbers. when done, send the result by email to<EMAIL_ADDRESS>)

run = client.beta.threads.runs.create(
    thread_id=thread.id,
    assistant_id=assistant.id,
)

while (run := client.beta.threads.runs.retrieve(
    thread_id=thread.id,
    run_id=run.id,
)).status in ('queued', 'in_progress'):
    run_steps = client.beta.threads.runs.steps.list(
        thread_id=thread.id,
        run_id=run.id
    )

    for step in run_steps.data:
        if (step.type != 'tool_calls'):
            continue
        if (step.step_details.type != 'tool_calls'):
            continue
        for tool in step.step_details.tool_calls:
            if (tool.type == "function"):
                print("function call ")

### OS

Manjaro Linux

### Python version

3.11.6

### Library version

openai-1.6.1

Thanks for reporting, we'll take a look!

Hey @kamou thanks for reporting. I was able to repro this problem in 1.6.1, but the snippet runs fine in the latest version (1.7.2). Updating the library should solve your problem.


Contrast Security Solution

Solution including workbook, data connector and analytics rules for review.

@davidaustinarcher , In order to pass Analytics rule validation, please add connector id in [ValidConnectorIds.json] file (https://github.com/Azure/Azure-Sentinel/blob/master/.script/tests/detectionTemplateSchemaValidation/ValidConnectorIds.json) Thanks !

Fixing logo


Sort an array in WaveForm in JavaScript

💥 WaveForm
Given an unsorted array, sort the array into a waveform in JavaScript.
Wave form - array[0] >= array[1] <= array[2] >= array[3] <= array[4] >= array[5] and so on
Have you read the Contributing Guidelines on Pull Requests?
Yes

/assign


Setting ARCAN_FONTPATH issues

Hello,
I'm currently trying to package Arcan and Durden for the Guix package manager. It seems to work quite well except that Durden doesn't care about my ENV defined ARCAN_FONTPATH.
If I ARCAN_FONTPATH=${my/path} arcan welcome system-font is correctly set but If I ARCAN_FONTPATH=${my/path} arcan durden, system-font seems to fallback to durden_folder/fonts. Is it expected?
I also wanted to know if it was possible to set multiple font folders?
Thank you,

Thanks,
For the egl-dri /sdl, I suppose it's currently on master only? I'm packaging on release 0.5.5 but i'll definitely look into it once it get released. For now, in Guix, we have other ways to make both binaries co-exist nicely! :D
I can confirm using 'arcan_softoverride_namespace' does set system-font correctly but I get
arcan_video_renderstring(), couldn't render node.
renderfun(), tried to update from broken font
I suppose it just doesn't find the right font anymore.
But it's ok, I'll stick to the default arcan behavior for consistency.

Durden actually assumes the set main font to be there, so that is the issue. It should be more resilient about non-existing default font at startup though so I'll take a stab at it later today or this week.
The egl/sdl change should be in the recently tagged <IP_ADDRESS>.
I'm not well aware of the fine details of Guix as to the separation. The problem we had was that essentially the arcan_lwa binary and other accelerated shmif clients needed the shmif-ext library. The way this library transfers buffers to the server depends on the video platform of the running instance, so sdl versus egl-dri used different methods for this, thus failing.


Fix tag format

Copy-pasta'd the tag format, previous releases have omitted the "v" prefix (and the Travis configuration now expects the tag to not have it).

Coverage remained the same at 100.0% when pulling 7a60bc35e24a59d3c6a37642cead8fc39c84e680 on jmbowman/fix_tagging into c8369d218670eee443da427d6dde899e7826f70f on master.


Exception "channel/connection is not open" when amqp.Publishing has UserId

When Publishing to a channel and the amqp.Publishing has UserId attached, after a while I get the exception "channel/connection is not open". When I remove the the UserId from amqp.Publishing everything is ok. Any ideas what is happening and how to fix it?
This is the code I'm running.
package main

import (
	"github.com/streadway/amqp"
	"log"
)

const exchangeKey = "test-exchange"
const exchangeType = "topic"

func main() {
	//set up queue handling
	conn, err := amqp.Dial("amqp://guest:guest@localhost")
	if err != nil {
		panic(err)
	}

	messageChannel, err := conn.Channel()
	if err != nil {
		panic(err)
	}

	if err := messageChannel.ExchangeDeclare(
		exchangeKey,  // name
		exchangeType, // type
		true,         // durable
		false,        // auto-deleted
		false,        // internal
		false,        // no-wait
		nil,          // arguments
	); err != nil {
		panic(err)
	}

	defer messageChannel.Close()
	defer conn.Close()
	var count int64

	publish := func(body []byte, userId string) {
		count += 1
		if err := messageChannel.Publish(
			exchangeKey, // exchange
			"test",      // routing key
			false,       // mandatory
			false,       // immediate
			amqp.Publishing{
				ContentType:  "application/json",
				Body:         body,
				DeliveryMode: amqp.Persistent,
				UserId:       userId,
			},
		); err != nil {
			log.Println("COUNT:", count)
			panic(err)
		}
	}

	for {
		publish([]byte(`{"foo":"bar"}`), "123")
	}

}

Hi @janika
I was just looking at this and i dont think this project is supported anymore. @streadway could you confirm?
I will try your code and see if i get the same issue.

Hi @dmportella
It would be great if you could confirm this bug or propose any solutions.
But yeah, I started looking around after posting this issue and this project seems to be a bit abandoned :(

@janika
I figured out what is the problem. The User Id must be a user that exists in rabbitmq. 123 doesn't work but if you use **guest ** it does.

hey @dmportella - the project isn't abandoned... just sleeping. I haven't reviewed the PRs for a while.
The UserId field comes from the AMQP spec and is passed to rabbit without being touched. There may be an exception being asynchronously returned which would close the channel/connection because RabbitMQ may not support that part of the spec.
What do the server logs show for publishings that use a UserId?

RabbitMQ does support the user id field and even performs validation on it. See server logs for details.

You are right. Thanks for the clarification. It makes totally sense that "123" doesn't work, because the user doesn't exist in RabbitMQ. I was trying to use the field with the wrong purpose. It would help, if the error message would be a bit clearer, but my mistake for not getting more into the documentation.
Thanks for your time and effort @dmportella, @streadway, @michaelklishin!

@janika to clarify: it does not work because the effective user (the one your connection authenticated as) is not "123". You can label the user with the "impersonator" tag to turn off validation. See the docs above.

Thanks, @michaelklishin it's good info. Although I think I will find another solution. I was trying to use UserId field to pass on the actual user's id whose request to the server initiated the action I'm passing on in RabbitMQ. I think adding it to the message body makes more sense now.

cool @streadway
glad its working for you now @janika


No executable

No sln file, no exe file, is it still in development or what?

Dll injections are usually detected af. Thanks for replying but I don't know nothing about i njections on CS2


Adapter

Inspired by Replacing switch statements with Object literals

your example is very complex and non general.
maybe this example from that page is simpler and general:
const drinks = new Map([
    ['coke', () => 'Coke'],
    ['pepsi', () => 'Pepsi'],
    ['lemonade', () => 'Lemonade'],
    ['default', () => 'Default item']
])
const drink = drinks.has(type) ? drinks.get(type)() : drinks.get('default')()

also mention your account (@0x860111) and that page as source at end of this example.

Is replacing switch-case with object a special es6 trick? or just (old) js trick?

Honestly, this is not a pure es6 trick. More like destructuring assignment + object literals + IIFE;
What if you need a more complex logic? Like 2 actions and 1 key depending on the input?
You can't achieve that with Map example.
Also, last example support renaming, like:
    const { axis: coordinate, clear: action } = (({
        row: () => {
            return {
                axis: $id % 9,
                clear: (...args) => this.clearFromRow(...args)
            };
        },
        column: () => {
            return {
                axis: Math.floor($id / 9),
                clear: (...args) => this.clearFromColumn(...args)
            };
        }
    })[$type])();
    clear(coordinate, $id);

What if you need a more complex logic?

we have here building blocks and this is art of developers to build towers


Is it possible to use it in library?

No. IDs are not final in libraries and thus cannot be used in annotations.


To group buttons of extensions in left bar

Issue Type: Feature Request
Sometimes, a group os extensions has similiriarity and Idlike to group by subject. ( Like DOcker and Docker compose extensions, should be grouped in a single button "Docker", and expanded as I wish)
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:39:46.686Z)
OS version: Linux x64 5.13.0-25-generic snap
Restricted Mode: No

You can always merge these views by drag n drop.


Add unit tests for encoder MC

The encoder contains separate (and separately tweaked) copies of the MC functions compared to the decoder. Add tests for these functions. Also simplify the structure of the MC tests a little bit (speeding up the compile time and reducing the overall number of tests).
Review at https://rbcommons.com/s/OpenH264/r/1090/.

can the failed CI record be remove from this pull request?

Sure, I'll rebase it and have it rerun with the last commit only.

Now there's only a passed travis record here.


[1.2.0-RC] WebSocket renderer doesn't work

I use WebServerPageConnectionService#fileRequested for reload preview on specification changes. After creation of 1.2.0 release I decided to check it on new versions, not only on 2021.2.
Error occurred when I open preview on 2021.2.2 because of changing of method signature.
java.lang.NoSuchMethodError: 'java.lang.CharSequence org.jetbrains.builtInWebServer.liveReload.WebServerPageConnectionService.fileRequested(io.netty.handler.codec.http.FullHttpRequest, java.util.function.Supplier)'
	at com.asyncapi.plugin.idea._core.AsyncAPISchemaHtmlRenderer.render(AsyncAPISchemaHtmlRenderer.kt:54)
	at com.asyncapi.plugin.idea.extensions.web.StaticServer$process$resourceHandler$1.handle(StaticServer.kt:47)
	at com.asyncapi.plugin.idea.extensions.web.StaticServer.handleRequest(StaticServer.kt:88)
	at com.asyncapi.plugin.idea.extensions.web.StaticServer.process(StaticServer.kt:74)

In 2021.1 - 2021.2.1 is:
fun fileRequested(request: FullHttpRequest, fileSupplier: Supplier<out VirtualFile?>): CharSequence?

In 2021.2.2 - 2021.2.3 is:
fun fileRequested(request: FullHttpRequest, onlyIfHtmlFile: Boolean, fileSupplier: Supplier<out VirtualFile?>): CharSequence?

Signature was changed in 2021.2.2 (build 212.5284)

WebServerPageConnectionService.fileRequested's signature was changed in 2021.2.2 (build 212.5284)

Use reflection for calling for proper method. com.intellij.openapi.application.ApplicationInfo#getFullVersion helps to know which IDEA is using plugin.
I chose it because signature won't be changed in future, and it easier than maintain two releases

Is current signature final variant in 2021.2.3 and will not change in next releases like 2021.3, 2022.*? If so I will left It on a place.

Yes, it won't be changed, at least backward compatibility won't be broken, so please feel free to use it.

References:

Question on JetBrains portal

How to prevent in future:

Don't forget to add new versions of IDEA in plugin verification settings

tasks.getByName<org.jetbrains.intellij.tasks.RunPluginVerifierTask>("runPluginVerifier") {
    ideVersions.set(listOf(
        "2021.1",
        "2021.1.1",
        "2021.1.2",
        "2021.1.3",
        "2021.2",
        "2021.2.1",
        "2021.2.2",
        "2021.2.3"
    ))
    verifierVersion.set("1.268")
}

Will allow to catch compatibility problems:
2021-11-10T23:53:02 [main] INFO  verification - Finished 1 of 8 verifications (in 2.2 s): IC-212.5080.55 against com.asyncapi.plugin.idea:1.2.0+idea2021: Compatible
2021-11-10T23:53:02 [main] INFO  verification - Finished 2 of 8 verifications (in 2.3 s): IC-212.5457.46 against com.asyncapi.plugin.idea:1.2.0+idea2021: 1 compatibility problem
2021-11-10T23:53:02 [main] INFO  verification - Finished 3 of 8 verifications (in 2.3 s): IC-212.5284.40 against com.asyncapi.plugin.idea:1.2.0+idea2021: 1 compatibility problem
2021-11-10T23:53:02 [main] INFO  verification - Finished 4 of 8 verifications (in 2.3 s): IC-212.4746.92 against com.asyncapi.plugin.idea:1.2.0+idea2021: Compatible
2021-11-10T23:53:02 [main] INFO  verification - Finished 5 of 8 verifications (in 2.4 s): IC-211.7142.45 against com.asyncapi.plugin.idea:1.2.0+idea2021: Compatible
2021-11-10T23:53:02 [main] INFO  verification - Finished 6 of 8 verifications (in 2.4 s): IC-211.6693.111 against com.asyncapi.plugin.idea:1.2.0+idea2021: Compatible
2021-11-10T23:53:02 [main] INFO  verification - Finished 7 of 8 verifications (in 2.4 s): IC-211.7442.40 against com.asyncapi.plugin.idea:1.2.0+idea2021: Compatible
2021-11-10T23:53:02 [main] INFO  verification - Finished 8 of 8 verifications (in 2.4 s): IC-211.7628.21 against com.asyncapi.plugin.idea:1.2.0+idea2021: Compatible
Plugin com.asyncapi.plugin.idea:1.2.0+idea2021 against IC-212.5080.55: Compatible
    Plugin can be loaded/unloaded without IDE restart

Plugin com.asyncapi.plugin.idea:1.2.0+idea2021 against IC-212.5457.46: 1 compatibility problem
Compatibility problems (1):
    #Invocation of unresolved method org.jetbrains.builtInWebServer.liveReload.WebServerPageConnectionService.fileRequested(FullHttpRequest, Supplier) : CharSequence
        Method com.asyncapi.plugin.idea._core.AsyncAPISchemaHtmlRenderer.render(io.netty.handler.codec.http.FullHttpRequest request, java.lang.String schemaUrl) : java.lang.String contains an *invokevirtual* instruction referencing an unresolved method org.jetbrains.builtInWebServer.liveReload.WebServerPageConnectionService.fileRequested(io.netty.handler.codec.http.FullHttpRequest, java.util.function.Supplier) : java.lang.CharSequence. This can lead to **NoSuchMethodError** exception at runtime.
    Plugin can be loaded/unloaded without IDE restart

Plugin com.asyncapi.plugin.idea:1.2.0+idea2021 against IC-212.5284.40: 1 compatibility problem
Compatibility problems (1):
    #Invocation of unresolved method org.jetbrains.builtInWebServer.liveReload.WebServerPageConnectionService.fileRequested(FullHttpRequest, Supplier) : CharSequence
        Method com.asyncapi.plugin.idea._core.AsyncAPISchemaHtmlRenderer.render(io.netty.handler.codec.http.FullHttpRequest request, java.lang.String schemaUrl) : java.lang.String contains an *invokevirtual* instruction referencing an unresolved method org.jetbrains.builtInWebServer.liveReload.WebServerPageConnectionService.fileRequested(io.netty.handler.codec.http.FullHttpRequest, java.util.function.Supplier) : java.lang.CharSequence. This can lead to **NoSuchMethodError** exception at runtime.
    Plugin can be loaded/unloaded without IDE restart

Plugin com.asyncapi.plugin.idea:1.2.0+idea2021 against IC-212.4746.92: Compatible
    Plugin can be loaded/unloaded without IDE restart

Plugin com.asyncapi.plugin.idea:1.2.0+idea2021 against IC-211.7142.45: Compatible
    Plugin can be loaded/unloaded without IDE restart

Plugin com.asyncapi.plugin.idea:1.2.0+idea2021 against IC-211.6693.111: Compatible
    Plugin can be loaded/unloaded without IDE restart

Plugin com.asyncapi.plugin.idea:1.2.0+idea2021 against IC-211.7442.40: Compatible
    Plugin can be loaded/unloaded without IDE restart

Plugin com.asyncapi.plugin.idea:1.2.0+idea2021 against IC-211.7628.21: Compatible
    Plugin can be loaded/unloaded without IDE restart

Settings were extended in #17


Harmonize intensity in mgf export

Adds options for formatting of intensity values.
SIRIUS used to normalize max signal to 100 now uses scientific notation 1.0005E4.
GNPS still uses the original intensity value without normalization. Scientific notation is untested so I removed this option.

Maybe another question @SteffenHeu should we change the scientific option to a checkbox next to the combobox?
This way we could combine the format and the normalization more freely. So we could have normalized to 100 but still benefit of scientific number format - like no issues with multiple magnitudes.
What do you think?

All done


DiscreteDistribution.dist_of_func

There is momentum gathering behind an xarray revolution. After checking out the library and @alanlujan91 's ConsLabeledModel, I am happy to join that revolution.
A crucial part, I think, is getting the distribution machinery to work with x arrays. Which I think we do with the DiscreteDistributionLabeled class.
I was playing around with its dist_of_func method and ran into behavior that is either unintuitive or a bug. Consider the following example code, which tries to take the expectation of a labeled function in two different ways.
a) Directly, using the .expected method.
b) First creating an object that represents the distribution of the function, and only then taking its expectation.
        # Create a basic labeled distribution
        base_dist = DiscreteDistributionLabeled(
            pmv=np.array([0.5, 0.5]), atoms=np.array([[1.0, 2.0], [3.0, 4.0]]), var_names=["a", "b"]
        )

        # Define a transition function
        def transition(shocks, state):
            state_new = {}
            state_new["m"] = state["m"]*shocks["a"]
            state_new["n"] = state["n"]*shocks["b"]
            return state_new

        m = xr.DataArray(np.linspace(0, 10, 11), name="m", dims=("grid",))
        n = xr.DataArray(np.linspace(0, -10, 11), name="n", dims=("grid",))
        state_grid = xr.Dataset({"m": m, "n": n})

        # Evaluate labeled transformation

        # This works
        new_state_exp = base_dist.expected(transition, state=state_grid)
        # This does not work
        new_state_dstn = base_dist.dist_of_func(transition, state=state_grid)
        new_state_dstn.expected()

Method a) works but b) instead raises the error
new_state_dstn.expected()
  File "/home/mvg/GitHub/HARK/HARK/distribution.py", line 1243, in expected
    return super().expected()
  File "/home/mvg/GitHub/HARK/HARK/distribution.py", line 936, in expected
    f_query = self.atoms
AttributeError: 'DiscreteDistributionLabeled' object has no attribute 'atoms'

The application of the function of the function is not yielding an object with an atoms dimension over which to integrate, I think. It might be that something else needs to be added to the function. But it is weird that .expected() can deal with it and .dist_of_func can not.
I can look into it sometime, but wanted to confirm whether it is a bug, or a lack of documentation or simply a desired to-be-implemented feature.

Welcome, Comrade, to the revolution!
Alan, an issue sounds like a pretty good place for this to rest.  But maybe
we should have a tag like "to-do" or "bus" of "needs-addressing" or
something to quickly pull up all items of this kind?
On Tue, Jun 20, 2023 at 7:22 PM Mateo Velásquez-Giraldo <
@.***> wrote:

There is momentum gathering behind an xarray revolution
https://github.com/econ-ark/HARK/issues/1289. After checking out the
library and @alanlujan91 https://github.com/alanlujan91 's
ConsLabeledModel
https://github.com/econ-ark/HARK/blob/37134b9c9eea4591659b7cc398cf5894e44ba0e7/HARK/ConsumptionSaving/ConsLabeledModel.py,
I am happy to join that revolution.
A crucial part, I think, is getting the distribution machinery to work
with x arrays. Which I think we do with the DiscreteDistributionLabeled
class.
I was playing around with its dist_of_func method and ran into behavior
that is either unintuitive or a bug. Consider the following example code,
which tries to take the expectation of a labeled function in two different
ways.
a) Directly, using the .expected method.
b) First creating an object that represents the distribution of the
function, and only then taking its expectation.
    # Create a basic labeled distribution
    base_dist = DiscreteDistributionLabeled(
        pmv=np.array([0.5, 0.5]), atoms=np.array([[1.0, 2.0], [3.0, 4.0]]), var_names=["a", "b"]
    )

    # Define a transition function
    def transition(shocks, state):
        state_new = {}
        state_new["m"] = state["m"]*shocks["a"]
        state_new["n"] = state["n"]*shocks["b"]
        return state_new

    m = xr.DataArray(np.linspace(0, 10, 11), name="m", dims=("grid",))
    n = xr.DataArray(np.linspace(0, -10, 11), name="n", dims=("grid",))
    state_grid = xr.Dataset({"m": m, "n": n})

    # Evaluate labeled transformation

    # This works
    new_state_exp = base_dist.expected(transition, state=state_grid)
    # This does not work
    new_state_dstn = base_dist.dist_of_func(transition, state=state_grid)
    new_state_dstn.expected()

Method a) works but b) instead raises the error
new_state_dstn.expected()
File "/home/mvg/GitHub/HARK/HARK/distribution.py", line 1243, in expected
return super().expected()
File "/home/mvg/GitHub/HARK/HARK/distribution.py", line 936, in expected
f_query = self.atoms
AttributeError: 'DiscreteDistributionLabeled' object has no attribute 'atoms'
The application of the function of the function is not yielding an object
with an atoms dimension over which to integrate, I think. It might be that
something else needs to be added to the function. But it is weird that
.expected() can deal with it and .dist_of_func can not.
I can look into it sometime, but wanted to confirm whether it is a bug, or
a lack of documentation or simply a desired to-be-implemented feature.
—
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/issues/1290, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKCK75QN3FKELAMWYWORV3XMIWE7ANCNFSM6AAAAAAZN6HNLQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--

Chris Carroll

@alanlujan91 I'm taking a stab at making this work and wanted to consult something with you.
I am running into issues where the properties and types of the objects used and returned by DiscreteDistributionLabeled's dist_of_fun and expected methods vary a lot depending on their arguments. See for instance this fragment of expected
https://github.com/econ-ark/HARK/blob/37134b9c9eea4591659b7cc398cf5894e44ba0e7/HARK/distribution.py#L1236-L1245
If I:

Pass a function with kwargs, it produces an xarray-like object.
Pass a function without kwargs, or no function at all it calls DiscreteDistribution.expected() and (if it succeeds in calling it) returns a numpy array.

Was there a reason for this behavior to depend on the arguments? Would it make more sense to homogenize everything? Or make the return types depend on f(atoms) instead. I.e, if f(atoms) is a dictionary or xarray then work with xarray, and if it is a numpy array or a float then work with numpy?

There are probably better ways of doing this, but the reason for different handling depending on arguments is as follows:
if len(kwargs): function depends on keyword arguments, which can be applied directly to xarrays. Then we can create a labeled Distribution and the expectation is the mean of a WeightedDataset.
if func is None: no need to apply function, faster to just do expected directly
else: function depends on positional arguments, which means that we need to convert the function arguments to be broadcastable.


Vulnerability roundup 112: containerd-1.5.9: 1 advisory [7.5]

search, files

[ ] CVE-2022-23648 CVSSv3=7.5 (nixos-21.11)

CVE details
CVE-2022-23648
containerd is a container runtime available as a daemon for Linux and Windows. A bug was found in containerd prior to versions 1.6.1, 1.5.10, and 1.14.12 where containers launched through containerd’s CRI implementation on Linux with a specially-crafted image configuration could gain access to read-only copies of arbitrary files and directories on the host. This may bypass any policy-based enforcement on container setup (including a Kubernetes Pod Security Policy) and expose potentially sensitive information. Kubernetes and crictl can both be configured to use containerd’s CRI implementation. This bug has been fixed in containerd 1.6.1, 1.5.10, and 1.4.12. Users should update to these versions to resolve the issue.

Scanned versions: nixos-21.11: efea022d6fe.
Cc @endocrimes
Cc @kalbasit
Cc @offlinehacker
Cc @vdemeester

21.11 is EOL.


awork, fruitgrowing

This pull request was generated by the 'mq' tool
[test]
flake rate: 0.4
logical conflict every: 5
sleep for: 300s
[pullrequest]
requests per hour: 30
deps=[a,f]

/trunk merge


Add support for timeFunction

Sorry for not reviewing this sooner.  I'm not sure I'm happy with the special casing for the time in the test function.  However, I don't have any better ideas at the moment other than its own custom test function.  We could do something with adding start/stop times to the test struct, but that would involve touching every single test entry.  Dunno...

OK, want me to move it into its own test function?

Yes,  that's easiest.

OK, I moved the test to a separate function. There's now some code duplication between the two functions, wasn't sure the best way to deal with it (or if you consider it a problem).

It's not a problem. We can deduplicate the test code later.   Thanks.


http: Added a Gin http receiver sample

A simple example of a Gin http receiver for CloudEvents. The  Gorilla/mux  project is archived which makes the existing gorilla receiver example deprecated.

@dgeorgievski can you rebase your PR?

Rebased

thanks!
LGTM
ping @lionelvillard @embano1


Respect custom paths in service descriptions

Replace fixed paths in services with a in build-time configurable value. All files in services/ are .in files now, these files get resolved by meson.
Signed-off-by: Mobin Aydinfar<EMAIL_ADDRESS>

@q66 ?

while i'm not against having some degree of configurability for the paths, this is not the way to go, and it interferes with other things i'm working on right now, so i'll just close this one
i'll probably do this myself later but in a different way

i have some early work towards that goal in https://github.com/chimera-linux/dinit-chimera/tree/script-path-unify, for now untested

Thanks, I will test it

it doesn't work yet