feat: Notifications dropdown

Resolves #220. There's a few things I'd like to talk about that I've opened code reviews for. Additionally, I wasn't sure if the system test configuration has been merged yet, so I can add in a system test if it has.
This PR adds a turboframe that loads in the notifications into a dropdown on the main UI. I made two changes from the original spec.

The history link exists at the bottom of the menu instead of in the empty state.
All notifications are loaded. This is so that we could decompose the notifications#index page into a turboframe instead of requiring a completely new route.

Pull request checklist

[ ] Your code contains tests relevant for code you modified
[x] You have linted and tested the project with bin/check

Answered!
I'm a bit worried about loading all notifications. They kick of N+1 queries because each notification has to fetch the associated record(s) and can't be preloaded. Unless I'm missing something with Noticed!

Oh, and once #6 gets merged in we will have a system test suite!

Answered!
I'm a bit worried about loading all notifications. They kick of N+1 queries because each notification has to fetch the associated record(s) and can't be preloaded. Unless I'm missing something with Noticed!

You definitely know better. I have a very surface-level understanding of noticed and didn't realize it was an N+1. I assumed it was redirecting at the controller level of the show action of the notification.
Would you be opposed to adding a query param to the notifications index that acts as a limit value?

Would you be opposed to adding a query param to the notifications index that acts as a limit value?

 I'm wondering now if it might be better to always limit this to the 10 most recent unread notifications and link to /notifications if there are more unread available. Then the limit or pagination could be handled in the respond_to block.

I don't think respond_to will catch turboframes, just turbostreams. If we added a limit method to the notifications chain, I think we wouldn't have to worry about pagy. It'd just load 5 notifications, and there wouldn't be anything to load on scroll.

Ah, good point. I've never used limit and pagy together, so that would require some experimentation to make sure everything works as we expect. Or are you saying limit only with a query param?

It could just be a binary URL param passed in. If params[:frame] = true then we tack on limit(5) to the AR query. I can take a look after work today. It's been busy and I'm about to get back into things.

Sounds great to me. And as always, no rush :)
FYI, #221 has been merged in so system tests are a go!

Just a lunchtime update from me.
Worked on this yesterday and had some issue getting the limit query to work the way I expected. I think maybe Pagy is overriding the limit value on the query. Need more time to investigate. Hoping this doesn't require a new controller.

I'm fairly confident that pagy does, indeed, override the limit parameter. You will need to use one or the other based on the param.
I'm not opposed to a new controller if we need it. It could be similar to how ReadNotificationsController works.

Was thinking about it more after work. Really didn't want a separate controller because it didn't feel very Turbo-y, but I think that's the easiest solution. Sometimes the best tool in your box is the one that works. 🤷🏻♂

@jacobdaddario, we might be able to use #turbo_frame_request? in the controller to handle the logic.
https://github.com/hotwired/turbo-rails/blob/main/app/controllers/turbo/frames/frame_request.rb

Perfect timing. I was about to sit down and look at this. I'll have a peak.

@joemasilotti I said screw it and went with the new controller approach. Everything is done now.

@joemasilotti
Okay, I want to break this down, because I'm actually a bit confused about a few of the asks there.

Regarding target="_top": I'm confused by this ask here, and I think that's because there's a breakdown between our understandings of what that attribute does. To my knowledge, it creates a full page navigation, but not in the way that you're describing. As I understand it, it makes it so that it loads only the frame fragment from the target URL it's pulling from on first load, thanks to the src attribute being present. Then, after that loads, any navigation in the frame breaks things out to a full-page navigation. That seems right to me, and it's the behavior I'm seeing in my browser. Clicking a notification fulling navigates me to the resource for which it's representing instead of of trying to render a frame from the resource's destination. I think we don't have an agreement on that attribute does.
Is the second ask about decomposing notifications#index instead of a new controller just asking to do what we were originally doing? Pagy and all? That was what I originally did, so I could just reset the branch back to fb27559a852d287db67e264e63d562ac58a80a29 and then cherry-pick the commit that added the system testing. I want to confirm this before I do it though, because that will re-write the git history and I won't be able to get my progress on the current solution back.

You are 100% right.
I think that is what I'm saying, yes. Apologies for the roundabout way of getting there. To be doubly safe, you could push this code to a new branch as a backup then come back and do the resetting and cherry-picking.

$ git branch -m notifications-dropdown-bk # rename the current branch
$ git push origin head -u # back up the backup to your fork
$ git checkout -b notifications-dropdown # recreate the branch as it was named before
$ git reset --hard ... # do your thang

@joemasilotti Really happy with how this came out. Originally, I didn't go with this, but I really wanted to keep the header being in the pre-rendered dropdown, as did you, and it made me realize I could have two turboframes in a view as long as they're in different branches of a conditional. Came out great.

@joemasilotti You can always commit to my PRs 😄.  It's your repository after all.
I'll make the change to the file really quickly, and then I assume this is out of my hands? Just want to make sure before I take my focus away from this project for a few weeks.
Additionally, could you get a screen capture of the behavior you're describing? I'm genuinely surprised to hear that you're running into this problem. I've got my monitor set to 1440p resolution, and I can't fit 10 notifications in the dropdown without scrolling. Additionally, I don't think the auto-pagination controller should mount before the notifications are rendered... I can't conceptualize what's happening, and hopefully if you can get a screen capture of it, it'll make it clearer.

Ha, fair!
I approved the PR. Consider your responsibility relinquished :)
I'm going to make some design changes this weekend (hopefully) and will merge soon. Thanks again for your PR!

Ah, so the issue occurs when you are on /notifications and then open the drawer. Because we are binding to #notifications for the Turbo Frame, the dropdown is getting picked up first. So the pagination on the main frame is getting "eaten" by the dropdown and never appearing.
Not sure how I'm going to handle this just yet, but wanted to post an update.

So are you saying that being at the notifications URL prevents the pagination object from instantiating correctly? That seems weird given that it's two different request cycles... Maybe I'm missing something here, or maybe it's a bug in Turbo?

Not exactly. Pagination works. But there are now two elements with the id "notifications". So when one pagination triggers it only loads the content into the first element - the drop down.

Ahhhh, that's tricky

By the way, I still do have a backup of the unique controller approach if you want to go that route to circumvent the non-unique IDs problem.

Hey again @jacobdaddario, sorry for the delay on this one. I'm going to close this PR for now.
The more I use the site the more I realize I don't "miss" having the dropdown. The new page works well enough for now. And if we can avoid extra complexity I'd like to keep it that way.
Nothing against your (two!) implementations, I just don't want to be responsible for maintaining this when there are so many other things going on.


Upgrade to JHipster 8.2

Superseded by https://github.com/jhipster/generator-jhipster-react-native/pull/1743


⚠ Roblox TextFilter Api has degraded performance

In 4a35718, Roblox TextFilter Api (https://textfilter.roblox.com) experienced degraded performance:

HTTP code: 200
Response time: 7136 ms

Resolved: Roblox TextFilter Api performance has improved in e1981ca.


Certain string in JSON makes Chrome CPU max out, requires force quit

OS: OS X
Browser: Chrome 55.0.2883.95 (64-bit)
I came across this accidentally, I have no idea what it is inside this string, but if I run the following snippet (for example, through chrome developer tools JS console) it will just spin a CPU thread at 100% and I have to force quit Chrome.
Does not seem to happen on Safari or Firefox.
Doesn't matter if it's invoked via the Prism.highlight(..) API or applied automatically via CSS styles, the same thing occurs.  It's just easier to control when it happens by using the API via the JS console.
var x = {
  "data": {
    "stderr": "psql://somefile.sql:7: ERROR:  column \"some_column\" does not exist\npsql://somefile.sql:8: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:9: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:11: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:12: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:13: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:14: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:16: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:17: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:19: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:20: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:22: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:33: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:35: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:46: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:49: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:61: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:64: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:76: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:79: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:91: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:93: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:94: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:95: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:96: ERROR:  current transaction is aborted, commands ignored until end of transaction block\npsql://somefile.sql:98: ERROR:  current transaction is aborted, commands ignored until end of transaction block"
  }
};
Prism.highlight(JSON.stringify(x), Prism.languages.json);

Hi! I think this is a duplicate of #1080. If I'm right about this, then this issue is already fixed. Try using the latest version of the JSON component.

Thanks @Golmote, it is a duplicate, the new version of the JOSN component is working fine


Haiku StringList api addition

Thanks! @bors r+

:pushpin: Commit cb25d0923d8c2516a61840a0c9b72a3bb339c94c has been approved by JohnTitor
It is now in the queue for this repository.

:hourglass: Testing commit cb25d0923d8c2516a61840a0c9b72a3bb339c94c with merge d30ac466e4ae42dc2b9dbe2b07081f7f39acf7d7...

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing d30ac466e4ae42dc2b9dbe2b07081f7f39acf7d7 to master...

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing d30ac466e4ae42dc2b9dbe2b07081f7f39acf7d7 to master...

:eyes: Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.


docs: Provide human-readable comment information

Signed-off-by: Xinwei Xiong(cubxxw<EMAIL_ADDRESS>
Describe what this PR does / why we need it
Does this pull request fix one issue?

Describe how you did it
Describe how to verify it
Special notes for reviews

@cubxxw ,rebase your code to fix conflicts


Split ExecHandleBuilder and ExecSpec interface and JavaExecHandleBuilder and JavaExecSpec

And delete InstantiatorBackedObjectFactory.
Note: Actually right now we introduced ClientExecHandleBuilder and deprecated ExecHandleBuilder, since KGP still uses that class

@bot-gradle test this

I've triggered the following builds:

Pull Request Feedback (Trigger) (Check)

Build Scan

The following builds have been cancelled:

Pull Request Feedback (Trigger) (Check)

Build Scan

@bot-gradle test this

The following builds have been cancelled:

Pull Request Feedback (Trigger) (Check)

Build Scan

@bot-gradle test this

I've triggered the following builds:

Pull Request Feedback (Trigger) (Check)

Build Scan

The following builds have been cancelled:

Pull Request Feedback (Trigger) (Check)

Build Scan

@bot-gradle test this

I've triggered the following builds:

Pull Request Feedback (Trigger) (Check)

Build Scan

The following builds have been cancelled:

Pull Request Feedback (Trigger) (Check)

Build Scan

@bot-gradle test this

Sorry some internal error occurs, please contact the administrator @gradle/bt-developer-productivity

@bot-gradle test this

I've triggered the following builds:

Pull Request Feedback (Trigger) (Check)

Build Scan

@bot-gradle test this

@bot-gradle clean

I've triggered the following builds:

Pull Request Feedback (Trigger) (Check)

Build Scan

Sorry but I'm afraid you're not allowed to do this.

The following builds have failed:

Pull Request Feedback (Trigger) (Check)

Build Scan

@bot-gradle test APT

I've triggered the following builds:

All Performance Tests (Trigger)

Build Scan

The following builds have passed:

All Performance Tests (Trigger)

Build Scan

@bot-gradle test this

@bot-gradle test AST

I've triggered the following builds:

All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)

Build Scan

I've triggered the following builds:

Pull Request Feedback (Trigger) (Check)

Build Scan

@bot-gradle clean

@bot-gradle test this AST

I've triggered the following builds:

Pull Request Feedback (Trigger) (Check)

Build Scan

All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)

