Medusa bucket secret label

What this PR does:
Which issue(s) this PR fixes:
Fixes #1253
Checklist

[ ] Changes manually tested
[ ] Automated Tests added/updated
[ ] Documentation added/updated
[ ] CHANGELOG.md updated (not required for documentation PRs)
[ ] CLA Signed:  DataStax CLA

A bunch of unit/integration test failures here, these don't happen locally so I'm not sure what the problem is. I'm assuming there's something wrong with main which is getting picked up in the pre-test rebase.

This PR now

Also ensures that the system kustomize is not used for e2e tests, instead preferring the one installed in the ./bin directory.
It pins that kustomize back to a 4.x.x version to ensure that we can use namespace replacements as expected.
It fixes some issues in the makefile where the local bin dir was not being exported to subshells.
It changes the port used by the docker registry deployed by kind to 5001, which avoids conflicts with other services on recent MacOSes.
I've also added patch permissions for secrets, which was necessary to ensure that the update operation could happen.

It should be ready to go now and CI should be 100% green.


Improve project import process in scan engine module to support UDVs and shared variables

@Beazurt @becega
should probably do this
should probably do this as part of an API we can share with others

Yess if not at least we should be able to import a library and all the variables in it.

and ethercat


Support oci chart

Hauler is not support to package oci chart.

not intuitive but if you refer to the oci chart as an image instead of a chart this should suffice as a work-around. if this is not acceptable, please create a new issue and fill out one of "bug report" or "feature request" templates

Closing as resolved per PR https://github.com/rancherfederal/hauler/pull/245!


Hey guys - this is a great piece of code for integrating Airtouch4 to HA. Have noticed that I need to restart HA each morning for the climate controls and sensors to update .

Not sure what's causing this, but it is almost as if the connection to Airtouch times out after a period of time (usually notice this in the morning after one of the AC systems was in the Off state

Hi @ddebono1984, are you sure you're running on the latest version of the home assistant integration? This was widely reported a month or so ago, and since it was fixed, I haven't had anyone else report similar issues

Thanks for the quick feedback - where would I find the latest version of the custom_component files?

@ddebono1984 as explained in this post here https://community.home-assistant.io/t/airtouch-4-integration-aus/233295/63 if you want to run it using custom_component, people have found that if they clone/download the airtouch4-integration branch from the forked repository https://github.com/LonePurpleWolf/core/tree/airtouch4-integration, and then copy all the files in homeassistant/components/airtouch4 https://github.com/LonePurpleWolf/core/tree/airtouch4-integration/homeassistant/components/airtouch4 to their custom_components/airtouch4 folder, it works. If/when HA core accept the integration, the process will not be this complicated.


Start playing with properties

Add the following functionality:

[x]  repetitions of the text (writing something similar to <Lorem times={3} /> is more efficient that <Lorem /> <Lorem /> <Lorem />
[x] style ( we could even start with html header type: <Lorem style="h1" />

Regarding the second checkbox, passing style as a property is not as good as just passing specific style attributes as properties. You pass the whole style as a property, you pass an entire object and that's not good.
Better stick to individual properties, as the current implementation suggests.


Incorrect ToolChip is displayed.

There is an error in the tooltip guide for the Preview Editor shortcut keys.
ToolChip's misrepresentation of the actual function assignment is as follows.
Skip Stream = Ctrl+Shift+S
Save = Ctrl+S

In Ver. 2.2.0, shortcut key customization is supported and ToolTip is now dynamically controlled according to key assignments.

In Ver. 2.2.0, shortcut key customization is supported and ToolTip is now dynamically controlled according to key assignments.


Enhancement-setmap from command line

sometimes the map gets confused, esp if 2 clients are running at the same time.
to fix the issue you just go to the mapper, select any other map and then re-select the appropriate map and your automapper issue i resolved.
can you expose a command to setmap # or something ?
PS Having a great time with it, thanks alot.

Genie has a #mapper reset command.  I think that will work great for this.

#mapper reset was added in v0.9.7


additional schema tests - cassandra-6717

this was branched off another pull request -- these additional tests fail due work still going on in for c*3.0

lgtm, and runs fine against trunk
+1


Illegal field entry - yellow card

Setup:

In the config.json, the robot is positioned in an invalid position inside the field of play.
The robot walks into the field at the beginning of the READY phase, while it is still penalized.

Expected outcome:

The robot is spawned at the beginning of the game.
The game state changes to READY
The robot is penalized by the referee and respawned at penalty position
The robot enters the field again
The robot is penalized again by the referee, respawned at penalty position and shown a yellow card
Game log contains the information (with real and simulated timestamp): Robots being spawned + position,  game state READY, robot (identified by team and number) penalized + type of penalty, robot (identified by team and number) re-spawned at penalty position, robot (identified by team and number) penalized again, robot (identified by team and number), robot (identified by team and number) re-spawned at penalty position receiving a yellow card

Covered by test_initial_positions.

I would assume this is a more general rule: if a penalized robot enters the field again, it gets a yellow card. Is that correct?
I could not find it explicitly in the rule book.

Yes, that's the case, it's written L525 of the Rules-Draft3

Covered automatically by the scenario positioning/initial.

According to the automatic test, robots are getting penalized at the beginning of PLAYING and not at the beginning of SET (which is important to guarantee that they are allowed to move directly from the beginning of PLAYING).

According to the automatic test, robots are getting penalized at the beginning of PLAYING and not at the beginning of SET (which is important to guarantee that they are allowed to move directly from the beginning of PLAYING).

Fixed in https://github.com/cyberbotics/webots/pull/2888/commits/56dd14c6b6db6784abd0728848ccc1e77e73324d


More options and features

New Features

Creates APP bundle without the need to use paclient by registering deploy channels. Folder and PAClient channel come by default (see -registerFolder and -registerPAClient options)
Allows the use of different folder for the binaries (see -binaryFolder option)
Checks deployment files to see whether they are needed depending on the configuration

Thanks a lot Vladimir.

Thanks to you too for bringing it out of the rough beta stage :)
Btw, in your post you mention that it used to require the PAClient for building an App bundle. It didn't need it for that, only for deploying Sandboxed apps that have to be signed. The App bundle is just a folder so I built and zipped it just by copying files. I'm pretty sure I had pushed the latest code to github.

Hi Vladimir,
you are right about the bundle and the use of PAClient in your initial code. However, you were just creating the folder but not setting the bits of the files to make it recognisable as .app bundle under OSX. I have, also, separated the creation of the folder and the compression to zip.


Create an intro

Add an intro about yourself: who are you, what is your strength, why are you here.

c


Installation fails with yarn due to<EMAIL_ADDRESS>

Description
When I try to install nativefier using yarn, it fails due to engine incompatibility from upath. I realise that this could be handled by changing yarn settings - yarn config set ignore-engines true. Also, the issue was fixed upstream(anodynos/upath#15) but for some reason yarn tries to install<EMAIL_ADDRESS>Steps to reproduce issue
➜ yarn global add nativefier
yarn global v1.7.0
(node:31075) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/4] 🔍  Resolving packages...
warning nativefier > electron-packager > electron-download > nugget > progress-stream > through2 > xtend ><EMAIL_ADDRESS>
[2/4] 🚚  Fetching packages...
error<EMAIL_ADDRESS>The engine "node" is incompatible with this module. Expected version ">=4 <=9".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

Details

Are you nativefying a public website?

NA

Feature request? Have you looked at nativefier --help to see if an existing option could fit your needs?

NA

Full nativefier command used to build your app: <command here>

NA

Version of Nativefier (run nativefier --version): v0.0.0

NA

Version of node.js (run node --version): v0.0.0

v10.6.0

OS: <OS here>

Ubuntu 18.04 LTS

Error message / stack trace (if any):

See above

Hi @sudo-suhas, thanks for the feedback 🙂. Couldn't reproduce, the issue must have been fixed recently in one of {upath, yarn}.
Logs:
 /opt/nativefier (master|✔) node --version
v10.7.0

 /opt/nativefier (master|✔) yarn install
yarn install v1.7.0
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning electron-packager > electron-download > nugget > progress-stream > through2 > xtend ><EMAIL_ADDRESS>
warning gulp ><EMAIL_ADDRESS>gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning gulp > vinyl-fs ><EMAIL_ADDRESS>please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
warning gulp > vinyl-fs > glob-stream ><EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-stream > glob ><EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule ><EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob ><EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob ><EMAIL_ADDRESS>please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
warning jest > jest-cli > istanbul-api ><EMAIL_ADDRESS>1.2.0 should have been a major version bump
[3/5] Fetching packages...
info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " ><EMAIL_ADDRESS>has unmet peer dependency "webpack@2 || 3 || 4".
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>[5/5] Building fresh packages...

success Saved lockfile.
Done in 23.20s.

I tried it again just now, not fixed :disappointed:
➜ yarn global add nativefier
yarn global v1.7.0
(node:22777) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/4] 🔍  Resolving packages...
warning nativefier > electron-packager > electron-download > nugget > progress-stream > through2 > xtend ><EMAIL_ADDRESS>
[2/4] 🚚  Fetching packages...
error<EMAIL_ADDRESS>The engine "node" is incompatible with this module. Expected version ">=4 <=9".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

I tried it just now, not working.

The issue is not due to nativefier:
➜ yarn add nativefier
yarn add v1.7.0
[1/4] 🔍  Resolving packages...
⠁ (node:12594) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
warning nativefier > electron-packager > electron-download > nugget > progress-stream > through2 > xtend ><EMAIL_ADDRESS>
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...

success Saved lockfile.
success Saved 184 new dependencies.
...
➜ yarn why upath
yarn why v1.7.0
[1/4] 🤔  Why do we have the module "upath"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
error We couldn't find a match!
✨  Done in 0.32s.
➜ cat yarn.lock | grep upath

I ran yarn global upgrade-interactive to fix the issue:
➜ yarn global upgrade-interactive
yarn global v1.7.0
(node:12999) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info Color legend :
 "<red>"    : Major Update backward-incompatible updates
 "<yellow>" : Minor Update backward-compatible features
 "<green>"  : Patch Update backward-compatible bug fixes
