Autoconvert from float to jax.numpy

Discussed in https://github.com/google/jaxopt/discussions/197

Originally posted by patel-zeel April  7, 2022
I have recently started working with jaxopt and I found that jaxopt does not auto-convert float to jax.numpy array. For example, If I run the following code:
Example 1
import jax
import jax.numpy as jnp
import jaxopt
import optax

def loss_function(params):
    return (params-1)**2

params = 0.0
jaxopt.ScipyMinimize(fun=loss_function).run(params)

It fails because params is just a float, but if I change last two lines with the following:
params = jnp.array(0.0)
jaxopt.ScipyMinimize(fun=loss_function).run(params)

The above code works fine. On the other side, optax does not fail in this case (maybe because jax.grad auto converts float to jax.numpy). Consider the following example for the same:
Example 2
params = 0.0
tx = optax.adam(learning_rate=0.1)
state = tx.init(params)
grads = jax.grad(loss_function)(params)
updates, state = tx.update(grads, state)
params = optax.apply_updates(params, updates)
print(params)

Output
0.09999933

So, I was wondering if jaxopt should auto-convert floats to jax.numpy or will that create some new issues?
Edit:
Error trace shows the following lines:
File ~/miniconda3/envs/jax_cpu/lib/python3.8/site-packages/jaxopt/_src/scipy_wrappers.py:192, in <listcomp>(.0)
    190 """Returns a PyTreeTopology encoding the PyTree structure of `x_jnp`."""
    191 leaves, treedef = tree_util.tree_flatten(x_jnp)
--> 192 shapes = [leaf.shape for leaf in leaves]
    193 dtypes = [leaf.dtype for leaf in leaves]
    194 return PyTreeTopology(treedef=treedef, shapes=shapes, dtypes=dtypes)

AttributeError: 'float' object has no attribute 'shape'

Will it suffice to just replace a few lines like this? (I tried it locally and it works for Example 1)
-shapes = [leaf.shape for leaf in leaves]
-dtypes = [leaf.dtype for leaf in leaves]

+shapes = [() if isinstance(leaf, float) else leaf.shape for leaf in leaves]
+default_dtype = jnp.float64 if jax.config.x64_enabled else jnp.float32
+dtypes = [default_dtype if isinstance(leaf, float) else leaf.dtype for leaf in leaves]
```</div>

Thanks a lot for reporting. We are investigating what's the best approach.

@froystig What's your opinion on this?

https://github.com/google/jaxopt/blob/d0e3949b04c06960dfbb631386eee20ebffa50a6/jaxopt/_src/scipy_wrappers.py#L192-L193
How about we change this logic to the following?
  shapes = [jnp.asarray(leaf).shape for leaf in leaves]
  dtypes = [jnp.asarray(leaf).dtype for leaf in leaves]


Read a product that has been created in the store

As a Store Owner
I need to view the details of a product in my store
So that I can decide whether I should update this product's details due to some new changes.
Assumptions: The product and its information exist in the database.
Acceptance Criteria:

Given a product ID
When I request the product details
Then I receive the product details including name, description, price, and image.

Sure. But we need more stories, otherwise there will be less than 8.


disabling firewalld

disabling firewalld (falling back to iptables) since its not starting on master without a reboot between prep and install playbook

using complex password for openstack requires single quote in ocp-inventory or master-api will fail to start


dino: 2018-11-29 -> 2019-02-05

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Didn't notice there's already #55291


Remove sanitizeHtml import on client

By importing this module on client many other server side only modules end up being bundled to the client and causing some issues with older browsers or Cordova, since those modules are not transpiled.
I've just refactored the code to prevent statically importing sanitizeHtml on the modules/utils.js (that is bundled to the client) and that it is only imported on the server.

Oh nice work, thanks!


Flaky test when opening Gitea pr

https://github.com/MarcoIeni/release-plz/actions/runs/5918039789/job/16046972001?pr=922
Log:
running 4 tests
New user 'zhlgtypv' has been successfully created!
New user 'hwapsgxg' has been successfully created!
Cloning into 'txdeknkh'...
Cloning into 'fbqdtodm'...
note: Cloning into "/tmp/.tmpl5B6gM"
    Updating `test-registry` index
     Running `git fetch --verbose --force --update-head-ok 'http://localhost:3000/zhlgtypv/_cargo-index.git' '+HEAD:refs/remotes/origin/HEAD'`
POST git-upload-pack (305 bytes)
POST git-upload-pack (182 bytes)
From http://localhost:3000/zhlgtypv/_cargo-index
 * [new ref]         HEAD       -> origin/HEAD
note: Cloning into "/tmp/.tmpl5B6gM"
    Updating `test-registry` index
     Running `git fetch --verbose --force --update-head-ok 'http://localhost:3000/zhlgtypv/_cargo-index.git' '+HEAD:refs/remotes/origin/HEAD'`
POST git-upload-pack (305 bytes)
From http://localhost:3000/zhlgtypv/_cargo-index
 = [up to date]      HEAD       -> origin/HEAD
note: Downloading txdeknkh 0.1.0
 Downloading crates ...
  Downloaded txdeknkh v0.1.0 (registry `test-registry`)
test changelog::release_plz_releases_a_new_project ... ok
test completion_test::test_generate_completions ... ok
New user 'ljwkhlcs' has been successfully created!
test changelog::release_plz_adds_changelog_on_new_project ... FAILED
test helpers::gitea::gitea_new::can_create_gitea_repository ... ok

failures:
error: test failed, to rerun pass `-p release-plz --test all`

---- changelog::release_plz_adds_changelog_on_new_project stdout ----
thread 'changelog::release_plz_adds_changelog_on_new_project' panicked at 'Unexpected failure.
code=1
stderr=``````
note: Cloning into \"/tmp/.tmppcJJnp\"
    Updating `test-registry` index
     Running `git fetch --verbose --force --update-head-ok \'http://localhost:3000/hwapsgxg/_cargo-index.git\' \'+HEAD:refs/remotes/origin/HEAD\'`