Build Scan

@bot-gradle clean


[Module Proposal]: Azure Virtual Desktop (AVD) Application Group

Check for previous/existing GitHub issues/module proposals

[X] I have checked for previous/existing GitHub issues/module proposals

Check this module doesn't already exist in another project that is being evolved into AVM

[X] I have checked for that this module doesn't already exist in CARML or TFVM

Terraform or Bicep?
Bicep
Module Classification?
Resource Module
Module Name
avm-res-desktopvirtualization-applicationgroup
Module Details
We will be migrating and modifying the CARML module we are using for AVD LZA.
Please add as the following co-owner:
@danycontre
cc: @matebarabas as we discussed submitting the issues.
Do you want to be the owner of this module?
Yes
Module Owner's GitHub Username
moisesjgomez

Hi @moisesjgomez,
Thanks for requesting/proposing to be an AVM module owner.
We just want to confirm you agree to the below pages that define what module ownership means:

https://azure.github.io/Azure-Verified-Modules/specs/shared/team-definitions
https://azure.github.io/Azure-Verified-Modules/specs/shared
https://azure.github.io/Azure-Verified-Modules/help-support/module-support

Any questions or clarifications needed let us know.
If you agree please just reply to this issue with the exact sentence below (as this helps with our automation 👍):
"I CONFIRM I WISH TO OWN THIS AVM MODULE AND UNDERSTAND THE REQUIREMENTS AND DEFINITION OF A MODULE OWNER"
Thanks
The AVM Core Team

I CONFIRM I WISH TO OWN THIS AVM MODULE AND UNDERSTAND THE REQUIREMENTS AND DEFINITION OF A MODULE OWNER
cc: @danycontre

@moisesjgomez, @danycontre,
Due to a recent change in the naming convention for AVM Bicep modules, this module is getting an updated name.
The title and description of this GH issue has been updated to reflect the name change. Please make sure you adhere to the new naming convention when publishing your module!
Please see the new naming convention in:

RMNFR1 for resource modules
PMNFR1 for pattern modules

Please note that the Telemetry ID and name of GitHub Teams haven't changed.
If you feel uncertain about any details, please check the Bicep modules indexes.

This module is in active development, aiming to complete by end of next week.

https://github.com/Azure/bicep-registry-modules/pull/832

[x] Module published.
[x] GitHub teams are available and assigned to their parents.
[x] CODEOWNERS file updated.

Thank you for your work @moisesjgomez! I'm closing this issue now.


Info about golangci lint

Description
Info about golangci lint
Type of change

Documentation update

Testing steps
N/A
Checklist

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

Codecov Report
Base: 72.91% // Head: 72.91% // No change to project coverage :thumbsup:

Coverage data is based on head (bf1cfbe) compared to base (dee4c15).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #433   +/-   ##
=======================================
  Coverage   72.91%   72.91%
=======================================
  Files          11       11
  Lines         587      587
=======================================
  Hits          428      428
  Misses        134      134
  Partials       25       25

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Investigate using System.Text.Json for storage persistence

It allows for direct async saving to Stream; have added PR to https://github.com/FoundatioFx/Foundatio/pull/259 to support the async mode
Would hopefully reduce the steps in serializing in memory, re-reading and then writing out again

I think it would be hard for us to have the events pipeline be completely stream based, but I wonder if we could have the reader be stream based and then have the pipeline iterate through one event at a time using an IAsyncEnumerable<PersistentEvent> where we just load a single event into memory at a time and process it and then release that memory back into a pool to load the next one.

I think it would be hard for us to have the events pipeline be completely stream based, but I wonder if we could have the reader be stream based and then have the pipeline iterate through one event at a time using an IAsyncEnumerable<PersistentEvent> where we just load a single event into memory at a time and process it and then release that memory back into a pool to load the next one.


Killing the Android Glyph cache

You might want to think about setting the LINEAR_TEXT_FLAG flag when the ACTION_DOWN even happens and removing it on the ACTION_UP/ACTION_CANCEL event. You can use TextView.setPaintFlags to achieve this.
https://developer.android.com/reference/android/graphics/Paint.html#LINEAR_TEXT_FLAG

Can you explain the purpose of setting this flag?

I think the documentation says it all. Using this flag mean the glyph cache doesn't store font glyph's for all the sizes in-between whilst resizing. This is good as rendering those only happens when resizing and not after/before.

Gotcha. Definitely something we can do, thanks!

Wow, this does make it a lot more clear. Thank you so much for the suggestion.

Hope you don't mind but I have some code suggestions on that commit. Will comment on the commit itself.

That's fine. I was going to ask for your blessing on the PR before I merged it, but this is even better.

@slightfoot Thank you for that, that's really important to avoid meddling with the user's current flags. Can't believe I overlooked that.

I have another suggestion just looking at the code. But unrelated to this issue. I'll see if I can submit a PR later. Your little library covers a topic I've done in depth before. So I have a lot of suggestions. ;)

For sure. Thanks!


install error 404 for canvas-v2.8.0-node-v72-linux-glibc-arm.tar.gz

Describe the bug
I try to install you adapter by commandline on a docker ioBroker installation and get following error:
root@solarpi:/opt/iobroker# iobroker install echarts
NPM version: 6.14.15
npm install<EMAIL_ADDRESS>--loglevel error --prefix "/opt/iobroker" (System
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v72-linux-glibc-arm.tar.gz
It looks like canvas-v2.8.0-node-v72-linux-glibc-arm.tar.gz is not available on github anymore.
Try to install the adapter via GUI of ioBroker doesnt work either.
Versions:

Adapter version: latest
JS-Controller version: 3.3.18
Node version: v12.22.7
Operating system:
root@solarpi:/opt/iobroker# os-name
bash: os-name: command not found
Raspberry 3 with docker

Do you have a suggestion for me?
Regards
AxLED

If you read the next lines ou will see that he falls back tzo locally build it ... so whats the full log?
Please also try to add these packates to the container: https://github.com/iobroker-community-adapters/ioBroker.mihome-vacuum#error-at-installation

Apollon, here's the full log when trying to install the canvas thingy via cli:
pi@raspberrypi:~ $ npm install canvas

><EMAIL_ADDRESS>install /home/pi/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Au                                                   tomattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v72-linux-glibc                                                   -arm.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for<EMAIL_ADDRESS>and node@1                                                   2.20.0 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/                                                   Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v72-linux-gli                                                   bc-arm.tar.gz
make: Entering directory '/home/pi/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/backend/Backend.o
  CXX(target) Release/obj.target/canvas/src/backend/ImageBackend.o
  CXX(target) Release/obj.target/canvas/src/backend/PdfBackend.o
  CXX(target) Release/obj.target/canvas/src/backend/SvgBackend.o
  CXX(target) Release/obj.target/canvas/src/bmp/BMPParser.o
../src/bmp/BMPParser.cc: In member function ‘void BMPParser::Parser::parse(uint8_t*, int, uint8_t*)’:
../src/bmp/BMPParser.cc:186:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned i          nt’ [-Wsign-compare]
   E(ptr - data > imgdOffset, "image data overlaps with another structure");
     ~~~~~~~~~~~^~~~~~~~~~~~
../src/bmp/BMPParser.cc:10:25: note: in definition of macro ‘E’
 #define E(cond, msg) if(cond) return setErr(msg)
                         ^~~~
../src/bmp/BMPParser.cc:201:27: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsi          gned int’} and ‘int’ [-Wsign-compare]
   E(ptr - data + imgdSize > len, "not enough image data");
     ~~~~~~~~~~~~~~~~~~~~~~^~~~~
../src/bmp/BMPParser.cc:10:25: note: in definition of macro ‘E’
 #define E(cond, msg) if(cond) return setErr(msg)
                         ^~~~
  CXX(target) Release/obj.target/canvas/src/Backends.o
  CXX(target) Release/obj.target/canvas/src/Canvas.o
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
  CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
  CXX(target) Release/obj.target/canvas/src/closure.o
  CXX(target) Release/obj.target/canvas/src/color.o
  CXX(target) Release/obj.target/canvas/src/Image.o
  CXX(target) Release/obj.target/canvas/src/ImageData.o
  CXX(target) Release/obj.target/canvas/src/init.o
  CXX(target) Release/obj.target/canvas/src/register_font.o
  SOLINK_MODULE(target) Release/obj.target/canvas.node
  COPY Release/canvas.node
make: Leaving directory '/home/pi/node_modules/canvas/build'
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

+<EMAIL_ADDRESS>added 59 packages from 30 contributors and audited 84 packages in 65.772s

8 packages are looking for funding
  run `npm fund` for details

found 2 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