? Choose which packages to update.
? Choose which packages to update<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>info Installing "dependencies"...
[1/4] 🔍  Resolving packages...
warning snyk > proxy-agent > socks-proxy-agent ><EMAIL_ADDRESS>If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
[2/4] 🚚  Fetching packages...
info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
success Saved 409 new dependencies.
info Direct dependencies
├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>└─<EMAIL_ADDRESS>info All dependencies
...
├─<EMAIL_ADDRESS>...
✨  Done in 31.08s.
➜ yarn global add nativefier
yarn global v1.7.0
[1/4] 🔍  Resolving packages...
⠂ nativefier(node:13096) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
warning nativefier > electron-packager > electron-download > nugget > progress-stream > through2 > xtend ><EMAIL_ADDRESS>
[2/4] 🚚  Fetching packages...
info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Installed<EMAIL_ADDRESS>with binaries:
      - nativefier
✨  Done in 6.77s.

@sudo-suhas only your solution works for me.
Thanks!


Please add onDrop override method to the example.

Just a improvement...

Can you clarify? or make a pull request?

Sorry if I am wasting your time. It is just an enhancement. Not even to the meaningful code.
The 'ExampleAdapter.java' class does not have the 'onDrop() { }' override method readily in it.
I know it's present in the usage. But after reading the usage I was copy pasting through directly from the example adapter. And since the onMove method is present in 'ExampleAdapter.java'. So I mistook that for onDrop.
Great work by the way.
Thanks.


The latency reached the second level when injection of 50ms of io jitter

Bug Report

What version of TiKV are you using?
v8.5.0
What operating system and CPU are you using?

6-tikv-32c/128g-m6g.8xlarge
Single Disk: io2-8000

Steps to reproduce
1、run simulated Wetech WalletCenter workload
2、injection of 50ms of io jitter
What did you expect?
A small influence on business
What did happened?
qps drop 53%
max latency(P999/P99) : .36s/238ms

/type bug
/severity major
/assign glorv


error in gemspec