POST git-upload-pack (305 bytes)
POST git-upload-pack (182 bytes)
From http://localhost:3000/hwapsgxg/_cargo-index
 * [new ref]         HEAD       -> origin/HEAD
Error: Failed to open PR

Caused by:
    HTTP status client error (409 Conflict) for url (http://localhost:3000/api/v1/repos/hwapsgxg/fbqdtodm/pulls)

command=`cd "/tmp/.tmppm72kr/fbqdtodm" && RUST_LOG="ERROR" "/home/runner/work/release-plz/release-plz/target/debug/release-plz" "release-pr" "--verbose" "--git-token" "2f8eee8dc55d7d7155e6939bdc27f593c5d6c5ad" "--backend" "gitea" "--registry" "test-registry"`
code=1
stdout=```
  \u{1b}[2m2023-08-20T14:59:27.64[259](https://github.com/MarcoIeni/release-plz/actions/runs/5918039789/job/16046972001?pr=922#step:7:260)1Z\u{1b}[0m \u{1b}[31mERROR\u{1b}[0m \u{1b}[1;31mrelease_plz\u{1b}[0m\u{1b}[31m: \u{1b}[31mFailed to open PR

Caused by:
    HTTP status client error (409 Conflict) for url (http://localhost:3000/api/v1/repos/hwapsgxg/fbqdtodm/pulls)\u{1b}[0m
    \u{1b}[2;3mat\u{1b}[0m crates/release_plz/src/main.rs:18

stderr=```
note: Cloning into "/tmp/.tmppcJJnp"
Updating test-registry index
Running git fetch --verbose --force --update-head-ok \'http://localhost:3000/hwapsgxg/_cargo-index.git\' \'+HEAD:refs/remotes/origin/HEAD\'
POST git-upload-pack (305 bytes)
POST git-upload-pack (182 bytes)
From http://localhost:3000/hwapsgxg/_cargo-index

[new ref]         HEAD       -> origin/HEAD
Error: Failed to open PR

Caused by:
HTTP status client error (409 Conflict) for url (http://localhost:3000/api/v1/repos/hwapsgxg/fbqdtodm/pulls)

', /rustc/eb[262](https://github.com/MarcoIeni/release-plz/actions/runs/5918039789/job/16046972001?pr=922#step:7:263)96b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:250:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    changelog::release_plz_adds_changelog_on_new_project

test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 10.73s

[ ] print body to check what's the issue

this is not happening anymore with latest version of gitea


TS/IC: Add a separate plugin_searchpath to distinguish from the image searchpath.

We were previously using the one "searchpath" (documented as being for images) for the plugins as well.

Good catch. lgtm.  how did you find this bug?

Somebody had mentioned it on the mail list over the weekend.
Ever since we added EMBEDPLUGINS=1 as the default, I don't think the true "plugin" path is frequently used, though I think it's important to support because in cases when OIIO is embedded in a shipping product, it's a way for a customer to extend it for proprietary or otherwise unsupported formats.


Remove next set of converted ATE tests

All removed tests have had OTG versions merged/validated > 1 month ago.

Pull Request Functional Test Report for #2917 / 152fdcd54edfeed0bd07dbb55dab515d164b48a4
No tests identified for validation.
Help

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 55.448%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1949

Relevant Lines:
3515

💛  - Coveralls


add --colors support to turbo CLI

Adds turbo flag support colors in CLI output from commands run by turbo.
Fixes incorrect spelling
Prettier/Lint-Staged adjusted some spacing on things.

Usage:
turbo --colors
Two questions:

should this flag affect the colors in the output from turbo or just the command turbo runs?
would you like me to add tests to run_test.go?

With colors

No colors

Closes #223

Hm, there seems to be a build failure. I will try to investigate.

Had to run git commit -m "..." --no-verify to get Prettier/Lint-Staged to go incorrectly format the docs CLI page.

@charkour I think the main issue that colours aren't working is because most tools checks whether they are running in a terminal or not. If it's not in a terminal then it won't show colours. I think the change you are proposing would only fix the issue for chalk-based or Node.js application only.
I am wondering if we could either pass the terminal to the child processes or attach a pseudo terminal (tty) to the child process. If that would happen then I can see problems with prefixing of the console output, though
Anyways, I think it's a good start to get colours working. As most people will use Turborepo with Node applications.

@weyert, Ah yes, I didn't understand the nuance of terminal colors prior to your comment. Thanks for the suggestions! Attaching tty sounds good but I will not start on that unless @jaredpalmer wants that implemented. Thanks!


⚠ Fetchers has degraded performance

In 528901b, Fetchers ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 724 ms

Resolved: Fetchers performance has improved in 0674dbd.

Resolved: Fetchers performance has improved in 0674dbd.


Update cats-effect-std to 3.2.4

Updates org.typelevel:cats-effect-std from 3.2.1 to 3.2.4.
GitHub Release Notes - 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.typelevel", artifactId = "cats-effect-std" } ]

labels: library-update, semver-patch

Codecov Report

Merging #258 (2fa7640) into master (8dcfc47) will decrease coverage by 0.45%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #258      +/-   ##
==========================================
- Coverage   84.61%   84.16%   -0.46%
==========================================
  Files          35       35
  Lines         221      221
  Branches       10       10
==========================================
- Hits          187      186       -1
- Misses         34       35       +1

Flag
Coverage Δ

unittests
84.16% <ø> (-0.46%)
:arrow_down:

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

Impacted Files
Coverage Δ

core/src/main/scala/io/fmq/poll/Poller.scala
86.20% <0.00%> (-1.73%)
:arrow_down:

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 8dcfc47...2fa7640. Read the comment docs.

Superseded by #259.


uniforms-patternfly "AddField" or "DelField" are not supported in the DMN Runner Table view

To render a row of the DMN runner table we use the uniforms-patternfly library. This feature isn't fully supported as the AddField and DelField are not working correctly.
Reference: heating.dmn

The + signal doens't work in the DMN Runner Table;
Should have a - signal to remove the additional data;
The Problems tab doens't work correctly, as it's missing all problems related to the "Execution";

Isn't this the same as #167 ?

Yes, it's. I'm going to close this one.


:warning: Full stream desync support will soon be required!

Since yesterday (for me, at least) DPI starts to randomly block ALL SSL/TLS traffic to googlevideo.com:

Very soon this change will be the default (multi-packet Client Hello analysis was rolled out like that before) and this proxy will be defeated!

TLS 1.2 has been in TSPU collection since August

You're missing my point:

RTFM:

In TLS 1.3, the client indicates its version preferences in the "supported_versions" extension (Section 4.2.1) and the legacy_version field MUST be set to 0x0303, which is the version number for TLS 1.2.  TLS 1.3 ClientHellos are identified as having a legacy_version of 0x0303 and a supported_versions extension present with 0x0304 as the highest version indicated therein.

But I have an old version of Wireshark, so it doesn't know of TLS 1.3;

TLS 1.3 is the default version in all modern browsers;

In fact, according to my tests for googlevideo.com it currently blocks ALL SSL/TLS versions: SSL 3.0 - TLS 1.3 (didn't check SSL 2.0), without even checking SNI!;

The point:
All connections you see on a screenshot are to googlevideo.com, with bypass applied! Connections from (random) ports 10733-34 successfully passed through, but from port 10737 it was blocked!
The first TLS data packet is Client Hello. As you can see, the connection was blocked AFTER the Client Hello, on Change Cipher Spec, because there is no bypass applied to it!

You can dislike me as much as you want until it will stop working. There are other people already seeing issues with video preload.

But I have an old version of Wireshark, so it doesn't know of TLS 1.3;

Why you are not specified this details in first post?

Because I just wanted to warn as soon as possible and didn't want to spend much time on this report.
In general, I expect developers to be at least on the same level of competence with their users. I also expect people to either believe in original statement or prove it is wrong.


Update Readme

Update readme to include

Link to blog post
information on running
image credits
licensing information

@amdegregorio, Hello, thank you for your tutorial! It helped me a lot! <3


Download Chrome automatically

There is a TODO in init.go to download Chrome automatically.
For my notes, there are continuous builds in this GCS bucket:
http://storage.googleapis.com/chromium-browser-continuous?prefix=Linux_x64

Hi @minusnine
I would like do this ToDo task, can you please give me more details on how it should be done or what is the expectation?

Download chrome automatically.
Do you mean there should be a init.go file inside the chrome directory and it should download the chrome driver automatically? Thanks in advance.

Hi Ravi, thanks for volunteering.
init.go is a simple command line utility that downloads a list of files, checks their checksums, and unpacks them. It should be changed to also download Chrome automatically.
To do this, it should use the Google Cloud Storage API, likely through the official Go API, to iterate through the continuous build bucket for Chromium to find the newest available binary, and then download and unpack it.
Please let me know if you have any other questions.

Hi @minusnine
I wrote this simple script just to tryout the download: https://gist.github.com/RaviTezu/b8607ff3e0c3da176df89cb8b1c315ec
The problem I see here is, I have to create service account(using my personal gmail account) and use its credentials to create a storage client like this. I have also checked the sample avaible here but creating a client needs the projectID, but I am not able to know the Project ID of chromium-browser-continuous bucket.
In short, I need a way to create a storage client with some common service account or someother way to create a client and browse the contents of chromium-browser-continuous bucket. Do you have any suggestions here? Thanks in advance.
I still have to do the following:

Refactor the variable names and also, integrate this code into init.go.
Perform the checksum once the file is downloaded.

There must be a way to access the data anonymously, since I can fetch a file constructed from the bucket manifest directly using an incognito browser window.
What happens if you don't call option.WithServiceAccountFile and only call storage.NewClient(ctx)?

Hi @minusnine
Thanks for the reply.
Without option.WithServiceAccountFile I get a could not find default credentials error as below:
ERROR: logging before flag.Parse: I0502 00:04:21.992061   18392 main.go:34] Cannot create a storage client: dialing: google.DefaultTokenSource: google: could not find default credentials. See https://developers
.google.com/accounts/docs/application-default-credentials for more information.
panic: runtime error: invalid memory address or nil pointer dereference

As you said, I am trying to see, if we can create a client without a creds.

The docs don't officially say how to access public data through the API:
https://cloud.google.com/storage/docs/access-public-data
The docs imply that setting an API key is required:
https://cloud.google.com/vision/docs/common/auth#set_up_an_api_key
By looking through the client source, I was able to determine that we can shortcut that error message by setting a dummy API key:
client, err := storage.NewClient(ctx, option.WithAPIKey("key-not-used-with-public-data"))
That's not obvious. I'll file a bug to improve the documentation with something, though I suspect this is not exactly supported, even if it works. I think it's good enough for us, for now, though.
Let me know if that doesn't work for you.

Ah, actually, the right thing to do is to use:
client, err := storage.NewClient(ctx, option.WithHTTPClient(http.DefaultClient))

Hi @minusnine
Awesome. I have submitted the PR here.

Merged. Thanks again!
Might you be interested in updating remote_test.go to point to the downloaded file by default?

Thanks @minusnine
I will start working on remote_test.go :)

Hi @minusnine
I have update the remote_test.go to point to the downloaded file and raise this PR.
However, I just found that the tests are failing becase the latest chromium according to the bucket-list here is Chromium 51.0.2684.0. But the actual latest release is something like 58.0.
The tests are failing with the below error:
unknown error - 33: session not created exception: Chrome version must be >= 56.0.2884.0

I have tried downloading the latest chromium from here and https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/473420/ and pointed the remote_test.go to this location and all the tests passed.
I am suspecting storage API we are using is not being up to date.

Can you update init.go to this bucket: chromium-browser-snapshots ?
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/

Hi @minusnine
I have updated the bucket from chromium-browser-continuous to chromium-browser-snapshots and I see the latest version is Chromium 60.0.3110.0  and I have executed the tests and all passed.
Added a commit before the existing commit in the same PR.

Merged! Thanks for the contribution! Please let me know if you are interested in contributing more, or just send PRs.


floats: new norm2 approach to have better performance

Would you mind reviewing it? Thanks.

This is more likely to overflow.

diff * diff may also underflow leading potentially to an inaccurate result.

I was wondering about this too and wrote my own version due to the performance diff.  Seems like you might want to add an option or a "Fast" version or something -- when computing large distance matricies etc the performance can really matter.

Making that kind of addition is very unlikely. First, because it is a doubling of development and maintenance effort and second because providing a fast way and a good way invariably leads to some users not being adequately informed about the risks of the fast way (no matter how much documentation and how doom laden it is). My view is that if people what to do things the wrong way, the amount of code they have to write in this case is minimal and we should be encouraging it.

Very obviously, when I talk about a doubling or work, I'm talking about ours. This is my primary concern when it comes to effort. It is an increase in the amount of work not just for the very small loop that others would have to write, knowing the limitations of the approach, while for us it is the loop, the tests and additional documentation telling people they should not use it, and then answering issues filed by people that ignored the documentation and find that they code is now unsafe.
The reasonable way to approach this would be to add a Norm2 to "internal/asm/f64" and call that. If someone wants to write it. We would certainly welcome the PR.

well if you didn't want a bunch of extra work, why did you make gonum in the first place!?  The whole point of making such a wonderful package is to save everyone else all the trouble of doing so, right? :)  And to suffer all their annoying comments :)
Anyway, maybe I'm missing something, but we can't access an internal package from outside right?  you mean just to optimize the existing sqrt-based computation?  how much faster would that likely be?

well if you didn't want a bunch of extra work, why did you make gonum in the first place!? The whole point of making such a wonderful package is to save everyone else all the trouble of doing so, right? :) And to suffer all their annoying comments :)

Work and extra work are different things. Work that is counter to the philosophy of the project is unlikely to be done. I believe that providing a fast and potentially dangerously incorrect implementation is counter to the philosophy of the project.

you mean just to optimize the existing sqrt-based computation?

Yes.

how much faster would that likely be?

I don't know. You could get an idea of that by looking at the speed of the current implementation and comparing it to OpenBLAS' dnrm2. It is written in assembler.

It looks like they use a different algorithm that should be quite fast and just uses one sqrt at the end -- maybe could Go-ify that and make everyone happy?
http://www.netlib.org/lapack/explore-html/de/da4/group__double__blas__level1_ga4b25c539b862414e6f91ebb30b391d7c.html#ga4b25c539b862414e6f91ebb30b391d7c

https://godoc.org/gonum.org/v1/gonum/blas/gonum#Implementation.Dnrm2

Thank you everyone for the comments. I learn a lot from this.
I just notice why math.Hypot() does some to avoid overflow and underflow, and I rewrote it by using similar approaches as math.Hypot() without doing sqrt/square for each sum up of the slice, It is 30% faster then the previous one. I didn't change Distance function yet, since may need a better way to recalculate the float array (s[i] - v), will study further about blas dnrm2 algorithm and rewrite it. (or just follow rcoreilly's change. ^_^) Thanks.