Hm ... worked ... but why you run that in your home dir? There the adapter will not find it ... you need to chose the right directory or install globally or whatever yoyu wanted

Well, good question. It was just for a test.
The installation via iobroker had the exact same output until the "CXX" lines.
It installed it in /opt/iobroker, at least I hope so.
Because in the iobroker log I did not see this line: > "node-pre-gyp install --fallback-to-build"
But then again, my adapter works perfectly fine without any issues.
So... what is this canvas thingy even doing? What would not work if it wasn't installed properly?

@Schmetterfliege,
why are you hijackin my issue?
@Apollon77
here is the output of
root@solarpi:/opt/iobroker# sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.6).
libcairo2-dev is already the newest version (1.16.0-4+deb10u1).
libgif-dev is already the newest version (5.1.4-3).
libjpeg-dev is already the newest version (1:1.5.2-2+deb10u1).
librsvg2-dev is already the newest version (2.44.10-2.1).
libpango1.0-dev is already the newest version (1.42.4-8~deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and the output of
root@solarpi:/opt/iobroker# sudo npm install canvas --unsafe-perm=true
><EMAIL_ADDRESS>install /opt/iobroker/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v72-linux-glibc-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(node-v72 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v72-linux-glibc-arm.tar.gz
make: Entering directory '/opt/iobroker/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/backend/Backend.o
  CXX(target) Release/obj.target/canvas/src/backend/ImageBackend.o
  CXX(target) Release/obj.target/canvas/src/backend/PdfBackend.o
  CXX(target) Release/obj.target/canvas/src/backend/SvgBackend.o
  CXX(target) Release/obj.target/canvas/src/bmp/BMPParser.o
../src/bmp/BMPParser.cc: In member function ‘void BMPParser::Parser::parse(uint8_t*, int, uint8_t*)’:
../src/bmp/BMPParser.cc:186:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
   E(ptr - data > imgdOffset, "image data overlaps with another structure");
     ~~~~~~~~~~~^~~~~~~~~~~~
../src/bmp/BMPParser.cc:10:25: note: in definition of macro ‘E’
 #define E(cond, msg) if(cond) return setErr(msg)
                         ^~~~
../src/bmp/BMPParser.cc:201:27: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
   E(ptr - data + imgdSize > len, "not enough image data");
     ~~~~~~~~~~~~~~~~~~~~~~^~~~~
../src/bmp/BMPParser.cc:10:25: note: in definition of macro ‘E’
 #define E(cond, msg) if(cond) return setErr(msg)
                         ^~~~
  CXX(target) Release/obj.target/canvas/src/Backends.o
  CXX(target) Release/obj.target/canvas/src/Canvas.o
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
  CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
  CXX(target) Release/obj.target/canvas/src/closure.o
  CXX(target) Release/obj.target/canvas/src/color.o
  CXX(target) Release/obj.target/canvas/src/Image.o
  CXX(target) Release/obj.target/canvas/src/ImageData.o
  CXX(target) Release/obj.target/canvas/src/init.o
  CXX(target) Release/obj.target/canvas/src/register_font.o
  SOLINK_MODULE(target) Release/obj.target/canvas.node
  COPY Release/canvas.node
make: Leaving directory '/opt/iobroker/node_modules/canvas/build'
+<EMAIL_ADDRESS>removed 54 packages and updated 1 package in 147.117s

53 packages are looking for funding
  run `npm fund` for details

After the command: root@solarpi:/opt/iobroker#  iobroker install echarts
NPM version: 6.14.15
npm install<EMAIL_ADDRESS>--loglevel error --prefix "/opt/iobroker" (System call)
host.solarpi install adapter echarts
upload [30] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/tab.html tab.html text/html
upload [20] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/static/css/2.1c4297c9.chunk.css.map static/css/2.1c4297c9.chunk.css.map application/json
upload [19] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/static/css/2.1c4297c9.chunk.css static/css/2.1c4297c9.chunk.css text/css
upload [18] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/manifest.json manifest.json application/json
upload [17] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/favicon.ico favicon.ico image/vnd.microsoft.icon
upload [16] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/echarts.png echarts.png image/png
upload [15] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/js/runtime-main.fc547312.js.map chart/static/js/runtime-main.fc547312.js.map application/json
upload [14] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/js/runtime-main.fc547312.js chart/static/js/runtime-main.fc547312.js application/javascript
upload [13] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/js/main.339b9faf.chunk.js.map chart/static/js/main.339b9faf.chunk.js.map application/json
upload [12] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/js/main.339b9faf.chunk.js chart/static/js/main.339b9faf.chunk.js application/javascript
upload [11] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/js/2.d8ebf8a2.chunk.js.map chart/static/js/2.d8ebf8a2.chunk.js.map application/json
upload [10] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/js/2.d8ebf8a2.chunk.js.LICENSE.txt chart/static/js/2.d8ebf8a2.chunk.js.LICENSE.txt text/plain
upload [9] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/js/2.d8ebf8a2.chunk.js chart/static/js/2.d8ebf8a2.chunk.js application/javascript
upload [8] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/css/main.47916834.chunk.css.map chart/static/css/main.47916834.chunk.css.map application/json
upload [7] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/css/main.47916834.chunk.css chart/static/css/main.47916834.chunk.css text/css
upload [6] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/css/2.dc6b75b2.chunk.css.map chart/static/css/2.dc6b75b2.chunk.css.map application/json
upload [5] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/static/css/2.dc6b75b2.chunk.css chart/static/css/2.dc6b75b2.chunk.css text/css
upload [4] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/manifest.json chart/manifest.json application/json
upload [3] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/index.html chart/index.html text/html
upload [2] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/favicon.ico chart/favicon.ico image/vnd.microsoft.icon
upload [1] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/chart/asset-manifest.json chart/asset-manifest.json application/json
upload [0] echarts.admin /opt/iobroker/node_modules/iobroker.echarts/admin/asset-manifest.json asset-manifest.json application/json
upload [14] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/js/runtime-main.fc547312.js.map static/js/runtime-main.fc547312.js.map application/json
upload [13] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/js/runtime-main.fc547312.js static/js/runtime-main.fc547312.js application/javascript
upload [12] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/js/main.339b9faf.chunk.js.map static/js/main.339b9faf.chunk.js.map application/json
upload [11] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/js/main.339b9faf.chunk.js static/js/main.339b9faf.chunk.js application/javascript
upload [10] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/js/2.d8ebf8a2.chunk.js.map static/js/2.d8ebf8a2.chunk.js.map application/json
upload [9] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/js/2.d8ebf8a2.chunk.js.LICENSE.txt static/js/2.d8ebf8a2.chunk.js.LICENSE.txt text/plain
upload [8] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/js/2.d8ebf8a2.chunk.js static/js/2.d8ebf8a2.chunk.js application/javascript
upload [7] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/css/main.47916834.chunk.css.map static/css/main.47916834.chunk.css.map application/json
upload [6] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/css/main.47916834.chunk.css static/css/main.47916834.chunk.css text/css
upload [5] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/css/2.dc6b75b2.chunk.css.map static/css/2.dc6b75b2.chunk.css.map application/json
upload [4] echarts /opt/iobroker/node_modules/iobroker.echarts/www/static/css/2.dc6b75b2.chunk.css static/css/2.dc6b75b2.chunk.css text/css
upload [3] echarts /opt/iobroker/node_modules/iobroker.echarts/www/manifest.json manifest.json application/json
upload [2] echarts /opt/iobroker/node_modules/iobroker.echarts/www/index.html index.html text/html
upload [1] echarts /opt/iobroker/node_modules/iobroker.echarts/www/favicon.ico favicon.ico image/vnd.microsoft.icon
upload [0] echarts /opt/iobroker/node_modules/iobroker.echarts/www/asset-manifest.json asset-manifest.json application/json
host.solarpi object system.adapter.echarts created/updated
host.solarpi object _design/chart created/updated
root@solarpi:/opt/iobroker#

it seemed to work.
Thanks for your reply.
AxLED

it's not "your" issue, it's an issue of the repository.
if you look closely, you'll see that we are talking about the exact same issue, your logs are basically a copy-paste of mine, and my inputs could have given you answers about the background - or do you not care about the error that you still get?
Read again, and you'll see that apparently the issue WE BOTH HAD isn't an issue and the first installation worked perfectly fine too - even for you :)

@Apollon77 ,
your tip worked for me, so i close this issue.
Thanks.
AxLED


⚠ Samsung has degraded performance

In ea09c33, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2807 ms

Resolved: Samsung performance has improved in 93266c7.


Does SendRequest() need to create a new node each time?

https://github.com/Multi-Tier-Cloud/hash-lookup/blob/34fdbc06b5534642acc7bdb212ab852c786d659a/hl-common/hl-common.go#L51
What's the rationale or original reason? Can't remember if this was discussed in the meeting.
I can definitely see pros/cons:

Pro: Anonymization of searches through the P2P network.
Con: Extra latency for new node to be created and connected to network, and connect to enough peers for search to return result.

I figured usually you'd want to reuse the same node for all communications, which is why I made the function below it, SendRequestWithHostRouting(), which takes in an existing node and uses it to send a request. Indeed, in the most critical use case, when the proxy queries hash lookup, it calls GetHashWithHostRouting(), which in turn calls SendRequestWithHostRouting() to avoid creating  a new node each time.

To answer your original question, I wrote SendRequest() for the case where all you want to do is make a single request, so instead of the caller having to write the new node setup code, I put it in SendRequest(). For ex. hl-cli will make a single call to one of Add/Get/List/DeleteHash(), and those functions just call SendRequest(). Another ex. When the proxy boots for the first time, it needs to get the hash of its designated microservice before it can set up its own permanent node, so it does call GetHash() once, creating that temporary node in the process.

Alright, thanks. The CLI example seems like a good use-case, and I think it's good to provide extra flexibility.
The LCA manager currently calls GetHash() (which calls GetRequest()) so I think I can change that to the other function types, it'd probably speed up the request and search.


Fix custom BPF mount

Currently, we've hardcoded the default BPF filesystem mount point in the Cilium agent daemonset yaml. However, there is a helm option bpf-root that users can specify to mount BPF fs at a custom location. In such cases, we should do a bidirectional mount at the user specified path from the host. Agent will then mount BPF fs at the volume mount path if not already mounted.

I would like to work on this issue.

I assigned you :rocket:

@Ankurk99 👍 Please reach out on Slack if you have any questions. Also, I would suggest waiting  until https://github.com/cilium/cilium/pull/16656 is merged to avoid having conflicts.

However, there is a helm option bpf-root that users can specify to mount BPF fs at a custom location. In such cases, we should do a bidirectional mount at the user specified path from the host.
The flag  'bpf-root' is in cilium-agent and I couldn't find it in helm, so do I need to add the flag for custom bpf location in Values.yaml?


Redirect inside OnTokenExchangeFailed not respected

Hello,
I have an issue where redirects inside OnTokenExchangeFailed are not respected.
For context:
Currently using Auth0 for authentication only as a phased approach, so have to match up with local records (link via stored auth0 id) to add some claims information to support legacy cookie login which is done on OnAuthenticated.
Example:
var provider = new Auth0AuthenticationProvider()
            {
                OnAuthenticated = context =>
                {
                    // Call to local cache/db + claims update work happens here, failure results in an exception
                    throw new Exception("A failure is raised by business code");
                    //return Task.FromResult(0);
                },
                OnTokenExchangeFailed = context =>
                {
                    // Want to go somewhere else, as it's currently legit behaviour in our case
                    context.Response.Redirect("/Home/Failed");
                },
            }

However, the resulting url I'm getting redirected to is:
http://localhost:[port]/?error=access_denied
I can see what's causing it within Auth0AuthenticationHandler.cs InvokeReplyPathAsync():
if (!context.IsRequestCompleted)
{
    string redirectUri = context.RedirectUri ?? RequestPathBase + Options.RedirectPath.ToString();
    if (context.Identity == null)
    {
    	// add a redirect hint that sign-in failed in some way
    	redirectUri = WebUtilities.AddQueryString(redirectUri, "error", "access_denied");
    }

    if (context.Request.Query["state"] != null && context.Request.Query["state"].Contains("ru="))
    {
    	// set returnUrl with state -> ru
        var state = HttpUtilities.ParseQueryString(context.Request.Query["state"]);
        redirectUri = WebUtilities.AddQueryString(redirectUri, "returnUrl", state["ru"]);
    }

    Response.Redirect(redirectUri);
    context.RequestCompleted();
}

Seems as if that url is hardcoded as I cannot access the context.RedirectUri inside any of the relevant action methods, and seemingly always comes through as just  "/" for the initial context.RedirectUri.
Thought ErrorRedirectPath on the Auth0AuthenticationOptions passed in for app.UseAuth0Authentication(options) might work, but that isn't respected in this case either.
Is it possible to force a redirect to a custom url via the OnTokenExchangeFailed delegate?
If not, any suggestions?

@IanBuswell-etech Hmm, yeah I think that particular line you are referring to should honour the ErrorRedirectPath. Do you want to redirect to a different path for each request, or is it fine if you set the ErrorRedirectPath and we redirect to that path every time?
Also, the OnTokenExchangeFailed will only be invoked if an error occurs when the authorization code is exchanged for the tokens. In your case, since the authorization failed, an authorization code will not be returned and therefore that even will not be invoked.
BTW, how do you fail the request from the Auth0 side? Do you have some sort of rule in place?

Hello, thanks for responding.
I think just using ErrorRedirectPath for every request will be fine for now thanks. I'll not complain if we get the option to set it on each request though.
Think there might be a bit of confusion on the second question.
We don't fail on Auth0 side, that's successful so we have a token, we're just failing inside the OnAuthenticated delegate which is the last thing invoked: (Auth0AuthenticationHandler.cs Line:130).
As it's post the Auth0 request and inside the large try catch statement, the OnTokenExchangeFailed is invoked inside the catch (here).

@IanBuswell-etech OK, so I think some of the complications come in because at the point where you "fail" the authentication, the authentication has actually completed successfully.
The easiest way for you to achieve what you want is to update the OnAuthenticated event handler to set the user's Identity to null - which means that there is no authenticated user - and then override the RedirectUri property of the AuthenticationProperties to point to wherever you want to redirect the user.
OnAuthenticated = context =>
{
    // Call to local cache/db + claims update work happens here, failure results in an exception
    context.Identity = null;
    context.Properties.RedirectUri = "/wherever";

    return Task.FromResult(0);
},

This also gives you complete flexibility to override the redirection URL on a per-request basis.

@jerriep Thanks v much - that way seems to be working well for our use case.

@jpercyetech Cool :)
Are you working with @IanBuswell-etech ? If so, can I close this issue?