Invalid gemspec in [/Users/pivotal/.rvm/gems/ruby-1.8.7-p334/specifications/lobot-0.9.1.gemspec]: Illformed requirement ["#YAML::Syck::DefaultKey:0x106792a00 0.9.0"]
/Users/pivotal/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:72:in `parse': Illformed requirement ["#YAML::Syck::DefaultKey:0x1071377b8 0.9.0"] (ArgumentError)
....
in our Gemfile.lock:
lobot (0.9.1)
  capistrano
  capistrano-ext
  fog (#<YAML::Syck::DefaultKey:0x1071377b8> 0.9.0)
  nokogiri (>= 1.4.4)
  rvm

We upgraded to the latest rubygems and still have the problem.
We switch to this fork: git://github.com/Unpakt/lobot.git

That fork looks identical though out of date, I think you're just running into a gemspec issue with Psych vs Syck. When you point bundler at github, it builds the gemsepc itself, hopefully using a yamler that works for your ruby.
I've pushed 0.9.2 built with ruby 1.8.7 and the latest rubygems, can you let me know if that works for you from rubygems?
We also eliminated the "=" dependency on Fog, which apparently breaks YAML. (http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html)


rgeos retirement

Hello,
First of all thanks a lot for creating and maintaining this package all these years.
I'd appreciate it if you can guide me about alternative options for my case described below:
I'm using sp package to define polygons, which are the boundaries around the cluster of points in 2D, and then gIntersects, gDifference,gBuffer, gUnion from rgeos mainly to do polygon manipulation (i.e., union, subtraction and intersection of two polygon), extracting the coordinates of the polygon from these functions, and then using point.in.polygon from sp to get indices of point inside the polygon.
I have part of my code  here as well.
#filter1 and filter 2 are matrices of 2D coordinates
  poly1 <- sp::SpatialPolygons(list(sp::Polygons(list(Polygon(filter1)), ID=c("c"))))
  poly2 <- sp::SpatialPolygons(list(sp::Polygons(list(Polygon(filter2)), ID=c("c"))))
  if(rgeos::gIntersects( poly1, poly2)){
    temp <-tryCatch(rgeos::gDifference(poly1,poly2), error=function(ex) return(1))
    if (mode(temp)=="numeric")
    {
      temp <- rgeos::gDifference(poly1,rgeos::gBuffer(poly2))
    }

    filter<-temp@polygons[[1]]@Polygons[[1]]@coords
 }

Since I'm working with biological data, reproducibility is really important, and I'd like to avoid any discrepancy while moving from rgeos/sp to another package, so any help would be very much appreciated

Analysis for rgeos: only flowDensity of all Bioc packages uses rgeos: "rgeos::gIntersects" "rgeos::gDifference" "rgeos::gBuffer". No Bioc packages are "most" reverse dependent on rgdal, only "GEOexplorer" is "most" reverse dependent on maptools: "maptools::pointLabel". As far as flowDensity is concerned, please attempt replacement with polyclip and report back.

Thanks @rsbivand. To answer your question, polygons in my case don't have holes, but there will be cases that one polygon might be inside the other one while sharing an edge or vertices.
Regarding reproducibility, I didn't mean rgeos is not reproducible, I'd like to use a replacement that won't alter the result much.
Thanks for the polyclip. I will check it and see how it goes, I just need to see how easy it is to use both sp and polyclip together.

Briefly, I don't think that sp is needed, just objects as specified in polyclip.


404 Not Found

After deploying to modal and trying to run this command:
curl -X POST -F "audio=@<filename>" https://<org>--whisper-v3-entrypoint.modal.run
The console returns {"detail":"Not Found"}
Checking the logs on Modal, I see "404 Not Found" errors.
Trying the web app on localhost does not work either.

OK, the correct command is:
curl -X POST -F "file=@" https://--whisper-v3-entrypoint.modal.run/transcribe


Gradle Donwload

One of the steps in deploying the sample Java app is assembling the app locally using Gradle.
Is there a way to specify to use the already installed instance of gradle rather than for the script to go and download Gradle again?
I am behind a proxy on a corporate network which i believe is causing the gradle download to fail. Configuring HTTP_PROXY or HTTPS_PROXY has not helped either.
I have gradle 2.14 installed on my box. So, is there was a way to get to use the already installed instance of Gradle rather than to go and download Gradle.
C:\Downloads\spring-music-master\spring-music-master>.\gradlew.bat assemble
Downloading https://services.gradle.org/distributions/gradle-2.14-bin.zip
Exception in thread "main" java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:564)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:272)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install$1.call(Install.java:61)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

Can you try setting http_proxy and https_proxy instead? Many applications only respect the lower-cased versions.
I suspect that you will need an internet connection to build that sample app.

i do have an internet connection and can access https://services.gradle.org/distributions/gradle-2.14-bin.zip from a browser.

Also, i forgot to mention that the lower case http/s_proxy environment variables did not make any difference.
Going back to the original question do i take that there is no way to use the existing Gradle set up and the only option is to download Gradle.

On my machine, the gradle zip is downloaded to:
~/.gradle/wrapper/dists/gradle-2.14-bin/76oc0mnc3ieqtsukq90mp0rxk/gradle-2.14-bin.zip

And it's not downloaded again on subsequent builds. You may be able to download it separately and provide it to gradle -- I'm not really sure, I don't use gradle. Regardless, you still won't be able to build spring-music without HTTP connectivity, because gradle needs to download 100+ other Java dependencies to build it.
This issue tracker is for questions about PCF Dev -- I suggest you refer to the gradle documentation for questions about gradle: https://gradle.org/docs


AuthenticationProperties allows non-local redirect URLs

Is there a scenario where this should be allowed? (because it is)
var props = new AuthenticationProperties {     RedirectUri = "https://evil.com };

How are you consuming the redirect Uri?  Cookies typically blocks absolute uris https://github.com/aspnet/Security/blob/23da47617624cfed065cd1cdd552d34e5ea5b821/src/Microsoft.AspNetCore.Authentication.Cookies/CookieAuthenticationHandler.cs#L377

I am using it as a redirect URI for Google authN challenge.
It indeed redirects me to evil.com after google is done.

@Tratcher @blowdart should the OAuth handler be blocking absolute redirect uris in the challenge similar to cookies which has a IsHostRelative check?  Doesn't look like this ever had a check going back to the Katana days
https://github.com/aspnet/Security/blob/dev/src/Microsoft.AspNetCore.Authentication.OAuth/OAuthHandler.cs#L195

That's deliberate: the AuthenticationProperties.RedirectUri property is assumed to be set and controlled by the developers themselves. If you rely on user input, you're responsible of validating it first (which is no different than returning return Redirect([user-provided URL]) in MVC).
Related: https://github.com/aspnet/Security/pull/940 and https://github.com/aspnet/Security/pull/943.

Sure - but is it needed to have that feature?

Why not? It's even quite common (e.g you can have your login stuff hosted at https://login.domain.com/ and redirect the user agent to https://www.domain.com/ when the authentication flow is done... and for that, you need to use absolute URLs).
Plus changing that at this point would be a (big) breaking change.

Why not?

Just asking - because you know it all :P

"Sarcasm is the lowest form of wit, but the highest form of intelligence" - Oscar Wilde :four_leaf_clover:
Joking aside, I knew that because I'm the guy who recommended making the RedirectUri handling consistent in the cookies handler: https://github.com/aspnet/Security/pull/940#r74350492 (and additionally, I've since used this pattern a few times in 1.1 :trollface:)

Wait, so changing this would break @PinpointTownes? This seems a win all around. :trollface:

I agree with the comments in https://github.com/aspnet/Security/issues/1382#issuecomment-324332727.
Disallowing this would be a breaking change and I think there's little value in the change.


The history of the multi API / MFD discussions 2022 July - Sep

Intruduction
This issue will go through the entire MFD / multi API device model discussions starting in with the modem driver design issue. Please note that this is summarizing multiple PRs and issues with about 100 comments across them, some details will be left out.
The issue with modem driver design July 2022
Modems often contain multiple functions, which are not common between all modems. The BG96 contains a cellular modem, GNSS modem and GPIO controller. Each of these modules support multiple features. A simple graph of features is shown below:
BG96 {
    DFOTA (download firmware over the air)

    Cellular modem {
        network interface
        dtm (direct test mode)
        cellular info (RSSI, IMEI, towers)
        SMS
    }

    GNSS {
        location (lat, long, speed, altitude etc.)
        gnss (tracking mode, satelite count, power modes, NMEA frames)
    }

    QuecLocator (cellular location) {
        location (lat, long, speed, altitude etc.)
    }
}

This is the basis for the need for multiple APIs since the BG96 contains multiple functions, which may contain multiple APIs each.
This issue was brought up at the architecture meeting, and no solution to the problem was suggested at that time.
The MFD devicetree parent/child solution July 2022 https://github.com/zephyrproject-rtos/zephyr/pull/47655
This solution to the problem is simple, just add every function or feature which requires its own API, be it an actual device or just a device struct being used as a handle, to the devicetree. Then instanciate a single driver for the top parent node which instanciates device instances for all features (child devices).
The issue proposed design rules and some macros which would help to keep the design and implementations of MFDs consistent.
BG96 {
    compatible = "quectel,bg96"

    cellular info {
        compatible = "quectel,bg96-cellinfo";
    };

    sms {
        compatible = "quectel,bg96-sms";
    };

    dtm {
        compatible = "quectel,bg96-dtm";
    };

    gnss {
        compatible = "quectel,bg96-gnss";
    };
};

The summed up opposing opinions  to this solution at the time was:

This solution is already in use in-tree
We should consider if the current device model is sufficient for MFDs moving forwards.
This solution deviates from the linux driver design as they support multiple APIs pr node.
features like sms and dtm are not actual devices, they are purely software, so they should not be in devicetree as nodes

The last opposing opinion sparked the research into multiple APIs pr device node.
The runtime API lookup solution Aug 9 2022 https://github.com/zephyrproject-rtos/zephyr/pull/48817
This solution pulled out the API pointer from the struct device, and placed it in an iterable section based on API type along
with a pointer to the device struct it belongs to.
Device instantiation before:
struct i3c_driver_api;
DEVICE_DT_DEFINE(node_id, ..., &i3c_api);

Device instantiation after:
struct i2c_driver_api;
struct i3c_driver_api;

DEVICE_DT_DEFINE(node_id, ..., NULL)
I2C_API_DT_DEFINE(node_id, i2c_driver_api)
I3C_API_DT_DEFINE(node_id, i3c_driver_api)

The iterable sections would contain arrays of the following:
struct device_api {
    void *api;
    struct device *dev;
};

and the API wrappers would be rewritten to look through the section containing all devices
which support the specific API, comparing the provided struct device with the one in the
iterable section, to invoke the correct API implementation for the device.
The opposing responses to this solution at the time:

Requires updating all device API wrappers
Requires updating all device drivers DEVICE_DEFINEs
Is slow due to runtime lookup of appropriate APIs, especially for GPIO ports as there are often 10 plus pr controller.

The multi API device model solution take 1 Aug 2022 https://github.com/zephyrproject-rtos/zephyr/pull/48817
This solution creates a single device struct and names it according to its api type, moving away from the generic DEVICE_DT_DEFINE(node_id, ..., api_ptr) to DEVICE_DT_API_DEFINE(node_id, ..., api_type, api_ptr) and
DEVICE_DT_GET(node_id) to DEVICE_DT_API_GET(node_id, api_type).
This allows for multiple device instances
pr device node, since a device instance is accessed using both the node and the api_type.
struct device *i2c_dev = DEVICE_DT_API_GET(node_id, i2c);
struct device *i3c_dev = DEVICE_DT_API_GET(node_id, i3c);

Note this solution doesn't work well with the PM subsystem as all devices which belong to the same node share the the same PM sub context.
pm_action(i2c_dev, ...);
is equal to
pm_action(i3c_dev, ...);
All instantiated devices would also be placed in iterable section by api type with this solution.
There where no relevant opposing responses to this solution at the time, just some notes:

We must know which APIs are supported for each node before compilation as this knowledge is required.

The multi API device model solution take 2 Aug 22 2022 https://github.com/zephyrproject-rtos/zephyr/pull/49374
This solution is identical to the first take, however, this was the full implementation of it. It is split into multiple smaller issues
which we will go through now.
Where to declare API support and generate macros take 1 Aug 2022 https://github.com/zephyrproject-rtos/zephyr/pull/49374
The first solution was to use create a new top-level key in the bindings files in dts/bindings named api:. The required macros for the multi API device model where then generated by edtlib.py.
This solution also identified that it was not necessary to place devices in iterable sections at compile time (presuming all devices where declared in the devicetree) since we could generate foreach macros instead, greatlyr reducing complexity and allowing for compile time checks for if a device supports a specific API, or if any device supports a specific API, which could be used to auto exclude shells and subsystems which only work if those devices exists, and selecting the appropriate API when there are multiple potential APIs supported for a device, fx sensors often support both I2C and SPI, the macros could be used in place of the bus: property.
The opposing responses to this solution at the time:

API is a software description, and should not be placed in devicetree

Where to declare API support and generate macros take 2 Aug 2022 https://github.com/zephyrproject-rtos/zephyr/pull/49374
The properties files where invented, YAML files that extend the properties which can be defined for a device using the device
compatible to link the properties in it with the devicetree nodes and bindings files.
The supporting responses to this solution

We can place other meta data in these files
We should separate the properties files from the multi API device model solution as they are not strictly coupled with the multi API device model.

The opposing responses to this solution

Adds complexity
There is some overlap between responsibilities of Kconfig files and properties files
Some of the ideas for properties to place in properties files where covered by bindings files

At this point, the properties files are pulled out into their own PR.
Back to the multi API device model Sep 2022 https://github.com/zephyrproject-rtos/zephyr/pull/49374
The multi API device model using the properties files is discussed at this point. This section will look past the properties files, which have their own section later. As a response to this PR, the following solutions where presented / discussed:
The runtime API lookup solution with added flag for multi API devices
The solution treats single and multiple API devices differently, by using the api pointer inside the struct device if only one API
is supported, and using the API lookup if more than one API is supported for said device. This differs from the first runtime lookup solution as this would aim to remove the api ptr from the struct device, which means every device would be treated equally.
This solution solves

Multi API devices
Grouping devices by API type for all devices

This solution requires

Adding API sections to linker files for all APIs
Updating the DEVICE_DEFINEs
Updating all API wrappers to support API lookup

Issues with this solution

Adds runtime overhead for multi API devices
No type safety on device structs ()

Using device_api structs instead of device struct clones
The seconds solution was to use the multi API device model proposed in the PR, but changing device instance struct to the following:
struct device_api
{
    void *api;
    struct device *dev;
};

This would save ROM because only two extra pointers are added for each API (and one removed from inside the struct device), including the "primary" one, instead of the entire struct device.
This solution solves

Multi API devices
Grouping devices by API type for devices in devicetree

This solution requires

Knowing API types of devices before compilation to create macros/externs to statically obtain devices
Updating the DEVICE_DEFINEs
Updating all API wrappers to use device_api structs

Issues with this solution

Awkward with PM subsystem
Grouping of devices by type only works for devices in devicetree

Using the originally proposed MFD solution
The original solution was brought up again as a possible solution. Issues and requirements for solution will be repeated here.
This solution solves

Multi API devices
Multi functional devices

This solution requires

Optional addition to docs
Optional macros to help with device driver instantiation

Issues with this solution

Places software constructs in devicetree
Uses the most ROM
Only works for devices in devicetree

Using the multi functional device model in the PR
This solution solves

Multi API devices
Grouping devices by API type for devices in devicetree

This solution requires

Knowing API types of devices before compilation to create macros/externs to statically obtain devices
Updating the DEVICE_DEFINEs

Issues with this solution

Awkward with PM subsystem
Grouping of devices by type only works for devices in devicetree

Properties files PR Sep 2022 https://github.com/zephyrproject-rtos/zephyr/pull/50441
The supporting responses to the properties files on their own:

May contain metadata regarding drivers that should not be in devicetree bindings files
Are easy to integrate into CI
May be used for declaring APIs

The opposing responses to the properties files on their own are:

To complex to only be used to declare APIs and metadata
Some properties might be declared in Kconfig instead
Some properties might be declared in bindings files instead
Some properties might be declared in source files and extracted by scrubbing elf files instead
There are not enough features that need the functionality brought by the properties files at this time to justify adding them

Solution Bjarki
Proposed solution
Using the api_device structs model, placing the api / device type information in the bindings files, generating macros using gen_defines.py / edtlib.py.
Supporting remarks

Only adds 1 pointer pr API to ROM if struct device pointer is removed.
No runtime lookup of devices
Type safety through specifying device type in DEVICE_API_GET

Requirements

Requires rework of PM device subsystem
Requires updating DEVICE_DEFINEs
Requires updating edtlib

Further arguments
The PM device subsystem is already remarked as being flawed and will be updated in the future in any case. For single API devices, the PM subsystem works as expected, it also works with multi API devices, but it is awkward.
The update of DEVICE_DEFINEs can be done gradually, and only require changing the api_ptr argument, which allows for an easy transition to this model.
The api: key in the bindings files is nearly identical to the Linux device_type: property, we could even call it device_type, but it is not as clear as api:. So there is precedent for having that information in the devicetree bindings files.

The MFD devicetree parent/child solution July 2022 #47655
This solution to the problem is simple, just add every function or feature which requires its own API, be it an actual device or just a device struct being used as a handle, to the devicetree. Then instanciate a single driver for the top parent node which instanciates device instances for all features (child devices).
The issue proposed design rules and some macros which would help to keep the design and implementations of MFDs consistent.
BG96 {
    compatible = "quectel,bg96"

    cellular info {
        compatible = "quectel,bg96-cellinfo";
    };

    sms {
        compatible = "quectel,bg96-sms";
    };

    dtm {
        compatible = "quectel,bg96-dtm";
    };

    gnss {
        compatible = "quectel,bg96-gnss";
    };
};

The summed up opposing opinions to this solution at the time was:

This solution is already in use in-tree

It is used e.g. by STM32 timers (specific functions of the timer are represented as child nodes: pwm, qdec, etc. Same approach is used in Linux, so we're not deviating here. Also used now by GD32 RCU (Reset and Clock Unit).

We should consider if the current device model is sufficient for MFDs moving forwards.
This solution deviates from the linux driver design as they support multiple APIs pr node.

The main problem I see in Zephyr really is that we use DT node identifiers (node labels, paths, aliases, etc.) to obtain struct device instances. This forces us to have a 1:1 relationship between DT nodes and struct device objects. This is the main difference with Linux, I guess. It's not really a problem, but a design choice that has important consequences on how we use Devicetree. For example, node labels are used in DT to reference to a node, e.g. in pwms = <&pwm1 0 ...>; but that's it. In my view, the fact we use them to obtain software devices means we're in practice using DT as a compile time source of software configuration.

features like sms and dtm are not actual devices, they are purely software, so they should not be in devicetree as nodes

They could also be seen as hardware blocks of the modem (some definitely are, like GPIO), but it's true that some cases may be at the edge. But as I said above, we don't use Devicetree as Linux does, and I think we need to be pragmatic in the end. Is it worth breaking the whole device model? Or is it better to allow for certain exceptions in the case of MFDs (allow for Zephyrisms)?
I solved the GD32 RCU case this way:
https://github.com/zephyrproject-rtos/zephyr/blob/e348fe494a21aad2bfd5744e0e2ce57262a24651/dts/arm/gigadevice/gd32f4xx/gd32f4xx.dtsi#L39-L55
RCU is a HW block that has both reset and clock control registers. I could just describe the RCU in DT (as ST does on Linux with RCC, same/similar IP). But to my understanding, it's not inaccurate to add a couple of sub-nodes to represent the reset and clock control blocks.

The last opposing opinion sparked the research into multiple APIs pr device node.

I get the point, but I think we need to be careful on breaking the device model for what it seems to be an edge case that has, in my view, a viable solution with the existing model.

@gmarull Sorry, but could you copy your comment to this discussion https://github.com/zephyrproject-rtos/zephyr/discussions/50641 ? I have created a copy in the discussions section instead of the issues section. I tried to close this issue but it did not work it seems :)

FYI; there is a "Convert to discussion" action for issues.

FYI; there is a "Convert to discussion" action for issues.

Ha, of course there is :)


BracesFixer - handle comment for content outside of given block

@keradus, I'm seeing some odd behavior in the latest php-cs-fixer release that seems to be related to this PR. If I have a series of comments inside an if..else, the first one gets de-indented. So, for example, I end up with something like this:

if ($condition) {
    echo "This is code.";
// This is the first line of comments
    // This is the second line of comments
} else {
    echo "This is different code.";
}

This isn't really causing major problems for me, but it seems like it is not the desired behavior, so I thought you might be interested to know. Please let me know if you would like any additional information.

2nd commend shall be de-indented as well, as those multiple T_COMMENT are one comment for dev.
Would you mind to send a PR ?

@keradus, it may take me a little while to find time to put together a PR, but I will try to do so. Thanks!

Thanks, I would appreciate that !

@keradus, I wanted to start by creating a test case to demonstrate the problem, and to this end I began trying to find a way to set up an example of my problem in BracesFixerTest. Unfortunately, I don't think I understand exactly what all these arrays of examples are supposed to do, and I ran out of time before achieving success. Do you have any pointers on a place in the test suite where I can simply provide input and expected output in order to begin this project?

Sure @demiankatz
test case is the following array: [$expected, $input = null, array $configuration = null]
$input is code piece before fixing, then $expected is the code we want to have after fix
we could also have only $expected, if we want to confirm that fixer won't change anything in already valid code (no $input)
optionally, $config could be added if we want test rule configured differently (some of the rules allows for configuration).
Now, I can see that we didn't properly handle this PR. Test scenarios we have added are having expected values, but not input ones (only one element in array).
For that, I do believe that we shall add next case build on top of https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3359/files#diff-6ee2b7ebb0faee78657d4e8d3fb3e10dR2781 . Basically, copy it as next case scenario and modify it to cover newly discovered issue - by both, extending it to cover multiline comments and to have that missing $input version

Thanks, @keradus, that is extremely helpful. I was able to create a failing test here:
https://github.com/demiankatz/PHP-CS-Fixer/commit/8b5f66447b06c45c89fc0e9330d409aea4a96b5b
Not sure if I'm qualified to actually fix the bug, though -- I've been poking at the code a bit, but it's quite complex, and I'm not sure if this problem is going to require a small tweak or a more significant rewrite. I welcome advice if you're willing to share. In any case, thanks for your time so far!

you welcome ;)
I do agree that braces rule is huge and hard to maintain, but hey, it's monster for sad reasons, that it's super complex to handle all of those braces in one place without creating conflicts with other rules and have all "sub-rules" of braces working well together :( https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/472 for reference - see amount of commits, fixes, referred issues...
Your test-case looks pretty valid and I believe it nicely showing the issue we are facing now.
Please, open it as work-in-progress PR, so it would be easier to actually discuss and help on it, also we would have CI services processing the changes !

Thanks, @keradus, I've opened #3573 to continue this conversation. And yes, I do understand that some of these things are inherently complicated. Keeps us from getting bored, I guess! :-)


Variable Detection Flaw

In the attached elf x86 executable one of the binary-ninja assigned variables isn't being recognized.
Flaw is in the check function.
Switching to Low Lever IL option fixes the bug. Check the screens.
FLAW:

WORKING:

Source for binary executable here. Look for a file named crackme0x04 under bin-linux folder.
The linux binaryninja version i used is 1.0.7 (demo edition :grimacing:)

Fixed in dev

Thank you!


Implement 2FA

Implement flows for enabling and disabling 2FA, including using recovery codes.
Implement login flow for 2FA. (This looks like "oauth success -> user requires 2fa, enter otp code -> on success continue, on error retry")

Counter point: Github supports 2FA already. Is there a way we could check whether or not a GitHub user uses 2FA so that we can utilize that, rather than potentially having 3FA?

I don't think there's a way to tell if a user has 2FA enabled through the API, unless they're a member or collaborator on your org :\

What I'd like to gain from Entropic-supported 2FA is the ability to prompt users for a second factor when taking sensitive actions, like publishing a package, inviting/removing folks from namespaces, or inviting/removing maintainers from packages. GitHub 2FA protects the initial sign-up process (& subsequent website sign-ins to generate tokens) but not app-specific actions.

OTP and SSS (Shamirs Secret Sharing) are also great solutions, especially to prevent the storage of full tokens.

I guess FIDO2 would only make sense for a web-registry login scenario https://fidoalliance.org/fido2/


[NextJS] Error fetching data from a Server Component

Bug report

[X] I confirm this is a bug with Supabase, not with my own application.
[X] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug
I’m trying to set up Supabase authentication in a multi-tenant NextJS 13 app with experimental appDir enabled, based on this example and this one.
However, when trying to fetch data from the server, it fails with the following error:
{
  error: {
    message: 'TypeError: fetch failed',
    details: 'TypeError: fetch failed\n' +
      '    at Object.fetch (node:internal/deps/undici/undici:11457:11)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)',
    hint: '',
    code: ''
  },
  data: null,
  count: null,
  status: 0,
  statusText: ''
}

A post in the Discussions section is also available, with a little more information.
To Reproduce
I've created a repo with minimum configuration to reproduce the issue.

Clone the repo.
Copy .env.local.example to .env.local and fill the values.
Since it is using GitHub login, point a GitHub app to http://app.localhost:3000.
Execute the app with npm run dev.
Go to app.localhost:3000/login.
Perform login.
If session is present, then app.localhost:3000 will try to fetch data from the server and will raise the error, so it will be seen in the console.

Expected behavior
Info from Supabase being returned.
System information

OS: macOS
Version of Node.js: 20.0.0
@supabase/auth-helpers-nextjs: ^0.6.1
@supabase/auth-helpers-react: ^0.3.1
@supabase/supabase-js: ^2.21.0

Had a complex setup based on self hosted configuration. I made it work changing the urls for the server helper method.

Can you provide more context to your resolution? I'm having the same problem


pre-commit update

Codecov Report

Merging #8 (aa15328) into main (e248a8e) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head aa15328 differs from pull request most recent head 026b585. Consider uploading reports for the commit 026b585 to get more accurate results

@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   18.96%   18.96%
=======================================
  Files          10       10
  Lines         717      717
=======================================
  Hits          136      136
  Misses        581      581

Flag
Coverage Δ

cpu
18.96% <ø> (ø)

pytest
18.96% <ø> (ø)

python3.10
18.96% <ø> (ø)

python3.7
?

python3.8
18.96% <ø> (ø)

python3.9
?

Flags with carried forward coverage won't be shown. Click here to find out 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 e248a8e...026b585. Read the comment docs.


Schema builder: autosave

It would be nice if the schema builder could automatically save each update as it's made. I could see this happening in one of two ways:

We save the JSON schema to the browser local storage each time it changes, and check for this with the cache ID when we load the page.

We use a background POST API call to actually save the schema each time it updates, but without changing its status. So the same method as when we click Finished except the status. Reloading the page will reload the latest save.

I'm thinking that (2) is probably the easiest to implement and better of the two options.
This should save accidents like the one suffered by @ggabernet where progress is accidentally lost by refreshing the page etc.

Yes, this would be nice. I got stung yesterday when I clicked a link in the help text and tried to go back to the schema I was updating. Luckily, I had only made a few changes so was able to rescue the situation without having to throw anything across the room.

Should be done and merged in #491 - the web copy will now be updated every time you make a change, so refreshing the page or navigating away and back again should be safe. Would be great if someone could test!
PR #490 still open which contains additional functionality to also automatically save changes back to the local file as they are made on the server in real time. @ggabernet / @drpatelh - any thoughts on this? (I’m not completely sure that we really want this behaviour, but would like some additional input).

Yep, I think it's better to cache the web copy and then only to save locally when "Finished" is clicked. You can imagine instances where someone just wants to "play" with a particular schema without having it saved instantly, especially since it is then not trivial to undo those changes.

git would help with the undo (if the json-schema is tracked already)

Yes, I agree with Harshil. If there would be a use case where save changes to the local file is also desired, maybe these could be triggered by a Save button, as you were mentioning earlier, rather than automatically in real time.

okay, I'll close PR #490 then and this issue has been successfully addressed by #491.

To use your analogy in the other PR @mashehu its quite easy to undo with a word processor but having to do this with git -> 🤯

Thank you muchly for this 🙂

Yes, thank you @mashehu!

yes, thanks a lot for the quick fix!


Added new operator Neg

Current coverage is 63.11%

Merging #18 into master will decrease coverage by -4.43% as of 2aa1204

@@            master     #18   diff @@
======================================
  Files           12      13     +1
  Stmts          114     122     +8
  Branches        18      19     +1
  Methods          0       0
======================================
  Hit             77      77
  Partial          5       5
- Missed          32      40     +8

Review entire Coverage Diff as of 2aa1204

Powered by Codecov. Updated on successful CI builds.


Response time fixed

Hi,
Thank you for this Hapi extension! I find it very useful and it helps me to monitor my microservices.
Recently I discovered a possible bug or strange behaviour. The response times displayed on the status page do not correspond with any other response times measured by other means like developer tools in a browser or good-console logging.
It displays constantly times under 1ms, which is already strange. Especially, when all other tools display response times around 1.5s for my requests.
First, there were a computation flaw in the formula  ((diff[0] * 1e3) + diff[1]) * 1e-6 => ((sec * 1e3 + nanos) * 1e-6 => (ms + nanos) * 1e-6. Basically a flaw in groupping of the parts.
When I fixed that, I discovered that the start time is recorded too late, when the computation in routes is already finished, in the onPreResponse hook. So the time diff doesn't say anything about the processing time. But there is a request.info.received variable from Hapi, which marks the request start and we can compute the diff against it.
After that correction, the response time displays realistic values. The presentation has to be adapted slightly and do not display decimal values, but this is just a design issue.

Could you please check my changes and consider to merge them? Thank you!

It would be even possible to simplify the middleware-wrapper.js to something like:
server.on('response', function (request) {
    if (request.response.isBoom || request.path === opts.path) {
      return;
    }
    const tookMs = Date.now() - request.info.received;
    onHeadersListener(request.response.statusCode, tookMs, opts.spans);
});

to get even more precise response times, but this would need some additional refactoring.

Coverage decreased (-1.1%) to 53.012% when pulling 432f7780a328b181e212493fd45706066a84bae8 on todvora:master into 23bf6a09e71c0a466a1b13640da16a529bfa42bf on ziyasal:master.


Preferred way to use convertion with immutable.js

React Boilerplate
Before opening a new issue, please take a moment to review our community guidelines to make the contribution process easy and effective for everyone involved.
Please direct redux-saga related questions to stack overflow:
http://stackoverflow.com/questions/tagged/redux-saga
For questions related to the boilerplate itself, you can also find answers on our gitter chat:
https://gitter.im/mxstbr/react-boilerplate
Before opening a new issue, you may find an answer in already closed issues:
https://github.com/react-boilerplate/react-boilerplate/issues?q=is%3Aissue+is%3Aclosed
Issue Type

[ ] Bug (https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md#bug-reports)
[ x] Feature (https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md#feature-requests)

Description
I have a question on stack overflow about what is the preferred way to use immutable.js in react-boilerplate. I.e. where to use toJS() and fromJS().
Please see my question on stack overflow, https://stackoverflow.com/questions/53186890/correct-way-to-use-immutablejs-tojs-and-fromjs-with-redux

Im my project. I ensure to use fromJS only on reducer fromJS. With toJS I rarely use this because this comes with a performance bottleneck.
You can read more about it here:
https://redux.js.org/recipes/usingimmutablejs#immutable-js-best-practices

@joshuaalpuerto Ok great, so you always convert data with fromJS in reducer? Like redux docs says:
// recommended const newObj = { key: value } const newState = state.setIn(['prop1'], fromJS(newObj)) // newObj is now an Immutable.JS Map

Yup

@joshuaalpuerto Please see my update, I basically ask if you always convert in your reducer with fromJS ? Best Regards

@joshuaalpuerto Thanks! Then I will follow same practice as well :)

Yeah thats' one thing I noticed. Im not pretty sure why they initialize their state with fromJS but  updating it with a regular object.

@joshuaalpuerto I wonder that too...

@joshuaalpuerto A simple answer could be that it is quicker. Else they would need to use immutable get or set etc their react components, yes?

(@gretzky - Just wanted to bring your attention to this if you haven't seen it. @Absvep makes an interesting point about the way we do Immutability in the sample app.)
Indeed the reducer doesn't convert the array of repos to an Immutable List.
I don't know why it was done that way but my guess would be one (or a combination) of the following reasons:

It would mean having to do this ugly and confusing thing in the List component:

Or to take the performance hit of toJS in the selector.

Perhaps someone thought that set and setIn automatically convert the given data to an Immutable data type. That's how I understood Immutable at first (i.e. everything in the tree is Immutable).

I can't think of an elegant way to fix this.

Either use Immutable all the way through but

components become confusing with a mix of POJO props and Immutable data
PropTypes become useless (unless you want to add immutable-prop-types).

Or use fromJS and toJS in the reducers and selectors but get a big performance hit for... no benefit basically?

IMO this emphasizes the need to move away from Immutable ASAP. The downsides of its custom data types aren't worth the benefits of immutability, especially since there are now cleaner ways to do immutability.

@Absvep  @julienben Here's what I'm doing.

No immutable when object is initialized inside the container
Immutable  objects are only from the store.

components become confusing with a mix of POJO props and Immutable data

I ensure that the containers only has the idea that the object is immutable. Component should only receive POJO, check the HOC implementation here.
The component becomes easy to test because it doesn't have to be dependent with ImmutableJS

PropTypes become useless (unless you want to add immutable-prop-types).

This is correct for Containers but for Component it should be just Object or Array since it's just POJO.

IMO this emphasizes the need to move away from Immutable ASAP.

I strongly agree with this. Because you have to learn immutablejs to manipulate the array or object to ensure you don't use toJS often. Which is an overhead.

My personal preference is to switch to immer. You can see what that would look like in PR #2380.

@julienben Thanks. I will do that to with the help of your PR :)


Tensorflow.loadLibrary() not working on Windows

Running:
TensorFlow.loadLibrary("ner-dl/win/_lstm_ops.so")
Returns:
java.lang.UnsatisfiedLinkError: ner-dl\win\_lstm_ops.so not found
	at org.tensorflow.TensorFlow.loadLibrary(TensorFlow.java:47)

We're trying to load contrib .so files dynamically from java API. These .so files are generated on Windows by installing tensorflow through pip. Using python 3.6.8 to do so and retrieving them from the library source code. These libraries are from tensorflow.contrib, since this is what we're using on our graphs. To me, this sounds like a path resolving issue, since it's the same error than making up an invented path.
Works fine when using appropriate .so files on Linux and Mac.
Same happens if using absolute paths btw:
java.lang.UnsatisfiedLinkError: C:\Users\saifa\IdeaProjects\spark-nlp\src\main\resources\ner-dl\win\_lstm_ops.so not found
	at org.tensorflow.TensorFlow.loadLibrary(TensorFlow.java:47)

It seems this also happened to this poor guy here:
https://stackoverflow.com/questions/50115117/using-ops-from-tensorflow-contrb-on-windows-via-java-api
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
TensorFlow.loadLibrary("ner-dl/win/_lstm_ops.so")
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Windows 10
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary):
Binary from pip
TensorFlow version (use command below):
b'v1.12.0-rc2-3-ga6d8ffae09' 1.12.0
Python version:
Using Java API
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:
GPU model and memory:

Describe the current behavior
Running
TensorFlow.loadLibrary("ner-dl/win/_lstm_ops.so")
returns
java.lang.UnsatisfiedLinkError: ner-dl\win\_lstm_ops.so not found
	at org.tensorflow.TensorFlow.loadLibrary(TensorFlow.java:47)

Describe the expected behavior
Should be able to load libraries dynamically on Windows. This works fine from Linux and Mac.
Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
TensorFlow.loadLibrary("ner-dl/win/_lstm_ops.so")

@asimshankar Can you PTAL? Thanks!

Unfortunately, dynamic library loading in Windows is not supported yet AFAIR.
I might be mis-remembering, but dynamically loading shared libraries doesn't work on Python on Windows either, right?
@allenlavoie @sjamesr @gunan  might have more details on this and might be able to explain what needs to happen to make this possible.

@meteorcloudy as he helped us a lot with shared objects on windows.
I think we finally had custom ops working on windows. Were they using loadLibrary?

Dynamically loading shared libraries works in Python on Windows, but I never tired using Java API so it might still be not supported.

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

Hi, I am still interested on this issue. Was closed by bot. Still opening, still happening.

I noticed that the loadLibrary call is loading a .so file. Shouldn't it be loading a .dll file? Does ner-dl\win\_lstm_ops.so exist?

Yes, the file exists. the error is the same if you make up a file name. The same code works on linux and mac. I am not sure if it should be a .dll. If so, I'd like to know where to get the lstm contrib libs for windows.

Hi everyone! I faced with the same problem when I tried to load "tf.contrib" using TensorFlow Java API on Windows (for Linux Ubuntu works fine).
I found answer how to solve this : link. But there is another problem -> unable to load model.
So, how do we solve this problem?

@asimshankar Can you PTAL? Thanks!

@sjamesr : Could you take a look? (I haven't been working on TensorFlow for a while now :))

Has there been any advance on this?

Will take a look, sorry for the delay.

Hi, is this problem resolved ?

Hi @sjamesr , any updates on the issue?

@sjamesr, @asimshankar, any updates?

Hi, this issue is no longer valid since Tensorflow 1.15, given contrib libraries are handled differently.

@saif-ellafi
Please confirm if we may moved this to closed status.

@Saduf2019 I can confirm this issue can be closed. Me and Saif work on the same project and this issue is no longer presents in 1.15.x
Many thanks.

I confirm this can be closed. Thanks


Unable to load ace-builds folder

Hello, first of all super nice component, also I'm not a very experienced front-end developer, so I could just be doing something wrong.
Describe the bug
When I'm installing the component in my OpenWC typescript project I'm unable to resolve ace-builds folder.
To Reproduce
Steps to reproduce the behavior:

Create a OpenWC typescript application
Create lit-ace element
Error loading theme and mode.

Expected behavior
I would expect the theme and mode to resolve to node_modules/@f0rce/ace-builds. Instead it tries to find ace-builds in the root of the project (see screenshot).
I can work around the issue copying the ace-builds folder to the root of my project.
Screenshots
Error:

ace.js:883:

Desktop (please complete the following information):

OS: MacOS 12.6
Browser: chrome

Thx in advance!

Good morning @wimspaargaren,
yeah the so called basepath is wrong when using the webcomponent in a standalone environment. As stated in the readme, I created this webcomponent to fit and serve the needs of the Vaadin (Java Web Framework) Add-on I created. So you could use your workaround or select the instance of lit-ace and execute set the property baseUrl to your path.
Hope that helps,
David

Hey @F0rce , thx for the swift response. Setting the baseUrl works like a charm 😄
    <lit-ace baseUrl="node_modules/@f0rce/ace-builds/src-min-noconflict" theme="monokai" mode="html"></lit-ace>

I'll close the issue 👍

@wimspaargaren no worries :) have a great day


Add a variant that works with background secondary for Skeleton component

Duplicates ❌

[X] I have searched the existing issues

Which Figma library is concerned?
Not related to one Figma library
Summary 💡
Add a skeleton variation for background secondary

Examples 🌈
No response
Motivation 🔦
No response
New 🆕

[ ] Validated in a grooming session

Backlog 📋

[ ] Has a good summary
[ ] Has example link(s)

Design in progress 🏗

[ ] Analysis (functional & technical)
[ ] Design refinement
[ ] Dev qualification (properties, breakpoints, tokens etc.)
[ ] Documentation refinement (inside the Figma branch)

Design review 👀

[ ] Figma branch merged
[ ] Documentation review _(and move the documentation into Vitamin Documentation Figma file)

Ready to dev 👍

[ ] Issues are created in all repositories affected (vitamin-<web,android,ios,compose>)

Dev in progress 💻

[ ] All issues are resolved (to replace with issues links)

The background is tertiary on the Figma design, so it is a darker shade. Is this a problem in the code?

It's also tertiary in vitamin-web as you can see here in live: https://decathlon.github.io/vitamin-web/@vtmn/showcase-css/?path=/story/components-structure-skeleton--overview
& here is the related source code: https://github.com/Decathlon/vitamin-web/blob/5ca93a7dadb60c96f401c04292ca56f25a4afd4e/packages/sources/css/src/components/structure/skeleton/src/index.css#L11


Traefik fails to load configuration file whose name includes dashes

Do you want to request a feature or report a bug?

bug
What did you do?
I created a configuration file named a-b.toml. Traefik silently fails to load it when invoked with: traefik -c ./a-b.toml

What did you expect to see?
I expected Traefik to load the configuration file.
What did you see instead?
Traefik failed silently and fell back to the default configuration.
Output of traefik version: (What version of Traefik are you using?)

$ traefik version
Version:      dev
Codename:     cheddar
Go version:   go1.9.4
Built:        I don't remember exactly
OS/Arch:      darwin/amd64

$ brew info traefik
traefik: stable 1.5.2 (bottled), HEAD

What is your environment & configuration (arguments, toml, provider, platform, ...)?
[entryPoints]
  [entryPoints.http]
  address = ":8000"

(minimalistic working configuration)
If applicable, please paste the log output in debug mode (--debug switch)
$ traefik -c ./a-b.toml --debug
INFO[2018-02-25T04:22:15+01:00] Traefik version dev built on I don't remember exactly
INFO[2018-02-25T04:22:15+01:00]
Stats collection is disabled.
Help us improve Traefik by turning this feature on :)
More details on: https://docs.traefik.io/basics/#collected-data

DEBU[2018-02-25T04:22:15+01:00] Global configuration loaded {"LifeCycle":{"RequestAcceptGraceTimeout":0,"GraceTimeOut":0},"GraceTimeOut":0,"Debug":true,"CheckNewVersion":true,"SendAnonymousUsage":false,"AccessLogsFile":"","AccessLog":null,"TraefikLogsFile":"","TraefikLog":null,"LogLevel":"DEBUG","EntryPoints":{"http":{"Network":"","Address":":80","TLS":null,"Redirect":null,"Auth":null,"WhitelistSourceRange":null,"Compress":false,"ProxyProtocol":null,"ForwardedHeaders":{"Insecure":true,"TrustedIPs":null}}},"Cluster":null,"Constraints":[],"ACME":null,"DefaultEntryPoints":["http"],"ProvidersThrottleDuration":2000000000,"MaxIdleConnsPerHost":200,"IdleTimeout":0,"InsecureSkipVerify":false,"RootCAs":null,"Retry":null,"HealthCheck":{"Interval":30000000000},"RespondingTimeouts":null,"ForwardingTimeouts":null,"Web":null,"Docker":null,"File":null,"Marathon":null,"Consul":null,"ConsulCatalog":null,"Etcd":null,"Zookeeper":null,"Boltdb":null,"Kubernetes":null,"Mesos":null,"Eureka":null,"ECS":null,"Rancher":null,"DynamoDB":null,"ServiceFabric":null,"Rest":null,"API":null,"Metrics":null,"Ping":null}
INFO[2018-02-25T04:22:15+01:00] Preparing server http &{Network: Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc4206ea160} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s
ERRO[2018-02-25T04:22:15+01:00] Error opening listener listen tcp :80: bind: permission denied
FATA[2018-02-25T04:22:15+01:00] Error preparing server: listen tcp :80: bind: permission denied

I see, adding quotes effectively solves the issue. -c"./a-b.toml" feels weird though, but the discussion does not belong here 👌


OrderBy nullable navigation property - Linq Expression could not be translated

I used version 1.2.8 today to do dynamic sorting in my project. Some of my sortable properties are actually foreign keys- and since I don't want to sort by keys, but by a property on the linked object, I dynamically adapt the query - include the subtable in the IQueryable, and rewrite the property I sort by (instead of NavigationPropertyFK, I'm using NavigationProperty.Name so in the end I'm sorting by the name property of the navigation property).
All this works fine as long as my navigation property is non nullable. If it is nullable, I'm using the np operator on the property I'm odering by, and once the IQueryable gets evaluated, I get this
The LINQ expression 'DbSet<CiscoProfile>     .Cast()     .Join(         outer: DbSet<Cluster>,          inner: e => EF.Property<Nullable<Guid>>(e, "ClusterId"),          outerKeySelector: c0 => EF.Property<Nullable<Guid>>(c0, "Id"),          innerKeySelector: (o, i) => new TransparentIdentifier<CiscoProfile, Cluster>(             Outer = o,              Inner = i         ))     .OrderBy(e => e.Outer != null && e.Inner != null ? e.Inner.Name : null)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
my IQueryable is from EFCore 3.1 (I first created a test project with POCO classes where it worked fine).
my parameter for SortBy is
"np(Cluster.Name)"
The tip to use AsEnumerable would be killer here - it bombs out on a count (I'm doing paging and returning just the page and the count of all items - so I absolutely want to avoid AsNumerable or I'm undoing the whole performance gain I get from paging). As I said, if it's a non nullable navigation property, it works (there I'm using just "Cluster.Name"), but I'd like this to work on both nullable and non nullable navigation properties.

Dear @ssteiner,
Can you please provide a full working (console-app) example which demonstrates your issue ? Else it's very difficult for us to analyze the problem.

@ssteiner Can you please taker a look at my comment and provide / update your failing example code?

Hello,
I'm having a similar problem with the OrderBy when using the Null Propagating expression.
I'm using version 1.2.14.
When I have this:
`var query = context.Brands.Select(b => new BrandModelWithStats
{
Id = b.Id,
Name = b.Name,
BrandStat = new BrandStat
{
ProductCount = context.Products.Count(p => p.BrandId == b.Id),
PublishedProductCount = context.Products.Count(p => p.BrandId == b.Id && p.State == 1)
}
});
query = query.OrderBy("np(BrandStat.ProductCount)");
var result = query.ToList();`
I get this error:
System.InvalidOperationException   HResult=0x80131509   Message=The LINQ expression [...] could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'
I don't have any error if I don't use the np() expression.
I uploaded a sample console app where you can see the error: https://github.com/ariannepeiso/ConsoleAppDynamicLinq
Thanks in advance for your help.

@ariannepeiso
What happens if you just use normal LINQ? Does that work?

@ariannepeiso
Did you have time to verify this?

I did add some more tests, and all seem correct with latest version.
See
https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/865


L515 Measure water surface elevation

Required Info

Camera Model
{ L515 }

Firmware Version
(Open RealSense Viewer --> Click info)

Operating System & Version
{Win (10)

Kernel Version (Linux Only)
(e.g. 4.14.13)

Platform
PC

SDK Version
{ legacy / 2.. }

Language
{ }

Segment
{others }

Issue Description
We have expanded your L515 new application scenario and successfully applied it to the measurement of water surface elevation (https://authors.elsevier.com/c/1gnc36nh74kVU). Thank you for launching this powerful product.
By the way, according to the agent, the current version of the L515 has been discontinued. Will you have a new version of the L515 product launched in the future?

Thanks so much @liyuan1a for sharing your successful project with the RealSense community!
Intel are unable to comment on possible future plans for RealSense products, unfortunately.  Projects can be adapted for the still-continuing RealSense 400 Series stereo camera range with minimal code changes though.

Hi @liyuan1a  Do you require further assistance with this case, please?  Thanks!

Case closed due to no further comments received.


Initial ui changes

Please add a description to this pr of what you edited, the Jira story this is referencing, and change the title to be more specific on what is being changed per https://github.com/ARC-Summer-2020/AutoRockClimber/wiki/Pull-Review-Expectations


[CONTROLLER] support debugging raw data from platform

This PR is for:

Server

support debugging raw data from platform
Checklist

[ ] Added unit test.

Backport to branches

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.zhengya seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Example using in C/C++

I love zig, but my day job is C++. Do you have an example of using this library from C? It doesn't look like rules_zig propagates a CcInfo provider, does that mean we have to do the build to binary and then cc_import hack? My next question is about generating headers from the zig code :) Thanks in advance, this is super cool stuff

Ah maybe this workaround will suffice: https://github.com/aherrmann/rules_zig/issues/14

you can create a static lib using zig_binary + kind.STATIC_LIB. That said, be careful because zml requires to take over the thread using asyncMain (since we use a stackful coroutines implementation)

This is actually how we implement zig_cc_binary: https://github.com/zml/zml/blob/master/bazel/zig.bzl


multiple digit recognition

is there any way to detect multiple digit recognition ?

Well, you should have a pipeline with object detection and digit recognition. If an object is classified as a digit, then run the recognition.

Thanks a lot for a very quick reply 👍
Well I am new to python so I don't know how to do that. can you please provide me some tutorials / link from where I can understand it that how to do that ?

There are many ways to do the object detection. The most state-of-the-art object detection approaches are YOLO or RCNN(fast R-CNN, faster R-CNN, mask R-CNN)
You can check these work out.

Reading Digits in Natural Images with Unsupervised Feature Learning

Multi-digit Number Recognition from Street View
Imagery using Deep Convolutional Neural Networks

Also, you can build up your own machine learning pipeline which fits your requirement.


Read access_token from logged in user

How can I from a controller get the tokens for the authorized user? I have tried something like this but the token list is seems to be empty.
var userResult = await HttpContext.AuthenticateAsync();
var user = userResult.Principal;
var tokens = userResult.Properties.GetTokens().Select(token => new string[] { token.Name, token.Value });

Is this the correct way to get hold of the tokens?

What are you using for authentication?

I use OAuth/GithHub for authentication

You set the SaveTokens option on the handler and then
    string accessToken = await HttpContext.GetTokenAsync("access_token");
    string idToken = await HttpContext.GetTokenAsync("id_token");

I just tried this and the tokens are not available so they are null. I forgot to say that I have two apps. One that handles the authentication with GitHub/Oauth and one that uses a shared cookie. The frontend app is where I want to get the tokens and the authentication configuration looks like this in the frontend.
      services.AddAuthentication(options =>
      {
        options.DefaultScheme = IdentityConstants.ApplicationScheme;
      })
      .AddIdentityCookies(options =>
      {
        options.ApplicationCookie.Configure(a =>
        {
          a.Cookie.Name = ".AspNet.SharedCookie";
          a.Cookie.Domain =  _configurationOptions.Domain;
          a.Events = new CookieAuthenticationEvents
          {
            OnRedirectToLogin = (context) =>
            {
              context.HttpContext.Response.Redirect($"{_configurationOptions.RedirectUri}");
              return Task.CompletedTask;
            }
          };
        });
      });

This is the only authentication configuration I have in my frontend app and this is where the tokens is null.

There are additional steps needed to persist tokens when using Identity. See https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/additional-claims?view=aspnetcore-3.1#save-the-access-token

@Tratcher I already have SaveTokens=true in my config. This is how the complete configuration looks like on the site that handles the sign in.
services
          .AddAuthentication(options =>
          {
            options.DefaultScheme = IdentityConstants.ApplicationScheme;
            options.DefaultSignInScheme = IdentityConstants.ExternalScheme;
          })
        .AddOAuth("GitHub", "GitHub", o =>
        {
          o.ClientId = _configurationOptions.GitHub.ClientId;
          o.ClientSecret = _configurationOptions.GitHub.ClientSecret;
          o.CallbackPath = new PathString("/signin-github");
          o.AuthorizationEndpoint = "https://github.com/login/oauth/authorize";
          o.TokenEndpoint = "https://github.com/login/oauth/access_token";
          o.UserInformationEndpoint = "https://api.github.com/user";
          o.ClaimsIssuer = "OAuth2-Github";
          o.SaveTokens = true;
          // Retrieving user information is unique to each provider.
          o.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "id");
          o.ClaimActions.MapJsonKey(ClaimTypes.Name, "login");
          o.ClaimActions.MapJsonKey("urn:github:name", "name");
          o.ClaimActions.MapJsonKey(ClaimTypes.Email, "email", ClaimValueTypes.Email);
          o.ClaimActions.MapJsonKey("urn:github:url", "url");
          o.Events = new OAuthEvents
          {
              OnRemoteFailure = HandleOnRemoteFailure,
              OnCreatingTicket = async context =>
              {
                  // Get the GitHub user
                  var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint);
                  request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", context.AccessToken);
                  request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                  var response = await context.Backchannel.SendAsync(request, context.HttpContext.RequestAborted);
                  response.EnsureSuccessStatusCode();

                  using (var user = JsonDocument.Parse(await response.Content.ReadAsStringAsync()))
                  {
                      context.RunClaimActions(user.RootElement);
                  }
              }
          };
        })
        .AddIdentityCookies(options =>
        {
          options.ApplicationCookie.Configure(a =>
          {
            a.Cookie.Name = ".AspNet.SharedCookie";
            a.Cookie.Domain = _configurationOptions.Domain;
          });
        });

And then my site using this config should be able to read the tokens. I guess?

Keep reading that doc where it talks about OnPostConfirmationAsync.

@Tratcher Ok I see. The problem I seem to have is when a user already have an account with the GitHub login registered. When this is the case I use ExternalLoginSignInAsync to sign in the user. This is how my callback works right now.
public async Task<IActionResult> GoogleCallback(string returnUrl = "/", string remoteError = "null")
    {
      var info = await _signInManager.GetExternalLoginInfoAsync();
      if (info == null)
      {
        return RedirectToAction(nameof(Login));
      }

      if(!info.Principal.HasClaim(c => c.Type == ClaimTypes.Email)) {
        return Redirect($"{returnUrl}/auth/error/?missing_email=true");
      }

      var email = info.Principal.FindFirstValue(ClaimTypes.Email);

      var user = await _userManager.FindByEmailAsync(email);

      if (user != null && user.Claims.Exists(x => x.ClaimType == "Invited"))
      {
        // Sign in the user with this external login provider if the user already has a login.
        var signInResult = await _signInManager.ExternalLoginSignInAsync(info.LoginProvider, info.ProviderKey, isPersistent: true);

        if (signInResult.Succeeded)
        {
          // Update any authentication tokens as well
          await _signInManager.UpdateExternalAuthenticationTokensAsync(info);

          // We're responsible for calling .SaveChangesAsync when we're done making changes.
          await _session.SaveChangesAsync();

          return Redirect(returnUrl);
        }
        else
        {
          var identityResult = await _userManager.AddLoginAsync(user, info);

          if (identityResult.Succeeded)
          {
            if (info.Principal.HasClaim(c => c.Type == ClaimTypes.GivenName))
            {
              await _userManager.AddClaimAsync(user, info.Principal.FindFirst(ClaimTypes.GivenName));
            }

            if (info.Principal.HasClaim(c => c.Type == ClaimTypes.Name))
            {
              user.FullName = info.Principal.FindFirst(ClaimTypes.Name).Value;
              await _userManager.AddClaimAsync(user, new Claim("FullName", info.Principal.FindFirst(ClaimTypes.Name).Value));
            }

            // Include the access token in the properties
            var props = new AuthenticationProperties();
            props.StoreTokens(info.AuthenticationTokens);
            props.IsPersistent = true;

            // Sign in the user with the default identity provider
            await _signInManager.SignInAsync(user, props);

            // Update any authentication tokens as well
            await _signInManager.UpdateExternalAuthenticationTokensAsync(info);

            // We're responsible for calling .SaveChangesAsync when we're done making changes.
            await _session.SaveChangesAsync();

            return Redirect(returnUrl);
          }
        }
      }

      return Redirect($"{returnUrl}/auth/error/");
    }

Is it possible to use ExternalLoginSignInAsync and include the tokens inside the authentication properties or do I need to change my code in some way?

@HaoK That doc needs an update to show persisting fresh tokens for existing users. Can you take over from here?

Is this the correct way of doing this? I have added SignInWithClaimsAsync if the ExternalLoginSignInAsync succeeds.
        // Sign in the user with this external login provider if the user already has a login.
        var signInResult = await _signInManager.ExternalLoginSignInAsync(info.LoginProvider, info.ProviderKey, isPersistent: true);

        if (signInResult.Succeeded)
        {

          await _signInManager.SignInWithClaimsAsync(user, info.AuthenticationProperties, user.Claims.Select(c => new Claim(c.ClaimType, c.ClaimValue)));

          // Update any authentication tokens as well
          await _signInManager.UpdateExternalAuthenticationTokensAsync(info);

          // We're responsible for calling .SaveChangesAsync when we're done making changes.
          await _session.SaveChangesAsync();

          return Redirect(returnUrl);
        }

Yes that would result in the cookie containing the updated claims, but if you want to actually store the claims in the identity tables for the user, you would need to call userManager.Add/ReplaceClaimAsync otherwise there are some potential codepaths where you might lose the extra claims

@HaoK Ok. I thought that await _signInManager.UpdateExternalAuthenticationTokensAsync(info); would be enough but maybe I have misunderstood? Do you have a complete example of using the “social” login where all keys are updated both on the user and cookie with access tokens and so on?

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/additional-claims?view=aspnetcore-3.1 is the official document that we have, @guardrex should we incorporate some of these questions into that doc?

I'll open an issue to take a look at this.

Thanks @guardrex
closing this issue @marcuslindblom feel free to use the docs issue for any further discussion


Show SS58 encoded addresses

Instead of showing raw hex addresses, it would be better UX to show the SS58 encoded address for the specific chain being explored.
Perhaps this can be matched against a mapping of squid_name -> ss58_prefix manually kept in this repo, or you could match the name of the chain against a repository of chain info, like Nova's: https://github.com/nova-wallet/nova-utils/blob/master/chains/v5/chains.json

Hi, yes, good point, we are going to do it soon. Related to #29

I think this is done. Check it please and feel free to reopen if you think it is not implemented as you thought.


Typo "Azure Blob storage"→"Azure Blob Storage"

https://docs.microsoft.com/en-us/azure/storage/blobs/

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

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


Make a faster edge-convert util

By my calculations this speeds up _convert_edges_table by about 40,000 times, using the trick in https://tskit.dev/tutorials/args.html#traversing-parent-nodes, and another trick which means leaving the edges from the previous parent to be used in the next parent, if the next parent is a "recombination_node_to_merge". However, this gives slightly different behaviour because the list of links is ordered by parent ID, not child ID.
However, do check that this works. In combination with #76 it should allow huge genealogies (e.g. half a million nodes / edges) to be read in OK. I've been testing it on the sc2ts ARG

I think the ordering of edges by parent ID might be giving funny edge crosses, like this:

It would be possible (but less efficient) to order by child ID as in the example at https://tskit.dev/tutorials/args.html#traversing-child-nodes

However, this gives slightly different behaviour because the list of links is ordered by parent ID, not child ID.

Hmm, now I'm repeating the testing, this different links order is giving blank graph plots. I can change the order back to how it was by resetting the IDs before returning the data. I suspect this is a tiny bit less efficient, however, so maybe it can be fixed in some other way @kitchensjn ?
        links = [l for parent_links in links for l in parent_links]
        links.sort(key=lambda x: (x["source"], x["target"]))
        for ID, link in enumerate(links):
            link["id"] = ID

After syncing this PR with the latest main (now including your two PRs), everything is plotting as expected. I believe this specific PR was missing the msprime import at the top since that is being used. That may have been the reason for the blank plots (?), as the ordering of the links in the JSON should not matter for plotting.

Ah, that might well be it. Thanks for checking.


IOError: [Errno 32] Broken pipe how to solve this error

[Epoch #1] loss: 4.759 = (CE: 4.759) + (Ent: 0.0 * 2959.694) + (Rec: 0.0 * 0.000): 100%|██████████| 244/244 [04:48<00:00,  1.18s/it]
train loss: 5.88176631732 (CE 5.88176631732 + E 2908.56674344 + REC 0.0)
{'reflen': 342, 'guess': [300, 200, 100, 0], 'testlen': 300, 'correct': [272, 140, 66, 0]}
ratio: 0.877192982454
Traceback (most recent call last):
File "train.py", line 165, in
main()
File "train.py", line 142, in main
val_scores = evaluate(val_iter, model, model.vocab)
File "/content/drive/My Drive/RecNet/utils.py", line 200, in evaluate
scores = score(vid2pred, vid2GTs)
File "/content/drive/My Drive/RecNet/utils.py", line 169, in score
scores = calc_scores(refs, hypos)
File "/content/drive/My Drive/RecNet/utils.py", line 188, in calc_scores
score, scores = scorer.compute_score(ref, hypo)
File "/content/drive/My Drive/RecNet/meteor/meteor.py", line 37, in compute_score
stat = self._stat(res[i][0], gts[i])
File "/content/drive/My Drive/RecNet/meteor/meteor.py", line 55, in _stat
self.meteor_p.stdin.write('{}\n'.format(score_line))
IOError: [Errno 32] Broken pipe
how to solve this error

Can you specify your environment settings? The python version, OS, java version, etc.

i dont  have high end machine thats y i tried in google colab python 2 with gpu environment

The different java version seems to be a problem, but I think it is related to this issue as the error comes from the evaluation codes in the repo.


Another installation error

Issue summary
The followng error is observed after performing installation steps.
gnina: error while loading shared libraries: libc10.so: cannot open shared object file: No such file or directory
The reason may be due to following errors during "sudo make install" in gnina/build, but i'm not sure, as i've tried adding the mentioned folder (/mnt/c/Users/Clario/openbabel/build/gnina/build/external/local/lib/python3.12/dist-packages/) to .bashrc:
!!
  self.initialize_options()
Checking .pth file support in /mnt/c/Users/Clario/openbabel/build/gnina/build/external/local/lib/python3.12/dist-packages/
/usr/bin/python3.12 -E -c pass
TEST FAILED: /mnt/c/Users/Clario/openbabel/build/gnina/build/external/local/lib/python3.12/dist-packages/ does NOT support .pth files
bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /mnt/c/Users/Clario/openbabel/build/gnina/build/external/local/lib/python3.12/dist-packages/

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.

Steps to reproduce
"gnina" with or without any arguments after all installation steps
Your system configuration
Operating system: WSL 2 on Windows 10
Compiler: gcc 13.2
CUDA version (if applicable): 12.4
CUDNN version (if applicable):
Python version: 3.12

It can't find libc10, which is a torch library. If gnina had to install torch itself, this library should be in /usr/local/lib/gnina/.  If torch was already installed, you need to make sure the torch libraries used for compilation are in your LD_LIBRARY_PATH.


Update to Diversity

[ ] Rewrite diversity branch in TypeScript
[ ] Remove runtime types (unlikely)
[ ] Multiple stream plugin support
[ ] Sync with development and match-multiple-plugins branches

Related: #7

remove ramda s not really needed


chore(abi)!: Replace struct name with fully qualified struct path

Description

Problem*

Resolves #2238
Closes #2296
Summary*

Documentation

[ ] This PR requires documentation updates when merged.

[ ] I will submit a noir-lang/docs PR.

[ ] I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

[ ] I have tested the changes locally.
[ ] I have formatted the changes with Prettier and/or cargo fmt on default settings.

After approvals, we'll hold this until 0.11 release is being prepared


Nothing displayed in logs tab of Component Output

Bug Description
Hi I'm using langflow version 1.0.19 and there is a logs tab in Component Output but displays nothing. Is this behavior normal ? If not, how can I see the logs? If it's normal, when will logs section ready to use?

Reproduction

use langflow 1.0.19
create a custom component and paste the code

# from langflow.field_typing import Data
from langflow.custom import Component
from langflow.io import MessageTextInput, Output
from langflow.schema import Data

from loguru import logger

class CustomComponent(Component):
    display_name = "Custom Component"
    description = "Use as a template to create your own component."
    documentation: str = "http://docs.agione.org/components/custom"
    icon = "custom_components"
    name = "CustomComponent"

    inputs = [
        MessageTextInput(name="input_value", display_name="Input Value", value="Hello, World!"),
    ]

    outputs = [
        Output(display_name="Output", name="output", method="build_output"),
    ]

    def build_output(self) -> Data:
        data = Data(value=self.input_value)

        logger.debug("That's it, beautiful and simple logging!")

        self.status = data
        return data

run the component
open component output and go to logs section

Expected behavior
No Data Available
Oops! It seems there's no data to display right now. Please check back later.
Who can help?
No response
Operating System
Amazon Linux
Langflow Version
1.0.19
Python Version
None
Screenshot
No response
Flow File
No response

@linnie98
Can you check if the issue persists in the latest version of langflow version 1.1.1 ?

Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to help you.


The sample doesn't work for me

The sample code in the README results in this for me:

And when I press a button it just goes further down. Any ideas what could cause this?

Sorry. I didn't know you had to do those imports which were shown further down. It fixed it and so I'll close now

I am still struggling with the same problem.
I am trying to render a JSON, but there's no output at all.
https://codesandbox.io/s/youthful-pine-5tnh9?file=/src/App.tsx


Failed to load synonyms file entity_synonyms.json

Rasa NLU version:latest
Operating system (windows, osx, ...):linux
Content of model configuration file:
language: "en"

pipeline:
- name: "nlp_mitie"
  model: "data/total_word_feature_extractor.dat"
- name: "tokenizer_mitie"
- name: "ner_mitie"
- name: "ner_synonyms"
- name: "intent_entity_featurizer_regex"
- name: "intent_classifier_mitie"

Issue:
I met an error when I post an messge to the server it writes as follow
[root@localhost rasa_nlu]# python -m rasa_nlu.server --path projects
2018-06-10 11:40:04+0800 [-] Log opened.
2018-06-10 11:40:04+0800 [-] Site starting on 5000
2018-06-10 11:40:04+0800 [-] Starting factory <twisted.web.server.Site object at 0x7f079f72c630>
2018-06-10 11:40:10+0800 [-] /usr/local/python3/lib/python3.6/site-packages/h5py/init.py:36: builtins.FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
2018-06-10 11:40:11+0800 [-] /root/rasa_nlu/rasa_nlu/extractors/entity_synonyms.py:85: builtins.UserWarning: Failed to load synonyms file from '/root/rasa_nlu/projects/default/model_20180608-012640/entity_synonyms.json'
2018-06-10 11:40:12+0800 [-] "<IP_ADDRESS>" - - [10/Jun/2018:03:40:12 +0000] "POST /parse HTTP/1.1" 200 194 "-" "curl/7.29.0"
^C2018-06-10 11:44:00+0800 [-] Received SIGINT, shutting down.
2018-06-10 11:44:00+0800 [twisted.web.server.Site] (TCP Port 5000 Closed)
2018-06-10 11:44:00+0800 [-] Stopping factory <twisted.web.server.Site object at 0x7f079f72c630>
2018-06-10 11:44:00+0800 [-] Main loop terminated.
[root@localhost rasa_nlu]# ^C
[root@localhost rasa_nlu]#
so I have an check at the projects folder
there's no entity_synonyms.json
files in the folder are:
entity_extractor.dat
intent_classifier.dat
metadata.json
regex_featurizer.json
training_data.json
So can you help me to solve this issue?
Thank you very much
WeiZhen

it's not an issue, it's a warning. I'm guessing you haven't specified any synonyms anywhere in your training data - which means you can safely ignore this warning

@akelad
thank you very much
weizhen

@weizhenzhao,
You could put a file with the following
{}
and save it as entity_synonyms.json That would stop the warning.
@akelad ,
Since the file is expected, would it not be seamless if the trainer just output an empty json file so this warning is suppressed auto magically?

@useready-andyv either that or don't expect the file.


enh/create set

There was a bug in concatenating the sets generated (we were only keeping the last set). The section was in the loop, brought it out to fix the issue.
Refactored the set generation code slightly to make it more granular and more testable. Added some tests to check for bugs and issues.

Addressed comments