@neojou you are unlikely to do better than BLAS, so #1132 is probably the best way to go at this point.  If you could add your benchmark code for Distance to the floats_test file, and run the comparisons, that would be great!

@rcoreilly Yes, I agree with you. will use the way  #1132 and do some benchmark as you said. ^^

1134 looks great. close this one.


Bump GMT from 6.3.0.dev1+70463e0 to 6.3.0.dev2+50be0be

This is an automated pull request!
This PR will update the following package:

gmt from 6.3.0.dev1+70463e0 to 6.3.0.dev2+50be0be

Full list of commits made since last release viewable at compare view

Notes for merging this PR:

Feel free to push to the bot's branch to update this PR if needed.
Checklist before merging this PR:

[ ] Dependencies have been updated if changed
[ ] Tests have passed

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


New Backup & Sync and Google Drive File Stream clients

This is not really an issue but a question regarding the new Google Drive client and it's implications. With the introduction of these new Backup & Sync and Google Drive File Stream clients and the deprecation (end of support on march 2018) of the old Drive application, Does this application keep working? I'm using it to backup several folders on a Linux server and haven't found any relevant information as to whether the change affects only the client applications or also the service as a whole.
Thank you very much!

Oops! Did a quick search through the issue queue and found out there is already another issue about this: #948
Closing this as duplicate


