Restore last opened workspaces after crash

Issue Type: Bug
same issue as 137618, though now I have a better idea of the cause, it's neither an application or anything to do with ripgrep, it has to do with vscode being killed by the system for any reason.
the issue has been happening frequently, each time the only fix was nuking the config dir and then repulling the settings from my github account.
I'm using sway and systemd-oomd, processes are often killed when the system is under load (such as when compiling, updating, or gaming). when it does chrome and any electron app are often the first to go. I believe this was this culprit before. What makes me think this is the cause is that this morning I had to do an improper shutdown after a system hang when switching virtual terminals, vscode was open and working correctly at the time of the shutdown. after rebooting and logging in the issue reoccured.
steps to reproduce

start vscode with the flags --enable-features=UseOzonePlatform --ozone-platform=wayland
improperly shut down vscode (at system level, greater than user permissions, not sure if necessary)
restart vscode

Expected results
vscode starts as normal, in last open project/workspace
Actual results
vscode shows getting started page, most recents projects/workspaces/folders refuse to load
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:39:46.686Z)
OS version: Linux x64 5.15.11-200.fc35.x86_64
Restricted Mode: No

System Info

Item
Value

CPUs
AMD Ryzen 7 2700 Eight-Core Processor (16 x 3900)

GPU Status
2d_canvas: unavailable_softwaregpu_compositing: disabled_softwaremultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: disabled_offrasterization: disabled_softwareskia_renderer: enabled_onvideo_decode: disabled_softwarevulkan: disabled_offwebgl: unavailable_softwarewebgl2: unavailable_software

Load (avg)
2, 4, 2

Memory (System)
15.61GB (8.92GB free)

Process Argv
--enable-features=UseOzonePlatform --ozone-platform=wayland --unity-launch --crash-reporter-id 8209f1c7-78b8-4c88-bedb-a2cdc62a51d2

Screen Reader
no

VM
0%

DESKTOP_SESSION
undefined

XDG_CURRENT_DESKTOP
sway

XDG_SESSION_DESKTOP
sway

XDG_SESSION_TYPE
wayland

Extensions (72)

Extension
Author (truncated)
Version

Bookmarks
ale
13.2.2

sourcetrail
ast
0.0.2

docs-view
bie
0.0.9

better-toml
bun
0.3.2

yo
cam
0.9.10

path-intellisense
chr
2.6.0

gitignore
cod
0.7.0

systemd-unit-file
coo
1.0.6

doxdocgen
csc
1.3.2

vscode-markdownlint
Dav
0.45.0

algorithm-mnemonics-vscode
dav
1.0.3

vscode-eslint
dba
2.2.2

vscode-dash
dee
2.4.0

githistory
don
0.6.19

xml
Dot
2.5.1

gitlens
eam
11.7.0

shell-format
fox
7.2.2

vscode-yarn
gam
2.0.0

graphviz-markdown-preview
gee
0.0.8

vscode-pull-request-github
Git
0.34.2

todo-tree
Gru
0.0.214

debug-visualizer
hed
2.2.4

realtime-debugging
hed
0.1.0

better-cpp-syntax
jef
1.15.10

tera
kar
0.0.9

bash-ide-vscode
mad
1.11.0

rust-analyzer
mat
0.3.833

git-graph
mhu
1.30.0

vscode-docker
ms-
1.18.0

python
ms-
2021.12.1559732655

vscode-pylance
ms-
2021.12.2

jupyter
ms-
2021.11.1001550889

jupyter-keymap
ms-
1.0.0

jupyter-renderers
ms-
1.0.4

remote-containers
ms-
0.209.6

remote-ssh
ms-
0.70.0

remote-ssh-edit
ms-
0.70.0

remote-wsl
ms-
0.63.13

cmake-tools
ms-
1.9.2

cpptools
ms-
1.7.1

cpptools-extension-pack
ms-
1.1.0

color-highlight
nau
2.5.0

autodocstring
njp
0.5.4

material-icon-theme
PKi
4.11.0

trusty-rusty-snippets
pol
0.0.5

scheme
reb
0.0.2

java
red
1.2.0

bash-debug
rog
0.3.9

vscode-qt-for-python
sea
1.1.7

crates
ser
0.5.10

fish-vscode
sky
0.2.1

java-generate-setters-getters
soh
7.4.0

code-spell-checker
str
2.0.14

best-dark-themes-pack
the
1.0.2

html-preview-vscode
tht
0.2.5

vscode-status-bar-format-toggle
tom
3.0.0

cmake
twx
0.0.17

errorlens
use
3.4.1

vscode-lldb
vad
1.6.10

intellicode-api-usage-examples
Vis
0.0.6

vscodeintellicode
Vis
1.2.15

vscode-java-debug
vsc
0.37.0

vscode-java-dependency
vsc
0.18.9

vscode-java-pack
vsc
0.20.0

vscode-java-test
vsc
0.33.1

vscode-maven
vsc
0.34.2

vscode-spring-initializr
vsc
0.8.0

vscode-todo-highlight
way
1.0.5

pestfile
xor
0.2.0

markdown-all-in-one
yzh
3.4.0

material-theme
zhu
3.13.8

vscode-proto3
zxh
0.5.5

(10 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vscop804:30404766
vscop453:30404998
vsrem710cf:30416617
vscexrecpromp3t2:30407763

I have more context as to what's going on... The window is "invisible" as process explorer shows the window as running and active, in order to cause the window to display, you have to kill the window from process explorer, which prompts that the window has crashed and asks to restart.
on selecting yes, the window appears.
Note this same issue is popping up in chrome, chrome shows multiple crashed windows as active despite not being visible on any workspace


Update interactions.ts

instead of saying hours it now says hour(s) so its grammatically correct

In my defense, that looks wrong

fixed image lol

mb I just remembered to not make PRs without new features.


Add constant constructor to AccountId32

This helps declaring some well known account ids as const in tests without resorting to lazy_static or OnceCell.

bot merge


[Firestore] IN query not working. Invalid 'opStr'

[READ] Step 1: Are you in the right place?
Yes
[REQUIRED] Step 2: Describe your environment

Firebase SDK version: firebase-admin": "^8.2.0"
Firebase Product: Firestore

[REQUIRED] Step 3: Describe the problem
As described in this blog and firestore documentation, IN query is now supported. But when I run this query,
firestore.collection("transactions")
		.where("uid", "==", uid)
		.where("number", "==", number)
		.where("status", "in", ["pending", "success"])
		.where("type", "==", type)
		.orderBy(admin.firestore.FieldPath.documentId(), "desc").limit(1).get()

I get the following error:
Error: Value for argument "opStr" is invalid. Acceptable values are: <, <=, ==, >, >=, array-contains
    at Object.validateEnumValue (/srv/node_modules/@google-cloud/firestore/build/src/validate.js:291:15)
    at validateQueryOperator (/srv/node_modules/@google-cloud/firestore/build/src/reference.js:1797:16)
    at Query.where (/srv/node_modules/@google-cloud/firestore/build/src/reference.js:954:17)
    at exports.createoid_v2.functions.runWith.https.onCall (/srv/index.js:2367:4)
    at func (/srv/node_modules/firebase-functions/lib/providers/https.js:318:32)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)

Hi
I am receiving the same error
Error: Value for argument "opStr" is invalid. Acceptable values are: <, <=, ==, >, >=, array-contains
when using the in operator in google cloud functions. I've installed the latest firebase sdk using
npm install firebase-functions@latest firebase-admin@latest --save and also updated the firebase tools using npm i -g firebase-tools
I am importing:
import * as functions from 'firebase-functions'; import * as admin from 'firebase-admin';
and that's my query:
let size = 10;
let items = afterData.requested.slice(i,size);
i = i + size;
console.log(items)
await admin.firestore().collection("users")
//@ts-ignore
.where("phnr","in",items)
.get()
.then((querySnapshot: admin.firestore.QuerySnapshot) => {})
How can I make this work?

@thifil update your firebase-admin version.

Updating my firebase-admin seems to have had no effect.

I am experiencing this issue too, and am using firebase-admin: "^8.9.0" in my package.json, and am running version 8.5.0 of the firebase CLI.
Code
 db.collection('bookings')
        .where('dateTime', '>', startDate)
        .where('dateTime', '<', endDate)
        .where('location', 'in', ['malvern', 'balwyn', 'mobile'])
        .get()