I am, yes.
And yeah go ahead and close - thanks for your help.

Great, thank you!


Okina Makefile fix [artv3/okina-makefile-fix]

Certain folders were not being created to store .o files. This PR modifies the makefile to create the folders (*/kernels).
@camierjs  @jdahm , I closed the other PR since it included other changes I did not intend to add.

Can I merge this?


Potential inconsistency in WMT24 system-level task weights for WMT24OnWMT23 function

In the WMT24OnWMT23 function located in the tasks.py file, the weight assigned to the first task (PCE on a single language pair) is currently set to the number of language pairs (len(lps)):
def WMT24OnWMT23(lps: list[str] | None = None, primary=True, k=0, gold=None):
  """Generate the WMT24 task set for WMT23 and associated weight vector."""

  # Not strictly necessary to declare this, because setting human=True will
  # only score human outputs if any are available, but we want to make the
  # human attribute reflect what actually got used, and also want to avoid
  # having to load the EvalSets at this point to get this info automatically.
  lps_with_multiple_refs = {'en-he', 'he-en'}

  def Add(lp, level, corr_fcn, human, gold, **kw_args):
    tasks.Append(Task(
        'wmt23', lp, level=level, corr_fcn=corr_fcn, human=human, gold=gold,
        primary=primary, k=k, **kw_args))

  if lps is None: lps = ['en-de', 'he-en', 'zh-en']
  lps = sorted(lps)

  tasks = TaskSet()

  # For each language pair: PCE at the system-level and accuracy at the
  # segment-level.
  for lp in lps:
    human = lp in lps_with_multiple_refs
    Add(
        lp,
        'sys',
        'pce',
        human=human,
        gold=[gold] * len(lps) if gold else None,
    )
    Add(
        lp,
        'seg',
        'KendallWithTiesOpt',
        human,
        gold,
        avg_by='item',
        perm_test='pairs',
        corr_fcn_args={'sample_rate': 1.0},
    )

  weights = [len(lps)] + [1] * (len(tasks) - 1)
  weights = [w / sum(weights) for w in weights]

  return tasks, weights

Since now the PCE is computed per single language pair, shouldn't all the weights be equal to 1? Like in the WMT24 function:
def WMT24(lps: list[str] | None = None, primary=True, k=0, gold=None):
  """Generate the WMT24 task set associated weight vector."""

  # Not strictly necessary to declare this, because setting human=True will
  # only score human outputs if any are available, but we want to make the
  # human attribute reflect what actually got used, and also want to avoid
  # having to load the EvalSets at this point to get this info automatically.
  lps_with_multiple_refs = {'en-de'}

  def Add(lp, level, corr_fcn, human, gold, **kw_args):
    tasks.Append(Task(
        'wmt24', lp, level=level, corr_fcn=corr_fcn, human=human, gold=gold,
        primary=primary, k=k, **kw_args))

  if lps is None: lps = ['en-de', 'en-es', 'ja-zh']
  lps = sorted(lps)

  tasks = TaskSet()

  # For each language pair: PCE at the system-level and accuracy at the
  # segment-level.
  for lp in lps:
    human = lp in lps_with_multiple_refs
    Add(
        lp,
        'sys',
        'pce',
        human=human,
        gold=[gold] * len(lps) if gold else None,
    )
    Add(
        lp,
        'seg',
        'KendallWithTiesOpt',
        human,
        gold,
        avg_by='item',
        perm_test='pairs',
        corr_fcn_args={'sample_rate': 1.0},
    )

  weights = [1] * len(tasks)
  weights = [w / sum(weights) for w in weights]

  return tasks, weights

Thank you!

Fixed in 8d586ba.


Ignore some root folders in a multi-root workspace