Getting Presenting source wrong

In my scenario, i have a view controller which is presented modally, this view controller has a player button, but when i attempt to play the video i get this error:
Warning: Attempt to present <MPMoviePlayerViewController: 0x7fe80b76c5e0> on <UINavigationController: 0x7fe80b842000> whose view is not in the window hierarchy!
The reason is because you are using the RootViewController, which in this scenario is not the top View Controller.
I'm using the latest version in Cocoapods.

A temporary solution is:
self.presentViewController(self.videoPlayer!.movieViewController(YKQualityOptions.High), animated: true, completion: nil)


Build image using vendor folder

Building the image from the vendor folder, rather than downloading
modules as part of the build, can greatly reduce the build time on
some systems. In addition, this removes the risk of modules being
unavailable for download for whatever reason.
Signed-off-by: Don Penney<EMAIL_ADDRESS>

/lgtm


extend testing and [compat] back to 1.0

Codecov Report

Merging #5 (823f997) into main (2591a8c) will decrease coverage by 0.29%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
- Coverage   76.00%   75.70%   -0.30%
==========================================
  Files           2        2
  Lines         175      177       +2
==========================================
+ Hits          133      134       +1
- Misses         42       43       +1

Impacted Files
Coverage Δ

src/SortMark.jl
72.02% <100.00%> (-0.32%)
:arrow_down:

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 2591a8c...823f997. Read the comment docs.