Output
Error: Value for argument "opStr" is invalid. Acceptable values are: <, <=, ==, >, >=, array-contains
    at Object.validateEnumValue (/workspace/node_modules/@google-cloud/firestore/build/src/validate.js:310:15)
    at validateQueryOperator (/workspace/node_modules/@google-cloud/firestore/build/src/reference.js:1813:16)
    at Query.where (/workspace/node_modules/@google-cloud/firestore/build/src/reference.js:955:17)
    at Promise (/workspace/lib/src/bookings/index.js:107:14)
    at new Promise (<anonymous>)
    at exports.sendOutForms.functions.pubsub.schedule.timeZone.onRun (/workspace/lib/src/bookings/index.js:92:12)
    at cloudFunction (/workspace/node_modules/firebase-functions/lib/cloud-functions.js:115:23)
    at Promise.resolve.then (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:330:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Is anyone else experiencing this?

You are likely using an outdated version of Firestore. Please remove your package lock file and your node_modules folder and re-install.


Error installing using io.js v2.3.1

Using io.js v2.3.1 (installed via nvm) and and npm v3.0 (same with v2.12.0), getting the following error when running npm install fsevents:
><EMAIL_ADDRESS>install /Users/yamalight/Eccenca/elds-ui/datamanager/node_modules/fsevents
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 response dowloading http://nodejs.org/dist/v2.3.1/node-v2.3.1.tar.gz
gyp ERR! stack     at Request.<anonymous> (/Users/yamalight/.nvm/versions/io.js/v2.3.1/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:251:14)
gyp ERR! stack     at emitOne (events.js:82:20)
gyp ERR! stack     at Request.emit (events.js:169:7)
gyp ERR! stack     at Request.onRequestResponse (/Users/yamalight/.nvm/versions/io.js/v2.3.1/lib/node_modules/npm/node_modules/request/request.js:985:10)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! stack     at ClientRequest.emit (events.js:169:7)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack     at Socket.socketOnData (_http_client.js:305:20)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/Users/yamalight/.nvm/versions/io.js/v2.3.1/bin/iojs" "/Users/yamalight/.nvm/versions/io.js/v2.3.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/yamalight/Eccenca/elds-ui/datamanager/node_modules/fsevents
gyp ERR! node -v v2.3.1
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 14.3.0
npm ERR! argv "/Users/yamalight/.nvm/versions/io.js/v2.3.1/bin/iojs" "/Users/yamalight/.nvm/versions/io.js/v2.3.1/bin/npm" "i" "fsevents"
npm ERR! node v2.3.1
npm ERR! npm  v3.0.0
npm ERR! code ELIFECYCLE

If I try to export location of io.js using npm_config_nodedir=/Users/yamalight/.nvm/versions/io.js/v2.3.1/include/node/ as note in #55, I get the following error:
><EMAIL_ADDRESS>install /Users/yamalight/Eccenca/elds-ui/datamanager/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:23:10: fatal error: 'uv.h' file not found
#include <uv.h>
         ^
1 error generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/yamalight/.nvm/versions/io.js/v2.3.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/Users/yamalight/.nvm/versions/io.js/v2.3.1/bin/iojs" "/Users/yamalight/.nvm/versions/io.js/v2.3.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/yamalight/Eccenca/elds-ui/datamanager/node_modules/fsevents
gyp ERR! node -v v2.3.1
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 14.3.0
npm ERR! argv "/Users/yamalight/.nvm/versions/io.js/v2.3.1/bin/iojs" "/Users/yamalight/.nvm/versions/io.js/v2.3.1/bin/npm" "install" "fsevents"
npm ERR! node v2.3.1
npm ERR! npm  v3.0.0
npm ERR! code ELIFECYCLE

Everything works OK when using previous version of io.js (v2.2.1).

I think you need to drop the include/node bit from npm_config_nodedir.

@bnoordhuis then it's a file-not-found (common.gypi) error, I'd actually added it later after finding the file manually.
Here's error output without it:
><EMAIL_ADDRESS>install /Users/yamalight/Eccenca/elds-ui/datamanager/node_modules/fsevents
> node-gyp rebuild

gyp: /Users/yamalight/.nvm/versions/io.js/v2.3.1/common.gypi not found (cwd: /Users/yamalight/Eccenca/elds-ui/datamanager/node_modules/fsevents) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/yamalight/.nvm/versions/io.js/v2.2.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:199:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/Users/yamalight/.nvm/versions/io.js/v2.2.1/bin/iojs" "/Users/yamalight/.nvm/versions/io.js/v2.2.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/yamalight/Eccenca/elds-ui/datamanager/node_modules/fsevents
gyp ERR! node -v v2.2.1
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 14.3.0
npm ERR! argv "/Users/yamalight/.nvm/versions/io.js/v2.2.1/bin/iojs" "/Users/yamalight/.nvm/versions/io.js/v2.2.1/bin/npm" "install" "fsevents"
npm ERR! node v2.2.1
npm ERR! npm  v2.12.0
npm ERR! code ELIFECYCLE

As a quick experiment, can you clone the io.js repo and point npm_config_dir to the checkout?

@bnoordhuis ok, will try and report back in a sec...

@bnoordhuis yep, that actually worked without any issues. Is it an iojs issue then?

I think it's a nvm issue but I'm not sure what exactly, I don't use nvm myself.
The first error in your original message is because of an unpatched gyp trying to download the tarball from the wrong location.  The second error seems to be caused by an incomplete source tree.

@bnoordhuis okay, will try to install iojs manually and see if that helps. will report back in a moment

@bnoordhuis yep, that fixed it. will file an issue to nvm, thanks!

@yamalight it seems you were installing alternate versions of npm directly from the registry? If so, that may be the real source of the issue - not necessarily an nvm problem.

@es128 I tried with the default npm as well before with same results.
just killed my nvm and re-installed it - that seem to fix it. might be something broke my nvm install :\

When you say you tried with the default npm - was it just that you installed the matching version of the one that comes bundled with io.js (npm i -g npm@2.12.0)? Because that's different from using the one that comes in with a fresh install of an io.js version.

@es128 I tried with one that comes bundled with iojs (v2.11.3 i think)

Ok, got it. But if everything works now with a fresh install of nvm - perhaps there was a bug somewhere that's already been fixed?
Hard to track down given all the interactions between the different versions of things.

@es128 yeah, might've been something else. oh well, it works now. thanks for help! :)


[Feature Request] Add shell completion scripts

This is not necessary, but I think it's nice to have.

Yeah, I agree, that its a neat feature to have.
I am currently focused on a FreeBSD port and package build automation, so it would be very helpful if you could start working on shell completion.

it would be very helpful if you could start working on shell completion.

I will try to work on it, but I am currently having to deal with school/college issues; so it could take me awhile to start working on this.

@Z5483 I added a completions file for fish shell. This is just an early version, so don't judge it too harshly.
This is not a priority for me, so your contribution would help a lot.

@filiparag I made a simple completion script for zsh too. The only obstacle is the languages, since it's slightly different per source.

I will close this issue, we can continue development discussion in a pull request.

It might be better to keep this open, so other people can see this too.

You're right. Someone might see this and help with the development.


Version Flag

Hi @StevenBlack,
Adding the version flag -v per issue #16.
Thank you for the guideline!

Thanks Esad, that's perfect.
Merging!


Early stopping options for Keras

Hi all,
Is there an early stopping option for Keras training based on any criterion (validation log loss etc.)
Appreciate any help.
Thanks.
Dr Chan

You would have to implement it in your own code. One easy solution is to run epochs one after the other For instance, with .fit(nb_epoch=1) --this will return a training history which includes training and validation loss. You can then decide to stop training based on any criterion you want.

`earlyStopping=keras.callbacks.EarlyStopping(monitor='val_loss', patience=0, verbose=0, mode='auto')
model.fit(X, y, batch_size=128, nb_epoch=100, verbose=1, callbacks=[earlyStopping], validation_split=0.0, validation_data=None, shuffle=True, show_accuracy=False, class_weight=None, sample_weight=None)`

@Tokukawa I believe you mean to have validation_split greater than 0.  Perhaps 0.1.

Sure, is a typo.

Great! It is so useful for small data which are usual in my area.

Such callback can be useful:
class EarlyStoppingByLossVal(Callback):
    def __init__(self, monitor='loss', value=0.01, verbose=0):
        super(Callback, self).__init__()
        self.monitor = monitor
        self.value = value
        self.verbose = verbose

    def on_epoch_end(self, epoch, logs={}):
        current = logs.get(self.monitor)
        if current is None:
            print("Early stopping requires %s available!" % self.monitor)
            exit()

        if current < self.value:
            if self.verbose > 0:
                print("Epoch %05d: early stopping THR" % epoch)
            self.model.stop_training = True

P.S. It is not fully mine, found it on stackoverflow and changed a little.

This code snippet shows how to stop and save the best model. Hope it helps.
filepath="weights.best.hdf5"
checkpoint = ModelCheckpoint(filepath, monitor='val_acc', verbose=1, save_best_only=True, mode='max')

# check 5 epochs
early_stop = EarlyStopping(monitor='val_acc', patience=5, mode='max')

callbacks_list = [checkpoint, early_stop]

history = model.fit(x, y, validation_data=(x_test, y_test), epochs=100, callbacks=callbacks_list)


feat: update Player move method to accept MoveOptions

the "force" property is useful to move a player if a node disconnect

@flav-code pls see changes requested, leave a comment on each change if you disagree

My bad, I'll take a look at overloads

Can you remove the overload first please, so the build doesn't fail, or else I can't merge

Could you resolve the conflicts pls?


drop_path_prob=0 or 0.3 in training ImageNet

the drop_path_prob is set as 0, but the paper said it follows "Regularized evolution for image
classifier architecture search", which set 0.3.
Does it matter??

Have you tested the right hyperparameter "drop_path_prob"? I reproduce with drop_path_prob set as 0 and get a test accuray 70.8%.


[ Seo ]

Work on the SEO of the website

and Try to bring to the top results

I'm working on it

Adding the backlink  in the Repositiry


chore(package): update stylelint to version 8.0.0

Closes #949
Fixes #[replace brackets with the issue number that your pull request addresses].
Changes proposed in this pull request:

[list out summary of changes here]
[list out summary of changes here]
[list out summary of changes here]
[etc]

Note: pull requests without proper descriptions may simply be closed without further discussion. We appreciate your contributions, but need to know what you are offering in clearly described format. Thanks! (you can delete this text)
cc @HospitalRun/core-maintainers

https://github.com/material-components/material-components-web/pull/955


No empty lines in test template test data

Chek if enforce already

It's not enforced, following code passes (and Robot ignores empty lines):
B
    [Template]    Template
    B

    C


Shadow DOM in components

Hi !
Can moon create components with their content in shadow dom ? and upgrade components, as it is possible with custom elements ?
Regards
Alexandre

Moon's virtual DOM engine cannot create content in shadow DOM, and due to browser limitations, I'm not considering adding it right now. You can control elements and their shadow DOM inside of hooks and methods—Moon will simply ignore them.

v1 is compatible with shadow DOM running alongside Moon but does not use it.


Is there a way to disable the command line abbreviation?

I didn't know this cabbrev existed but stumbled upon it by surprise. I wanted to search for the text HI so I typed /HI<CR>, but then all of a sudden it was searching for Hi instead, leaving me confused for a bit. I would rather avoid these kinds of surprises, if possible. (It's also weird that cabbrev applies to both : commands and / commands but that is a "problem" with neo/vim itself).
https://github.com/azabiong/vim-highlighter/blob/e625c9a475b760f970c2f813cbe37e9d28cd51ed/plugin/highlighter.vim#L70
Anyway, thanks for the incredible plugin @azabiong!

Thank you for identifying this issue and providing a detailed explanation. 👍
Now it's fixed!
It was initially introduced for the convenience of command typos. However, since both the Hi and HI commands are currently supported, I think the ca command can be omitted. Thanks!

Great, thanks! 🚀

Closed by 314272f69a4b49b9d06b3e07b44747323f26b9fe


Update scodec-bits to 1.1.29

Updates org.scodec:scodec-bits from 1.1.28 to 1.1.29.
GitHub Release Notes - Changelog - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scodec", artifactId = "scodec-bits" } ]

labels: library-update, semver-patch

Codecov Report