Brief Issue Summary
It would be great to be able to set certain 'projects' (root folders) within a Multi-Root Workspace to be ignored with regards to the CMake build actions.
I have a Multi-Root workspace with a 'build_all' project (as used by my CI system), which pulls in several external CMake projects using ExternalProject_Add.
I have these external projects as separate root folders under my workspace, so that their Intellisense settings etc can be separately configured for development purposes. I don't want to build these individually - just from the build-all project.
This worked well before the Multi Root Workspace support was added (as the CMake extension just grabbed the first project in the workspace), but now if I go into the 'CMake' sidebar view, I can't (for example) configure a single project individually - I can only configure all.
(I also have a load of entries in here which I don't care about)
Where I used to have one 'project' in the CMake view, I now see a lot, and I'd really like to be able to ignore those highlighted.

+1 this feature. It's quite annoying to not be able to have non-CMake package in the same Workspace as CMake packages due to this issue. A simple tag in the "folders" listing which indicates if the package should be interpreted as a CMake package might be all that is required.

+1, I think I was looking for this feature - sort of.
In my case, I was first annoyed by source control activity not showing repositories from .gitignored sub-folders in "single-root" workspace. I've not found other solutions to this except the one explained here. This makes it to work via multi-root. but I shouldn't need it in first place. Anyway, somehow recursive repositories search in SCM side of vscode pulled me to try it out.
So, with that scenario as basis, SCM works but CMake doesn't. CMakeLists in subdir(s) configured as multi-root, but supposed to be managed by the parent (the real root) and stay hidden from CMake extension alone. I get it's kind of self-inflicted to first declare something as root/project and then start to ignore it per extenssion :D But in general, I would prefer all extensions to let me configure such things explicitly - i.e. disable roots from auto-detecting anything.
In CMake activity, the active target selection (hence also F7) works, but all other actions e.g. from under ...-menu (clean rebuild, clean reconfigure...) seem to default to first sub-directory or attempt to do it on both maybe - but failing to first in my case. Also 'autoSelectActiveDirectory' doesn't seem to affect.

+1 this feature. It's quite annoying to not be able to have non-CMake package in the same Workspace as CMake packages due to this issue. A simple tag in the "folders" listing which indicates if the package should be interpreted as a CMake package might be all that is required.

Implemented what you mentioned: get the forked extension here


error report and fix bug with snap package in ubuntu Ubuntu 18.04 bionic

hello i have phpstorm,
im installing discord from snap package manager
but i have error in Discord-Integration
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.collections.ArraysKt___ArraysKt.contains, parameter $this$contains 	at kotlin.collections.ArraysKt___ArraysKt.contains(_Arrays.kt) 	at com.almightyalpaca.jetbrains.plugins.discord.plugin.diagnose.DiagnoseService$readPlugins$matches$4.invoke(DiagnoseService.kt:153) 	at com.almightyalpaca.jetbrains.plugins.discord.plugin.diagnose.DiagnoseService$readPlugins$matches$4.invoke(DiagnoseService.kt:40) 	at com.almightyalpaca.jetbrains.plugins.discord.plugin.diagnose.DiagnoseServiceKt$sam$java_util_function_Predicate$0.test(DiagnoseService.kt) 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176) 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) 	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) 	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) 	at java.base/java.util.stream.ReduceOps$5.evaluateSequential(ReduceOps.java:257) 	at java.base/java.util.stream.ReduceOps$5.evaluateSequential(ReduceOps.java:248) 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 	at java.base/java.util.stream.ReferencePipeline.count(ReferencePipeline.java:605) 	at com.almightyalpaca.jetbrains.plugins.discord.plugin.diagnose.DiagnoseService.readPlugins(DiagnoseService.kt:154) 	at com.almightyalpaca.jetbrains.plugins.discord.plugin.diagnose.DiagnoseService.access$readPlugins(DiagnoseService.kt:40) 	at com.almightyalpaca.jetbrains.plugins.discord.plugin.diagnose.DiagnoseService$plugins$1.invokeSuspend(DiagnoseService.kt:44) 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56) 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
it seems like discord is running in a snap package this will most likely prevent the plugin from connecting to your discord client

I  think the Discord Integration plugin will does not connect to  discord from snap package

Don't use the snap package as that version is outdated and does not support RPC.
The exception seems to be a duplicate of #92

Hello, Snap is designed in such a way that it runs the installed applications in a sandbox, which means that the external applications cannot communicate with the discord client's RPC system. I recommend you to download and install Discord using the official releases.

thanks @duncte123  @InfRandomness

A fix for the exception has been released 12h ago on the repository.

A fix for this was released this morning with version v1.4.0


Optimizations

Rewrote CounterSegment and StaticCounterDigits as functions
Configured Webpack to build with NODE_ENV=production for acceptance testing
Replaced babel-preset-stage-0 with plugins for object rest spread and class properties

Minified file size shrunk from 20.6 kB to 17.4 kB 👍

@JelF updated.


Add support for using /dev/urandom as a randomness source

I had to mess around with the macro magic for selecting the randomness backend in the process, but that's okay, it was insane to start with.
The Makefile is a bit lacking in flexibility. It would be nice for example to not try and link against libcrypto (which is no longer necessary now I've written this). I'm going to have a think about how it could be improved.
I can also confirm that it builds on FreeBSD 10.3 (latest), although FreeBSD's OpenSSL is somewhat alpha status, hence me writing this so as to avoid it.

Thanks for working on this.  It would be good to have.
However, there are some problems with the pull request.  First, it doesn't actually compile when you switch to RLWE_RANDOMNESS_USE_DEV_URANDOM.  I've fixed that and pushed onto the branch.  But even then, when I run ./rlwe_main it tells that "Keys don't match! :(".  Did you check this on your system?  I have not looked into details yet.
Also: what is the purpose of the rlwe_memset_volatile stuff you added?

Hi.
I thought I'd tested it, but I must have messed up in that. The memset volatile stuff, I had to go look. Looks like it got accidentally copy-pasted from some other code I was working on at the time. Sorry, that was sloppy.
I'll look into this and update my PR.

Okay, here's where things start to get weird. I've applied your changes on top of mine except it builds and runs perfectly fine here.
And the memset volatile line you mentioned, removing it seems to make the build fail, so I left it in. I cannot for the life of me remember what the purpose of it is, however :/
I'm on FreeBSD 10.3, using recent clang with -03 -Eall
Okay, here's where things start to get weird. I've applied your changes on top of mine except it builds and runs perfectly fine here.
And the memset volatile line you mentioned, removing it seems to make the build fail, so I left it in. I cannot for the life of me remember what the purpose of it is, however :/
I'm on FreeBSD 10.3, using recent clang. What environment are you unable to build under and what does it say to you?

[Okay, I've explored some more and that rlwe_memset_volatile line is shared by all of the rand "modules", so it just seems to be boilerplate. But it's definitely required.
The changes in my branch print 'Keys match.' here.

Turns out the return code from RAND_CHOICE_init in the rlwe_rand_dev_urandom.c was flipped -- should be 1 on success and 0 on error.  I've fixed that and added some tests to catch that.  I've committed the fix on a new branch under pr/16. Thanks for the code.


Improve BalancedAccuracyEvaluator

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (957a302) to head (3b2903e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #533   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files          131       131
  Lines         3614      3619    +5
  Branches       182       182
=========================================
+ Hits          3614      3619    +5

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


gcp:instance-name and tweak GCP labels fetching

Add gcp:instance-name tag in --tags-from-gcp-meta-data mode. The existing gcp:instance-id is numeric (e.g.<PHONE_NUMBER>206740772) and less friendly/useful than the name.
Also, in --tags-from-gcp-labels mode, fetch GCP labels by instance name, not instance id. The instances.get REST API specifies “Name of the instance” but appears to also accept the numeric ID. However using the name allows GCP IAM condition expressions to match against a prefix of the instance name, as demonstrated in this Terraform example:
resource "google_project_iam_member" "compute_viewer" {
  project = var.gcp_project
  member  = "serviceAccount:${google_service_account.default.email}"
  role    = "roles/compute.viewer"

  condition {
    title       = "only_buildkite_instances"
    description = "only instances named buildkite-*"
    expression  = <<-END
      resource.type == "compute.googleapis.com/Instance" &&
      resource.name.extract("instances/{instance}").startsWith("buildkite-")
    END
  }
}

Sadly there's no existing tests around this, and I'm already too 🐇🕳 to add them now, but I'll verify this branch works on a GCP VM…

Before:
$ ./buildkite-agent-main start 2>&1 | egrep -i 'gcp|google' | head -n4
2022-08-11 07:21:57 INFO   Fetching GCP meta-data...
2022-08-11 07:21:57 INFO   Fetching GCP instance labels...
2022-08-11 07:21:58 WARN   googleapi: Error 403: Required 'compute.instances.get' permission for 'projects/…/zones/…/instances/6502291863206740772', forbidden (Attempt 0/5 Retrying in -2562047h47m14.854775807s)
2022-08-11 07:22:00 WARN   googleapi: Error 403: Required 'compute.instances.get' permission for 'projects/…/zones/…/instances/6502291863206740772', forbidden (Attempt 1/5 Retrying in -199.035506ms)

After
$ ./buildkite-agent-gcp-instance-name start 2>&1 | egrep -i 'gcp|google' | head -n4
2022-08-11 07:22:04 INFO   Fetching GCP meta-data...
2022-08-11 07:22:04 INFO   Fetching GCP instance labels...
2022-08-11 07:22:04 INFO   Successfully fetched GCP instance labels
2022-08-11 07:22:04 INFO   Successfully registered agent "buildkite-default-abcd-1" with tags [gcp:instance-name=buildkite-default-abcd, gcp:machine-type=e2-medium, gcp:preemptible=false, gcp:project-id=…, gcp:zone=…, gcp:region=…, gcp:instance-id=6502291863206740772, agent-on=gce, hello=world, queue=default]

gcp:instance-name=buildkite-default-abcd is new 👍🏼
agent-on=gce and hello=world came through from labels via a instance-name-conditional IAM role 👍🏼

Good question @moskyb. It think it's possible, but it's also very difficult to set up IAM permissions by instance ID, because it's a random numeric string, and with auto-scaling etc it's changing all the time.
Combined with the fact that the API docs actually ask for the instance name, and don't indicate that it works at all with instance ID, I think this is low enough risk to merge. (And GCP could even drop support for the instance ID version, given it's undocumented, so perhaps we're even mitigating an existing risk).


Scoreboard issue

Battle Ecliptica II:

Battle Ecliptica II TE:

Cardinal version: 9815475

You have Battle Ecliptica II:TE?

@Prodigy4532 this isn´t related with the issue...
but... yes, i have it.

@Prodigy4532 This isn't related with the issue

@Prodigy4532 @MysticxPvP @TiTo-418 Can we please bring this back on topic? Please use Skype if you need to talk about maps.

@iEli2tyree011 Sorry


Gracefully handle echotc Co failure

In Emacs, M-x shell creates a shell buffer with very rudimentary terminal capabilities. $TERM is set to dumb, and echotc Co fails after printing echotc: no such capability: Co to standard error. If our goal was to determine whether the terminal supports 256 colors, we really have no information to go on. I recommend that we trust the user and hope for the best. That means we should (1) discard any echotc Co error output, and (2) forego the warning message about having fewer than 256 colors if echotc Co failed.

Yep, the only intention was to print a nice error if the terminal supports less than 256 colors.. Our hope was that echotc always returns the correct number of colors.. Obviously it doesn't. Great catch. 👍

Merged into master and then master --> next

Thanks for the great contribution, @liblit! Even small contributions like these have a really important impact for the project, and it's how we can keep something like P9k well-maintained as our codebase grows. Thanks!


bug(form-field): New line added when entering text on form field on iOS 17 (actual phone - not simulator)

Is this a regression?

[X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
Legacy angular material
Description
On iPhone 15, when entering text in a form field with a suffix, a new line is added even though there's enough room for the text. This only happens on a real phone. I can't reproduce it on a simulator or desktop browser responsive mode.
See below

Reproduction
Go to https://material.angular.io/components/form-field/overview#prefix--suffix on an iPhone 15 running iOS 17.2 (other iPhones may work too) and enter an amount in the dollar text field.
Expected Behavior
No empty line should be added.
Actual Behavior
Empty line is added. See above screenshot.
Environment

Angular: 16 or 17
CDK/Material: 16 or 17
Browser(s): Safari
Operating System (e.g. Windows, macOS, Ubuntu): iOS 17.2

Actually this has nothing to do with suffix. It happens with all input boxes:

If I make the input of type 'password' then it doesn't happen.

I'm able to reproduce as well on an iPhone 12 running iOS 17.2 but not an iPad running iOS 16.

note it only happens if you press backspace on a text field to clear text then type again.

Tested on an iPhone X running iOS 16.5 - does not happen there.

I upgraded the iPad above from iOS 16 to iOS 17 and can now repro on the iPad as well. So looks like this bug occurs only in iOS 17.

Duplicate of https://github.com/angular/components/issues/28228.


Microsoft Azure Service Bus - Session closed when producing messages

Query/Question
Dear,
Our application needs to send many(10k+) messages to a queue, we implement an outbox pattern, several records are updated to the pending state and a job reads these records and sends them to a queue. For performance, we split these records into a batch packet of 25 messages, send to the queue using the jmsTemplate(transacted) producer callback, for every batch a commit or rollback session is called. We are facing a problem, some messages were lost and we received warning messages saying “The session is closed”. This warning appears for the producer thread but appears for random @JmsListeners consumers too. Due to warning message and not a exception we update registers like ok in database but acctualy some messages are lost.
We are unable to reproduce locally and this issue occurs intermittently in our environment. We have 24 @JMSlistener consumers and 2 jobs for sending messages.
We think its related to https://github.com/Azure/azure-sdk-for-java/issues/37042.
Could you help us please?
Producer stack:
Caught exception trying rollback() when putting session back into the pool, will invalidate. jakarta.jms.IllegalStateException: The Session is closed
jakarta.jms.IllegalStateException: The Session is closed
	at org.apache.qpid.jms.JmsSession.checkClosed(JmsSession.java:1113)
	at org.apache.qpid.jms.JmsSession.rollback(JmsSession.java:264)
	at org.messaginghub.pooled.jms.JmsPoolSession.close(JmsPoolSession.java:112)
	at org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:109)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:513)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:534)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:526)
	at br.com.a.a.t.integration.usecase.integration.adapter.external.job.SendToOffTradeJobBase.enqueue(SendToOffTradeJobBase.java:84)
	at br.com.a.a.t.integration.usecase.integration.adapter.external.job.SendToOffTradeJobBase.updateStatusAndEnqueue(SendToOffTradeJobBase.java:77)
	at br.com.a.a.t.integration.usecase.integration.adapter.external.job.SendToOffTradeJobBase.prepareAndSend(SendToOffTradeJobBase.java:71)
	at br.com.a.a.t.integration.usecase.integration.adapter.external.job.SendToOffTradeJobBase.execute(SendToOffTradeJobBase.java:57)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)