This is harder than I'd like. I'm not going to muck with these errors on 1.0.


Version 1.1.1 not available in VS Code Marketplace

Describe the bug
The current release of 1.1.1 is not available in the VS Code Marketplace. The last update date matches the release date of 1.1.1 (January 17, 2023), but the available version is still 1.1.0.
To Reproduce
Visit the Marketplace and observe the last update date and the version - https://marketplace.visualstudio.com/items?itemName=stoplight.spectral
Expected behavior
Version 1.1.1 be available on the Marketplace

1.1.2 is now available.


Data file corruption when opened from the drawer- switching files

Open tN, select a book.
From the drawer, select a book that does not exist in your user branch(which is not opened before)
The file selected in step 2 is corrupted with the data(contents) from the previously opened file.

@elsylambert Looks like you saw this back in March, but this is for TN.  We'll wait and retest after #1243 has be tested.


CRYPTO_set_locking_callback openssl 1.0.2 and fips mode

Question
We have a ruby on rails application that uses a number of different libraries such as libmysqlclient, and librdkafka and libcurl that then use openssl including ruby itself.
It seems that each of these libraries implementation uses its own CRYPTO_set_locking_callback implementation that then has its own mutex etc.
Some check for existing callbacks and others don't.
Here are the implementations online

libmysqlclient that uses the openssl_lock_function here - see - https://github.com/mysql/mysql-server/blob/7d10c82196c8e45554f27c00681474a9fb86d137/vio/viosslfactories.cc#L421

librdkafka can be found here - see - https://github.com/edenhill/librdkafka/blob/cedb2917396ddb02a853330adf5030506abdebf3/src/rdkafka_ssl.c#L1390

Ideally, I would like them to use one implementation of the CRYPTO_set_locking_callback API call but it depends on the order they are initialized.
In the example above libmysqlclient doesn't look for existing callbacks which I would argue is a bug?
Ideally, I would like to just have it (that is CRYPTO_set_locking_callback) called once and for the other calls to delegate to the first caller somehow or maybe my own version.
If I use something like a trampoline to capture all calls to CRYPTO_get_locking_callback and CRYPTO_set_locking_callback is that in violation of FIPS ?
Is there an easy way to ensure there is only one CRYPTO_set_locking_callback implementation being used?
I understand this is not an issue with openssl 1.1 and above but we have to use 1.0.2 due to FIPS.

1.0.2 is past its use by date and is unsupported.
For FIPS related questions, you should ask a FIPS lab.

Is there an easy way to ensure there is only one CRYPTO_set_locking_callback implementation being used?

No.  Having a library try to set the locking callbacks is a recipe for this kind of disaster.
If more than one library is trying to set the callbacks and to use the provided callback functions for mutual synchronization with their own internal processing, the situation is basically unresolvable.  In 1.1.1 the locking callbacks are not needed or used, and as was already noted 1.0.2 is EOL.

It seems the question is answered, closing.


fix: flyctl deploy flag from region to regions

flyctl v0.2.47 [PR] silently broke everyones CI/CDs. It broke my review apps. This fixes that change.
This really needs to go out ASAP as it breaks ALL review apps until it's fixed. I'm changing mine to manually run this code until this is merged in and released.

ETA on getting merged in?

@bryantbrock how do we manage the situation till this PR is merged? Can we use your steps?

Thanks for the merge. I'm trying to push preview app but fails with the same error.
 uses<EMAIL_ADDRESS>There is no version change. So what am I missing?

@ragbadaskar you should see a new release now, v1.2.1.


FIX popover positioning for StatusBar

Please read and mark the following check list before creating a pull request:

[x] I read and followed the CONTRIBUTING.md guide.
[x] I read and followed the New Feature Checklist guide.

Short description of what this resolves:
All 'popovers' in components not work properly with 'StatusBar'

Thank you for your response,
I will inspect the code
On Wed, Jun 16, 2021, 10:45 AM Artur Yorsh @.***> wrote:

@.**** commented on this pull request.
Hey 👋
Thank you for your time to work on this. Unfortunately, this will not
solve the issue completely and will break the apps that handle this case in
another way.
Please see #743
https://github.com/akveo/react-native-ui-kitten/issues/743 for reference
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/akveo/react-native-ui-kitten/pull/1452#pullrequestreview-684831358,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALKJKEQYAI5ZRDYQLAWBJFLTTBJA7ANCNFSM46XNZLZQ
.