Merging #562 (583b6b7) into master (7ed32fd) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #562   +/-   ##
=======================================
  Coverage   62.54%   62.54%
=======================================
  Files          39       39
  Lines        1303     1303
  Branches        7        7
=======================================
  Hits          815      815
  Misses        488      488

Continue to review full report at Codecov.

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


Add loader example to README

Users may want to "see the code" before looking at details of Croissant. This PR summarizes the introduction notebook in a few lines of code.

@mkuchnik Can you please rebase?


I can't change button tint and background colour.

The following properties I can't set. Please help me. Thanks.
alert.firstButtonTitleColor = [UIColor blueColor];
alert.secondButtonTitleColor = [UIColor blueColor];
alert.firstButtonBackgroundColor = [UIColor whiteColor];
alert.secondButtonBackgroundColor = [UIColor blackColor];

Hi @moneyfreeuse
Are you using Cocoapods?

Hi @moneyfreeuse
You should be able to update to the latest release and change the button background and title color. Please let me know if there are any further issues.
Cheers 👍


fix(plugin-chart-echarts): area chart opacity bug

SUMMARY
Cherry-pick https://github.com/apache-superset/superset-ui/pull/1464 into the 1.4 branch using a custom post-release of the 0.18.19 @superset-ui/plugin-chart-echarts release.
SCREENSHOTS
With the fix, ECharts area charts now work as expected:

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

[x] Has associated issue: closes #18129
[ ] Required feature flags:
[ ] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)