@JmsListener stack
Setup of JMS message listener invoker failed for destination 'queue-name' - trying to recover. Cause: The Session is closed
Caught exception trying rollback() when putting session back into the pool, will invalidate. jakarta.jms.IllegalStateException: The Session is closed
jakarta.jms.IllegalStateException: The Session is closed
	at org.apache.qpid.jms.JmsSession.checkClosed(JmsSession.java:1113)
	at org.apache.qpid.jms.JmsSession.rollback(JmsSession.java:264)
	at org.messaginghub.pooled.jms.JmsPoolSession.close(JmsPoolSession.java:112)
	at org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:109)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1291)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1137)
	at java.base/java.lang.Thread.run(Thread.java:831)

Pool configuration:
spring.jms.servicebus.idle-timeout=30000
spring.jms.servicebus.pool.enabled=true
spring.jms.servicebus.pool.max-connections=10
spring.jms.servicebus.pool.time-between-expiration-check=10000
spring.jms.servicebus.pool.idle-timeout=60000

JmsTemplate producer:
public void enqueue(List<StimulusConsolidation> stimulusConsolidationList) {
        jmsTemplate.setSessionTransacted(true);
        jmsTemplate.execute(getMessageProducerCallback(stimulusConsolidationList));
    }

    public ProducerCallback<Message> getMessageProducerCallback(List<StimulusConsolidation> stimulusConsolidationList) {
        return (session, producer) -> {
            Queue queue = session.createQueue(getQueueName());
            try {
                for (StimulusConsolidation e : stimulusConsolidationList) {
                    producer.send(queue, appMessageConverter.toMessage(e, session));
                }
                session.commit();
            } catch (Exception e) {
                session.rollback();
                throw e;
            }
            return null;
        };
    }

Setup (please complete the following information if applicable):

OS: Linux Docker image on AKS.
OpenJDK 17
SpringBoot 3.1.5
Library/Libraries: [spring-cloud-azure-starter-servicebus-jms (groupId:com.azure.spring:5.3.0)]
Service Bus Tier: Standard

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[x ] Query Added
[x ] Setup information Added

had the same or a similar issue - we fixed it by setting "partitioning" to false and enabled "dead lettering on message expiration" for all queues

Hi @Andrexams  , thanks for reaching out.
We have received your submission and will take it into consideration. We appreciate your input and will review this matter as soon as possible.
Please feel free to provide any additional information or context that you think may be helpful. We'll keep you updated on the progress of our review.
Thank you for your contribution to improving our project.

Hi @Andrexams , ServiceBus server side has a fix recently for premium tier.
So if you still meet this error in premium tier, please add environment property PN_TRACE_FRM=1 and provide the log info here, thanks.


On groups with channels it doesn't download all of the content

As I wrote it skips some or most of the content :[

Please, use Issue template.

This may be due to unsupported characters for file names. This fix will be included in the next release.

Try to use the v0.5.180 Release.


Change typeIdentifier used in createExtensionItemForURLString

…in order to maintain compat with LastPass.

I am filling from a WKWebView in a browser.
LastPass does not support kUTTypeAppExtensionFillBrowserAction very well.
GenericPasswordExtension does not support kUTTypeAppExtensionFillBrowserAction at all.

There's a wider conversation to be had re: supporting LastPass for other codepaths.
Relevant:

https://github.com/mozilla/firefox-ios/pull/510
https://github.com/mozilla/firefox-ios/pull/1191

Hi @jhugman!
I'm not the maintainer of the extension code but I am filling in while our maintainer is out on vacation. He should be back next week and I'm sure he'll take a look and get some feedback to you then.
I just didn't want you thinking we were ignoring you while you waited :) If you have any questions in the mean time just let me know and I'll see what I can do to get you the answers you need.
Kyle
AgileBits

Ace, thanks for the update Kyle.
– James
On Fri, Oct 30, 2015 at 4:34 PM, Kyle Swank<EMAIL_ADDRESS>wrote:

Hi @jhugman https://github.com/jhugman!
I'm not the maintainer of the extension code but I am filling in while our
maintainer is out on vacation. He should be back next week and I'm sure
he'll take a look and get some feedback to you then.
I just didn't want you thinking we were ignoring you while you waited :)
If you have any questions in the mean time just let me know and I'll see
what I can do to get you the answers you need.
Kyle
AgileBits
—
Reply to this email directly or view it on GitHub
https://github.com/AgileBits/onepassword-app-extension/pull/277#issuecomment-152579978
.

@gks, thanks for the assist, Kyle!
Thanks for taking the time to contact us, @jhugman :+1:
I see that the purpose of this change is to maintain compatibility with LastPass. However, this is not the right approach and I will explain in the paragraphs below:
The itemProvider’s type identifier in createExtensionItemForURLString: in intended to be kUTTypeAppExtensionFillBrowserAction and not kUTTypeAppExtensionFillWebViewAction. These two type identifiers represent the two distinct capabilities of the App Extension API’s Fill into Web View actions. For more info about our web view filling capabilities, please make sure that you read our Web View Filling ups the awesome factor of the 1Password App Extension blogpost.
createExtensionItemForURLString: is method designed to be used when adding the 1Password extension to a custom UIActivityViewController. See our  Adding the 1Password extension to a custom UIActivityViewController gist which is very similar to my initial implementation of https://github.com/mozilla/firefox-ios/pull/510. This change not only breaks the integration of apps that previously used createExtensionItemForURLString:, but will also result in missing activities/extensions in FireFox’ share sheet.

I am filling from a WKWebView in a browser.

The recommended type identifier is kUTTypeAppExtensionFillBrowserAction and not kUTTypeAppExtensionFillWebViewAction. See the implementation I did back in May 2015 within https://github.com/mozilla/firefox-ios/pull/510.

LastPass does not support kUTTypeAppExtensionFillBrowserAction very well.

This is really unfortunate, but we can’t hack the kUTTypeAppExtensionFillBrowserAction support into LastPass by altering an entire API. It is up to every individual password manager to implement the exposed capabilities of the App Extension API.

GenericPasswordExtension does not support kUTTypeAppExtensionFillBrowserAction at all.

IIRC, GenericPasswordExtension is an old fork of this repo and it is not maintained or endorsed in any way by AgileBits.
Hope that this helps :wink:

Labeled as invalid and closing the PR.

Thanks @radazzouz .
Yes, this is difficult.
I appreciate that this is your API for you to name write and document.
Since the API is not password manager specific, what can I do to help you or help myself so

We can support as many password managers as possible?
The level of support we are able to provide is better than lowest common denominator?

More than happy to move the dicussion over to https://github.com/mozilla/firefox-ios/pull/1191 or leave it here

Hi @jhugman,
Thanks so much for the quick reply :+1:
This API was designed to be open and transparent, in the hope that all password managers would comply to it and help improve it. All the capabilities that this API offers are supported by 1Password and we hope that other password managers will soon support them all.
This API is a bridge or a protocol with which your app interacts with a password manager. Implementation work needs to be done on the host app's side (Firefox in our case) and the password manager, which should ensure that the capability used by the host app is supported in its extension.

We can support as many password managers as possible?

We hope that other password managers will quickly implement kUTTypeAppExtensionFillBrowserAction into their App Extension. It is really easy if they already support kUTTypeAppExtensionFillWebViewAction.

The level of support we are able to provide is better than lowest common denominator?

If we were to merge the initial implementation of https://github.com/mozilla/firefox-ios/pull/510 (I haven't had a chance to look at https://github.com/mozilla/firefox-ios/pull/1191), Firefox will require no further updates. This means that password managers will work in Firefox as they support kUTTypeAppExtensionFillBrowserAction.

More than happy to move the dicussion over to mozilla/firefox-ios#1191 or leave it here

I am leaving this decision to you :wink: BTW, if you require more info, I'll be happy to jump on a call with you and discuss this issue more in-depth. Simply give us a shout at<EMAIL_ADDRESS>Cheers!

Ok. I've pinged someone at LastPass about this. My preference is for
LastPass to ship a fix, but I don't know how our schedules are aligned.

If we were to merge the initial implementation of mozilla/firefox-ios#510
https://github.com/mozilla/firefox-ios/pull/510 (I haven't had a chance
to look at mozilla/firefox-ios#1191
https://github.com/mozilla/firefox-ios/pull/1191),
1191 is a rebase and a fairly mechanical refactor of 510, so most of the
code you should recognize. As you say, once this issue is sorted, things
can move reasonably quickly.

Congratulations on 1Password for Teams, btw :)
On Tue, Nov 3, 2015 at 5:45 PM, Rad Azzouz<EMAIL_ADDRESS>wrote:

Hi @jhugman https://github.com/jhugman,
Thanks so much for the quick reply [image: :+1:]
This API was designed to be open and transparent, in the hope that all
password managers would comply to it and help improve it. All the
capabilities that this API offers are supported by 1Password and we hope
that other password managers will soon support them all.
This API is a bridge or a protocol with which your app interacts with a
password manager. Implementation work needs to be done on the host app's
side (Firefox in our case) and the password manager, which should ensure
that the capability used by the host app is supported in its extension.

We can support as many password managers as possible?

We hope that other password managers will quickly implement
kUTTypeAppExtensionFillBrowserAction into their App Extension. It is
really easy if they already support kUTTypeAppExtensionFillWebViewAction.

The level of support we are able to provide is better than lowest
common denominator?

If we were to merge the initial implementation of mozilla/firefox-ios#510
https://github.com/mozilla/firefox-ios/pull/510 (I haven't had a chance
to look at mozilla/firefox-ios#1191
https://github.com/mozilla/firefox-ios/pull/1191), Firefox will require
no further updates. This means that password managers will work in Firefox
as they support kUTTypeAppExtensionFillBrowserAction.
More than happy to move the dicussion over to mozilla/firefox-ios#1191
https://github.com/mozilla/firefox-ios/pull/1191 or leave it here
I am leaving this decision to you [image: :wink:] BTW, if you require
more info, I'll be happy to jump on a call with you and discuss this issue
more in-depth. Simply give us a shout at<EMAIL_ADDRESS>Cheers!
—
Reply to this email directly or view it on GitHub
https://github.com/AgileBits/onepassword-app-extension/pull/277#issuecomment-153430103
.

That's great news @jhugman! Thanks for the update and for the kind words about 1Password for Teams :+1:


Allow to set service root inside a dispatcher

For projects which use several different endpoints over CORS the static Defaults.setServiceRoot(String) is not enough. Consider adding a setServiceRoot(String) method to dispatcher's builder parameter for better flexibility.

I'm experiencing a ClassCastException when specifying the serviceRootKey on the service interface without 'expect' value:
@Path("test")
@Produces("application/json")
@Options(serviceRootKey="sandbox")
public interface TestRestService extends DirectRestService {
	@GET @Path("{id}")
	public TestDto getTest(@PathParam("id") String localId);
}

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [I
    at com.sun.proxy.$Proxy55.expect(Unknown Source)
    at org.fusesource.restygwt.rebind.RestServiceClassCreator.writeMethodImpl(RestServiceClassCreator.java:549)
    at org.fusesource.restygwt.rebind.RestServiceClassCreator.generate(RestServiceClassCreator.java:301)
    at org.fusesource.restygwt.rebind.BaseSourceCreator.create(BaseSourceCreator.java:198)
    at org.fusesource.restygwt.rebind.RestServiceGenerator.generate(RestServiceGenerator.java:39)
    at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)

It works fine with @Options(expect = {200}, serviceRootKey="sandbox")

The last problem with the broken @Options parsing I've opened as #244.
I'd also like to set a service root, but dynamically for each service call. The static dispatcher override is not a solution for my case. I'm using the API from a web component, and the user can give me the service base URL she wants to call. Each web component instance can call a different backend.

@christianbauer Is there any reason why you don't use RestServiceProxy#setResource?

Thanks, that helped in my case. I didn't see it in the docs.

guess we can close this


infra: make most pkgs tree shakable

Description
making most of the packages tree shakable
Test plan
u can see the bundle sizes of our apps has been decreased (new is on the right)

tested payments demo nextjs app

If the config is the same, would it be possible to have one in the root and import it from each package?

For @AlbertoElias to consider during review -- is this test plan sufficient? Could tree-shaking fail in unexpected ways we must test? (e.g. run a couple demo sites or something)

If the config is the same, would it be possible to have one in the root and import it from each package?

done

I'm testing it with other apps. So far, in Smarter Wallet, there are some styles that are not being built correctly so I'm looking into it.

I'm testing it with other apps. So far, in Smarter Wallet, there are some styles that are not being built correctly so I'm looking into it.
@jmderby could you chime in with how twind works to create classes on the fly? The issue comes with classes that are set conditionally during execution such as:
<iframe
    ref={iframeRef}
    src={iframeSrc}
    onLoad={handleIframeLoaded}
    title="Authentication Modal"
    className={classNames(
        "w-full h-[500px] border pt-12 pb-8",
        appearance?.colors?.border
            ? `border-[${appearance.colors.border}]`
            : "border-[#D0D5DD]",
        appearance?.borderRadius ? `rounded-[${appearance.borderRadius}]` : "rounded-2xl",
        appearance?.colors?.background ? `bg-[${appearance.colors.background}]` : "bg-white"
    )}
/>

Yeah, I might have to re-evaluate how we're handling the dynamic classes by using inline styles or something. It breaks tailwind rules
https://tailwindcss.com/docs/content-configuration#dynamic-class-names:~:text=Don’t use props to build class names dynamically

yeah, classes like border-[${appearance.colors.border}] are known to not work/be flaky
better to use style object for those

@maxwellfortney @AlbertoElias do you guys want me to prioritize a PR that replaces dynam classes with inline?

not sure safelisting will even work, but i would just go for styles for simplicity + certainty it will work

want me to prioritize a PR
assuming its currently broken, i think that makes sense

in the context of this pr tho, i think we can say the conditional styles not working is not due to the tree shaking

in the context of this pr tho, i think we can say the conditional styles not working is not due to the tree shaking

Not due to the tree shaking, but something changes in the build process that breaks this while it does work in main. I'll finish testing other apps and report back

Looking good. But we should wait to merge this until @jmderby fixes the twind stuff on react-ui or development and testing will be a pain

@mPaella Implemented #805 so this can now be merged.


Language selection

Description of the PR
Adds language selection to the course project dialog. This language gets then used when submitting exercises. The language can be changed by using the "Turn project into A+ course project" feature again and selecting a different language.
Testing

unit
integration
manual

- [x] new unit tests created
- [x] all unit tests pass

- [ ] new integration tests created
- [x] all integration tests pass

- [x] manual testing went well

Have you updated the TESTING.md or other relevant documentation?

[ ] Yes
[ ] Not yet. I will do it next.
[x] Not relevant

This is a very fine solution. +1
I first wondered if it would make more sense that SubmissionInfo just had a list of SubmittableFiles and each SubmittableFile had map from languages to (localized) filenames but now when I think about it, this approach of yours feels actually better.

Thanks! Keeping the lists of files for different languages in SubmissionInfo also makes it possible to have different length lists for different languages, although I'm not aware of any exercise that does this, or whether it's even possible in A+ :smile:


Efficiency improvement targeting Collection and Upload

Collection and Upload index procedure is very different from other entity types, similar to each other though.
Collection.datasets and Upload.datasets are both generated by on_read_trigger. This can be time-consuming when a collection has lots datasets. For instance, 3ae4ddfc175d768af5526a010bfe95aa has 211 datasets, the GET request takes 8 seconds to generate a 3.6MB payload.
As an additional efficiency improvement,

Rename Collection.dataset_uuids (used by POST only) to Collection.dataset_uuids_to_link (no side effects since no Collection creation being used by other services). Also update the trigger method to use this new field. (Karl? Since he made Collection creation/update using the generic POST/PUT)
Rename Collection.datasets to Collection.dataset_uuids with only returning a list of uuids (requires updating the neo4j quey and corresponding search-api tweaks)
Rename Upload.datasets to Upload.dataset_uuids with only returning a list of uuids (requires updating the neo4j quey and corresponding search-api tweaks)

HM related card: https://github.com/hubmapconsortium/entity-api/issues/632

Not applicable after indexing rework