Post Form - Integrate frontend and backend for post-session form

Requirements for feature

[ ] Backend: Add a new type of note item type: checkbox-bullet. Current types are text OR bullet
[ ] Integrate the PATCH note & GET note requests with frontend

Any context for feature
N/A
Resources / tips for development
N/A

Not needed at the moment.


hack: update to golangci-lint v1.49.0

Use newer version of golangci-lint. Disabled linters which are defined as deprecated or unmaintained (namely: deadcode, structcheck and varcheck).
Fixed newly discovered trivial case of assigned-but-unused variable in configuration.go.
Signed-off-by: Shachar Sharon<EMAIL_ADDRESS>

golangci-lint v1.49 requires go1.19.

golangci-lint v1.49 requires go1.19.

That's unfortunate. I really don't like it when projects stop supporting versions of Go before the Go team does. Can we take a release of golangci-lint a release or two back that fixes our typecheck errors but also works with Go 1.18?

Sure, I will try it.

golangci-lint v1.49 requires go1.19.

That's unfortunate. I really don't like it when projects stop supporting versions of Go before the Go team does. Can we take a release of golangci-lint a release or two back that fixes our typecheck errors but also works with Go 1.18?

Sure, I will try it.

@phlogistonjohn I dived into it an realized that its a more complicated issue: currently, samba-operator supports as far back as Go1.16 (e.g., in github actions). However, not all our build tools are compatible with this version in their latest release. Thus, we need to pin-point each tool to explicit version which is not too old but still supports Go1.16. A separate PR is on its way.


why is the value used in this filter xvdg

Why is this value set to xvdg?
https://github.com/aws-samples/sqlserver-monitoring-tool-with-amazon-cloudwatch/blob/b50435016a2aba40ac5678b273f0873f4d2dca2e/CW_agent_config_automation.ps1#L13
i worked out that worked fine.
aws ec2 describe-volumes --filters Name=attachment.instance-id,Values=$instanceID

based on output of screenshot, i see the value should be /dev/sda1.
this is probably fine for me.  but this should probably be altered to find the value or locate the first instance of the value as this is a powershell script.

@sahaarnabar, almost 3 months and no reply so tagging you. any status update on this issue?


Small edits

two things :
add # files in gitignore (emacs rocks ;)
change FindRadium and apply these changes in plugins

This branch as conflicts with master. Please fix them

The RADIUM_ROOT change might break stuff in the plugins, no ?

RADIUM_ROOT is never used directly by the plugins, in contrast to RADIUM_PLUGIN_OUTPUT_PATH and RADIUM_INCLUDE_DIR.

Branch squashed and merged in commit  e6b1be6


git xet migrate

(BETA)  Migrate an external repository to a new XetHub repository.   All commits, branches, and other files are converted, history is fully preserved, and all data files stored as LFS or Xet pointer files are imported.
USAGE:
    git-xet migrate [OPTIONS] --src <SRC> --dest <DEST>

OPTIONS:
        --dest <DEST>                  The URL of the Xet repository to initialize with the contents
                                       of the src repository. This repository must be a new Xet
                                       repo, or use --overwrite to replace all contents of this
                                       repository with the source repo
    -h, --help                         Print help information
        --no-cleanup                   Do not clean up the working directories after completion
        --overwrite                    The migrate command will error out if the remote repository
                                       is not empty. When this flag is passed, the contents of the
                                       remote repository will be overwritten regardless of state
        --src <SRC>                    The URL of the git repository to import
    -V, --version                      Print version information
        --working-dir <WORKING_DIR>    The directory to use to do all of the processing in (default:
                                       ~/.xet/migration)

Currently, only the OID (20 bytes) and indexing are stored in memory, so I don't think that would be an issue.   It was something I thought about though.
If we assume that there is another 80 bytes per OID between references, hash table overhead, etc., (generous) then we would be able to store 10,000,000 objects per GB of ram, which is already an enormous repo, so I don't think this should be an issue.
Also, the repo itself would be much larger, as that doesn't include any of the content.


Refresh druid process (CLI / endpoint) should create perms as it creates datasources

May i ask a question about permission, superset can support assign permissions with those datasources of druid?
Cuz i only can find those permission options like [datasource access on [main].[birth_names](id:3)] about SQLite, MySQL etc, rather than Druid.

Does running superset init create the missing perms? How do you currently sync Druid's metadata?

Yeah, i have been synchronized Druid's metadata with superset refresh_druid command.

Is the superset init command nessnary?

Wait a second, i try them.

It works! Thank u so much :D

Should we add some notes for it in Superset document Security

@asdf2014: it is already documented here - http://airbnb.io/superset/installation.html

We should make it such that superset refresh_druid creates perms where needed. I'll hickjack this issue by renaming it.

@nishantmonu51  I see. That very good, but it just notice us to use the superset init command when we Create default roles and permissions or Upgrade superset rather than changing something about permission...

Hi is this being worked on? We would want the view_menus to be add right after refreshing. So we can assign them to users. Also when a datasource is deleted, the associated perms should also be delete right? Right now it doesn't seem to do that. Can I get an update on this issue? If it is not being worked on, I'd like to work on a pull request.

@ShengyaoQian please submit a PR, we have a different way of updating metadata at Airbnb that doesn't use the exposed endpoint or CLI command from Superset. It should be pretty straightforward.

Also note that if the issue is open and there's no assignees you can assume it is not being worked on at the moment.

@mistercrunch Sure. I will work on a PR. I don't think I can assign the task to myself.