[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided

[ ] Introduces new feature or API
[ ] Removes existing feature or API

Happy to see this fix coming in 1.4.2.


Corona-Warn-App/src/main/res/values/strings.xml: adjust update interval

[x] None of the other issue templates apply to this issue.

"The exposure check is performed automatically about every two hours." should rather be:
"The exposure check is performed automatically each day." or some such.
And then, all translations need to be fixed...

Internal Tracking ID: EXPOSUREAPP--1997

This issue has not been addressed.
CWA three-dot menu > Overview still contains the following text under
Definition of Terms
Exposure Check
"Exposure log data is retrieved and synchronized with reported infections of other users. The exposure check is performed automatically about every two hours."
So far, including with the current version 1.5.1, exposure checks are performed automatically once a day, not every two hours.
https://github.com/corona-warn-app/cwa-app-android/blob/master/Corona-Warn-App/src/main/res/values/strings.xml
Line 282
<!-- YTXT: App overview body for glossary risk calculation -->
<string name="main_overview_body_glossary_calculation">

Hi @schweer-guest, @MikeMcC399,
Thanks for your contributions. This issue is fixed, text is now:
<string name="main_overview_body_glossary_calculation">"Exposure log data is retrieved and synchronized with reported infections of other users. Your risk is checked automatically several times per day."</string>
We will close this issue now. Best wishes, DS

Corona-Warn-App Open Source Team


Named denominations

Make it possible to name individual denominations, for example pounds and pennies, or gold blocks, gold bars, gold ingots.
The names would display on the /money command in the form "23 gold blocks, 8 ingots and 3 nuggets"
Further consideration: Display the items themselves with the respective names.

Implemented in 2.7 at last!


vncdo crashes when connection with password

Please include the following information:
vncdotool version
vncdotool 0.12.0 with Python 3.10
VNC server and version
UltraVNC Server <IP_ADDRESS>
Steps to reproduce
Try to connect to a password pretected VNC Server
`PS C:\Users\username> C:\Users\username\AppData\Roaming\Python\Python310\Scripts\vncdo -s localhost capture "screenshot2.png"
VNC password:
Expected result
a screenshot
Which erroneous result did you get instead
`PS C:\Users\username> C:\Users\username\AppData\Roaming\Python\Python310\Scripts\vncdo -s localhost capture "screenshot2.png"
VNC password:
Unhandled Error
Traceback (most recent call last):
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\python\log.py", line 96, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\python\log.py", line 80, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\python\context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\python\context.py", line 82, in callWithContext
return func(*args, **kw)
---  ---
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\internet\selectreactor.py", line 148, in _doReadOrWrite
why = getattr(selectable, method)()
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\internet\tcp.py", line 248, in doRead
return self._dataReceived(data)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\internet\tcp.py", line 253, in _dataReceived
rval = self.protocol.dataReceived(data)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 685, in dataReceived
self._handler()
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 694, in _handleExpected
self._expected_handler(block, *self._expected_args, **self._expected_kwargs)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 255, in _handleVNCAuth
self.vncRequestPassword()
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\command.py", line 52, in vncRequestPassword
self.sendPassword(self.factory.password)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 261, in sendPassword
des = RFBDes(pw)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\pyDes.py", line 410, in init
self.setKey(key)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 835, in setKey
if bsrc & (1 << i):
builtins.TypeError: unsupported operand type(s) for &: 'str' and 'int'
CRITICAL:twisted:Unhandled Error
Traceback (most recent call last):
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\python\log.py", line 96, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\python\log.py", line 80, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\python\context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\python\context.py", line 82, in callWithContext
return func(*args, **kw)
---  ---
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\internet\selectreactor.py", line 148, in _doReadOrWrite
why = getattr(selectable, method)()
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\internet\tcp.py", line 248, in doRead
return self._dataReceived(data)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\twisted\internet\tcp.py", line 253, in _dataReceived
rval = self.protocol.dataReceived(data)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 685, in dataReceived
self._handler()
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 694, in _handleExpected
self._expected_handler(block, *self._expected_args, **self._expected_kwargs)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 255, in _handleVNCAuth
self.vncRequestPassword()
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\command.py", line 52, in vncRequestPassword
self.sendPassword(self.factory.password)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 261, in sendPassword
des = RFBDes(pw)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\pyDes.py", line 410, in init
self.setKey(key)
File "C:\Users\username\AppData\Roaming\Python\Python310\site-packages\vncdotool\rfb.py", line 835, in setKey
if bsrc & (1 << i):
builtins.TypeError: unsupported operand type(s) for &: 'str' and 'int'
CRITICAL:root:unsupported operand type(s) for &: 'str' and 'int'
PS C:\Users\username>`
Additional information
Same Problem under Windows 11 and Debian 11. After disabling the password, the screenshot was saved.

0.12.0 is way to old, especially with any Python 3.x.
Please give the current version from the main branch, which might get releases as v1.1.0 this week. #203

pip install git+https://github.com/sibson/vncdotool.git@main

Thank you very much. I followed the instructions on the documentation. But this helped.


Prepaid credit card agreements: Update result count to 25 per page

See https://[GHE]/CFPB/el-camino/issues/365
Changes

Prepaid credit card agreements: Update result count to 25 per page

How to test this PR

Search on http://localhost:8000/data-research/prepaid-accounts/search-agreements/ should have 25 results or less per page. Compare to 20 results or less on production https://www.consumerfinance.gov/data-research/prepaid-accounts/search-agreements/

Holding till we figure out if we want a smaller results count for pages with tall results items. cc @sonnakim


Trigger job with button_ctrl with a smartbutton ?

I created a job with a button_ctrl property :
/api/jobs
body = {"button_ctrl": {
        "button" : "toggle",
        "event": "on",
        "loads": [load_id]}
}

Reponse => [...] job_id = #51
Then tried to link this job to a smartbutton (a scene one not a grp_ctrl) :

/api/smartbuttons/program =>

    body = {
        "on": True,
        "timeout": 10,
        "button_type": "scene",
        "owner" : "all",
        }

/api/smartbuttons/notify

    body = {
        "on": True,
        "timeout": 60,
        "button_type": "scene",
        "owner" : "all",
        }

Assign the job to the smartbutton : /api/smartbuttons/{id} (<-smart button id = 43)
    body = {"job": job_id}  <- here job_id = 51

All requests returns 200.
Is it :
a) impossible to trigger a "button_ctrl" from a scene (the system is designed as such) or
b) i'm doing a mistake ?
I naturally tested the job alone with /api/jobs/{id}/trigger and it works.
To bypass this problem I created a script to call the trigger action through the API
id = 16 #load ID
token = "Don't want to write it here :-)"
headers = {'Authorization': 'Bearer {0}'.format(token)}
host = '<IP_ADDRESS>'

async def onButtonEvent(*argv):
    await alog('%s %s on smartbutton %s', argv[0], argv[1], argv[2])
    body = '{"button" : "toggle", "event": "click"}'
    #body = '{"on": true}'
    url = 'http://' + host + '/api/loads/{id}/ctrl'.format(id=id)
    ret = await aiocurl(url, method='PUT', body=body, headers=headers)

It's working but with three main drawback :

I can't use localhost or <IP_ADDRESS> to connect to the API instead of API (OSError: [Errno 111] ECONNREFUSED
, the socket refuse the connection)
If I restart my wifi router, the gateway get a new IP and I have to adjust the script
If there's no wifi connection it won't work

Is it possible to tell me :

if it is possible to attach a job with button_ctrl to a smartbutton (scene type) or not ? Did I made a misstake in the first part ?
If it is possible to allow connection from localhost to the API ? I think it can add a lot of flexibility in use / programming ;-)

For the IP issue see my other issue :-) #8
Regards !

Thank you for reporting this issue!
I confirm that with the current firmware v5.1.27 (or older) a script with access to localhost or <IP_ADDRESS> leads to OSError: [Errno 111] ECONNREFUSED. I am working on this and am confident that a fix will be included in the next release.

To trigger a job with a Scene-SmartButton, you need a job like this:
"target_states": [
        {
              "load": 1,
              "bri": 10000
        },
        {
              "load": 2,
              "bri": 10000
        }
]

When the  Scene-SmartButton is pressed, the load 1 and 2 jumps to 100%.
To trigger a job with a GroupCtrl-SmartButton, you need a job like this:
"button_ctrl": {
        "loads": [1 ,2]}
}

With the GroupCtrl-SmartButton you can now switch the loads on and off (short-press) or dim them up and down (long-press).

here you can find more information...
Lets use a smartbutton and get it married with a job.

Thank you for reporting this issue!
I confirm that with the current firmware v5.1.27 (or older) a script with access to localhost or <IP_ADDRESS> leads to OSError: [Errno 111] ECONNREFUSED. I am working on this and am confident that a fix will be included in the next release.

Thanks a lot !
@woodworm sorry about the confusion I wasn't 100% clear with the name you use for each type of Object button/ctrl/... so, if I understand right :

a GroupCtrl-SmartButton toggle ONLY button_ctrl part of a job => so it ignore the "target_states" part ?
a Scene-SmartButton toggle ONLY target_states part of a job => so it ignore the "buton_ctrl" part ?
It's not possible to trigger a "button_ctrl" part of a job with a Scene-SmartButton

Thank you for reporting this issue!
I confirm that with the current firmware v5.1.27 (or older) a script with access to localhost or <IP_ADDRESS> leads to OSError: [Errno 111] ECONNREFUSED. I am working on this and am confident that a fix will be included in the next release.
@oliver-joos Do you know when the new firmware will be available? The "cloud update" button tells me that my firmware is up to date, but I have version 5.1.25-0. Thanks in advance for your reply. Is there any way of obtaining the firmware manually?


ImportError: cannot import name 'accuracy_jaccord'

I installed fast_bert as described but there is one particular import that is not working:
>>> from fast_bert.metrics import accuracy_jaccord
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'accuracy_jaccord'

This leads to run_bert_classifier.py failing.
Do you know if a very specific version of fast_bert or sklearn are required? No version is specified in fast_berts' requirements.txt

Dear Sir,can i have you personal email ! Because i am trying to reproduce this code but i am a rookie!
I am sorry to bother you~sincerely! @swidi

Yes,I found the same error! i doubt if the author of fast_bert update the code ?
And have you solved the question ?  Yours sincerely! @swidi

@swidi @shaoniana1997  Please add the following function in the metrics.py :
def accuracy_jaccord(y_pred: Tensor, y_true: Tensor, thresh: float = CLASSIFICATION_THRESHOLD, sigmoid: bool = True):
    if sigmoid:
        y_pred = y_pred.sigmoid()
    return jaccard_score(y_pred > thresh, y_true.bool(), average='samples')

I am closing this issue for now. Feel free to reopen.

thank you for your timely reply!

when i use the accuracy_jaccord to evaluate ,if always reminds the information :
TypeError: accuracy_jaccord() got an unexpected keyword argument 'labels'
can you give me some useful advice? @fabrahman


Maximum Number of Images?

I have been making heavy use of Queryable and really enjoying it. However, it recently seems to have hit some internal limit on the total number of images it supports. When I update the index it shows progress up to 4,900/total then crashes like it normally does due to the memory leak (usually the memory leak crash is at 10,000-20,000). However, when I restart the app the total number to index is unchanged.
I tried deleting and reinstalling the app in case my index got somehow corrupted. A bit over 200,000 images into my 300,000 image library the same thing started happening again. I thought it was notable that the images being indexed were different for the crash before the reinstall and after. Also, before the reinstall it had indexed about 50,000 more before getting stuck at the 4,900 index crash.
Also, as my library has gotten bigger performance has gotten quite a bit worse. It is currently taking about 70 seconds to launch the app, have the model load  and successfully complete the first search. Subsequent searches take about 45 seconds each to complete once I hit search. (I am using an iPhone 14 Pro Max).
I assume this is due to my picture library size but if speed up is possible I would really appreciate it.

Hmm actually I just noticed that the 4,900 index crash started right around when the app was updated to Apple's CLIP model. Perhaps they are related?

It works fine on my iPhone 15, and I only experienced a crash after 20k images. The load and search speed is a significant improvement over MobileCLIP (2x faster).
As for the crash, there are usually two reasons:

Insufficient free memory. This happens when you have a large number of photos (say 20k), and then you get stuck. You can try closing some memory-consuming apps (e.g., Telegram, WeChat, Chrome) and rebuilding the index again. This should allow you to continue, as it saves a checkpoint every 5k embeddings when building the index.
An image with unusual dimensions. When the height-to-width ratio is highly abnormal (say 19200 x 40), it could cause a resize issue.

Hmm that doesn't appear to be the case for me. What can I provide to help get this debugged?
Actually, it seems to be crashing on the checkpoint save. That would explain why it is getting stuck at 4,900 and then crashing. Also, I have noticed that the final picture has been changing as I add more photos to my library. So I am pretty confident it is not an aspect ratio issue. Additionally, I killed all other apps and the behavior is unchanged.
Oh and is the Apple CLIP version in the App Store yet? If not than I don't have that version.

A few additional notes on this.

I am running iOS 18 developer beta if that matters
I just tried again and it successfully cleared the stuck point after a noticeably long delay at 4,900. That delay repeated at 9,900 and then again at 14,900 but then it crashed during the delay at 14,900. I ran it again and once again it crashed after a delay at 4,900
So far the crash has always happened in a large collection of nearly identical photos. As in the source images for a Timelapse. So hundreds or thousands of photos that are all very similar with only minor differences.


subscription.isClosed is not a function

Bug report
isClosed function not found.
Describe the bug
[Unhandled promise rejection: TypeError: subscription.isClosed is not a function. (In 'subscription.isClosed()', 'subscription.isClosed' is undefined)]
at node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js:188:17 in __awaiter$argument_3
at node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js:8:13 in <anonymous>
at node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js:4:11 in <anonymous>
at node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js:8:13 in <anonymous>
at node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js:4:11 in <anonymous>

To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

Subscribe to a table
Wait for connection to go idle [i'm using react native, so wait a few min / minimise the app]
When the connection drops, this warning shows

  useEffect(() => {
    let matchSub
    if (user && user.id) {
      matchSub = subscribematchUpdate(user.id)
    }
    return () => {
      if (matchSub) {
        supabase.removeSubscription(matchSub)
      }
    }
  }, [user])

  const subscribematchUpdate = async (user_id) => {
    return supabase
      .from(`matches:profile_id=eq.${user_id}`)
      .on('*', (payload) => {
        console.log({ payload })
      })
      .subscribe((status) => {
        console.log('subscribe', status)
      })
  }

Expected behavior
Show clean up / remove subscriptions itself
Screenshots

System information

OS: [e.g. macOS, Windows]    "react-native": "0.68.2",
Browser (if applies) [e.g. chrome, safari] "expo": "^45.0.0",
Version of supabase-js: [e.g. 6.0.2]     "@supabase/supabase-js": "^1.35.4",
Version of Node.js: [e.g. 10.10.0] v16.13.1

Additional context
Add any other context about the problem here.

yes @w3b6x9 you are correct, my bad!


Document how to run BigchainDB with MongoDB

Documented changes in the configure command.
Documented the new add-replicas remove-replicas commands.
Updated quickstart with instructions to run with mongodb
Updated how to run a dev/test node with mongodb (with and without docker)

Codecov Report

Merging #1116 into master will increase coverage by 0.31%.

@@            Coverage Diff             @@
##           master    #1116      +/-   ##
==========================================
+ Coverage   96.65%   96.97%   +0.31%
==========================================
  Files          49       49
  Lines        2185     2444     +259
==========================================
+ Hits         2112     2370     +258
- Misses         73       74       +1

Continue to review full report at Codecov.

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


No icon / desktop entry for the TUI version

Hello!
For the programs that i have installed I prefer to have icons too, besides their names and descriptions, so that they are more user friendly, easier / faster to recognize and I can pin them to the start menu's Favorites section, the desktop or the task bar for quick and fast access.
Unfortunately for this program, the TUI and the simple-TUI doesn't have any icon / entry in the start menu.
I understand that it's not common to create icons / desktop entries for command line interfaces, but at the moment I cannot make up my mind which one i prefer to view stats (the GUI or the TUI) and it would be really nice to be able to find both of them in the start menu and from there to be able to either pin them to the desktop or the task bar or just click to open them.
I know that htop monitor, which is a TUI too, has an icon / desktop entry in the menu and can be opened from there with a click.
While opening its icon is also visible in the task bar.
And I assume it can be used as an example on how to create a desktop entry for a programs that runs in the terminal and probably this is its desktop entry file:
https://github.com/htop-dev/htop/blob/main/htop.desktop
At the moment I can click on the Htop icon in the start menu, or on the desktop or on the task bar and open it in the terminal.
For this program I have to open the terminal, type "amdgpu_top" and click enter.
It would be nice to be able to open the TUI version of this program as simple as I can do it with Htop.
I installed this program (v0.1.10 ) on Debian 12 + KDE Plasma 5.27.5 (on Wayland session)
So, what do you think, is this a good idea, to have another entry, maybe with a text like "AMDGPU TOP (TUI)" and an icon?
For me, the icon could even be the same as long as the name have this GUI / TUI distinction.
As for the simple TUI version, I have no idea if I would want an icon / desktop entry for that too, as I don't see myself using it much, but I don't think I would mind having and entry for that too in the menu, hopefully closed to the other two.
Thank you!

Added amdgpu_top-{smi,tui}.desktop.
But, I did not want to add desktop menu entries without thought, so I did not include them in the package.
I thought it would be better for users to install it themselves in ~/.local/share/applications.
https://github.com/Umio-Yasuno/amdgpu_top/commit/6ffc41e1b522b469a4b730e6818327c92b315d64

Added amdgpu_top-{smi,tui}.desktop. But, I did not want to add desktop menu entries without thought, so I did not include them in the package. I thought it would be better for users to install it themselves in ~/.local/share/applications.
6ffc41e

Cool, thank you!
But to be sure I understood correctly what I should do...
I need to download them from Github and put them into that folder?
That will create shortcuts just for my user, not for all users on the system, current and future ones, right?
It doesn't look that hard, but doing it for multiple computers (desktops / laptops) and for family / friends computers might become a hassle.
Is it possible that that they can be embedded in the .deb file, but not installed by default?
Like to be installed only if the .db file was installed with some specific argument, let's say --shortcuts or -s?
Such as:
sudo apt install --shortcuts ./amdgpu-top_0.2.3_amd64.deb
Or
sudo apt install --shortcuts ./amdgpu-top_0.2.3_amd64.deb
That way after installing / reinstalling the OS on my computer or ther computers I can skip the download files and copying them into that folder part and just remember to add an argument when I install the program.
Sorry if I ask too much!

I assume the SMI and TUI modes of amdgpu_top are to be run from a terminal.

I assume the SMI and TUI modes of amdgpu_top are to be run from a terminal.

That's ok, but some of the user, myself included, don't mind to have some graphical shortcuts, like in the start menu to open those commands in a terminal.
Like I previously mentioned, Htop is TUI and work in a terminal too, but it also has an entry in the start menu to save me from opening the terminal and writing "htop" + pressing enter.
Having it in the start menu means that I can even add it as a shortcut to the task bar or to the desktop.
Which allows us to compress the "open terminal" + "type command" + "press enter" to a single or double-click.
Anyway, it was just an idea.
Maybe it would make more sense one day if this program gets more functionality and that' needs to be splitted in more different tools or with different arguments so there are more entries and these can be grouped like in Windows in a folder.
Thanks for the great work!


python311Packages.pyfume: 0.2.25 -> 0.3.0

Changelog: https://github.com/CaroFuchs/pyFUME/releases/tag/0.3.0
Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] 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/)
24.05 Release Notes (or backporting 23.05 and 23.11 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

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

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

4 packages built:

python311Packages.fuzzytm
python311Packages.fuzzytm.dist
python311Packages.pyfume
python311Packages.pyfume.dist


Vdswitches tagging ui

Tagging UI for vSphere distributed switches
Links
https://www.pivotaltracker.com/n/projects/1613907/stories/130368515

@miq-bot add_label ui, enhancement, wip, providers/vmware/infra

@miq-bot assign @dclarizio

@jameswnl - please review

@lgalis do you have screen shots? Or it'll be the same as https://github.com/ManageIQ/manageiq/pull/11406?

@jameswnl  - screenshot added

@lgalis How are we going to come to this page? Are we going through a menu bar item "Policy->Edit tags" like e.g. tagging a VM?
The page looks good to me 👍

@jameswnl - yes - select the switch in the Infrastructure->Networking tab, either in the list or by selecting the switch details - there will be a Policy->Edit Tag menu available. Adding a screenshot for that above.

@miq-bot remove_label wip

Euwe Backport details:
$ git log
commit e3fe4b06465dd30fb7d834aa11961d0dea8e76fa
Author: Dan Clarizio<EMAIL_ADDRESS>Date:   Mon Sep 26 10:28:35 2016 -0700

    Merge pull request #11508 from lgalis/vdswitches_tagging_ui

    Tagging UI for vSphere distributed switchesVdswitches tagging ui
    (cherry picked from commit 73a8bd21e612297274998fa4dc518bb8b02fe66c)


Rename components

Closes https://github.com/oacore/reader/issues/20https://github.com/oacore/reader/issues/20

@viktor-yakubiv There was nothing to review.


High power consumption -> not possible to run via battery

I measured the power consumption of the sensor in a setup with an ES8266 NodeMCU and found it to use (on average) 80mA. One of the main reasons for the high power consumption is the WiFi that is always on. Therefore, using a battery as power source is not suitable except you want to change the battery very often. This is a problem when there is no outlet nearby or you don't want to use a cord. According to the docs of the sensor it should be possible to use the deep sleep mode of the ESP and wake it up when someone passes the sensor:

I'll just leave this here as a suggestion for further development of the algorithm 🙂 (Maybe I am able to find a solution on my own, but I have to learn a lot about ESP programing until I reach this point)
Link to the docs: https://www.st.com/resource/en/user_manual/dm00474730-vl53l1x-api-user-manual-stmicroelectronics.pdf

I know that the consumption are very high, however I wanted to always have the sensor connected to the wifi, in order to minimize the time that passes between passing under the sensor and turning on (or off) the light.
I know that turning on and off the wifi should be almost immediate, however I think that even at that point the consumption given by the VL53L1X sensor and the ESP itself (with wifi off) make it impossible to connect the whole device to a battery and have a long battery life. However, if you manage to create a sensor that works with battery and has a long battery life (at least a few months I would say), let me know

I know that the consumption are very high, however I wanted to always have the sensor connected to the wifi, in order to minimize the time that passes between passing under the sensor and turning on (or off) the light.
I know that turning on and off the wifi should be almost immediate, however I think that even at that point the consumption given by the VL53L1X sensor and the ESP itself (with wifi off) make it impossible to connect the whole device to a battery and have a long battery life. However, if you manage to create a sensor that works with battery and has a long battery life (at least a few months I would say), let me know

The delay between passing the sensor and turning on/off the light is definitely a disadvantage when it comes to turning off the WiFi to save some battery. In addition (as you said) the consumption of the sensor + ESP itself with wifi off is still high. So that is another challenge.
I'll let you know if I managed to create a sensor with a long battery life (long = > 6 months) and a delay that is acceptable. But I see some challenges here so let's see.

The delay between passing the sensor and turning on/off the light is definitely a disadvantage when it comes to turning off the WiFi to save some battery. In addition (as you said) the consumption of the sensor + ESP itself with wifi off is still high. So that is another challenge.
I'll let you know if I managed to create a sensor with a long battery life (long = > 6 months) and a delay that is acceptable. But I see some challenges here so let's see.

Is there a way to use zigbee with the esp32/esp8266?

Is there a way to use zigbee with the esp32/esp8266?

Here is a library to connect atmega328 with cc2530.
https://github.com/VertorixAU/Vertorix_VT1100_Mini


Question about classloader

Hello team，I am learning about how pinpoint works. And I hava the following questions.

why PinpointBootstrap class should be loaded by BootstrapClassLoader，why not SystemClassLoader？As we know， main class is loaded by SystemclassLoader.
why modify the parent of AgentClassLoader to BootstrapClassLoader？why it can avoid deadlock and avoid library conflicts？how does it work？
why plugins require a separate pluginsclassloader，why not use agentclassloader？
Look forward to your reply，thanks.

why PinpointBootstrap class should be loaded by BootstrapClassLoader，why not SystemClassLoader？As we know， main class is loaded by SystemclassLoader.

If the agent loads PinpointBootstrap into SystemCl, it cannot instrument the JDK class.

why modify the parent of AgentClassLoader to BootstrapClassLoader？why it can avoid deadlock and avoid library conflicts？how does it work？

There is no circular dependency because ClassLoader hierarchy is much simpler.

why plugins require a separate pluginsclassloader，why not use agentclassloader？
I think it is not good for plugin to access all APIs of Agent.

Advantages
  - Easy to manage API compatibility
     Only maintain compatibility with bootstrap APIs.
  - Better security

Even if the library in the agent has a vulnerability, it is difficult for an attacker to attack.
       I have a lot of experience with RCE(Remote Code Execution) attack on struts2.
Therefore, security is a top priority.

Disadvantages
  - Increase complexity


Adding Support for SAMS70 SoC

Zephyr already support the SAME70 & SAMV71 SOC's. The SAMS70 is just a cut-down version of the SAME70 so adding support is not that complicated.
We are developing a product based on the SAMS70 so I have a vested interest in getting it officially supported. We already have support in our own fork but would like to upstream the changes. I have attempted this in the past but did not have time or  experience to see it through.
Changes Required

[ ] Add the required asf files for the SAMS70 to the atmel_hal. See: https://github.com/zephyrproject-rtos/hal_atmel/pull/37
[x] Add the pinctrl definitions and headers to atmel_hal [Already Supported]
[ ] Add devicetree  support. Refactor devicetree files so the S70 is the base and the E70 and V71 inherits from it.
[ ] Add support for the SoC. Possibly refactor the E70 & V71 soc code since all three are essentially the same, but perhaps that should be done later.
[ ] Add board support in the form of another variant of the sam_e70_xplained board

I am still pretty new to contributing so, got a couple of questions:

Is adding the board enough to get it tested, or do I have to do something else in that regard?
Do I create a separate PR for each item on the list or combine them into one PR? (Other than the atmel_hal which has to be seperate)
Is anything missing from the list?

Thanks

Hi @mcscholtz ,
Mostly everything is in place to add SAMS70. Your list seems to be everything that needs to move forward with this. The details will be discussed on each PR.
In this process newer drivers won't be accepted. It is more important enable a reference board to build the current drivers with ASF. I recommend add the board with minimal support and not enable all drivers at same time. You need only the serial working to make this. After that, you can enable each driver individually so we can check what could be necessary to include that driver in the tests or sample tests when appropriated. Usually project preference is only enable one board vs one driver since it took time in CI. We add drivers variants to build in CI to avoid get regressions and that may require more than one board or configuration, it depends and it is case by case.
The structure necessary to send this is composed of 2 parts:
P1:
1- make ASF available at hal_atmel on a PR (follow all details mentioned at repo readme)
P2:
1- update west pointing to the hal_atmel/PR as first commit in the series
2- introduce dts changes commit (refactor will be mandatory)
3- add soc commit (refactor for improvements should be made later)
4- add a reference board commit

@nandojve Great thanks. I will get start on this.

@nandojve
About the dts refactoring, could I change the dts files so that there are just 6 of them? like this:
samx7xx19.dtsi,
samx7xx19b.dtsi,
samx7xx20.dtsi,
samx7xx20b.dtsi,
samx7xx21.dtsi,
samx7xx21b.dtsi
Not all peripherals are supported by all devices but they are disabled by default. So unless you turn them on for an unsupported soc it should work well and there will be a lot less files. This will even support samv70 which is also not supported by zephyr currently.
Alternatively you can have something like:
For the SOC's:
sams70.dtsi
same70.dtsi
samv71.dtsi
sams70b.dtsi
same70b.dtsi
samv71b.dtsi
For the different packages:
samx7xj.dtsi
samx7xn.dtsi
samx7xq.dtsi
For the different memory configurations:
samx7x19.dtsi
samx7x20.dtsi
samx7x21.dtsi
Then you can combine them to make different configurations. This will prevent you from trying to enable for example use can1 on a same70j device since it is only supported by n or q devices. Or prevent you from trying to enable ethernet on sams70. However there will be an error regardless so are all of these combinations really worth the extra complexity over a generic one?
Let me know how you think I should proceed with this.

Hi @mcscholtz ,
The main idea of these is create a tree. This means that it starts from the root device samx7x and grow to many directions. In the board only a leaf of this tree should be chose, ideally speaking.
The way I was thinking is:
1- Rename current same70 to samx7x. It is important do the rename to not lost history.
2- Create the new same7x file and move all non common nodes.
3- Update current files accordingly. We still need to keep the SoC model
4- No need to differentiate the package. The pinctrl binds the driver with pins and since the entry is not available that makes impossible to use the peripheral.
5- About the memories, this is more complex because customer can define cache etc and that reduces the amount of SRAM. You can have a generic definition to be included in a final dts file which represents the PN.
6- We still need to have the A/B variants.
At end, in the mainline we try reuse must we can and give some flexibility to customer pick what is important to create their own custom board. What we can not do is create gaps to have inconsistencies. Having the memory and B variation apart give flexibility to avoid the majority of the issues.


How to add database drivers for connections?

Thanks for developing this awesome piece of software. It was something I wanted for a long time.
I'm using docker and want to connect MySql databases. It looks like the driver is not included in the image. How can I add the driver? Thanks again.

I was able to connect to Mysql. Connected to the docker image, downloaded the driver to /LIB lib and restarted the container.
From Webspoon, I need to connect to my database repository. Created the connection, tested it. The connection is successful however when I want to connect to the repository I get:
"You don't seem to be getting a connection to the server. Please check the path you're using and make sure the server is up and running."
My repository 3306 port is available, the connection for database repository is ok. Why am I not getting connected? Is it something related to PDI 8.0?
Thanks in advance if you provide a hint?

I was gonna tell you this way (copy the JDBC driver to /lib, then restart).
Alternatively, you can create a new Docker image based on hiromuhota/webspoon:latest-full.
The new Dockerfile should look like
FROM hiromuhota/webspoon:latest-full
COPY mysql-connector-java-5.1.45-bin.jar ${CATALINA_HOME}/lib/mysql-connector-java-5.1.45-bin.jar

I encountered a similar error when I was testing DB repository, which I resolved somehow.
Let me try to remember what it was.

I quickly tested with a PostgreSQL-based DB repository and it worked.
One notable difference between postgresql and mysql is that the driver for postgresql is placed at $CATALINA_HOME/webapps/spoon/WEB-INF/lib and that for mysql is at $CATALINA_HOME/lib.
Can you move the driver for mysql to $CATALINA_HOME/webapps/spoon/WEB-INF/lib and try again?

Thanks. I am trying right now.

Well, It turned out I put it in that directory at the first time:
/usr/local/tomcat/webapps/spoon/WEB-INF/lib
That's why my connection to the database was ok. I am using <IP_ADDRESS> version. Could it be that 8.0 version is looking for a newer repository version?

Could it be that 8.0 version is looking for a newer repository version?

I don't think so because Database repository is no longer supported hence no reason to change the dependent version of MySQL.
What would happen if you use Spoon of 8.0 version?

What would happen if you use Spoon of 8.0 version?
-- Well, we do not know. The version we have has been working just fine. They added so many things that either we do not need or made the whole thing more complex.  We do not use the BI server. I am not big fan of their interface either but I am willing to put up with it if I can make webspoon work.
I am used to mysqldump our reps to production and with this version we need to run DI server?

Please test it with Spoon of 8.0. If it works, this issue is webSpoon-specific. If it doesn't, it is an issue of Spoon itself.

I am used to mysqldump our reps to production and with this version we need to run DI server?

This could be an alternative way, but please test it with Spoon first.

I will try it but 8,0 is not in the sourceforge and my build from the source failed. If you know anyother place I can download it, please let me know.
But here is the thing; I am able to connect to the database so it means it connection works. I can also get data using a table input step using another connection. I think it is related to webspoon but the definitive answer will come after I downloaded the 8.0.

8.0 is also hosted by sourceforge and downloadable from https://sourceforge.net/projects/pentaho/files/Pentaho 8.0/client-tools/pdi-ce-<IP_ADDRESS>-28.zip
Most of the webSpoon’s source code is identical to Spoon’s.
So whenever I get an error on webSpoon, I have to check if the error can be reproduced on Spoon unless I can deny the possibility.
Please try Spoon and tell me how it goes.

You were right. I got the same error connecting to the same rep. However, I was able to connect to another rep without any issue. So there should be something different in repository that it does not like. Do you have any idea?

I checked the rep version "SELECT * FROM r_version". The one that it is working has 5.0 and the other one is 4.0. It seems like it is expecting at least 5.0 rep version. I created a blank rep and checked the version and it was 5.0. The old one needs be upgraded to make it work.

Thank you for testing with Spoon.

The old one needs be upgraded to make it work.

I found a similar issue in (the old) Pentaho Forums: https://forums.pentaho.com/threads/156321-Error-upgrading-repository-from-4-4-0-to-5-0-1
According to the post, you can upgrade a database repository by

Create new empty repo using 5.0.1
Export 4.4.0 repo
Import into 5.0.1

If this method does not help, please consider asking a help in the old Pentaho Forums or the new Vantara Community as this is an issue of Spoon instead of webSpoon.

Thanks for researching it for me. You steps works as expected.


Put the checksum (md5/sha1) on the website, not CDN

A small request. Currently, the MD5 is available for download on the same CDN as the actual tgz files. The CDN is an untrusted source, so the checksum is best hosted independently, on techfiles.online directly.
And, a sha256 would be better too.

For the next quarterly builds, sha256sum's will be generated as well.  However, the way they are delivered on the site will be the same as now in that the packages/checksums are stored on my webserver, and they will be pushed to the CDN.  This process will not change.
If this is a problem for anyone, the solution if you do not trust my packages or checksums, or the way I deliver them via the site, is simply - do not use my packages.  In this case, please feel free to build Zimbra yourself so that you can be 100% trustworthy of it.

I'm happily using your packages.
The thing is that CDNs can (theoretically) be compromised. And then they can alter both the package and the digest.

Theoretically they could do the same with my webserver.  So it's no different, there can always be some risk somewhere, if not the server or CDN, then BGP route poisoning or other things.  We cannot control that either.

Checksums for sha256 are now available on the site for the packages created during Q1.  MD5 checksums have now been removed, since there is no point offering both when sha256 is better anyway.  These files have also been pulled from my server to the CDN, and will still be downloadable in the same way as it always has been.
The use of a CDN is normal, and the use of one also ensures a higher level of security for my server of which I will not be compromising on.  All downloadable content from my site will always be via the CDN and never directly from my server (for security reasons).


paper_trail show full changes.

When I create a record with a large number of fields, in history change I get the the short text.
create [contract_number = 555, contractor = 55, subject_contract = 55, amount_contract = 55555555, currency_contract = 974...
How can I show ful text change?

Have a look here: https://github.com/rikkipitt/rails_admin_history_rollback


[MCOMPILER-542] add IT

first draft just contains an IT that checks the issue
after that, it's time to work on a fix...

help wanted for patching module-info.class with asm, please...

help wanted for patching module-info.class with asm, please...

Superseded by https://github.com/apache/maven-compiler-plugin/pull/208

I close it ... we have new PR


Fix Linux numpad shortcuts on web

Issue Link
https://github.com/flutter/flutter/issues/148447
Target
stable
PR Link
https://github.com/flutter/flutter/pull/150723
Changelog Description
Fixes an issue on Web+Linux that prevents users from inputting data using the numpad.
Impacted Users
Users that use Flutter web apps on a Linux machine
Impact Description
Numpad keys are ignored on web apps running on Linux.
Workaround
Before running the app, ensure "num lock" key is disabled. When the web app is running, enable the numpad and it will work normally.
Risk
low
Test Coverage
yes
Validation Steps
No response

https://github.com/flutter/flutter/pull/150723 merged


Investigate case when no cells die (set Bernoulli parameters to 1)

See if parameter estimation goes up. Ideally, make a new figure that shows what happens when the Bernoulli parameter increases while keeping everything else fixed.

Still an issue.


Commit behaviour when using kgo.DisableAutoCommit()

We have a use-case where we want to manually commit messages that are processed in a consumer group using CommitOffsetsSync. So as to disable auto-commit behavior we passed kgo.DisableAutoCommit() while initializing the client. We noticed that setting kgo.DisableAutoCommit() would commit the head as the final offset when we would close the consumer. After brief exploration we found that https://github.com/twmb/franz-go/blob/ae169a1f35c2ee6b130c4e520632b33e6c491e0b/pkg/kgo/consumer_group.go#L1814 would be called and it commits offsets till head.
Our expectation when passing kgo.DisableAutoCommit() is that only manual commits are possible. I am curious to know why the library chooses to commit till head as the final commit when the consumer is closed.

Good find, I'll remove this.

Wait, coming back to this, I don't think this is a bug. I misread the issue originally -- I thought you were saying the client was committing automatically in LeaveGroup even though you had autocommit disabled, but that doesn't happen.
With autocommit disabled, the goroutine is not started. updateUncommited updates the head offset always, so that when you call UncommittedOffsets(), you have the latest offsets that you have polled available to commit.
When you close the consumer, OnPartitionsRevoked is called. With autocommit disabled, there is no commit here anywhere.
What's the confusion here?

Marked records are only relevant for AutoCommitMarks. Marking records is a no-op when you have disabled autocommit (and MarkCommitRecords documents that).
If you disable autocommit, all offsets you poll are always available / always what you receive when you query offsets (via UncommittedOffsets(), or CommitUncommittedOffsets()).
CommitMarkedOffsets() can be changed to be a no-op if autocommit is disabled, but this is just an added safety check -- the docs all currently dissuade you from using any mark APIs unless you've opted into AutoCommitMarks.
I'm not sure what the question is at this point -- do you need to switch methods? Is something else wrong here?

Your explanation is correct and ideally the library's user shouldn't be calling Mark related methods when autocommit is disabled as it is documented as a suggested usecase pattern in your docs as well. Maybe this is a more API border decision related issue since under the hood the library is considering UncommittedOffsets as MarkedOffsets when using CommitMarkedOffsets(). Uncommitted offsets and marked offsets are different in the case of auto-commit disabled. The library is assuming CommitMarkedOffsets() is only going to be used in the context of auto-commit. In that case maybe an error should be returned when using an abstraction like CommitMarkedOffsets() when auto-commit is disabled? Or it could be a no-op just like marking records is currently.

Sure.... I'll make the mark functions no-op.


ModuleNotFoundError: No module named 'helper_ply'

ModuleNotFoundError: No module named 'helper_ply'
Can you release helper_ply which is mentioned in tool.py?

helper_ply was added


Convert OpenGL from Docbook to CommonMark

This issue tracks the conversion of /doc/builders/packages/opengl.xml from Docbook to CommonMark per RFC 72.
If you intend to work on this conversion, please comment below!
Conversion instructions

Comment here that you intend to work on it. (Please also post if you stop working on it.)
Checkout a new branch of nixpkgs master.
Edit doc/builders/packages/index.xml: change opengl.xml to opengl.section.xml.
Rename doc/builders/packages/opengl.xml to opengl.section.md.
Convert the contents from Docbook to CommonMark. Follow conversion best practices. Use existing .md sections for inspiration.
Use nix-build from the doc/ folder to build the manual.
Preview the manual on your computer at http://<IP_ADDRESS>:8000/manual.html after running from doc/ folder:

nix-shell -p python3 --run 'python3 -m http.server --directory ./result/share/doc/nixpkgs'

When it looks good, submit a PR and reference this issue.

I think I can do this.


Add option to presume the issue number as one

This seems like the simplest solution to the missing issue number problem. If there is no issue number and the option is selected (false by default) then when the archive is loaded, the issue number "1" is added.

My issue with this is that we already have this option.
  -1, --assume-issue-one, --no-assume-issue-one
                        Assume issue number is 1 if not found (relevant for -s).

It is restricted to auto-tagging specifically because it is not always correct and if you are in the GUI interactively searching / auto-identifying an issue you can type the number 1 easily enough. Sure it's a little annoying but if you want the fully automated approach that is provided via the auto-tagging feature.

I forgot/missed that was already in there. Blinders on.
I think changing the pop up message with auto-identify would be a good idea then. Right now, if you only read the message "Can't auto-identify without an issue number (yet!)" it seems like it's not possible at all. Auto-identify the function vs auto-identify in general (a subset required for auto-tag etc.). Adding a "You can use Auto-tag with 'Assume issue number is 1 if not found' option if desired." make sense?


Error when running the example code provided in the blog post from section VI.4 - Practical example

Hello,
I attempted to run your example from your blog post here:
I copied the section from V - Practice
In that file, I inserted the sample implementation for the generate_token() function, described in the same section, where the token is generated with hashlib.md5(str(t).encode()).hexdigest().
Then, I tried to run the scripts provided in section VI.4 - Practical example, both for the detection example and the sandwich attack scenario.
The given expected output using the generated command for the detection example is:
# >><EMAIL_ADDRESS># $ reset-tolkien detect<PHONE_NUMBER>892c39716477efb579538c -d "Wed, 27 Mar 2024 15:10:18 GMT" --prefixes<EMAIL_ADDRESS>--suffixes<EMAIL_ADDRESS>--hashes="md5" --decimal-length 6
# The token may be based on a timestamp:<PHONE_NUMBER>.352686 (prefix: None / suffix: None)
# The convertion logic is "md5,uniqid"

In my case, both scripts to generate the reset-tolkien cli input worked, but using the generated cli input resulted in the following error:
docker run --rm -it --net=host -v "$PWD:/reset-tolkien/" reset-tolkien:latest detect 49a7edd5011a2cd9578f6900588afc4d -d "Thu, 20 Jun 2024 03:02:29 GMT" --prefixes<EMAIL_ADDRESS>--suffixes<EMAIL_ADDRESS>--hashes="md5" --decimal-length 6
The token may be based on a timestamp:<PHONE_NUMBER>.408737 (prefix: None / suffix: None)

Traceback (most recent call last):
File "/usr/local/bin/reset-tolkien", line 33, in <module>
sys.exit(load_entry_point('reset-tolkien==1.1.1', 'console_scripts', 'reset-tolkien')())
File "/usr/local/lib/python3.10/site-packages/reset_tolkien-1.1.1-py3.10.egg/resetTolkien/cli.py", line 317, in main
formats=Formatter().export_formats(formats)
File "/usr/local/lib/python3.10/site-packages/reset_tolkien-1.1.1-py3.10.egg/resetTolkien/format.py", line 80, in export_formats
raise ValueError(f"No partial name found : {format}")
ValueError: No partial name found : functools.partial(<bound method Formatter.prefix_suffix of <resetTolkien.format.Formatter object at 0x74665d6d1030>>, prefix=None)

Thanks @alehresmann for this issue.
The error occurs because of the way I retrieve the name of partial functions with a regex. This bug should only appear when using the tool locally, as in your example with the docker.

Fixed in #10


How to enable for Spigot/Paper Servers?

Hi there,
I currently followed the instructions as listed on the Modrinth page by updating the level.dat file in the world folder and added the jar to the world/datapacks folder, but it doesn't appear to work for Spigot/Paper servers. Any idea why that might be the case or how to get it to work? When I enter in the following command, I see the following in the console:

ImJayzus issued server command: /datapack list
Found non-pack entry './Creative/datapacks/no-trial-chambers-1.2.jar', ignoring

Server Version: 1.20.4
Server Type: paper-1.20.4-446.jar
World Name: Creative

Didn't realize there was different versions. Downloaded the "Datapack" loader version instead of using the "Fabric" loader version and that fixed it. Thanks for the the tutorial and mod/datapack!


Enable config ServiceInstance weight and provide WeightedLoadBalancer

@OlgaMaciaszek Hello, I am resubmitting a new PR from #1103 , which all commits cherry picked and squashed

Fixes gh-1063.

Hello @OlgaMaciaszek, comments and checkstyle are fixed, but there is still a points of contention:
Should we add an interface method `getWeight` and use field `weight` to record the weight of `ServiceInstance`, but not use `metadata` directly.

In the earliest version, I had tried use metadata directly. But as we can see, in our current use cases, metadata is never updated, so each time metadata.getOrDefault("weight", "0") called will get same string value, to use it in LoadBalancer we must use 	int weight = Integer.parseInt(instance.getMetadata().getOrDefault("weight", "0")); to parse to int value, it's slowly and unnecessary.
As for why could user set weight in constructor and setter but not always read from metadata, is considered that LoadBalancer could be static (no service discovery). In this condition, if we request must use metadata to pass weight, the user side code will be complicated and ugly
// Set weight with metadata
var metadata = new HashMap<>();
metadata.put("weight", "100");
// var metadata = Collections.singletonMap("weight", "100");
var instance = new DefaultServiceInstance("instanceId", "serviceId", "localhost", 80, false, metadata);

// Set weight without metadata
var instance = new DefaultServiceInstance("instanceId", "serviceId", "localhost", 80, false, metadata, 100);

We should create a new interface and implementation, that way we don't use metadata and don't pollute the base interface and default impl

We should create a new interface and implementation, that way we don't use metadata and don't pollute the base interface and default impl

We should create a new interface and implementation, that way we don't use metadata and don't pollute the base interface and default impl

Hello, @spencergibb , in the earliest version, I had tried this solution by providing another interface named WeightedServiceInstance, but I don't know what to do when ServiceInstance is not an instance of this interface. Here is the commit link(https://github.com/spring-cloud/spring-cloud-commons/pull/1103/commits/f9ccc10ec9d85df1e312778ec456c6de084350b1).

The DefaultServiceInstance probably should not have any methods regarding weight. Maybe the WeightedLoadBalancer could handle the instances and use some default behaviours when the instance is not a WeightedServiceInstance? Also, please include a proposal defining the instance weight by the users (via properties?) to the PR.

The DefaultServiceInstance probably should not have any methods regarding weight. Maybe the WeightedLoadBalancer could handle the instances and use some default behaviours when the instance is not a WeightedServiceInstance? Also, please include a proposal defining the instance weight by the users (via properties?) to the PR.

Hello, @OlgaMaciaszek. This may not be the main use case for Spring Cloud.
Some traditional enterprises do not have complete cloud infrastructure, including service registration, service discovery and api gateway, or they use RMI-style registry, but do not support RESTful-style service registration (this is what I have experienced). However, when integrating between such systems, it is necessary to avoid single points of failure through load balancing.
Here is an example of the code, I used ConfigurationProperties to autowire from a yml file
@Data
@Component
@ConfigurationProperties(prefix = "service")
public static class ServiceProperties {
    private Map<String, List<DefaultServiceInstance>> instances;
}

service:
  instances:
    hello-world:
      - instance-id: instance-1
        service-id: hello-world
        host: <IP_ADDRESS>
        port: 8080
        weight: 200 # 2 cores
      - instance-id: instance-2
        service-id: hello-world
        host: <IP_ADDRESS>
        port: 8080
        weight: 400 # 4 cores

After that we can create a LoadBalancer Bean that gets the name from the environment and the list corresponding to the name from our properties
    @Bean
    ReactorLoadBalancer<ServiceInstance> weightedLoadBalancer(Environment environment,
                                                            ServiceProperties serviceProperties) {
        String name = environment.getProperty(LoadBalancerClientFactory.PROPERTY_NAME);
        List<ServiceInstance> instances = new ArrayList<>(serviceProperties.instances.get(name));
        return new WeightedLoadBalancer(new SimpleObjectProvider<>(new StaticServiceInstanceListSupplier(name, instances)), name);
    }

    class StaticServiceInstanceListSupplier implements ServiceInstanceListSupplier {
        private final String serviceId;

        private final List<ServiceInstance> instances;

        StaticServiceInstanceListSupplier(String serviceId, List<ServiceInstance> instances) {
            this.serviceId = serviceId;
            this.instances = instances;
        }

        @Override
        public String getServiceId() {
            return serviceId;
        }

        @Override
        public Flux<List<ServiceInstance>> get() {
            return Flux.just(instances);
        }
    }

The DefaultServiceInstance probably should not have any methods regarding weight. Maybe the WeightedLoadBalancer could handle the instances and use some default behaviours when the instance is not a WeightedServiceInstance? Also, please include a proposal defining the instance weight by the users (via properties?) to the PR.

I thought about it, because all instances are offered by the same supplier, we can assume that all weighted or unweighted. So we could peek the first element to check whether weighted, if not we could delegate to RoundRobinLoadBalancer to do unweighted choose.

Here is an example of the code, I used ConfigurationProperties to autowire from a yml file

We'll need to make it usable for all our users before merging, so the PR should include changes that will allow for mapping weight values provided by the users in properties for instances (based on instanceId, but I am thinking based on zone or on other specific metadata value might be useful) without them having to create their own configurations; let me know if you have any idea on how to handle this - if not I could try come up with sth.

How to get/set weights from the registry depends on the registry and discovery client implementation, including Spring Cloud Eureka, Spring Cloud Consul and Spring Cloud Kubernetes.
Here is an example that apisix working with Eureka, it uses eureka.instance.metadata-map.weight. As my original issue #1102 , it uses metadata to set weight of the service instance when instance started.

This is not part of this PR. That the code snippet just a simple what user would be when using WeightedLoadBalancer without service registry and discovery client.

Yes, and it's something that needs to be implemented (use with SR) before we merge it.

Hello, @OlgaMaciaszek . I have a better idea.
As @spencergibb said, we can provide a WeightedServiceInstance interface and DefaultWeightedServiceInstance as default implementation, which all behaviors are delegated but weight related not.
And then, maybe we don't need a LoadBalancer to choose the best weight/currentWeight instance, but we could move to WeightedServiceInstanceListSupplier. WeightedServiceInstanceListSupplier has a final field Function<ServiceInstance, Integer> weightFunction, which used to calculate the weight of instance, and if weightFunction is not given, we read the
weight from metadata
	private final Function<ServiceInstance, Integer> weightFunction;

	public WeightedServiceInstanceListSupplier(ServiceInstanceListSupplier delegate) {
		this(delegate, METADATA_WEIGHT_FUNCTION);
	}

	public WeightedServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, Function<ServiceInstance, Integer> weightFunction) {
		super(delegate);
		this.weightFunction = weightFunction;
	}

After that, weight related is as same as HintBased, ZonePreference and SameInstancePreference, we provide two method in builder withWeighted() and withWeighted(Function<ServiceInstance, Integer> weightFunction) to decide how to map the weight of instance.

Function<ServiceInstance, Integer> weightFunction

To avoid unnecessary boxing and unboxing, it should be IntFunction<ServiceInstance> weightFunction

Hello, @OlgaMaciaszek , I submitted some changes, PTAL.

Split weight related methods to WeightedServiceInstance.
Remove AtomicInteger getCurrentWeight() method, using WeightedLoadBalancer::calculateCurrentWeight instead.
Allow user setting ToIntFunction<ServiceInstance> weightFunction to calculate the weight of instance. If not given, we will check whether instance of WeightedServiceInstance. At last, we will try to calculate weight from metadata, if not set in metadata, it will be DEFAULT_WEIGHT.

Hi @jizhuozhi - thanks a lot. I'm away for a few days - will get back to it next week.

Hi @jizhuozhi - thanks a lot. I'm away for a few days - will get back to it next week.

Hello, @OlgaMaciaszek , no problem, I will continue to think if there is a better solution

Hello @OlgaMaciaszek , I've made two main changes since the last discussion.

I tried removing the new interface and just using the weightFunction to calculate the weight of the instance, this helps keep it as simple as possible
I limit the maximum number of samples each time choose is executed to avoid slowing down the execution of the program due to too many instances.

Here is the optimized microbenchmark, we can see that for very many instances, the performance can remain stable, and the unit test can ensure that the distribution accuracy can reach 99.9% in the case of concurrency.
Benchmark                                                                  (hostCount)   Mode  Cnt       Score       Error  Units
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChoose                        1  thrpt    5   55385.974 ± 14624.403  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChoose                       10  thrpt    5   54463.344 ± 12883.199  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChoose                      100  thrpt    5   42551.335 ±  9318.646  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChoose                     1000  thrpt    5   45279.520 ±  4289.937  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChoose                    10000  thrpt    5   43439.806 ±  9629.446  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChooseConcurrently            1  thrpt    5  193488.917 ± 17728.115  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChooseConcurrently           10  thrpt    5  187978.163 ± 43241.231  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChooseConcurrently          100  thrpt    5  172112.049 ± 51418.301  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChooseConcurrently         1000  thrpt    5  157070.282 ± 51588.981  ops/s
WeightedLoadBalancerBenchmarkTests.weightedLoadBalancerChooseConcurrently        10000  thrpt    5  160940.176 ± 68303.753  ops/s

Thanks, @jizhuozhi - will review next week.

Hello @jizhuozhi - sorry for not getting back to you earlier. I think using a WeightedServiceInstanceListSupplier instead of resolving the weight in the LB is a very good idea; could you redraft your PR with this kind of approach? When it comes to passing the weight in the metadata, I understand the pain point of unnecessary parsing, but I'd rather do it and have all the supported SD systems work with this model than not. I agree that instance weight can be final, but I think in order to serve currently supported SD systems (Netflix Eureka, Consul, Zookeeper -not an SD, but also Kubernetes), I thoughut we'd need to get the initial weight value from the metadata. I'm happy to consider a different proposal, but please make sure it would work with all the supported SDs without the need of introducing changes to them.

Hello @jizhuozhi - sorry for not getting back to you earlier.

Hello, @OlgaMaciaszek, don't mention it.
Using a WeightedServiceInstanceListSupplier is my initial idea, but when I implemented it I moved it to the WeightedLoadBalancer. Because if I move the weight calculation logic to another class, then the problem will go back to the origin, how can I make WeightedLoadBalancer get this value without modifying the interface.
As for unnecessary parsing, after this period of trying, this may not be a pain point at present, because through micro-benchmarks, we could see the performance overhead caused by this may be minimal. If performance becomes the bottleneck, then I prefer to use a custom weightFunction with cache, which is reserved for enough room for improvement.
How to calculate the weights no longer seems to be the main problem, so now the problem that needs to be solved is how to store this constantly changing current weight. The current implementation is to use ConcurrentHashMap, but this may cause memory leaks, and if weak references are used, it will bring accuracy problems. So it's still debatable.

how can I make WeightedLoadBalancer get this value without modifying the interface and ensure that users can always complete the configuration with minimal changes.

You could verify if it is a WeightedInstance - if not, just use some default weight that could be set by properties.

The current implementation is to use ConcurrentHashMap, but this may cause memory leaks, and if weak references are used, it will bring accuracy problems.

Maybe you could do a quick analysis and some benchmark testing of the solutions you're considering with their drawbacks and advantages, put a summary and then we discuss it here to pick the best one?

You could verify if it is a WeightedInstance - if not, just use some default weight that could be set by properties.

Like this?
https://github.com/spring-cloud/spring-cloud-commons/pull/1111/commits/1293960d7752ebc9f37db7836a339c2f99bce383#diff-10d2beb0bc9a6e3eb81e639e73d5c3583c58421faefa6058a1a2a033c87a64f9L132-L140
The reason was described at https://github.com/spring-cloud/spring-cloud-commons/pull/1111#issuecomment-1185483682

Like this?
Yes, like this, just making sure to include some kind of default for non-weighted instances.

Like this?
Yes, like this, just making sure to include some kind of default for non-weighted instances.

Thanks, I will revert it.
The final point of contention is how to store the current weights after each calculation and ensure that no memory leaks occur. Do you have any good idea?

The final point of contention is how to store the current weights of mixed instances after each calculation and ensure that no memory leaks occur.

Hello, @OlgaMaciaszek , the final solution is to check the type of ServiceInstance.
If ServiceInstance is an instance of WeightedServiceInstance, then use the getCurrentWeight method of the instance directly, otherwise save it in ConcurrentReferenceHashMap (with Collections.synchronizedMap(new) WeakHashMap >()) is equivalent), the accuracy will be sacrificed at this time, but it is guaranteed that there will be no memory leaks.
PTAL, thanks.

Thanks, @jizhuozhi - will take a look this week.

Hello @OlgaMaciaszek, thanks for reviewing. Actually there is a concern here, if it is acceptable I will close this PR and resubmit.
For the solution of expanding the list by weight in the supplier, it is a feasible solution, which runs very fast, and can avoid the swarming problem by shuffling the cards.
I'm worried about a very large heap memory usage for large weight lists. Although the occupied space can be reduced by the greatest common divisor, because of formula $n + 1 \equiv 1 \pmod n$, once there are two adjacent numbers, the gcd will be invalid.

Yes, @jizhuozhi , please do create one based on a Weighted ServiceInstanceListSupplier. For memory issues, one other thing that could be considered is caching; we use it already for cached load-balancing, providing a default Evictor-based caching and a production-appropriate Caffeine-based caching (see [CachingServiceInstanceListSupplier](https://github.com/spring-cloud/spring-cloud-commons/blob/main/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/core/CachingServiceInstanceListSupplier.java)). Maybe for the WeightedServiceInstanceListSupplier we could use some kind of opt-in only caching mechanism as well, to allow people move from a ConcurrentHashMap to a proper cache if they need to in production? We'd have to POC to verify if it makes sense, though.


linux-ota: update need reboot sentinel path

We now use the aktualizr upstream sentinel file for knowing when the
device needs a reboot, so reflect that in our docs.
Signed-off-by: Ricardo Salveti<EMAIL_ADDRESS>

Docs for f4637693be4eca2601c955f3041d755e4fef1862 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/287/docs/artifacts/html/index.html


Sof 1135/threadedclass stability improvements

TSR is bumped to 2.1.8 (https://github.com/tv2/tv-automation-state-timeline-resolver/pull/36).
Logs have been improved:  Errors are now assigned to the data meta key, instead of each character in the stringified error being a key-value pair on the log object.
Minor refactors of code.

Codecov Report

Merging #179 (1feb461) into master (cd4e164) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #179   +/-   ##
=======================================
  Coverage   69.64%   69.64%
=======================================
  Files         307      307
  Lines       34876    34876
  Branches     4761     4761
=======================================
+ Hits        24290    24291    +1
+ Misses      10130    10129    -1
  Partials      456      456

Impacted Files
Coverage Δ

meteor/lib/lib.ts
68.81% <100.00%> (+0.53%)
:arrow_up:

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


How to Matrix Multiplication in CKKS

I want to perform operations like this：M*Enc(A)=Enc(AM),and A,M are Matrixs. But I can't find the class of the matrix，and CKKSEncode and multiply_plain can only be used for vectors . Is there a better way to multiply matrix numbers? Thanks.

If you have no constraint on how the right-sided matrix Enc(A) must be encoded, then the fastest way is to column-encode it, and encode M by replicating each of its values #columns time. Then computing each row of Enc(A*M) can simply be done with constant multiplications and additions (or plaintext multiplications and additions if more than one row can be stored in a ciphertext).


Remove restriction on the number of component datasets can be created via multi-assay split

Related card: https://github.com/hubmapconsortium/entity-api/issues/614
We want to remove any restriction for number of component datasets created

See this relevant PR: https://github.com/hubmapconsortium/entity-api/commit/59dc58ac4b0a93b4d2d8137a3b8b75d7e048a7a7

[ ] Need to double check if any update is needed in Ingest API


[calibre-web] Change ingress to $http_connection to repair the login

resolves #1050

Thanks, I've added the changeling and version bump to allows the build to proceed