Transactions don't work with async/await

I'm migrating a pretty big codebase to use async/await and ran into problem with making rusqlite work.
I understand why Connection is not Sync and normally i would use a Mutex to hold a connection in a multi threaded environment, but in this case i'm holding a reference to a Connection and &T: Send is not Send.
playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c25f81c48a319e5fbaf88b79ac1989eb
use rusqlite;
use tokio; // 0.2.13

fn main() {
    let rt = tokio::runtime::Runtime::new().unwrap();

    let handle = rt.spawn(async {
        let conn = rusqlite::Connection::open_in_memory().unwrap();
        let tx = conn.transaction().unwrap();
        async {
            // do something async
        }
        .await;
        tx.execute_batch("SELECT 1").unwrap();
        tx.commit();
    });

    rt.block_on(handle).unwrap();
}

Hmm. In general, &T: Send tends to imply T: Sync -- if you can send a reference to something to another thread, it has to allow concurrent use. There are reasons we don't support this (see #342 -- some SQLite APIs are not thread safe, even when compiled with fully thread safety).
That said, I do think usability in async contexts is important to support, so I'll look into this.

@thomcc that makes sense!
My current strategy is to begin/commit transactions manually (by sending BEGIN and COMMIT through regular Connection struct) while storing a Connection in a Mutex and locking/unlocking inside an async function when needed

Are you able to use Statement across await? I'm guessing not... I know of a solution for Transaction (make transaction hold &mut Connection. Sadly this requires killing the new unchecked_transaction API, which has valid use cases... That said it's new so not that big of a deal I guess...)
It would be nice to fix the general problem though -- I suspect fixing that would mean many other APIs don't work still.

But what point to use blocking code (all sqlite code is blocking) in async context?
fsync may takes ages in some circumstances.

rusqlite doesn't provide an async API, please use spawn_blocking.

(This also roughly relates the question raised at https://github.com/rusqlite/rusqlite/issues/188#issuecomment-631169811 the other day).
From some discussion, I've heard that doing blocking operations on async worker threads is a big problem, and that it's probably good that rusqlite behave as it does currently, as a way to signal to users that they're doing something very wrong.
In the mean time, you should either follow @xfix's advice (use spawn_blocking), or if that is is not-viable, perhaps you could use the sqlx crate, which seems to make SQLite async by performing IO on a background thread.
Eventually there's a reasonable chance that similar async support will become desirable for rusqlite (I suspect Firefox may eventually need it...), but there are no short term plans for this. (And if this happens it wouldn't be the default though, it would be behind in a feature; or possibly even a separate rusqlite-async crate).
Because of all that I'm going to close this as works-as-intended for now, even if it's a bit surprising.