Notice: this issue has been closed because it has been inactive for 369 days. Feel free to comment and request for this issue to be reopened.


Fix only replacing wildcard at end in toNamespace

The docs state that, when running debug.disable(), it will return the namespaces currently enabled and skipped. They are, however, often malformed. This seems to be because the toNamespace method only replaces a trailing *.
debug.enable('api:*,-*:verbose,-api:*:verbose');
const prevConfig = debug.disable();
console.log(prevConfig); // -> api:*,-.*?:verbose,-api:.*?:verbose

console.log(prevConfig); should have returned api:*,-*:verbose,-api:*:verbose.
The issue seems to be fixed by removing the $ in the replace regexp in toNamespace.
It might be nice to improve the following test too:
describe('rebuild namespaces string (disable)', () => {
	it('handle names, skips, and wildcards', () => {
		debug.enable('test,abc*,-abc');
		const namespaces = debug.disable();
		assert.deepStrictEqual(namespaces, 'test,abc*,-abc');
		// ^ could use more tests, maybe: *,test,-test,abc*,*abc,abc:*:xyz,-abc:*:xyz,-*:verbose (etcetera)
	});
	// ...
});

However, for the sake of keeping this PR clean, I haven't added that to this PR.

Coverage remained the same at 87.692% when pulling 9f5ed0369e230008fba21b282ad55545ab230576 on Anoesj:fix/wildcard-replace into 22e13fe07e21f32888201aa40833599fd10a4fbb on visionmedia:master.

Coverage remained the same at 87.692% when pulling 9f5ed0369e230008fba21b282ad55545ab230576 on Anoesj:fix/wildcard-replace into 22e13fe07e21f32888201aa40833599fd10a4fbb on visionmedia:master.

I wonder how to get the maintainer's attention to get contribution merged in?

I'm always looking, the project is currently blocked due to Node feature parity issues when moving from CJS to ESM. Please see the roadmap pinned on the repo.
Further, .enable() and .disable() have a ton of issues as it stands and need to be rethought/reworked entirely.


Write a verbose return option for all model methods

Writing for all MagmaSat models for v0.9 release. Can add verbose option for other models during review or after!

Going to skip a verbose method for calculate_isobars_and_isopleths, since it doesn't really make sense for this case. It would be unclear what data to return and what a user would do with that data.


Style checking azure identity

Enable StyleCop and fix errors
Fix code style to adhere to editorconfig rules

You did core changes here too


Where a description for  Umbraco.Sys.ServerVariables?

Where a description for  Umbraco.Sys.ServerVariables?

This isn't really an Articulate question, this is an Umbraco question. But to answer, the documentation is found here: https://our.umbraco.org/documentation/Extending-Umbraco/version7-assets


Evm improvements

Removed unused parser_tx_t object to free RAM.
Use new blind sign "required" flag properly.
Display "coin asset" field based on chain ID.

LGTM! I will let the approval done.  But let's bump version minor instead of patch because we are adding a new feature.


feat: counterexample to Monic => regular in general semirings

This example fixes a mistake that I made in a PR review: the implication Monic => IsRegular does not hold in general Semirings (cf. Polynomial.Monic.isRegular for the statement with a Ring hypothesis).

Thanks, the changes are great!
bors r+


[REQUEST] For --userlist arg output file with 2 columns

Hi,
It would be SUPER useful when using the --userlist argument (with a path to the file) together with the --csv file output argument for the output file to contain 2 columns.
The first column would be the follower (current behaviour), but the second column would be a comma separated list of those accounts from the --userlist file that is a follower of that account.  E.g.
--userlist file: -
TwitterUser01
TwitterUser02
TwitterUser03
Proposed -o --csv output file: -
TwitterUser70 --> TwitterUser01,TwitterUser02
TwitterUser82 --> TwitterUser03
TwitterUser84 --> TwitterUser02,TwitterUser03
I assume this is possible because you are having to go through the --userlist file anyway and then build a combined file output with all followers.
What I am asking for would be great for producing graph files of follower relationships that could be used with e.g. Gephi.

Really hoping you can consider this :)

This is really a great idea, but please consider the difference from "data harvesting" and "data analyzing", what you are asking for is something that you can achieve trough data analyzing, for example with the db

OK thanks. I'm just not that experienced, that's all. No worries.

I'm at a Hacker Camp in these days so I'm really really busy, I'll add this and other stuff to the wiki asap

Thank you! It's very much appreciated. If I knew how to do it, I would. Would make my life a lot easier!

You can use simple SQL queries like: SELECT follows FROM following_names WHERE user = "user1"
This will return who user1 is following, you can also "switch" follows with user to get the vice versa
SQL queries return tuples so this is really easy to handle, you don't really need much more for easy elaborations like this, you can look at the db structure inside twint/storage/db.py and construct queries by your self

Hi! Really appreciate your help here...but believe me when I say it's beyond my skills. I'm happy running a simple command from Terminal by copying some examples, but when it comes to db stuff - I've no idea. If anyone has the time to do a step by step from running Twint, to storing it in a db, to querying the db to give me what I want, to producing a CSV output I'd be eternally grateful :)

I think that you should search for some basic SQL language course, this is not really the right place to talk about this
Than with a little knowledge of python you can parse the data to every format or "storage type" that you prefer


Range bug

If the start value is greater than the end value, an exception is raised.
You need to add validation so that it doesn't happen in the first place.

I added a new function to validate the form's value.


[jsonConfig]: darkStyle wrong type

No existing issues.

[X] There is no existing issue for my request.