Fix various problems around projects board view

The problem
The previous implementation will start multiple POST requests from the frontend when moving a column and another bug is moving the default column will never be remembered in fact.
What's changed

[x] This PR will allow the default column to move to a non-first position
[x] And it also uses one request instead of multiple requests when moving the columns
[x] Use a star instead of a pin as the icon for setting the default column action
[x] Inserted new column will be append to the end
[x] Fix #30701 the newly added issue will be append to the end of the default column
[x] Fix when deleting a column, all issues in it will be displayed from UI but database records exist.
[x] Add a limitation for columns in a project to 20. So the sorting will not be overflow because it's int8.

Not sure I like this pin to star change, star icon does seem a bit out of place here.

Not sure I like this pin to star change, star icon does seem a bit out of place here.

But it's not suitable to use pin to indicate it's a default column especially now default column can also be moved from the first position.

 Imho we should remove that concept entirely.

 Seems like useless visual distraction to render that icon.
Imho we should remove that concept entirely. What's the purpose a default column anyways?

Yes, I agree to remove the default column concept but not this PR. The default column exist absent feature of #30617

Should users even have to care about "default column"? Seems like useless visual distraction to render that icon.
Imho we should remove that concept entirely. What's the purpose a default column anyways?

Yes, I agree to remove the default column concept but not this PR. The default column because of the absent feature #30617

Maybe then  remove the unrelated change with the icon?

 Seems like useless visual distraction to render that icon.
Imho we should remove that concept entirely. What's the purpose a default column anyways?

Yes, I agree to remove the default column concept but not this PR. The default column because of the absent feature #30617

Maybe then remove the unrelated change with the icon?

I'd say it's related. Before this PR, a default column will always be in the first position of a project board view. So that a pin icon is acceptable. But now, default column could be moved to any position, it's not pin, so a star maybe better?

At least we need to find a better icon than star, star has a very specific meaning in gitea that should not be abused elsewhere.

Maybe https://primer.github.io/octicons/home-16 for default column.

This PR mixing column and board, I would suggest merging #30170 first

 maybe can be done in #29311

Yes, this PR will focus on fixing bug.

Any test for the new code?

Any test for the new code?

Tests added.

Rewritten and simplified.

This PR mixing column and board, I would suggest merging #30170 first

Since this is a bug fix and will be backported to v1.22. So I think it's better to merge this one and then that one.


can't highlight codes after upgrading VS code to 1.54.2

go-template plugin version: 0.2.0
VS code info:
Version: 1.54.2
Commit: fd6f3bce6709b121a895d042d343d71f317d74e7
Date: 2021-03-11T00:56:09.783Z (4 days ago)
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 19.6.0

Hi, I just published v0.2.1 to fix this, have a try.

it works! thanks!


POST /c/{company_id}/issued_documents net_price issue invoice total to 0

Hello,
according to your doc https://developers.fattureincloud.it/api-reference#post-/c/-company_id-/issued_documents
net_price can be null, or better empty ''. In this case, when we set a gross_rice and the iva the api emit an invoice with 0 as total amount.
Step to recreate:
POST /c/{company_id}/issued_documents
Set
net_price: ''
gross_price: 20
vat:{
  id: 0,
  value: 22
}

Thanks
MM

Hi @Mattia-Marchiorato, I don't get your point, it's correct that the net_price can be empty, because setting the use_gross_prices field to true the net will be calculated from gross and vat, if you don't specify that fiel, gross_price is ignored as explained here.
Thanks,
Emanuele.

Hello @emajo,
thanks, in the api-reference is not that clear that you have to set use_gross_prices to use gross_price, neither in the api error, with that field is workin.
Thanks
MM


Removed test folder from the package

There was a strange issue when building with bazel the lib wdio-vscode-service which has a dependency on @fastify/send. It breaks on the path with non-ASCII char U+2603 ☃ node_modules/@fastify/send/test/fixtures/snow ☃/index.html

Checklist

[x] run npm run test and npm run benchmark
[ ] tests and/or benchmarks are included
[ ] documentation is changed or added
[x] commit message and code follows the Developer's Certification of Origin
and the Code of conduct

To test the change

run npm pack
unzip fastify-send-2.1.0.tgz
open package folder
Result: see that test folder is not included in the package

I think a better way to fix this is to have that directory dynamically created in the tmp folder.

Maybe it is better to report this upstream as this could be a source of error anyway.

I think this should be addressed upstream first.

@Uzlopak, do you mean at https://github.com/fastify/fastify/blob/main/.npmignore ?

The test failure is not relevant to the change at CI / test / Test (21, ubuntu-latest
Run actions/setup-node@v4
  with:
    node-version: [2](https://github.com/fastify/send/actions/runs/6959139610/job/18936272961?pr=59#step:3:2)1
    always-auth: false
    check-latest: false
    token: ***
Attempting to download 21...
Not found in manifest. Falling back to download directly from Node
Error: Unable to find Node version '21' for platform linux and architecture x6[4](https://github.com/fastify/send/actions/runs/6959139610/job/18936272961?pr=59#step:3:4).

No. This is an issue with bazel and wdio-vscode-service. So report this issue to bazel.

I'd say that it needs to be addressed in both places. It needs to be reported to Bazel, but we also shouldn't be breaking our users either.

@Uzlopak I got your point. I also contacted bazel before.
But my point is:

Having folders with whitespaces is the name is unusual practice and some other libs/frameworks could fail while working with them. So it will limit the application of this lib in those cases without giving any additional value
Adding send as a dependency I never intend to run it's tests or use them in any other way. So removing the folder will make this lib lighter, which is preferable

anyway.
this PR should create the folder when testing and not ignore it in npmignore as @mcollina mentioned.

Is there any reason why this lib should have test folder in the package?

Yes, we like to ship them with the npm packages.

Yes, we like to ship them with the npm packages.

but why? is there any purpose for that?

You can read all about it here


format code

fix https://github.com/koupleless/koupleless/issues/128

add tips that we not implement required for autoWiredFromXXX
reformatter the code with new plugin
add api for get all beans in all activated bizs

Summary by CodeRabbit

Refactor

Improved code readability through formatting adjustments across various classes and methods.
Simplified code structure in specific handler classes for better readability.
Adjusted class and method declarations for clarity and alignment with style guides.

Style

Reformatted enum declarations and method call alignments for consistency.
Adjusted indentation and method chaining in test cases for improved readability.

Chores

Minor adjustments in code formatting for better alignment and readability without altering logic or functionality.

@coderabbitai review


Add Short Menu

"The lightning fast and intelligent URL shortener"

Thank you for the contribution. It was merged directly as ac212e6e92310afcbaf85494ba6d918fbdac5895 to keep commit history cleaner. Your contribution is still credited to you.


python310Packages.velbus-aio: 2022.10.1 -> 2022.10.2

Description of changes
https://github.com/Cereal2nd/velbus-aio/releases/tag/2022.10.2

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

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

3 packages built:

home-assistant-component-tests.velbus
python310Packages.velbus-aio
python39Packages.velbus-aio


prepare for rustc for mips-gnu, mipsel-gnu, ppc64-gnu and ppc64el-gnu

Just (*) by setting these env vars I could can use this command:
$ configure --enable-llvm-static-stdcpp --enable-rustbuild --host=mips-unknown-linux-gnu
$ make

to build rustc for these targets.
(*) for ppc64, I additionally installed g++ for ppc64 because I didn't want to mess with CFLAGS
(i.e. -m64).
I tested building rustc for each target. Then tested, under QEMU, that each (**) cross compiled
rustc could, itself, compile the "smallest hello" program (see code below). And, finally, I executed the smallest hello binary that was "natively" (under QEMU, withouth --target flag) compiled by the foregin rustc.
The commands looked like this:
$ uname -a
Linux 7d6aa2c97ca4 4.6.4 #1 SMP Fri Jul 22 11:55:10 PET 2016 x86_64 x86_64 x86_64 GNU/Linux

$ export QEMU_LD_PREFIX=/usr/powerpc64-linux-gnu

# Note: transparent QEMU emulation via the qemu-user-static and binfmt-support packages
$ rustc -Vv
rustc 1.13.0-dev (eaf71f8d1 2016-08-25)
binary: rustc
commit-hash: eaf71f8d1034f16140791f566cab3f3c9a0bf96a
commit-date: 2016-08-25
host: powerpc64-unknown-linux-gnu
release: 1.13.0-dev

$ rustc -C linker=powerpc64-linux-gnu-gcc-5 smallest-hello.rs

$ file smallest-hello
puts: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked, interpreter /lib64/ld64.so.1, for GNU/Linux 3.2.0, BuildID[sha1]=600eca53c0d784de9e680bc9e52a0e84af25acb9, not stripped

$ ./smallest-hello
Hello, world!

// smallest-hello.rs
#![feature(start)]
#![feature(lang_items)]
#![feature(no_core)]
#![no_core]

#[link(name = "c")]
extern {
    fn puts(_: *const u8);
}

#[start]
fn start(_: isize, _: *const *const u8) -> isize {
    unsafe {
        let msg = b"Hello, world!\0";
        puts(msg as *const _ as *const u8);
    }
    0
}

#[lang = "copy"]
trait Copy {}

#[lang = "sized"]
trait Sized {}

(**) I couldn't test the ppc64el target because qemu-ppc64el segfaulted with every binary I threw at
it (I even tried this C program: int main() { return 0; }). But rustc did successfully cross compile for that target.
r? @alexcrichton

Nice!

Ok, I've built a docker container and pushed it, but I now realize it may not be too useful until we get libc-test working...

FWIW, libc-ctest passes on mips and on mipsel. libc-ctest doesn't compile for ppc64 and qemu for ppc64el is kaput so I didn't even try to compile libc-ctest for it.

Ok the next steps here I think are:

Land support in rust-lang/rust for these targets
Get the bootstrap of new compilers working for these targets in the most recent docker containers
Conclude we have the budget for this
Figure out how to schedule all the new nightlies
Add entries and start building nightlies