If you use tokios task::spawn_blocking, isn't this the same problem (InnerConnection is not Send)?:
std::cell::RefCell<rusqlite::inner_connection::InnerConnection> cannot be shared between threads safely`

Connection should be send even if InnerConnection isn't (https://github.com/rusqlite/rusqlite/blob/master/src/lib.rs#L316). What API exposes the RefCell in a way where this matters?
Worth noting that sqlx might be a better choice if you need to use sqlite and async. It's somewhat deliberate that rusqlite is awkward to use in this context, as blocking IO is bad here.
(At least, that's what people more experienced with async tell me is good to do)

@broccolihighkicks
This is correct, SQLite is not thread-safe, connections cannot be shared with other threads. Use a connection manager or use a mutex.

Worth noting that sqlx might be a better choice if you need to use sqlite and async. It's somewhat deliberate that rusqlite is awkward to use in this context, as blocking IO is bad here.

sqlx is extremely slow with SQLite, up to 500% slower than rusqlite in my tests.
spawn_blocking is also not an option in cases where you need to call async functions during transaction as async is not possible within spawn_blocking.
Currently there doesn't seem to be any good way to use SQLite in async Rust.

Worth noting that sqlx might be a better choice if you need to use sqlite and async. It's somewhat deliberate that rusqlite is awkward to use in this context, as blocking IO is bad here.

sqlx is extremely slow with SQLite, up to 500% slower than rusqlite in my tests.
spawn_blocking is also not an option in cases where you need to call async functions during transaction as async is not possible within spawn_blocking.
Currently there doesn't seem to be any good way to use SQLite in async Rust.

Do you have any suggestions?

Do you have any suggestions?

I'm attempting to create async-wrapper for rusqlite based on actor which runs inside std::thread::spawn and keeps Connection and Transaction there. Actor can receive closure via mpsc. Closure takes Connection or Transaction as parameter and is run within the thread, returning result via oneshot channel.
This would fix the main problem of sqlx which is really high async overhead, as each query is separate async task: The closure can run any number of queries with fixed async overhead per closure.
This would also allow running async operations during transaction:

start transaction
run closure against transaction
run other async code
run other closure against transaction
commit

I'm attempting to create async-wrapper for rusqlite based on actor which runs inside std::thread::spawn and keeps Connection and Transaction there. Actor can receive closure via mpsc. Closure takes Connection or Transaction as parameter and is run within the thread, returning result via oneshot channel.
This would fix the main problem of sqlx which is really high async overhead, as each query is separate async task: The closure can run any number of queries with fixed async overhead per closure.
This would also allow running async operations during transaction:

start transaction
run closure against transaction
run other async code
run other closure against transaction
commit

That sounds cool. If you need something concrete to make stuff easier for that use case, feel free to file issues.

That sounds cool. If you need something concrete to make stuff easier for that use case, feel free to file issues.

https://www.sqlite.org/asyncvfs.html
A async C FFI was added to SQLite, but did not offer much performance gains over using WAL mode.
Maybe it would be OK for your code just to sync wait until the call returns. Assuming the DB file is in WAL mode (so that fsync calls are batched together and the latency cost is only paid once in every 1000 queries or so (every checkpoint)).

https://www.sqlite.org/asyncvfs.html
A async C FFI was added to SQLite, but did not offer much performance gains over using WAL mode.
Maybe it would be OK for your code just to sync wait until the call returns. Assuming the DB file is in WAL mode (so that fsync calls are batched together and the latency cost is only paid once in every 1000 queries or so (every checkpoint)).

It doesn't seem like calling async functions from spawn_blocking should be a fundamental problem — basically you just want to call the async function without awaiting it, and block (block_on?) until the Future succeeds, right? I'm not sure offhand of the best incantation for this, but it seems doable.

It doesn't seem like calling async functions from spawn_blocking should be a fundamental problem

But if you have a single threaded event loop there is not any point, as the SQLite function blocks it for the same amount of time - no difference between blocking it now for x or blocking it later for x?

But if you have a single threaded event loop there is not any point

Right — if you only have one thread, SQLite will block it, period. Pretty sure there's no way around this without writing your own VFS or something.
I was considering the case where you push the SQLite transaction to a separate spawn_blocking thread, but you still want to call other async functions from that thread, which is now no longer inside an async function itself.

Async rusqlite built on top of rusqlite.
https://github.com/programatik29/tokio-rusqlite


prevent "opener" access to the hosting website

There are some window.open() calls in the code that should be improved in  way where "opener" XSS attacks are made impossible. Just in case, someone hacks your site, for sure people don't want to be XSSed that way. That, by the way, is another reason not to hotlink to your script and instead host it on own webspace.
Keep up the good work!
Further reading:
https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/

Hi Jens,
I now added rel="noopener" to all target="_blank" links. Except links getting opend by javascript, where this is more complicated to secure.


Raise version to match Capacitor standards

Typically, Capacitor 5 plugins have a 5.X.X version code (6.X.X for Capacitor 6). Bumping the version code on this repo would make version 5 support more clear.

Just released a v6 version of this plugin for Capacitor v6


Do not change the repo after a file upload

I have several repos (root nodes) in the file module. After I have uploaded a file in the repo (2nd entry in the dropdown), the file browser jumps to the 1st repo. I would like it to stay in the same repo.

depends on the filebrowser rework: https://github.com/viur-framework/vi-admin/issues/6

Still the same behavior with the new file browser :disappointed:


Landing page -- support

The index page of the server that prints configuration about the server could include an optional HTML fragment so we can add support blurbs for a deployed server.
This could be a HTML snippet that gets injected into the template if it is present. It would provide a support email for our next deployment.

Good idea. The support email should be provided as a Flask configuration option, e.g., SUPPORT_EMAIL.

We need a bit more than support e-mail.  A HTML block to insert
would be describe the site.
Jerome Kelleher<EMAIL_ADDRESS>writes:

Good idea. The support email should be provided as a Flask configuration
option, e.g., SUPPORT_EMAIL.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub*

Sure, whatever works. I just don't want to hard-code in any specific information to the source.

A conf variable pointing the html frag would do the trick.
Jerome Kelleher<EMAIL_ADDRESS>writes:

Sure, whatever works. I just don't want to hard-code in any specific
information to the source.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub*


Create Exponential search in c++

Added exponential search in c++ language

Thanks for appreciating. I will change it by today itself.
On Sat, 8 Oct, 2022, 10:35 pm Aniz B N, @.***> wrote:

@.**** requested changes on this pull request.
Hey Pal,
Thankyou for your contribution.
Changes :

Check your code.
Change the name of the code inside the file to in cpp.c++
Add documentation as comments inside the file itself.

must contain : Time and space complexity .

Happy coding !
—
Reply to this email directly, view it on GitHub
https://github.com/4N1Z/Sorting-Searching-Algorithms/pull/55#pullrequestreview-1135243974,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARMNJN2WDTG32WE2GNKID53WCGSUDANCNFSM6AAAAAARAEPHNM
.
You are receiving this because you authored the thread.Message ID:
@.***>

I have made all the suggested changes please review and merge it @AnirudhDaya

I have made changes as per suggestions . Please review and accept my pr @AnirudhDaya #55

Hii @4N1Z/Sorting-Searching-Algorithms
@.***>  I have
made changes 2 days ago as per your request. Please review and merge my pr
by today.
On Wed, 19 Oct, 2022, 7:33 pm Anirudh Dayanand, @.***>
wrote:

@.**** requested changes on this pull request.
Hey, buddy put it in the appropriate folder.
—
Reply to this email directly, view it on GitHub
https://github.com/4N1Z/Sorting-Searching-Algorithms/pull/167#pullrequestreview-1147642862,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARMNJN3TBXRBRLFRTEW5AVLWD75TNANCNFSM6AAAAAARHGZ7EE
.
You are receiving this because you were assigned.Message ID:
@.***>


Make changing port from cli possible.

Can pass optional argument to npm run dev. like:
npm run dev -- --port 6060 run at port 6060.

@posva  updated.

Actually, this is not necessary once #913 is merged

Well, port detection is more intelligent, but my patch is very light without extra dependency, it provides chance to specify a port anytime .

Hi @UncleBill
Thanks for your PR. However, I just merged port detection, also you can use the PORT env variable as well as the config. That should provide more than enough options to configure this.
So I have to close this PR.


Added TemplateHooks for the protocol plugin.

@emanuelschuetze Oh sorry. Did realize that your review is missing ...


conflicting with @typescript-eslint/adjacent-overload-signatures rule

getter and setters suppose to be kept together,  but it ends up with this order:
export class TestClass {
  get visible(): boolean {}
  get theme(): string {}
  set visible(_val: boolean) {}
}

expected:
export class TestClass {
  get visible(): boolean {}
  set visible(_val: boolean) {}

  get theme(): string {}
}

@luber Would you try 0.2.0 with keepGettersAndSettersTogether: true?

@luber Would you try 0.2.0 with keepGettersAndSettersTogether: true?

Hi. Thanks for quick response. Unfortunately it does not work for me. I have recorded video were I tried to use new version with new option. My IDE is setup to run formatter on each save:

@luber
Thank you for trying it and clear description with video.
Could you order getters and setters manually once? keepGettersAndSettersTogether: true just prevent existing paired getter / setter from split as of now.
I might improve it later to put getters and setters with same name together automatically. But it is somewhat hard because it looks to require completely new mechanism from current ordering.

@seiyab yes, manual sorting does the job.
Thank you for clarification and great plugin :)

Thank you for feedback.
If you can accept more opinionated order, sortMembersAlphabetically can help automatically put getter and setter with same name together.

@luber
Would you try 0.2.1-rc.0? It will automagically couple setters with associated getters even without sortMembersAlphabetically.

@luber Would you try 0.2.1-rc.0? It will automagically couple setters with associated getters even without sortMembersAlphabetically.

Hello, I have installed the latest version:
"prettier-plugin-sort-members": "^0.2.1-rc.0"
in .prettierrc I don't have sortMembersAlphabetically option specified, only "keepGettersAndSettersTogether": true
Unfortunately, when I tried to save changes in test class - the getters and setters were not grouped together:

Hmm... Sorry, I'll investigate it. Thank you for reporting the result 🙌

@luber
I reproduced similar behavior on my VSCode and Developer: Reload Window fixed the problem. Would you try reloading your IDE?
If it even doesn't work, I'd like to see the output for npx prettier path/to/test-class.ts. Thanks.

@seiyab I can confirm that restarting IDE did the trick :) Now it sorted correctly.
The output of npx prettier test-class.ts:
export class Foo {
  constructor() {}

  get menuMode(): string {
    return 'mode1';
  }

  set menuMode(value: string) {
    console.log('menuMode', value);
  }
  get theme(): string {
    return 'dark';
  }
}

Would be nice to have an empty line before get theme(): string {...
Before running prettier it had one:
export class Foo {
  constructor() {}

  get menuMode(): string {
    return 'mode1';
  }

  get theme(): string {
    return 'dark';
  }

  set menuMode(value: string) {
    console.log('menuMode', value);
  }
}

@luber Nice 👍

Would be nice to have an empty line before get theme(): string {

It looks hard. Prettier itself tries to preserve empty line. And for class members, actually it preserves empty line that follows it. For the input, set menuMode(value: string) doesn't have empty line below. So the resulting code neither have empty line after set menuMode(value: string).
FYI, when you add empty line after set menuMode(value: string), Prettier won't strip it.

Anyway, I close this issue as resolved since the original problem is solved.
If you want better empty line behavior, open a new issue. It looks very hard but I might study ways to hack Prettier if you give me ideas and justification. I'd like to get this plugin prettier.


Support for controller model names

get_model_and_version now returns also model name and model code.
fixed typo
description files are now in yaml

@jbarrancos Hi there, may I ask you to merge this PR?

Thx!

@jbarrancos Do you plan a new release?

https://pypi.org/project/pyrainbird/0.5.0/

Great, thank you!


CMake create makefile failed

Hi CNSt. team,
When I run "cmake -DCMAKE_TOOLCHAIN_FILE=${CNSTREAM_DIR}/cmake/cross-compile.cmake ${CNSTREAM_DIR}" , the error happens and output error message as below:
CMake Error at CMakeLists.txt:227 (find_package):
By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SDL2", but
CMake did not find one.
Could not find a package configuration file provided by "SDL2" with any of
the following names:
SDL2Config.cmake
sdl2-config.cmake

Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
"SDL2_DIR" to a directory containing one of the above files.  If "SDL2"
provides a separate development package or SDK, be sure it has been
installed.
Could you help to check whether something wrong with cmake rule or something missing in my environment?
Thanks

So sorry about running into this issue. Please add -DMLU=MLU220EDGE -DCNIS_WITH_CURL=OFF -Dbuild_display=OFF to cmake command. Because SDL2 is used by Displayer module which only designed for X86 graphic desktop

Thanks Lefttyre, I'll try it again.
For future issues, may I rise a issue here or would you leave any way to contact with you or your company engineer?
Many thanks!


Med admin support

Coverage remained the same at 100.0% when pulling 736fb61a90bfbf68860083d0004b53fb262dd2d5 on MedAdminSupport into 6472215cf2e3ab11bba8e300a1ddca009e979767 on master.


Failures testsuite

This is the base of failure test suite

Codecov Report

Merging #38 into master will increase coverage by 6.55%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
+ Coverage   52.36%   58.92%   +6.55%
==========================================
  Files         269      209      -60
  Lines       42151    24372   -17779
==========================================
- Hits        22073    14360    -7713
+ Misses      18140     8474    -9666
+ Partials     1938     1538     -400

Impacted Files
Coverage Δ

cmd/storage-errors.go
0% <0%> (-100%)
:arrow_down:

cmd/admin-rpc-server.go
41.66% <0%> (-27.57%)
:arrow_down:

cmd/routers.go
48.48% <0%> (-18.19%)
:arrow_down:

pkg/ioutil/ioutil.go
24.39% <0%> (-13.11%)
:arrow_down:

cmd/fs-v1-rwpool.go
60% <0%> (-12.42%)
:arrow_down:

cmd/fs-v1-metadata.go
67.74% <0%> (-11.15%)
:arrow_down:

cmd/erasure-utils.go
68.42% <0%> (-9.51%)
:arrow_down:

cmd/bucket-policy-handlers.go
79.48% <0%> (-8.7%)
:arrow_down:

cmd/web-router.go
69.69% <0%> (-8.09%)
:arrow_down:

cmd/admin-rpc-client.go
35.94% <0%> (-7.69%)
:arrow_down:

... and 260 more

Continue to review full report at Codecov.

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


Add Nickname to report header and fix RunQuery bug

Overview

Adds nickname to report header (when present) and fixes a bug that caused errors in RunQuery Dates outside of ApplySpec()
Test Notes/Sample Code

Run example 3.2 in inst/examples/3_ReportingWorkflow.R
Connected Issues

Closes #1878
Closes #1914

Merged main to pick up #1923.

Confirmed that this closes #1925!

Looks good @lauramaxwell! Minor tweak for consistency, otherwise good to go!

updated this minor tweak!


Home Assistant Addon doesn't install from the Plugins store.

I transitioned computers and now I am not able to install the Home Assistant StreamDeck Addon.  Says it is installing, but I close and reopen and it shows as not installed. I am able to install other plugins without issue. Is anyone else having this issue?
thanks

I'm having the same problem, but im not using a new install, the addon just kind of Uninstalled itself and I can't get the adding installed again, I even did a add remove programs on elgotto, reinstalled it, and still have this problem, I was thinking maybe my pc got a virus, dispite no other issues, and was about to reimage my pc when I seen this post.

O_o
Oh no. I will check...

What information is needed to troubleshoot this issue?

I was able to get this working again. I uninstalled the streamlabs app, removed all the folders associated with elgado from %ProgramData% and %appData%.. There were a few, make sure to check all the sub folders for Local, LocalLow, and Roaming. Then I reinstalled the app and it worked. I think there was a folder that kept the install from working. I came to this conclusion by downloading the plugin directly from github. Once I did this, I got a message saying that the plugin is already installed, which prompted me to remove any existing folders and start from scratch.. Good news is that I am working now, just need setup the other pieces again.

Great to hear, this worked for you. I am constantly installing, uninstalling and on-the-fly-exchanging the plugin during development, so it is very hard for me to find out, what happens during an automatic upgrade via store or fresh installs.
Lucky me, this time. @Jfulks2021 Maybe the solution from https://github.com/cgiesche/streamdeck-homeassistant/issues/134#issuecomment-1430119972 works for you, too?

@ImaBadCoder thanks worked perfectly,
@cgiesche mine worked just like ImaBadCoders did
Thanks for the help, too bad I lost my entire setup, but I'll rebuild it. Just glad it's working again


modified values

V1!
I was wondering...
when setting a new value it is added to modifiers.
However if the value before was 'a' and the new value is 'a' it is added to modifiers anyways.
Object is then considered modified (isModified() is true).
What about implementing a fail quietly feature if before and after values are equal? Then isModified would be false.
Does it make sense?

There it goes a test....
console.log(editedPlayer.isModified());
editedPlayer.set('name', "name");
console.log(editedPlayer.isModified());

false
true
console.log(editedPlayer.isModified());
editedPlayer.set('name', "name");
console.log(editedPlayer.getModified());
console.log(editedPlayer.isModified());
--
false
false
console.log(editedPlayer.isModified());
editedPlayer.set('name', "name");
console.log(editedPlayer.getModified(true));
console.log(editedPlayer.isModified());
--
false
false

is it suppose to be like this?

I've just checked it and it works properly, so there is probably an error in your code.

Hi.
I think it has to do with (this) context of viewmodel. I will take a look at that and come back.

V1.
I was checking the code and it might be weird but:
Players list has one Player with name "whatever".
---1
let player = Players.findOne();
player.set('name', "whatever");
player.isModified() // true
---2
let player = Players.findOne();
player.set('name', "whatever");
player.getModified() // {}
player.isModified() // false
is this working properly?
player.isModified() should have been true no?

Hmm how is it possible that the same code returns different results? Show entire code because the way where you use it may influence document somehow.

UPDATE: Oh in deed it's possible. Strange thing, it's probably a problem with clearing modifiers in some of the methods... I will fix it after releasing 2.0

My questions to you might seem strange and weird but this is my day to day life in development 💨
I always find myself in these dark places 👻
I think that is in the clearing modifiers yes. I was going thru the code and I notice that:
lib/modules/fields/modified.js:8
-> what is unnecessary?
I don't have time to go thru your code more (unfortunately)  but my suggestion (and I don't know if it is being already like this) would be to fail quietly  if newValue == oldValue.
Thank you for your patient 👍

With modifiers and setter there was always a problem because of a bad assumption at the beginning of development of Astronomy 1.0. I've entirely changed the way how it works right now and it's paying out with less bugs. There are a lot of things going on with setting values, getting modified values and getting modifiers and changing one little thing can influence some applications. So I have to be very careful about changes. It's necessary, it was an "ugly" fix to a problem somebody had :). The possible solution may be clearing modifiers also in the isModified() method. As I'm thinking about that, it should solve the problem. You can play with it if you want.

I understand better now. I think it might solve the problem. It looks like you have a solution. 👍


Make typing more inclusive for batch_load_fn and cache_map

Changing the typing for batch_load_fn to accept and return Sequence instead of List, and cache_map to be a MutableMapping instead of a Dict.
This is more accurate, and gives more freedom to implementations.

@aawilson, let me know if you have any concerns here.  This is the last change I intend to make before moving forward with the 0.3.0 release.

MutableMapping is great, no notes. Sequence has the very small problem that things like "str" count as sequences,, but afaict the typevars make it impossible to use a Union type here and Sequence[KeyT] etc aren't actually exposed in the Generics so it shouldn't practically be an issue.

MutableMapping is great, no notes. Sequence has the very small problem that things like "str" count as sequences,, but afaict the typevars make it impossible to use a Union type here and Sequence[KeyT] etc aren't actually exposed in the Generics so it shouldn't practically be an issue.

This is a good point though.  In a DataLoader[str, str], the batch_load_fn could incorrectly return a str, since a str is a Sequence[str].  I'll roll back the List -> Sequence, and just make the MutableMapping change.


feat: add option to only detect browser locale on root path

Don't attempt to detect browser's language when user (or crawler) goes
directly to a page with a locale prefix. This is to avoid redirecting
user that potentially wanted to load that specific page rather than the
one matching browser's language.
Resolves #455
Resolves #761
TODO

[ ] Test navigation with already stored locale cookie
[ ] Maybe rename option to onlyRedirectFromRoot (per https://github.com/nuxt-community/nuxt-i18n/issues/761#issuecomment-645989675)

Locale cookie isn't changed - that's definitely needed.
Visit example.com -> redirected to /en (based on accepted-language)
After that visit examples.com/fr -> cookie not changed to 'fr', still kept 'en'.
Visit example.com again -> redirected to /en instead of /fr.
--
'detectOnlyOnRoot' might be better name I think ?
Otherwise looks good!

Locale cookie isn't changed - that's definitely needed.
Visit example.com -> redirected to /en (based on accepted-language)
After that visit examples.com/fr -> cookie not changed to 'fr', still kept 'en'.
Visit example.com again -> redirected to /en instead of /fr.

I'm not convinced.
You are suggesting that opening /fr should update user's detected locale. Why is that?
I would say that stored locale is something more of a user's choice and should remain at the original value even if user somehow ends-up loading page from another locale.
In sites that I work with the locale is detected and store initially on the first page visit and then the user can change through a language selector. I'm not sure it should change on just visiting a page from another locale.

You are suggesting that opening /fr should update user's detected locale. Why is that?

First time user came from search engines to the page ending with /fr (based on localized keywords that he have typed).
That user definitely wanted fr as language and his default locale cookie should set to that so when he gets back directly to the root page this should be redirected to fr (lets say he closed page and came back after 5 minutes).
It doesn't make sense to redirect again based on other factors when he definitely visited that page once before.

I would say that stored locale is something more of a user's choice and should remain at the original value even if user somehow ends-up loading page from another locale.

It's an user's choice that isn't kept at all which should be.

In sites that I work with the locale is detected and store initially on the first visit and then the user can change it through a language selector. I'm not sure it should change on just visiting a page from another locale.

His first visit is from search engines directly to fr page. Does that makes sense now?
Also, any other i18n are just doing what I wrote and honors user choice on page visit.
Thanks!

That user definitely wanted fr as language and his default locale cookie should set to that so when he gets back directly to the root page this should be redirected to fr (lets say he closed page and came back after 5 minutes).
It doesn't make sense to redirect again based on other factors when he definitely visited that page once before.

That's the case when user visits the page for the first time and it makes sense what you are saying.
I was more thinking about user that has already visited the page and then clicked a link to different locale (accidentally or was sent a link or something). Then I would consider changing his choice too invasive.

(accidentally or was sent a link or something). Then I would consider changing his choice too invasive.

It's not too invasive, see how Google handles this:
Visit https://support.google.com/webmasters/?hl=fr  (or Russian for example https://support.google.com/webmasters/?hl=ru)
Close the window and visit https://support.google.com/webmasters/
Language was set to French by only visiting that url.
Nobody mistakenly visits links, even if it happens user could change language later on - it's less annoying or invasive (it's not saved in database or not changing some config files 😄) .

Isn't kept at all? I think it is currently at least. Excluding the initial navigation that sets the cookie based on browser locale, from there I think it doesn't change unless changed explicitly.

Currently this behavior is a temporary fix for crawlers to see page content without redirection, however coming back user will be annoyed to be redirected to en locale when he definitely was browsing fr before.

Do you have any references to other solutions that do that?

Yes, kindly check this library probably it also answers some of the questions regarding prefix_except_default
Thanks!

Well, that's quite convincing but it would be quite a major behavior change for existing users so I'm not sure I can just enable that behavior by default. And tying it to the detectOnlyOnRoot wouldn't make sense, semantically.

Well, that's quite convincing but it would be quite a major behavior change for existing users so I'm not sure I can just enable that behavior by default. And tying it to the detectOnlyOnRoot wouldn't make sense, semantically.

Maybe add a configuration option? I know that you've previously said that won't add some new configurations, however as you could see this definitely needed and everyone could just configure i18n as they want.

@rchl any update on this please?

Sorry but I don't have much time and the time I have I prefer spending somewhere else right now.
I'm not entirely happy about this change and it also needs more testing (in form of tests, for now).
I'll get to it for sure and hopefully sooner than later.
I can release it as beta if you want to try it.

@rchl sorry to bother you again, have you had a chance to find a time to think about this again? Like what might take you happy about this change? This is needed for prefixed strategies to be used primarily for seo optimization. I think that all users will agree for a change, because this is a number one reason to be in search engines, otherwise no reason to make site with different locales when site isnt visible in search engines at all.
Anyways, I've tried to use this branch merged with the master, however it doesn't care about stored cookie at all and always redirects to default locale. Probably this started after that fix on initial load redirection https://github.com/nuxt-community/i18n-module/issues/805
Thanks!

Sorry for delaying this but this change feels like it needs a lot of uninterrupted attention from me so that I have the whole picture clear and manage convert all cases.
It could be that it's simpler case than I think of it and I'm just over complicating it...
It's just hard to get into it. Especially as this last week was busy for me (not easy with a kid that had to say home).

We also ran into this issue with a new site we are developing. The proposed option would solve our issue, but I'm wondering, should the locale in the url not always take precedence?
In my view, if the user entered a url with a certain locale, he probably wanted to view the page in that locale? I do see the case where I follow a link with a certain locale, but I might want to see the page in a different locale. But I feel that, if the site owner would want the second use case to take precendence over the first, they would have chosen a

There are various strategies. Spacing behavior for each would help me progress here:

no_prefix: routes won't be prefixed
prefix_except_default: add locale prefix for every locale except default
prefix: add locale prefix for every locale
prefix_and_default: add locale prefix for every locale and default

Expected (?) behavior with default detectBrowserLanguage settings:

no_prefix: always redirect
prefix_except_default: only redirect from the default (unprefixed) route
prefix: never redirect?
prefix_and_default: only redirect from the default unprefixed route (not from the default prefixed rule)?

(Behavior above applies when the i18n_redirected cookie is missing, of course. Once it's set, we don't attempt to redirect.)
Does everyone agree with that?
I'm not certain about the prefix_and_default case. Whether we should redirect from both unprefixed and prefixed default locale.

Thanks for the quick follow!
These rules look sane to me. I'm wondering however, are you suggesting to drop the onlyRedirectFromRoot option, or is the behaviour that you describe the behaviour only when onlyRedirectFromRoot is not set?

That's the behavior with onlyRedirectFromRoot (or as I called it in this PR, detectOnlyOnRoot).
I will make this new behavior opt-in to avoid breaking changes and then change the default in next major version if it's looking good.

Behavior above applies when the i18n_redirected cookie is missing, of course. Once it's set, we don't attempt to redirect.

@rchl just one kindly question, would it change cookie on visiting localized url ? https://github.com/nuxt-community/i18n-module/pull/799#issuecomment-662005991

I'm not certain about the prefix_and_default case. Whether we should redirect from both unprefixed and prefixed default locale. Same for prefix, should we never redirect or redirect from default (prefixed) locale?

Prefixed routes never should redirect, locale already here it doesn't make sense to try to detect anything (even cookie on that prefixed url)!
Regarding prefix_and_default it should work similarly as prefix_except_default doing redirection only on unprefixed locale url.
Sorry, if I misunderstood it correctly, however what we're looking is indexed site links in search engines and honoring site locale by visiting prefixed url without giving zero information (cookie, browser language and etc).
Thanks!

@rchl just one kindly question, would it change cookie on visiting localized url ? #799 (comment)

Yes, makes sense to update the cookie when not redirecting.

Prefixed routes never should redirect, locale already here it doesn't make sense to try to detect anything (even cookie on that prefixed url)!
Regarding prefix_and_default it should work similarly as prefix_except_default doing redirection only on unprefixed locale url.

I think we agree here then.

Sorry, if I misunderstood it correctly, however what we're looking is indexed site links in search engines and honoring site locale by visiting prefixed url without giving zero information (cookie, browser language and etc).

Yep.

@rchl sorry to ask, is this almost ready or something is left?
Thanks!

Feeling pretty sick this whole week. Planning to have a final look at the code as soon as possible. Wanted to go through https://github.com/mcamara/laravel-localization again as I remember I saw some interesting stuff while reading it but forgot what those were.

Feeling pretty sick this whole week.

Wishing you well. Looking forward to see when you'll feel better!
Thanks!

OK, I think I'm ready to let it go.
Two potential concerns:

This will still be an issue potentially: https://github.com/nuxt-community/i18n-module/issues/761#issuecomment-662100837
I'm wondering whether should there be a mode to redirect from any unprefixed locale URL (with prefix_and_default strategy). I think that is what https://github.com/mcamara/laravel-localization#localecookieredirect is doing and that was my intention initially when creating https://github.com/nuxt-community/i18n-module/issues/455

@rchl you're right, however there is no elegant solution for prefix_and_default , maybe adding a note about that it's really hard to give correct language or do some redirection which in fact affects SEO dramatically.
Search engines dislikes whenever route redirection/content changes and it makes them sick. Basically for SEO optimized website important thing is static content URLs that always kept same, if it changes duplicates are created and pages will be removed after that.
Hopefully I understood your concerns well.
Thanks!

Will release tomorrow morning so that I'm available if something breaks.


Default folder preference

If I could make a suggestion: I would like to choose which folder the adder uses for storing.

There is also a setting in the put.io account preferences for setting a default folder when you add from the site. Would be even better if the adder just used that setting.

Actually, I take it back. It does work with the default setting in my put.io account. I guess you could maybe close this one...


[RFC] Do not use root as default user [WIP]

Connecting to containers as root causes issues with permissions when using cp-remote to sync files, or running commands without realising.
If the build user were to be connected to instead, file permissions for new files would be correct and commands that would create new files in the wrong places (e.g. cache directories owned by www-data) would fail but not cause a site outage.
Invocations of container that need to do privileged things like install software with apt-get, would have to be re-run as sudo container instead.
This would be a breaking change as if people are using container setup, for example in a continuous-pipe.yml, they would need to update it to be sudo container setup.
Either we run container with sudo or we need to go around adding sudo to all commands we run that expecting to be root.
Downstream images will need to switch to root and back again to do their current software installations in their Dockerfiles but we could encapsulate this into container calls as build, e.g. container install_packages one two three would do sudo apt-get update; sudo apt-get install one two three; sudo apt-get clean; # etc
What do you think we should do?

sounds ok, but the app user should be used more in some contexts.

e.g. if running a PHP script as build user, then that PHP script has write access to the code


Moved logo resolution to public as Vite does not seem to be resolving…

… properly.
Closes #
Changes proposed in this pull request:

...

No longer needed. Issue was NGINX not serving svg's correctly.


Unable to deal with non-UTF-8 filenames

Fusepy was recently modified to treat all filenames and metadata as Unicode strings instead of byte strings. This works when filenames are UTF-8, but breaks when filenames or other metadata contain byte sequences that are not valid UTF-8 characters.
As I originally reported here, user code should be written to deal with bytes, not the other way around. On POSIX operating systems, file paths are NOT specified as being UTF-8 or any specific Unicode encoding. The only correct way to deal with filenames on Unix is to treat them as byte strings. Most software I've seen treats them as UTF-8, but at the file system level, they are binary strings and any FUSE implementation would be broken if it didn't support non-UTF-8 filenames.
In other words, I need to be able to cd to a FUSE-mounted file system, open Python 3, and type this:
>>> import os
>>> open(b'd\xe9j\xe0_vu.txt', 'w').close()
>>> os.listdir(b'.')
[b'd\xe9j\xe0_vu.txt']

In most shells, if you ls this file, it will display as d?j?_vu.txt. But it is a perfectly valid Latin-1-encoded filename. If fusepy encoded the filename as a Unicode string before sending it to the user code, it would either throw an exception in this case, or corrupt the filename.
The current version of fusepy (the GitHub version) breaks this assumption. Commit 2590f48 adds an 'encoding' argument to the FUSE constructor, and then decodes all the bytes values to strs with this encoding before giving them to the user-supplied operations, and encodes all strs supplied by user code before giving them back to the operating system. Unfortunately, it isn't a correct solution to simply say "pick an encoding before you start". File systems must be able to support different files with different encodings on their names.
If you run memory.py and then perform my above example, you get this:
Traceback (most recent call last):
  File "fuse.py", line 402, in _wrapper
    return func(*args, **kwargs) or 0
  File "fuse.py", line 410, in getattr
    return self.fgetattr(path, buf, None)
  File "fuse.py", line 640, in fgetattr
    attrs = self.operations('getattr', path.decode(self.encoding), fh)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 2: invalid continuation byte

Alternatively, create the b'd\xe9j\xe0_vu.txt' file somewhere on a normal drive, and then run the loopback.py example on the directory containing that file. Attempting to 'ls' the directory results in this exception:
Traceback (most recent call last):
  File "fuse.py", line 402, in _wrapper
    return func(*args, **kwargs) or 0
  File "fuse.py", line 586, in readdir
    if filler(buf, name.encode(self.encoding), st, offset) != 0:
UnicodeEncodeError: 'utf-8' codec can't encode character '\udce9' in position 1: surrogates not allowed

First things first: I have created a relatively incomplete test script which is in my tests branch. It tests mounting the memory filesystem and creating a binary filename, and this test currently fails in both Python 2 and 3. (Note that this test passes in Python 2 on the latest Google Code version of fusepy, SVN r65.)
I have also prepared a branch which fixes this issue in the ideal way for me: bytes. This branch removes all of the encode/decode calls and the encoding parameter to the FUSE constructor. All Operation methods accept and return plain bytes objects. This is ideally the way it should work. I have made sure this works on Python 2.7 and 3.2 (with 2to3). Note that I have updated the memory, loopback and context examples, but not the sftp example, as I was unable to test it.
However, it may be too drastic to accept this change: for one thing, it breaks on Python 2.5 and earlier, because it introduces b'' notation. (This is necessary to properly run on Python 3.) For another thing, it may break existing users who have adopted the Unicode strings in the current version.
I have thought a bit about another less drastic solution: work the way that Python 3's os.listdir works. The Python docs explain a bit about how this works here. Basically, byte strings are converted into unicode strings, but if any bytes are invalid in that encoding, they are replaced with U+DCxx where xx is the byte value. This is a bit hacky, but it allows the user to deal with Unicode strings, and then roundtrip properly back into bytes objects. Fusepy could employ the same technique on Python 3 when sending and receiving strings from the user's Operations methods. It is easy to implement: just call encode and decode with errors='surrogateescape'.
However, this only works in Python 3. In Python 2, you should absolutely not be encoding filenames and metadata as Unicode strings, because the Python 2 str type allows you to represent binary data but treat it as text.
If you go with this approach, I would also like the option of using bytes in my own code. Perhaps if I call the FUSE constructor with encoding=None, it will deal with bytes objects, and if I specify an encoding, it will use surrogateescape?
I'm happy to help work on the solution to this problem. I recognise that my branch is not a final solution, but the start of a discussion (which is why I haven't made a pull request). But I think it is necessary to resolve this issue in one way or another, because the current behaviour makes it impossible to implement a robust filesystem, and that is unacceptable to me.

So.. After three-years, have we fixed the Unicode support in any regard?

@dsoprea Perhaps you are right. @s-m-e was pushing me to do more drastic changes and I was digging in my heels a bit for fear of breaking backwards compatibility. Hearing you (someone with a relatively popular fusepy dependent project) push for a fix that potentially breaks backwards compatibility makes me reconsider my initial stance.
This project got caught in the early Python 3 zeitgeist of Unicoding everything, regardless of whether it actually made sense for the given use case or not. I did the same thing with a lot of my projects around the same time too.

I would like to fix it "the proper way," as you put it. Just to be sure we are on the same page, here is my vision of fixing this properly: I think @mgiuca was 100% correct. Since fusepy is POSIX system boundary code, then forcing Unicode conversions pretty much anywhere in fusepy is broken behavior. I would instead just use raw bytes for everything. 99.999% of the time the filepaths can be totally opaque and the code doesn't need to care at all what is actually inside the bytes objects. The only time anyone should care what is inside bytes objects is when working with paths, but even that isn't very hard since the os.path module in Python 3 supports both bytes as well as (Unicode) str objects. If it is just clearly understood that everything returns bytes all the time, then callers of the library can simply convert to Unicode if/when they need it. fusepy should avoid making any decisions about encoding/Unicode until the last possible moment by leaving it up to the user/caller.
Is that what you meant by fixing it properly, @dsoprea, or are you intending something else? I want to make sure we are on the same page.
Since I am moving the project to Semantic Versioning, I think such a change would be considered a major version change, since I would guess that it breaks backward compatibility. @dsoprea How would you deal with the breaking change in your project? Would you just lock off on a previous version of fusepy until you could make sure your project worked with the updated fusepy version?
Sidenote: @mgiuca has the beginnings of a testsuite for fusepy that we can use to exercise the code and make sure that we don't cause regressions moving forward.

Yep.  Kind-of like future for fusepy. Then, when do actually do a release to the next major version, flip the default to returning bytes. Major versions in SemVer are allowed to be backwards-incompatible anyway (as you said). Just put a loud warning in the documentation that brings this to peoples' attention ahead of time. It's going to still hurt people that have a > or >= for their pip requirement, but we've done our best to mitigate it and we all know how often Google and other large brands indiscrimantly break projects with backwards-incompatible changes. It's unfortunate, but you just have to be wise with how and when you do it.
My second suggestion (or, arguably, the alternative to the above) is that you might maintain two separate branches for six months or a year in order to show grace to the legacy integrations while providing people the newer implementation to develop/verify against. I'd put the new sexiness on the master branch and legacy on a branch. Most of your risk is going to be package use, not from people cloning the project. Then, since you're developing on two different branches, you can also maintain two different version series (2.x and 3.x, legacy and new) and push off both branches. If consumers can't deal with the overhead of reintegrating against the mainline packages, they can just be careful to stay on the legacy series.
Make sure you get Terence's to transfer his PyPI project, by the way.
I think those unit-tests should be our first, highest priority. What we've been talking about is probably the riskiest activity that you're going to have to deal with on this project and there's already enough potential for user disruption without introducing bugs through a lack of even minimal unit-test coverage. You can make them minimal, but they can also emphasis type-checking of inputs (make sure they're strings) and outputs (make sure strings are being returned, at least until the next step when you change how the outputs are handled) since we know this is going to be potentially problematic.
No strategy is going to be perfect. Just focus on things that will both minimize risk and maximize your ability to find and squash bugs when they happen.

@dsoprea I like your approach: have a switch to get proper behavior now, then change the default behavior at the next major release. If someone still needs the previous "unicode-y" behavior, they can explicitly flip the switch back again. It leaves a immediate upgrade path for people who want the bytes behavior now, and a good "downgrade" path for those who wan the Unicode behavior moving forward.
I agree that we need to testing in place first. It can be a very basic framework, but enough that we can add new test cases as needed would be enough to get us started.

My 2 cents: Filenames are not binary blobs.
In the old days, my windows partition had filenames encoded in iso8859-1, and it was really frustrating when filenames showed up with a bunch of � in the middle of it. Later on I learned that I could add iocharset=iso8859-1 to the mount options and my filenames were nice again.
Apparently this is no longer necessary to set the iocharset manually on a FAT partition, but this ilustrates that filenames are text, and the kernel will even perform charset encoding/decoding.
That said, if you really want to work with raw bytes, why not?
I suggest we update FUSE and FUSELL with 2 new methods, encode and decode, which will be no-ops if encoding is set to None.
If that works for you, I can write a PR

@paulo-raca I agree, I believe we should try to encourage encoding the filenames, but if someone wants to deal with binary because they know best or they need to perform their own decoding based on path or some other fallback encoding scheme they should be able to do so.


Fix linting errors presumably causing Circle CI fail following commit 613f650

Apologies, I neglected to run composer run-script test prior to my last pull request ... There were some extra spaces lying about.
Running  composer run-script phpunit and composer run-script coverage rely on class WP_Mock which is no longer in the vendor dependencies, so I assume those scripts aren't currently in use.
Let me know if I should be doing anything else for QC though prior to pull requests.

Thanks @janicak - no need to apologize, that's on me for not setting up CircleCI properly to run the right tests on PR's!
Yes, no WP_Mock in this project, it exists in wp2static/static-html-output-plugin, which actually has some phpunit tests. I'll be bringing those along with some other changes from that project into this one. I may have fixed up the dependencies in an open development branch here, but have been away for a while, looking fwd to getting that branch and some other changes merged in to make things a bit smoother here.


";/l.kjhngfdeswaq\

Are you attempting to report a malfunctioning keyboard? ;-)

haha, yes, apparently.  My screen was black and I was just trying to wake things up.  Closing.

No problem, these are fun - not many are... ;-)


Project path deduplication no longer happens

Prerequisites

[X] Put an X between the brackets on this line if you have done all of the following:

Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description
Atom is no longer deduplicating project paths when a request to open a path is made, this means that you open multiple windows to the same location instead of focusing the current window.
Steps to Reproduce

Open a folder in Atom
Open the same folder again

Expected behavior:
Atom simply focuses the instance that is already open.
Actual behavior:
Atom v1.25.0-beta0 opens a new window on the same folder, so there are now two windows open to the same folder.

Reproduces how often:
100% of the time.
Versions
OS: Windows 10 x64 Enterprise
Atom    : 1.25.0-beta0
Electron: 1.7.11
Chrome  : 58.0.3029.110
Node    : 7.9.0
apm  1.19.0
npm  3.10.10
node 6.9.5 x64
atom 1.25.0-beta0
python 2.7.14
git 2.16.1.windows.4
visual studio 2015

Also tested with the following as a point of comparison:
Atom    : 1.24.0
Electron: 1.6.16
Chrome  : 56.0.2924.87
Node    : 7.4.0

Additional Information
I know I've seen discussions related to this in one of the other issues or PR's, but my search-fu is failing me!

Note: Although opening is only shown through a PowerShell in ConEmu, the same behavior happens in native Command Prompt, PowerShell, and simply right clicking in a folder and selecting "Open with Atom" multiple times.

I know I've seen discussions related to this in one of the other issues or PR's, but my search-fu is failing me!

Ugh I feel like I saw this mentioned recently too but don't remember where 🤔
I can repro on Windows 10 and it looks like Max is taking a look :zap:


build: Fix error rootProject path when integrating reactnative as the…

Summary
hermes-engine rootProject will cause error path when manually building
The scene
MY_PROJECT
├─android
└─third_party
│      └─react-native
│ build.gradle.kts
│ setting.gradle.kts

hermes-engine will regard MY_PROJECT as rootPrject
val REACT_NATIVE_DIR = "$rootDir/third_party/react-native"

include(":MY_ANDROID_PROJECT")
project(":MY_ANDROID_PROJECT").projectDir = File("$rootDir/packages/embedded/android")

include(":ReactAndroid")
project(":ReactAndroid").projectDir = File("$REACT_NATIVE_DIR/ReactAndroid")

include(":ReactAndroid:hermes-engine")
project(":ReactAndroid:hermes-engine").projectDir = File("$REACT_NATIVE_DIR/ReactAndroid/hermes-engine")

include(":packages:react-native-codegen:android")
project(":packages:react-native-codegen:android").projectDir = File("$REACT_NATIVE_DIR/packages/react-native-codegen/android")

includeBuild("$REACT_NATIVE_DIR/packages/react-native-gradle-plugin")

// React Native
//includeBuild(REACT_NATIVE_DIR)

Test Plan
No test plan, it just modified the path with the same result and pass the ci

Hi @Nawbc, thanks for this. Can you help me understand what the issue was and how this fixes it? Also, can you please provide a summary, changelog, and test plan?

@charlesbdudley I reedit the pr

hermes-engine rootProject will cause error path when manually building

Thanks for pointing this out.
The correct fix is not to use new File("$projectDir/../../sdks/download"). You'll have to create a function that returns you the root folder like the following: (that's pseudocode).
return if (rootProject.name == "react-native-github")
   // Building RN root project
   rootProject.dir(".")
else
   // Building a project using RN from source
   rootProject.dir("node_modules/react-native/")

@cortinico but the rootProject is read-only, how to modify it https://docs.gradle.org/current/dsl/org.gradle.api.initialization.Settings.html#org.gradle.api.initialization.Settings:rootProject

@cortinico but the rootProject is read-only, how to modify it

You don't need to modify it 👍

You'll have to create a function that returns you the root folder like the following: (that's pseudocode).

I mentioned root folder, not root project.

@cortinico
new File("$projectDir/../../sdks/download") is not important, but https://github.com/facebook/react-native/blob/58a2eb7f37c2dc27ad3575618778ad5b23599b27/ReactAndroid/build.gradle#L286
https://github.com/facebook/react-native/blob/58a2eb7f37c2dc27ad3575618778ad5b23599b27/ReactAndroid/hermes-engine/build.gradle#L37
will make the building crash(it will get wrong ReactCommon, jsi path),  and how can i custom my directory if react-native is not under 'rootProject.dir("node_modules/react-native/")', like this
MY_PROJECT
├─android
└─third_party
│      └─react-native
│ build.gradle.kts
│ setting.gradle.kts

@Nawbc why have you closed this PR?

@Nawbc why have you closed this PR?

I will create a new one later


Environment extends map

Environment extend Mapping
Improved Environment test coverage
ignoring python 2 code coverage when running python 3 tests and vice versa

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

:exclamation: No coverage uploaded for pull request base (r2.0@de43fc8). Click here to learn what that means.
The diff coverage is 97.29%.

@@           Coverage Diff           @@
##             r2.0      #35   +/-   ##
=======================================
  Coverage        ?   99.52%
=======================================
  Files           ?        4
  Lines           ?      211
  Branches        ?       15
=======================================
  Hits            ?      210
  Misses          ?        0
  Partials        ?        1

Impacted Files
Coverage Δ

src/sagemaker_containers/collections.py
100% <100%> (ø)

src/sagemaker_containers/__init__.py
100% <100%> (ø)

src/sagemaker_containers/environment.py
99.36% <96.87%> (ø)

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 de43fc8...37cb196. Read the comment docs.


Added opt_in_out script.

Ticket: 53808
Added opt_in_out script.

@popovaan, please close this PR if it is no longer needed


drivers: can: use flags fields for can_frame and can_filter structs

The can_frame and can_filter structs support a number of different flags (standard/extended CAN ID type, Remote Transmission Request, CAN-FD format, Bit Rate Switch, ...). Each of these flags is represented as a discrete bit in the given structure.
This design pattern requires every user of these structs to initialize all of these flags to either 0 or 1, which does not scale well for future flag additions.
Some of these flags have associated enumerations to be used for assignment, some do not. CAN drivers and protocols tend to rely on the logical value of the flag instead of using the enumeration, leading to a very fragile API. The enumerations are used inconsistently between the can_frame and can_filter structures, which further complicates the API.
The CAN_EXTENDED_IDENTIFIER and CAN_STANDARD_IDENTIFIER definitions from the CAN controller driver API are reused directly for ISO-TP structure members, which leads to a very fragile design of this API. The ISO-TP layer must be responsible for its own definitions where needed. This PR replaces the "id_type" ISO-TP struct member with a well-known abbreviated "ide" bit (Identifier Extension Bit) struct member.
The discrete flags are converted to bitfields with separate flag definitions for the can_frame and can_filter structures. This API allows for future extensions without having to revisit existing users of the two structures. Furthermore, this allows driver to easily check for unsupported flags in the respective API calls.
As this change leads to the "id_mask" field of the can_filter to be the only mask present in that structure, rename it to "mask" for simplicity.
With the above changes in place, we can add test case for verifying that CAN-FD format frames cannot be sent in non-FD mode, which fixes #50776.

The main driver behind the change from discrete struct members to using a flags bitfield was the discoveries made by testing the proposed change in #50769. This revealed that older CAN code (written before the introduction of CAN-FD support in Zephyr) did not explicitly set the value of the fd and brs members in struct can_frame before calling can_send() (since these struct members where not present when the code was written). These fields were thus uninitialized and could take on either a value of 0 or 1, leading to failures once the CAN driver started to actually check those fields properly.
Moving to a single flags field will allow for future extensions without similar breakage.


Autocompletion gives me @react.react.component

If I type @react. and then press enter on the autocomplete suggestion “react.component”, I end up with @react.react.component.

Fixes https://github.com/rescript-lang/rescript-vscode/issues/152


Is there a way to make it where it changes .get("") to [""]

This for example
if (json.has("user")) UserImpl(json["user"], json["user"]["id"].asLong(), ydwk) else null

I think this is sufficiently outside the scope of ktfmt, which outside of a few exceptions, doesn't touch anything but white space.


bug( ): Readme.md mentions REMOTE_DEV.md but no file exists

Describe the bug
The Readme.md references a REMOTE_DEV.md instructions but it doesn't exist in the repo.
https://github.com/chanzuckerberg/single-cell-data-portal/blob/main/REMOTE_DEV.md

Looks like we replaced it with a google doc here: https://github.com/chanzuckerberg/single-cell-data-portal/pull/1653
We currently have documentation on Atlassian, Google Docs, and GitHub.  When do we choose which?

Is it intended that the Google Doc requires permission to access, maybe it just needs to be made public.

Closing as the README has been cleaned up.


TS error: Can't assign Layer to Container

I'm getting a lot of annoying TypeScript errors in my project when I attempt to use the @pixi/layers package with Pixi.js 6.0.4. This seems to be the root cause in https://github.com/pixijs/pixi-layers/blob/master/index.d.ts#L79
Property 'renderCanvas' in type 'Layer' is not assignable to the same property in base type 'Container'.
  Type '(renderer: ILayeredRenderer) => void' is not assignable to type '(renderer: CanvasRenderer) => void'.
    Types of parameters 'renderer' and 'renderer' are incompatible.
      Type 'CanvasRenderer' is missing the following properties from type 'ILayeredRenderer': _lastDisplayOrder, _activeLayer, incDisplayOrder, _oldRenderts(2416)

I'm unsure how to fix this problem as I'm new to TypeScript (and am ready to abandon it shortly with how much of a pain it's been over normal js so far, tbh...).
EDIT: Commenting out the line makes the error go away. I'm sure that's not how this is supposed to be fixed, but that's a workaround I guess for now...

I keep getting that error too. Its not really typescript's fault, just a type incompatibility between PIXI's default stage (PIXI.Container) and the Stage offered by pixi-layers.
Instead of commenting out something in a dependency (your change would be gone on next npm install), you could add // @ts-ignore one line before error (there would be a few more)

Oh, that's a new bug I have introduced :) gonna fix it

published 1.0.6 , plesae try again

That did indeed fix the problem. Thanks!

Instead of commenting out something in a dependency (your change would be gone on next npm install), you could add // @ts-ignore one line before error (there would be a few more)

Oh I'm fully aware of how dependancies work. I'm not new to the NPM game, just TS specifically. And I was irritated that I would have had to put a @ts-ignore on like five consecutive lines because every time I added another Layer to the Stage, ts was throwing the error. (And it was nearly midnight and I was cranky, and I've already had quite a few more annoyances with ts than this.)
But anyway, thanks for the fast response.


chore(main): release 1.0.1

:robot: I have created a release beep boop
1.0.1 (2024-04-12)
Bug Fixes

docs: add compatible vue versions (591af42)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/jhoermann/flagsmith-vue/releases/tag/v1.0.1 :sunflower:


Needs table in database

As per the readme on the following line
Creates a new model folderAncestor which contains the ancestry information

I am getting a sequelize error stating that the table folderAncestor does not exist in the database.

Also does it require to have the column HierarchyLevel present in the database. As per my understanding this column will be dynamically added.

was able to fix the issue by using children instead of descendants in the query.

Hi,
I'm currently encountering a similar issue.
Went exactly by the examples in the readme file
This example -
 // get entire hierarchy as a nested tree
folder.findAll({ hierarchy: true })

works as expected, but the next one
// get all the descendents of a particular item
folder.find({
    where: { name: 'a' },
    include: {
        model: folder,
        as: 'descendents',
        hierarchy: true
    }
)

Fails with this error
"name": "SequelizeDatabaseError",
"message": "ER_NO_SUCH_TABLE: Table 'folderancestor' doesn't exist"

Another attempt with the result of the first (successful) example was to use the getDescendents() method. This resulted with the same error
I'm using all default values, names and options - folder.isHierarchy() only.
MySQL, sequelize 3.30.4 (latest 3.x)
Do I actually need to create this table before hand...?
What am I missing here?


Allow specifying extraPackages

Rebased by mistake; squashed and force-pushed on main
https://github.com/juspay/github-nix-ci/commit/aa95c01a6f37f216b68f914ce494c4c9ae4e6fa1


Feat: Appwrite version upgrade

What feature?
Currently, the application is running on Appwrite 13 which is a previous but LTS version. But after version 14 there are some new features introduced which enhanced the performance of the overall experience.
This issue is open for the contributors to upgrade the appwrite library and measure its impact on existing functionalities
Add screenshots
No response
Record

[X] I agree to follow this project's Code of Conduct
[ ] I want to work on this issue

@Sanchitbajaj02 I would like to know exactly what we have to do in this issue .. can u elaborate please.
thank you.

@Sanchitbajaj02 I would like to know exactly what we have to do in this issue .. can u elaborate please. thank you.

Sure, the issue is currently the system is using version 13 of the appwrite, but the latest version is 14.x.x. Generally, I can upgrade but issue is that in version 14 many existing functions got their names and functionalities changed.
So the goal of this issue is to identify those changes and made the changes in existing functions/methods so that the functionality don't change.
Hope you understand it well, If you need more clarity in the idea, let me know

@Sanchitbajaj02 i have got a pretty good idea about the issue and i would like to work on it. kindly assign this issue to me under gssoc 24. I can't gurantee that issue will be resolved but would like to give a try if you don't mind.
thank you.

@Sanchitbajaj02 i have got a pretty good idea about the issue and i would like to work on it. kindly assign this issue to me under gssoc 24. I can't gurantee that issue will be resolved but would like to give a try if you don't mind. thank you.

The best way to start this issue to understand how Appwrite 14 works. You can create a dummy project and refer some of their youtube videos and blogs to understand it.

@Sanchitbajaj02 I have just setup the your project and the site is actually commendable. I want to know the version i am seeing on appwrite console online is shown in the image below :

you are telling to upgrade to appwrite 14 ..  i mean i kinda confused which version are we talking about?... if you dont mind kindly explain a little.
Thank you

@Sanchitbajaj02 i have made some progress and you were talking about appwrite version 15 but when i added the latest version it upgraded to appwrite 15 .. see here in the image:

I have made adjustment to the code where it was needed and it is working as it was when the appwrite version was 14 but there was a bug or call it issue before hand that is when we register a user , we are logged in the website and we login in again with same credential the site tells us to register although we are already register.
same issue is on the deployed app .... so my question is do i have to fix this ?...please ask if you don't understand what i am trying to explain.
Thank you.

Hi @pahuja-sahil it's ok if the version is upgraded to 15. Just remove the ^ symbol so that nobody else could not upgrade by mistake.
As for the registration issue that you're explaining, I didn't faced that but the issue might be related to partial verification. You can check whether it is related to states or verification of db and auth. Also, raise a separate issue for that if you think it is a major bug

hi @Sanchitbajaj02 I removed "^" symbol and i have also told my friend to check for the issue i mentioned earlier on your hosted app and i request you to do the same so that i can confirm that it was there before and if it was not then i guess i messed up and need to go through verification of db and auth. If it is there on the hosted website which is actually running on appwrite 13 that means that the bug was there before. I am still looking for the problem caused though.

@Sanchitbajaj02 i just saw some one raised the same issue that we talked in the morning so you can give that issue to the person who raised it and i have  updated the code as per appwrite version 15 and it is working fine . if you agree i can issue a PR for this.
Kindly reply when you are free.
Thank you.

@Sanchitbajaj02 i just saw some one raised the same issue that we talked in the morning so you can give that issue to the person who raised it and i have updated the code as per appwrite version 15 and it is working fine . I have checked each and every file related to appwrite and made the necessary changes required for the working of the site .If you agree i can issue a PR for this. Kindly reply when you are free. Thank you.

Please raise the PR as well as ping me on discord so that If I get any doubt, I will immediately contact you

hi @Sanchitbajaj02 I have removed "^" symbol and i have also told my friend to check for the issue i mentioned earlier on your hosted app and i request you to do the same so that i can confirm that it was there before and if it was not then i guess i messed up and need to go through verification of db and auth. If it is there on the hosted website which is actually running on appwrite 13 that means that the bug was there before. I am still looking for the problem's cause.

The issue is somewhat mentioned in #202. It occurred long ago, I don't know why it is occurring again

hi @Sanchitbajaj02 I have removed "^" symbol and i have also told my friend to check for the issue i mentioned earlier on your hosted app and i request you to do the same so that i can confirm that it was there before and if it was not then i guess i messed up and need to go through verification of db and auth. If it is there on the hosted website which is actually running on appwrite 13 that means that the bug was there before. I am still looking for the problem's cause.

The issue is somewhat mentioned in #202. It occurred long ago, I don't know why it is occurring again

I hope this time it will solved by the person who raised it recently and one more thing i dont know how to ping you on discord can u tell me please?

@Sanchitbajaj02  i will create a pr tomorrow there is something wrong on my end.

@Sanchitbajaj02 i have cleared problems on my end and raised a pr.
kindly see when you are free.
thank you.

@Sanchitbajaj02 i have cleared problems on my end and raised a pr. kindly see when you are free. thank you.

Sure I will look into it. Note that it will take time for me to review it fully


[bug] Sign In With Ethereum: Automatically triggers logout after signing in with metamask.

Link to minimal reproducible example
https://github.com/StabilityNexus/FairFund/tree/reown-update
Summary
Sign with with Ethereum implementation does not works as expected.

I click connect wallet
Metamask gets connected
Asks to sign in with Ethereum
Sign the transaction
After I sign, it asks to change the network
I change the network
It automatically trigger the signout function

List of related npm package versions
"@reown/appkit": "1.5.2",
"@reown/appkit-adapter-wagmi": "1.5.2",
"@reown/appkit-siwe": "^1.5.2",
Node.js Version
20.11.1
Package Manager
10.5.1

I am not able to reproduce on https://appkit-lab.reown.com/library/wagmi-siwe/ which uses v1.6.0
@adityabhattad2021 can you pls try upgrading to 1.6.0 and reopen the issue if it doesn't work?


Examples in documentation do not show images of the results

Hi I think you are using PlotlyJS so you can use LIterate's special comments to add the figures. I already gave an example in #14, but for convinience I will copy-paste it here:
# This is text that will be present in the docs explaining the code
#jl using Pkg; Pkg.activate(; temp = true); Pkg.add("Package1"); Pkg.add("Package2")
using Package1, Pacakge2
im = recon(data)
p = plot_image(im)
#md savefig(p, "../assets/results.html") # hide
#jl display(p)
#md # ```@raw html
#md # <object type="text/html" data="../../assets/results.html"></object>
#md # ```