Problem location
ioBroker Log
Warning message
deconz has an invalid jsonConfig: [{"instancePath":"/items/_instruction/darkStyle","schemaPath":"#/properties/items/patternProperties/%5E.%2B/properties/darkStyle/type","keyword":"type","params":{"type":"string"},"message":"must be string"},{"instancePath":"","schemaPath":"#/if","keyword":"if","params":{"failingKeyword":"else"},"message":"must match "else" schema"}]
Source link
https://github.com/ioBroker/adapter-react-v5/blob/ae00a551eb974fa64f4e95dd37f49e37c92570df/schemas/jsonConfig.json#L6341C46-L6341C52
Additional information
Should be type object as style it is

https://github.com/ioBroker/adapter-react-v5/blob/b52f83265c8386bb090291b2ad8e2a204e0b3e69/schemas/jsonConfig.json#L6339-L6342


git: Don't swallow all push output

Topic: outp

Reviews in this chain:
└https://github.com/Skydio/revup/pull/199 git: Don't swallow all push output

#
head
base
diff
date
summary

0
8da330e1
c7b92e83
diff
Dec 28 16:04 PM
2 files changed, 2 insertions(+), 2 deletions(-)


less encode/decode during replication

I think we should be able to not have to decode and encode the record sets when replicating and write repairing.

I agree.  I made a comment to that effect somewhere in the code.  I was thinking about making the change when simplifying the replication, but I had some concern that I no longer remember.  It definitely seems doable.


Trace id is not propagated correctly with reactor in AdaptCachedBodyGlobalFilter

Thanks for all the work that you are doing. I already investigated this bug, but I struggle to find the exact root cause and solution.
Describe the bug
We use Spring Cloud Gateway (version 4.0.4), Spring Webflux (6.0.13) and project reactor (3.5.11) for a gateway microservice.
We use the DataDog java agent for metrics.
Now, we noticed that sometimes the traces inside Spring Cloud Gateway are not connected correctly: It seems the trace id is not passed on correctly in the context if we have a request with a body.

There is one trace with 2 spans (servlet.request from tomcat-server and FilteringWebHandler.handle from spring-webflux-controller).
The other trace starts with netty.client.request from netty-client and then continues as expected.

When I disable AdaptCachedBodyGlobalFilter the traces are correct (spring.cloud.gateway.global-filter.adapt-cached-body.enabled: false)
Can it be that somehow in this filter the original context is lost and thus the tracer does not find the old trace id and uses a new one?
I expect the problem to be either in DataBufferUtils#join or ServerWebExchangeUtils#cacheRequestBody, but I am not sure how to change it, so the context is propagated correctly.

That's a great issue. I'll need some help maybe @jonatan-ivanov and I can chat about it.

I might need some help too to understand the above. :)
What is "servlet.request from tomcat-server" isn't this SC-Gateway with Webflux?
Also, there were lots of improvements around this (context propagation) in newer versions of Reactor and Micrometer Tracing. Could you please try to use latest Reactor 3.6.x and latest Micrometer Tracing (Spring Boot 3.2)?

Oh one more thing (though not very likely): java agents can cause weird behavior in components they instrument (see the end of this article), I might try to disable the agent to see if the problem still persists.

What is "servlet.request from tomcat-server" isn't this SC-Gateway with Webflux?

Good point about tomcat-server. We messed up our dependencies and got a transitive dependency to spring-boot-starter-web in our service, this dependency then also brought in Tomcat...

Also, there were lots of improvements around this (context propagation) in newer versions of Reactor and Micrometer Tracing. Could you please try to use latest Reactor 3.6.x and latest Micrometer Tracing (Spring Boot 3.2)?

I tried updating to Spring Boot 3.2.4 and Spring Cloud Gateway 4.1.1 and it did not solve the issue, but switching from Tomcat to Netty fixed it. Now the traces are looking good.
So the issue can be closed from my side. Thanks for highlighting this.


How to create a dynamic menu

Hello everyone, I would like to ask for some advice. This UI is great and is perfect for my front-end and back-end project. Now, I want to create a dynamic menu. Could you please advise me on how to set it up?

@Macfee hello!
All what you need is manage

                                   Menu item name

items.
I see you use Django.
Then you can render template using conditions.
Like
`{% if showSettings %}

Settings

{% endif %}
`
Hope it helps.

Thanks to @RomanBobkov. Hope it helps! @Macfee


Fix bug in BelongsToMany where non-related rows are returned

Laravel Version: 9.8.1
PHP Version: *
Database Driver & Version: *

Description:
After a pull request of mine was closed I wrote an explanation on the issue at hand, regarding three BelongsToMany methods that, in my opinion, can be rather confusing when you don't know the details/pitfalls hidden in them. The full PR can be found in #41881 . Now I come to understand that tickets that have been closed may never be looked at again, so I hope to find some opinions here. (Is this the place?)
Please do read up on the PR. In short, I think the behaviour of firstOrNew(), firstOrCreate() and updateOrCreate() in laravel 8.* was great and in 9.* can be confusing (up to the point that the difference in behaviour can lead to hard-to-find bugs and probably even security-related issues). I do understand there might have been a reason for the change, but I suspect the 'right' fix might have to be slightly different than the current implementation, as outlined in my last message.
Also, I'm still interested in what the exact reasons/examples were for the change in laravel 9.*, since no tests were added for it.
Any thoughts?

Please re-submit the PR with the new explanation, thanks.


The project URL (on the Git repository) redirects to a porn website

Everything is in the title. Now I need to explain to my sysadmin what the flip happen.

Please read #429


How do I expose Light Bulbs?

This may be a dumb question but I have read through all the documentation and I can not figure out how to expose my lightbulbs to homekit. Would someone be able to help me?

See #41.