Closing this (but will reference it in 14, just trying to condense actionable items)


chore: mv main.go to cmd/manager dir

What's changed and what's your intention?
mv main.go to cmd/manager dir
Please explain IN DETAIL what the changes are in this PR and why they are needed:

mv the mangaer's main.go to cmd/manager/manager.go
update Makefile & Dockerfile

Checklist

[x] I have written the necessary docs and comments
[x] I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

Rest LGTM!

And revise the dev doc of this line 🤣
+ `main() main.go`, the entry point of the program

And revise the dev doc of this line 🤣
+ `main() main.go`, the entry point of the program

and this line I think
"program": "${workspaceFolder}/main.go",

main.go

I will search the all main.go in the project 🤣


Pulling image fills disk/image size is huge, version 1.7.0

I am trying to pull image from docker hub repository.
(AWS, Ubuntu 14.04, c3.large, 40GB disk, docker version 1.7.0)
Pulling takes time, finishes and uses 38GB of dosk space for one image only.
I thought, that it is problem of repository.
I re-created automated build and tried to specify docker pull repository/image:latest, but it didn't help.
After pulling docker service CPU usage is 40-50% with 80% spikes.

Containers: 2
Images: 223
Storage Driver: devicemapper
Pool Name: docker-202:1-398123-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 3.242 GB
Data Space Total: 107.4 GB
Data Space Available: 37.19 GB
Metadata Space Used: 11.44 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.136 GB
Udev Sync Supported: false
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.82-git (2013-10-04)
Execution Driver: native-0.2
Kernel Version: 3.13.0-48-generic
Operating System: Ubuntu 14.04.2 LTS
CPUs: 2
Total Memory: 3.676 GiB
Name: ip-10-0-2-16
ID: JXWZ:CW2X:S7DM:UK54:T7CC:UDAV:OCIC:HOAU:CLF4:NCAP:MNG2:6G7K
Debug mode (server): false
Debug mode (client): true
Fds: 22
Goroutines: 32
System Time: Fri Jun 26 11:44:24 UTC 2015
EventsListeners: 0
Init SHA1: 7f9c6798b022e64f04d2aff8c75cbf38a2779493
Init Path: /usr/bin/docker
Docker Root Dir: /var/lib/docker
Username: qqwrst
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support
Some people left messages as well:
https://forums.docker.com/t/docker-1-7-0-is-using-huge-amount-of-disk-space/2046

Hi!
Please read this important information about creating issues.
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
This is an automated, informational response.
Thank you.
For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
uname -a:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

How did you install docker?
Can you provide the list the steps to reproduce the issue?
Can you post the output from sudo du -sh /var/lib/docker/*
You are using devicemapper as a storage driver, can you try using aufs?

Hello,

I install docker using sudo apt-get -y install lxc-docker-1.7.0
(If be more specific, using shell script https://get.docker.com/ubuntu/ which does action above)

Steps to reproduce issue:
A) Deploy new instance in AWS, even t2.micro is enough.
B) Install docker 1.7
C) docker login
D) docker pull myrepository/imagename
It is pulling image until disk is full, or almost full.

I will post output later, dont' have access now.

Yes, devicemapper, how can I try aufs?

Hey @antonbormotov ,
Can you try installing using the instructions here : https://docs.docker.com/installation/ubuntulinux/
It boils down to running
wget -qO- https://get.docker.com/ | sh

It eventually does apt-get -y install lxc-docker-1.7.0, but also sets up a lot of things (aufs for example)

I see, thanks @ankushagarwal, so, I will try and let you know.

We start hitting this issue as well.
It looks like the script located here: https://get.docker.com/ubuntu/ does not include aufs related installs. This cause docker to fallback to devicemapper.
The script at https://get.docker.com/ on the other hand includes it.

Yes, you are right, it doesn't, but,
I guess, devicemapper should work as well, shouldn't it?

It does work, but devicemapper takes much more disk space.
Yes, you are right, it doesn't, but,
I guess, devicemapper should work as well, shouldn't it?
—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/issues/14204#issuecomment-116421532.

I this still an issue? @antonbormotov have you been able to test this with aufs? Also be aware that the default devicemapper settings are not intended for production use. The default settings are to "get things working", but require manual configuration for production use (those settings are really dependent on your use case, so cannot be done automatically by the install script). This is one of the reasons to use aufs as the default driver for Ubuntu.
Docker recently launched new apt and yum repositories, containing dynamically linked binaries, which also solve a number of issues. More information on this can be found in the blog post here; https://blog.docker.com/2015/07/new-apt-and-yum-repos/

Thanks @thaJeztah. It is gone in version 1.7.1, and we have changed to aufs. I agree with you.
We saw, and using new repositories already, I guess we can close this issue.

thanks @antonbormotov!


Added FixedSizeListScalar and FixedSizeBinaryScalar

Adding FixedSizeListScalar and FixedSizeBinaryScalar
Supporting  FixedSizeListScalar and FixedSizeBinaryScalar in new_scalar
Adding related test

related to #782 and #783

Thanks a lot, @illumination-k !


BigQuery Client Api Library - Load operations raises Not Found Error when the table already exists in the dataset

For security reasons I can't publish specific additional informations, but I will try to detail as much as I can.
I have these tables on 'Sandbox' dataset:

Sandbox.test4
Sandbox.test5

a = bqLoader.loadAssync("/home/wesley/k/codes_return20150320.csv", "Sandbox", "test3", "/home/wesley/Desktop/loadFileTestSchema.json", )
print a
b = bqLoader.loadAssync("/home/wesley/k/codes_return20150321.csv", "Sandbox", "test4", "/home/wesley/Desktop/loadFileTestSchema.json", )
print b
c = bqLoader.loadAssync("/home/wesley/k/codes_return20150322.csv", "Sandbox", "test5", "/home/wesley/Desktop/loadFileTestSchema.json", )
print c

the above code's output:
<googleapiclient.http.MediaFileUpload object at 0x7f9580e94850>
job_xxxxxxxxC2WY6SlEFTrtaxxxxx

Traceback (most recent call last):
  File "/home/wesley/github/BI/helpers/BigQuery/BigQueryLoad.py", line 130, in <module>
    b = bqLoader.loadAssync("/home/wesley/k/codes_return20150321.csv", "Sandbox", "test4", "/home/wesley/Desktop/loadFileTestSchema.json", )
  File "/home/wesley/github/BI/helpers/BigQuery/BigQueryLoad.py", line 122, in loadAssync
    jobId = self._jobsInsert(jobData, upload)["jobReference"]["jobId"]
  File "/home/wesley/github/BI/helpers/BigQuery/BaseClass.py", line 107, in _jobsInsert
    raise e
googleapiclient.errors.HttpError: <HttpError 404 when requesting https://www.googleapis.com/upload/bigquery/v2/projects/PROJECT_ID/jobs?uploadType=multipart&alt=json returned "Not Found: Job PROJECT_ID:JOB_ID">

Just to clarify a little bit:
my loadAssync method can receive 'replace' parameter which so that calls another method which replaces the "writeDisposition" default value from the config json with "WRITE_TRUNCATE".
I just think there should be a better way to handle this type of error than 404

Triaging:
I'm afraid I can't make sense of this without seeing the implementation of loadAssync.  Really can't do much with this without.

Another theory is a typo in the project id...
The query string parms ('uploadType=multipart&alt=json') suggest that it is the POST for 'jobs.insert' which is raising the 404, which makes a typo in the project ID the favorite

Greetings!  For BigQuery, we recommend using this library instead:
https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/bigquery
Hope this helps!


Multiple faces

Plugin Version or Commit ID
v0.10.0
Unity Version
2021.3.3f1
Your Host OS
win 10
Target Platform
UnityEditor, Windows Standalone
Description
Can I detect multiple faces in the camera?
Code to Reproduce the issue
No response
Additional Context
No response

Yes.
See https://google.github.io/mediapipe/solutions/face_detection.html#detections.


docs: Fix a few typos

There are small typos in:

docs/5_customization.rst
docs/7_architecture.rst

Fixes:

Should read necessary rather than nessary.
Should read exception rather than excepton.

Semi-automated pull request generated by
https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

Thanks @timgates42


[metrics] Add a more precise histogram implementation

Prometheus histogram implementation requires specifying buckets and reported histogram therefore is not very precise.
The implementation in this PR takes different approach and calculates 'true' histogram by ordering data points.
This approach is more expensive but provides better data and does not require specifying buckets in advance. For things like aggregating network latencies this seems like a better trade off, as it will show outliers better(e.g. there is no 'cut off' on the histogram) and calculate more exact values.
There are more details on caveats and potential usages in documentation for HistogramVec struct.
Current PR also replaces histogram in only one place(SafeClient) for now, hopefully we can see some better data from that.
The result from this PR is that latency histogram becomes much more granular and trustworthy.
Previously we've seen problem where real p90 was largely skewed by unfortunate bucket choice in prometheus histogram:

Note how all latencies on this graph gravitate to constant values.
With adapted histograms (this PR):

I don't like that all the labels are cloned per point, which makes this solution very very expensive.

As I replied in other comments, labels are Arc<>, so I don't think this is expensive.
For the time series format - yes, the format is changed, as mentioned in the PR description. I don't see how this is a practical problem to be honest, we can add other percentiles to the defaults if needed, adding additional percentiles is not expensive.
@velvia I understand that there are probably endless way to improve histograms.
I believe that what I use here for safe_client latencies is better then what we currently have with fixed prometheus buckets - it provides more precise results and with load we have on those counters the solution works just fine. Do you see any practical issues with this implementation for this particular use case?
Perhaps it is not a universal solution, and regular prometheus histograms are still available for other use cases, where we have a lot of data points or other reasons preventing usage of the histogram from this PR. People can chose what they want, I don't even mind if prometheus histograms will be a default choice.
Since this seem to be working solution that is better that what we had before and solves practical problem that we encountered(with us misunderstanding latencies on prometheus graphs), I propose to just move forward with it. When someone has time to implement better histograms we can do that, and I don't mind if this code will get deleted in a month. Working beats perfect.


NPM package not updated?

It appears that the code which can be found on NPM isn't synced with the GitHub repo. When I install the package via NPM, it is missing the "responsive" part. I tried updating/reinstalling but nothing helps. Can someone fix this?

Updated.
But I am finding quite serious issues with the responsive approach, might need to revert.


Nitpick: Why have a try statement with no catch and an empty finally block?

https://github.com/PowerShell/PowerShellGet/blob/98aadd21b741c69ad782c6438663b18a309ff9e3/src/build.ps1#L95-L96

@JustinGrote the build script isnt being used yet, were just using tasks in an Azure Dev Ops pipeline, but we will update that so it is publicly available going forward :smile:


[x] I have read and understood the contribution guidelines and the instructions for creating a list.
[x] This pull request has a descriptive title. (For example: Add Node.js)
The list I added

[x] has been around for at least 20 days,
[x] is a non-generated Markdown file in a GitHub repo,
[x] is not a duplicate,
[x] only has awesome items with descriptions (Awesome lists are curations of the best, not of everything),
[x] contains the awesome badge on the right side of the list heading,
[x] has a Table of Contents section named Contents as the first section,
[x] has an appropriate license (Meaning something like CC0, NOT a code licence like MIT, BSD, Apache, etc),
[x] has contribution guidelines,
[x] has been checked for inconsistent formatting, spelling, and grammar (This includes starting each link description with an uppercase character and ending it with a period ., and consistent naming),
[x] has been added at the bottom of the appropriate category.

Hey @chantisnake, can you update the item to use the proper casing "PowerShell"?  Thanks!

@chantisnake Don't check checkboxes that are clearly not done... I've unchecked the ones that are invalid.

I will fix all the cases, grammar and contents issue. and then create a new pull request
@sindresorhus I think the reason that the list is small is because there is not that many people know about this list... I think putting this list in you awesome list will solve this problem, and Awesome-PowerShell can get more people to contribute.

@sindresorhus  I see you have unchecked:

has been added at the bottom of the appropriate category.

Why PowerShell doesn't belongs in Development Environment?

@chantisnake you have to add it to under the last item of this section. The list is not alphabetically sorted

okay, that makes sense.

I think the reason that the list is small is because there is not that many people know about this list... I think putting this list in you awesome list will solve this problem, and Awesome-PowerShell can get more people to contribute.

No, the reason it's small is because you haven't worked on it long and hard enough. Great awesome lists are hard work. You shouldn't expect to be able to just put up a quick list and have contributors do your job. Awesome lists are awesome from the start. External contributors are useful later on for contributing things you couldn't find.


Cannot load the mel-scale spectrograms by np.load()

when using np.load() to load the npy file, the error is :
_pickle.UnpicklingError: invalid load key, '\x00'.
Can anybody help me?

This looks like a Python/Numpy version mismatch. Can you share your system specs and version numbers?

Windows 10
python 3.6.3
numpy 1.19.3
librosa 0.7.0

Gotcha. Glad to know it's working!