Missing JS sample or clarification whether if it´s supported or not

Would be very useful to add a note whether if a user have to enable this feature on js or not

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: e73d0530-fbc3-e58e-3a32-f68c6d58d987
Version Independent ID: e0ff21e6-25da-f067-252f-d78384ab3daa
Content: Send user context IDs to enable usage experiences in Azure Application Insights
Content Source: articles/azure-monitor/app/usage-send-user-context.md
Service: application-insights
GitHub Login: @NumberByColors
Microsoft Alias: daviste

duplicated

@daveRendon Thanks for the update.


Stats number aren't display on the cards

Description
A clear description of the bug is:
The stats number is not shown on the cards anymore.

Must include any relevant identifiers, like:

Network: Testnet

Version: 2.3.0-rc3

Also on the landing page, so before and after login.

Verified, 9e745f8.
The numbers are now displayed.

TC2457 - Homepage before login
TC2458 - Homepage after login

Verified:

Mainnet
2.3.0


[to discuss] running sharing to root tests in CI

currently we run also suites in CI that do sharing to root (/), those tests are all skipped on OCIS because shares in OCIS always are received in a subfolder e.g. /Shares
The suites with 0 tests still need to compile ocis etc. Should we delete those suites from CI?
advantage: less CI time (will make less of a difference when we manage to cache the artifacts)
disadvantage: more brain time is needed to remember the fact that those tests do not run in ocis. Just copy-paste the suites list from oC10 does not work anymore. e.g. between phoenix oC10 tests & ocis tests

CC @phil-davis @micbar

@individual-it, in ci we run tests by using DIVIDE_INTO_NUM_PARTS settings that break the entire suite into smaller parts each having approximately an equal number of scenarios. furthermore, we also cache the build products so we dont have to build ocis on each pipeline.
can we close this now?

@individual-it, in ci we run tests by using DIVIDE_INTO_NUM_PARTS settings that break the entire suite into smaller parts each having approximately an equal number of scenarios. furthermore, we also cache the build products so we dont have to build ocis on each pipeline.
can we close this now?

with the caching the issue is much smaller, lets close this

with the caching the issue is much smaller, lets close this


[#146] Add JSON mapping file suport

Yet another adjustment for #146

Agree, it's annoying. I'll take that one - #151


Better focus by allowing panel to dock at the top

Bad (Need to focus on 2 different parts of the screen, i.e. unnecessary head/eye movements)

Good (Only need to focus on 1 area of the screen)

If and when we need the console/panel, the area of concern is usually at the bottom of the panel, e.g. typing our commands or the results of a command we just ran
It also means that this area will always be at the bottom-most of our screen, no matter if it was docked left/right/bottom
I find myself having to bend my neck more than necessary when switching between looking at the console and code (usually on the top half of my screen), that is about 6 inches of travel one way
To illustrate, the red boxes indicate my usual areas of most interest/focus
If the panel can dock at the top, all we need to do is focus on the center of the screen
I have been using this layout for the longest time to good effect on Visual Studio, hope this can be available on VSCode too

Please allow the panel to dock at the top. Thank you.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

hey everyone, we could use some help here, need 20 community votes thanks!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

@gjsjohnmurray is this something you can help review and possibly approve? Thank you!

-> https://github.com/microsoft/vscode/issues/50984


Image loaded

Hello,
The data-loaded is triggered before the ims src is actually replaced, so a CSS transition between the 2 states is not possible

Hi Sylvian,
I use the data-loaded trigger for CSS transitions in this example slideshow project.  I just wrapped the images in a container div and transitioned the container instead of the image itself.
https://codepen.io/tikevin83/pen/BPvQMz


LIB-333 generate self signed https certificate and keys

Generate the self signed certificate and key using this guide
This is the command I have used to generate the certificate
keytool -genkeypair -alias library-portal-backend -keystore src/main/resources/library-portal-backend-keystore.p12 -keypass secret -storeType PKCS12 -storepass secret -keyalg RSA -keysize 2048 -validity 365 -dname "C=SG, ST=Singapore, L=Singapore, O=AKL, OU=DEV, CN=localhost" -ext "SAN=dns:localhost"

p12 file which contains the self signed certificate and key is residing in src/main/resource folder

Verified the p12 file via this command keytool -list -v -alias library-portal-backend -keystore src/main/resources/library-portal-backend-keystore.p12 -storepass secret

Test Evidence


Changes for other data set for example CIFAR10

This is indeed a good tool. I thought if I change the weights to CIFAR10 trained network and labels, the tool works on CIFAR10 images, But not true. Looks like the code assumes that the input images is 227x227 and comes from Imagenet. What changes should we do for working the tool for CIFAR10 for example?
Also, what are the images that are shown on the right side? How is that related to the main conv images?

Hi, I got into the same problem. I tried the tool with my own model and dataset for emotion recognition but it gives me evry different result compared with deploying the net by itself. Any thoughts on this? have you resolved the problem @srp1970 ?

@srp1970, @nPellejero
I've made the tool substantially more generic: all the hardcoded parts where replaced with new settings parameters, most are deduced automatically by analyzing the network definition file
Latest version is in https://github.com/arikpoz/deep-visualization-toolbox


feat(tangle-dapp): Implement restaking UI: Shared profile setup

Summary of changes
Provide a detailed description of proposed changes.

Implemented Shared profile setup step, which shows an amount input and a roles dropdown to allow the user to setup their shared roles profile.

The amount of roles that can be selected is determined from Substrate: maxRolesPerAccount. It automatically disallows selecting more roles than that constant.
Added extensive input validation for amount inputs, ensuring that their input amounts are >= minRestakingBond (from Substrate), and <= staked amount * 0.5 (50% of the staked amount), and that they can only contain digits.

Substrate transaction logic for Shared profile setup is working, alongside UI. In other words, it has full functionality.
Created useRestakingLimits reusable hook, which provides both min & max restaking amounts for a certain profile type.
Added all roles from Tangle, replaced dummy roles.
Adjusted bar chart to more closely match the Figma design.
Fixed some styling issues & bugs, and also design is responsive and has been tested on light theme.
Changed enum values' casing to uppercase for consistency across codebase.

Screenshots

Proposed area of change
Put an x in the boxes that apply.

[ ] apps/bridge-dapp
[ ] apps/hubble-stats
[ ] apps/stats-dapp
[x] apps/tangle-dapp
[ ] apps/testnet-leaderboard
[ ] apps/faucet
[ ] apps/zk-explorer
[ ] libs/webb-ui-components

Reference issue to close (if applicable)
Specify any issues that can be closed from these changes (e.g. Closes #233).

Closes #1989

Screen Recording
If possible provide a screen recording of proposed change.

https://github.com/webb-tools/webb-dapp/assets/101931215/c5f2acb6-1b87-4bb5-8785-ca6f058f9bc7
Code Checklist
Please be sure to add .stories documentation if any additions are made to libs/webb-ui-components.

[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)

Awaiting for #2053 to be merged before setting this one up for review.

Requested change by Mona: https://github.com/webb-tools/webb-dapp/pull/2053#issuecomment-1984624746

Going to do some adjustments on the dropdown's styling. With the latest Tangle updates, the min restaking bond changed from 0 to another value, and that's causing the dropdown to break visually. If possible, once ready for review again please check the modified dropdown's style!

@monaiuu I've made it sorted in such a way that TSS gets priority. Still, Light Client Relaying comes on top as a result. I can make all TSS explicitly sorted, but that would complicate things a bit. Let me know!
I've also fixed the issue above, where the chip was breaking the design.


Brightness range not documented

In https://keras.io/preprocessing/image/#imagedatagenerator-class brightness_range is not documented.

Wouldn't that just be:

brightness_range: Tuple of floats; range to pick a brightness value from.

If yes, more than happy to make the change in the documentation. 👍

@dynamicwebpaige, I find brightness_range supports both tuple and list type (source)
Would it be more clear like:
brightness_range: Tuple or list of two floats; range to pick a brightness value from.

@assaflehr
I thought it just scales the brightness of image via PIL ImageEnhance module, but if so, it should return the original image when I give brightness_range=(1.0, 1.0), however, my experiment showed that brightness_range = (1.0, 1.0) gave more brighter images than brightness_range = None (default)
Actually the manual in keras.io says

brightness_range: Tuple or list of two floats. Range for picking a brightness shift value from.

that 'shift' may have different meaning from scale, I guess.

The term 'shift' is ambiguous here. When shifting I'd expect the value 0 to mean 'leave as is', a value > to make it brigther and < 0 darker. But as @assaflehr pointed out, here 1.0 means 'leave as is'. The behaviour noted by @jaewooklee93 is odd, did you maybe do any other preprocessing steps that might mess with the brightness?
I propose changing the documentation of brightness_range to

Tuple or list of two floats. Range for picking the new brightness (relative to the original image), with 1.0 being the original's brightness. Must not be smaller than 0.

@thunfischtoast
I tried more debugging and I almost figured out why that phenomenon happens. The below is a minimally working example code.
import numpy as np
import matplotlib.pyplot as plt
from keras.preprocessing.image import *

img = (np.random.rand(1, 500, 500, 3) * 255).astype(np.uint8)

fig, ax = plt.subplots(1, 5, figsize=(20, 10))
ax = ax.ravel()
ax[0].imshow(img[0])
ax[1].imshow(next(ImageDataGenerator().flow(img))[0])
ax[2].imshow(next(ImageDataGenerator(brightness_range=(0., 0.)).flow(img))[0])
ax[3].imshow(next(ImageDataGenerator(brightness_range=(1., 1.)).flow(img))[0])
ax[4].imshow(next(ImageDataGenerator(brightness_range=(1., 1.)).flow(img))[0] / 255)

Output:

By default, if brightness_range is not specified, ImageDataGenerator returns [0..1] ranged float images from [0..1] ranged images. (as you can see at ax[1])
However, when it comes to brightness_range=(1., 1.), it returns [0..255] ranged float images, and it's quite not conventional to handle float image with [0..255] ranged-values.
Still, the term 'shift' is ambiguous as you mentioned, so both docs and the behavior of function itself should be updated, I guess.

I agree. This is also the case for other arguments of the image generator. There needs to be a description of the valid ranges.

I have also experienced that if I am using brightness augementation during training, I also need to use brightness_range=(1., 1.) during inference, or I would get worse results. Anyone else experienced this phenomenon?

@AzharSultan, I found that Keras use the library  keras_preprocessing  to make the data augmentation.
Here is the code for random brightness
https://github.com/keras-team/keras-preprocessing/blob/master/keras_preprocessing/image/affine_transformations.py#L215
    x = array_to_img(x)
    x = imgenhancer_Brightness = ImageEnhance.Brightness(x)
    x = imgenhancer_Brightness.enhance(brightness)
    x = img_to_array(x)

and the first line will transform a numpy ndarry type to a PIL Image instance -- x = array_to_img(x)
the last line will return to an array  -- x = img_to_array(x)
But the problem is that returned x will be between 0 and 255, and the dtype is float32.
so you need to divide by 255 manually.

As I found, 0.5 is remain unchange, 1 for totally white and 0 for totally dark, so I guess it's a linear project?
import numpy as np
import matplotlib.pyplot as plt
from keras.preprocessing.image import *
img =128 + np.zeros([1, 500, 500, 3])
fig, ax = plt.subplots(1, 5, figsize=(20, 10))
ax = ax.ravel()
ax[0].imshow(img[0].astype(int))
ax[1].imshow(next(ImageDataGenerator(brightness_range=(0.2, 0.2)).flow(img))[0].astype(int))
ax[2].imshow(next(ImageDataGenerator(brightness_range=(0., 0.)).flow(img))[0].astype(int))
ax[3].imshow(next(ImageDataGenerator(brightness_range=(0.5, 0.5)).flow(img))[0].astype(int))
ax[4].imshow(next(ImageDataGenerator(brightness_range=(1., 1.)).flow(img))[0].astype(int))

@zlw21gxy
That's weird...
If you use a real image, then < 1 makes it darker. > 1 makes it brighter.
For example, try to change the 4th line of your code by:
from skimage.data import astronaut
img = astronaut()[np.newaxis].astype(int)

Yes, that’s really weird,I try to generate random number for every pixel
and it behave different with using a gray picture, if I use gray picture
0.5 is stay unchanged, if use real images or random number, 1 is stay
unchanged, that is so weird....
On Tue, May 28, 2019 at 10:01 PM Ricardo Cruz<EMAIL_ADDRESS>wrote:

@zlw21gxy https://github.com/zlw21gxy
That's weird...
If you use a real image, then < 1 makes it darker. > 1 makes it brighter.
For example, try to change the 4th line of your code by:
from skimage.data import astronaut
img = astronaut()[np.newaxis].astype(int)
[image: a]
https://user-images.githubusercontent.com/11894291/58483661-fa700680-8160-11e9-91a8-6c02e35656e5.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/keras-team/keras/issues/10366?email_source=notifications&email_token=AK7ZPCQ4TDFRZNBZUOLUNW3PXU3LRA5CNFSM4FDSASI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWMG3IQ#issuecomment-496528802,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK7ZPCS3WNNYBVN4ZJ2TFSTPXU3LRANCNFSM4FDSASIQ
.

@rpmcruz
hey bro, did u figure out the reason?
"I try to generate random number for every pixel and it behave different with using a gray picture, if I use gray picture 0.5 is stay unchanged, if use real images or random number, 1 is stay unchanged"

I just ran across this thread after wondering why my model training went horribly badly after adding image augmentation.  Based on the little documentation in TF 2.0.0b0, "Range for picking a brightness shift value from" I naiively used [-0.2, 0.2]. So yeah, I +1 any of the above documentation improvements that state the ranges allowed.
I also wonder why I didn't get an exception or assertion for using a negative value.

@zlw21gxy @rpmcruz this is a bug of keras or should say of the keras_preprocessing package.
I am testing on the lastest verson Keras-Preprocessing==1.1.0
If you go to the code with regard of brightness, you will see
def apply_brightness_shift(x, brightness):
    #...
    x = array_to_img(x) # !!!note this!!!
    x = imgenhancer_Brightness = ImageEnhance.Brightness(x)
    x = imgenhancer_Brightness.enhance(brightness)
    x = img_to_array(x)
    return x

then you go to the definition of array_to_img:
def array_to_img(x, data_format='channels_last', scale=True, dtype='float32')

As you can see, array_to_img actually has a parameter of scale, yet not set when called in apply_brightness_shift.
As a result, a gray image (value = 128) will be scale to a white one (value = 255).
To vertify, if you simply change the range of values in your image (e.g. even one single channel of one single pixel), you can get everything what you supposed:
import numpy as np
import matplotlib.pyplot as plt
from keras.preprocessing.image import *
img =128 + np.zeros([1, 500, 500, 3])
img[0,0,0,0] = 255 # !!! just add this or similar !!!
fig, ax = plt.subplots(1, 5, figsize=(20, 10))
ax = ax.ravel()
ax[0].imshow(img[0].astype(int))
ax[1].imshow(next(ImageDataGenerator(brightness_range=(0.2, 0.2)).flow(img))[0].astype(int))
ax[2].imshow(next(ImageDataGenerator(brightness_range=(0., 0.)).flow(img))[0].astype(int))
ax[3].imshow(next(ImageDataGenerator(brightness_range=(0.5, 0.5)).flow(img))[0].astype(int))
ax[4].imshow(next(ImageDataGenerator(brightness_range=(1., 1.)).flow(img))[0].astype(int))

Is this resolved yet?

I'm also curious if this was resolved.

Looking trough this, this looks like it should be removed, because it is too buggy to be used as is. And too scary to use. Looks like it behaves in very complex ways with various other parameters and also dependent on the image. As such I would refrain from using it. Although the idea of varying the brightness is very useful. But with this parameter one has to wade through dozens of other lines of code and do a fair bit of testing before being able to use it.

Just a note that brightness_range for ImageDataGenerator is defined differently to tf.image.adjust_brightness.
brightness_range applies a multiplication operation, so 1 is no change. (At least theoretically, other commenters here have pointed out that there are changes sometimes.)
adjust_brightness applies an addition operation, so 0 is no change.

Hello, I have found why the image gets shifted when it should not (when setting brightness_range = (1,1)). It is due to min-max image scaling which happens whenever brightness_range is set because of a missing parameter which defaults to True and leads to scaling. More explanation in my pull request https://github.com/keras-team/keras-preprocessing/pull/328 and issue report https://github.com/keras-team/keras-preprocessing/issues/327 .


HTTPCLIENT-2293 - Implement 'If-Range' request validation as per RFC9110

This pull request aims to introduce support for the "If-Range" header as specified in RFC 9110. The "If-Range" header provides a more efficient way to handle partial content retrieval and is a crucial step towards full support for Range requests in our HTTP client component.
Well, this is the first step to start implementing Range support in our project. Your feedback and contributions are highly appreciated as we work towards this important feature.

I would greatly appreciate feedback from @reschke on this implementation, especially concerning its compliance with RFC standards and any best practices that should be considered.


Authentication endpoint to generate JWT tokens

Great project!
I am having trouble working out where I generate the JWT token. Your docs provide a really good description of how you can see the details of a passed in token, so I assume that you are meant to create a JWT token in another service and just have the same secret as you have in postgraphql. Is this correct?
If so, is it possible to add an endpoint to postgraphql to allow users to authenticate with a postgresql login role and password and have postgraphql generate and return a JWT token for use with graphql queries?
Thanks.

We are still working out the best way to create tokens in PostGraphQL, if you have any ideas, we would love to here them! 😊
For now it's recommended to create a single HTTP endpoint where you can (temporarily) manually create tokens.
We'll probably have a solution soonish with the implemention of procedure execution, so stay tuned! (see my notes on #31)

This is an awesome project. Discovered it today and we already have a working example for implementation.
Is it possible to implement something like PostgREST
JWT tokens - http://postgrest.com/admin/security/
Users - http://postgrest.com/examples/users/

@rahult Authentication currently works very similar to PostgREST (actually hoping they will rename where they mount claims to be compliant with this spec so we can be compatible in that regard).
I will also probably do authentication that way, it really seems like the best idea. That is blocked by the implementation of procedures though so stay tuned!
I'm going to leave this open until we have an authentication implementation.

Thanks @calebmer! For what its worth, I do like that I can create my own authentication service to create JWT tokens for any special needs or authentication systems I might have, so it would be good to continue to be able to do that even once authentication is built in. It would just be nice to have the option of a built in authentication as well. So hopefully you can architect it to keep both options available.
Good luck getting the stored proc stuff sorted!

Thanks! Yeah, opt in authentication is super important for us 😊

Now that procedure support has been released, chances are there will be an authentication point done any time soon as well?

@meglio I’m going to look into adding this over the weekend.

This is awesome! Are you going to also handle replay attacks in any way?

@meglio no, not in what I imagine for authentication. However, that doesn’t mean you can’t implement it on the PostgreSQL side :wink:
What I imagine is we allow users to define tables, and/or custom types as tokens and then they could specify that type by the command line. So something like --token my_schema.my_token. Where that could be:
create type my_schema.my_token as (…);
-- or
create table my_schema.my_token (…);

If a table is specified we could bypass JWTs altogether and just return the primary key for the table. PostGraphQL could then also potentially define a function, postgraphql_current_token(), which would return the type you’ve specified. This would be nice as we could then have type safety for tokens. If the user didn’t specify a type by --token my_schema.my_token we would revert to the default behavior of course.
However, it looks like this feature requires more deep and fundamental changes in order to get right. It has also come to my attention that the library needs a good cleanup anyway. So it’s going to take a little longer to develop this feature than the weekend I initially anticipated. I think my time frame is around 2–3 weeks, we’ll see.
In the meantime, PostGraphQL already allows for authorization with whatever technique you want to devise, you’ll just need to put the authentication logic in you’re own microservice. Authentication will be coming to PostGraphQL though. Hopefully sooner rather than later :wink:

May you please elaborate on this:

If a table is specified we could bypass JWTs altogether and just return the primary key for the table.

What would be the structure of such a table? Probably table user_session( userid bigint, session_token text) - is that what you mean?
Also, not sure what you mean with "bypass JWTs altogether".

@meglio take the following example:
You have a user session table like so:
create table user_session (
  id serial primary key,
  user_id int references user(id)
);

…and on the command line interface you point to the table like so:
postgraphql … --token user_session

…and you had an authentication function like this:
create function authenticate() returns user_session …

Instead of creating a JWT, we could just return the primary key of the user_session table, which in this case is an integer. We’d sign and verify that similar to how JWTs are signed and verified (so someone couldn’t just put in a number and have it work). Then we could expose the data in the row identified by the primary key through environment variables like jwt.claims.…, or even better through a typed function that returns a typed user_session tuple.
Does that make sense?

Yep, thanks for making it more material :)
So, I'd have to create an authenticate() function and expose it to anonymous users (e.g. role pool_user which connects to the database before SET LOCAL ROLE is run). It would write whatever data I need to the user_session  table.
Next, client side I get the result and store it somewhere (local storage, cookies, ..).
In the network layer on my client I read the token and, if present, add an Authentication header.
Have I understood it correctly?

After reading this article, I wonder why should JWT be used for sessions at all, and what other solutions are avialable to set roles for authorized users in GraphQL based on sessions.

Yep you got it ;)
One small nit-pick though, the header would be Authorization and not Authentication ;). Authentication is the process of logging in and authorization is the process of confirming you’ve already logged in.
We would get the role from the table similar to how we get the role from the JWT. Imagine a table with a role column like so:
create table user_session (
  id serial primary key,
  user_id int references user(id),
  role text
);

We might even just detect references to the pg_user table ;)

As for JWTs, they are an interesting beast. Used incorrectly they can be a very dangerous session management system, but used correctly they have some pretty great advantages. Number one being we don’t need to query a database to validate our token. In many large systems setting up a Redis instance to store sessions may be efficient, but for most usecases it’s much easier to have a stateless JWT with a quick expire time.
I usually put an expiration of 10–30 minutes on my JWTs and also issue a refresh token with them. Then we get the best of both worlds. A JWT to make fast requests, and a refresh token that we can invalidate in the database. I recognize the article author’s concerns (concerns I’ve had when building JWT systems in the past), but I don’t agree with the conclusions.
I like JWTs for session management (when used wisely!), but this proposal would allow for either a JWT or a more managed solution.

Provided postgraphql is hosted on the same domain where the main application runs, what would be the best way for one to implement a custom authentication system (e.g. a classical cookies-based one), that would still  SET ROLES based on session?
I can see /usr/bin/postgraphql is a compiled .js file.
Does it mean I'll have to create my own nodejs project, import postgraphql module, create my own server and handle session analysis there and call SET ROLE before issuing any SQL request? Is there a simpler way without developing/compiling/deploying my own nodejs project?
What I would like to try is basically a classical cookies-based authentication system, yet it should call SET ROLE for me - otherwise it's not clear how to use Postgraphql in a web project as is without making my own endpoint if not going with JWT.
What I have in mind is something like this:

Start postgraphql with --authentication=cookie
User requests authenticate() function, which is available through PostgraphQL for anonymous users.
The authenticate() function returns a token to store in a cookie, e.g. abc
Postgraphql includes a Set-Cookie: some-name=abc header to the response, as well as 200 OK or whatever is valid for a successful GraphQL request
On any request that contains a cookie named some-name, Postgraphql executes authorize(abc), which will SET ROLE (or whatever is needed), and return some result for Set-Cookie to be set for the response. It might be the same string, a new string (rotation), or an empty string (to invalidate the cookie).
the some-name might be optionally customized, e.g. --cookie-name=some-name

Does it make any sense?

The flow would look more like this:
mutation Authenticate {
  authenticate(name: "admin", password: "password") {
    token
  }
}

Where then token you can do whatever you want with it. If you want token to be in a header, you can put it there. If you want token to be in local storage, you could save it there.

If anyone has a working authentication example, I would love to see it added to the documentation. Very interesting thread btw.

Yep, that's what I mean, but just wanted to let it not be limited to JWT only.

If I understood correctly from the last news, you have postponed authentication till the new architecture is implemented, as described in the recent My vision for the future of PostGraphQL thread. Please confirm.

@meglio correct. This is a feature that’s very high on my priority list, but I want to get it right.
I also want to remind that authentication can still be done outside of PostGraphQL today. It’s fairly simple to setup a Node.js server to manage authentication and use that token with PostGraphQL’s authorization features. If you want, it would also be fairly simple to hook into the generated mutation type allowing you to add your own mutation field.

Is this included endpoint still needed ? I'm planning to use https://github.com/michelp/pgjwt to generate sign a jwt using postgres and postgraphql only (no external auth server) and it would be relevant to match the final API.

@prevostc that’s pretty awesome, I did not know about that. I still want to support JWT generation in PostGraphQL for people who want it though, but that solves a lot of problems :blush:
Here’s my thoughts on API, you pass into PostGraphQL --token-type my_schema.my_table or --token-type my_schema.my_composite_type. If you passed a table, the table must have a primary key. Then, any database function you write which either uses the token type (table or composite type) as an argument or return type, PostGraphQL will automatically swap that with a JWT type.
So for SQL that looks like:
create type my_token as (
  user_id uuid
);

create function authenticate (name text, password text) returns my_token …;

In PostGraphQL you’ll get a GraphQL schema that looks (roughly) like:
scalar JWT

type Mutation {
  authenticate(input: AuthenticateInput!): AuthenticatePayload!
}

type AuthenticateInput {
  name: String!
  password: String!
}

type AuthenticatePayload {
  myToken: JWT
}

Where JWT is just the token string. For compound types, the token will contain all of the fields in the compound type. For tables with a primary key, the token will only contain the information required to lookup the row for that primary key.
PostGraphQL might add an exp by default to your tokens. I haven’t decided yet. If we do it will probably be generous. Something like 5 days. Of course that’s configurable if your table or compound type has an exp attribute, that will be used instead.
Hope that helps @prevostc :blush:

@calebmer that look nice to me! I would like to start working on this and submit a WIP asap. Any idea on how an external oauth identity provider would fit this model ? (google/facebook/github/...)

Authentication will be in PostGraphQL 2 which is almost done (you can track the development in the next branch). For now though https://github.com/michelp/pgjwt would work as a great “polyfill” if you will :blush:
I’m not 100% sure how Google/Facebook/GitHub etc. auth would fit well into this model. You’d probably want a GraphQL mutation something to the effects of authenticateGoogle which takes a Google token and creates a token for PostGraphQL.

PostGraphQL 2 beta has been released which has an authentication implementation (#145). Install the beta today and tell me what you think. I’ll be writing a documentation article on how to use the authentication feature and updating the example schema before the full release :+1:
npm install -g postgraphql@next
postgraphql --secret cat-keyboard --token my_schema.my_token

(make sure you have a Postgres server listening on postgres://localhost:5432)

With authentication built-in, this is getting closer to a fully featured out-of-the-box no-server-code applications. Where can we read about v2 new features and changes?

@meglio check out issue #145 and tell me what you think about the changes made 👍

I’m going to close this as its in the PostGraphQL 2.0 beta 🎉
Start playing with the pre-release, the final release should be out really soon. Tell me what you think! :+1:
npm install -g postgraphql@next
postgraphql

If you’d like to read up on how authentication works in PostGraphQL 2, there is a detailed documentation tutorial going over the entire process.
The documentation article: https://github.com/calebmer/postgraphql/blob/787bbe4ee842e0d931989df88acbdb3a88e1c380/examples/forum/tutorial.md
The authentication section: https://github.com/calebmer/postgraphql/blob/787bbe4ee842e0d931989df88acbdb3a88e1c380/examples/forum/tutorial.md#authentication-and-authorization

@calebmer Been following your documentation and everything worked really well. Great documentation, thanks for the huge effort that must have gone into it


Broken/Outdated? link for Trusted Root CA application

The link of root CA application https://aka.ms/rootcertapply which redirects to CA Trusted Root Program Application-2018.pdf is now redirecting to Browse code samples eventually.
What is the correct link for root application now?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8a89d1f2-b584-a6ce-711e-45a84b9efd0e
Version Independent ID: 09b2b395-f083-dd0b-8113-95c90701814d
Content: New CA application - Microsoft Trusted Root Program
Content Source: trusted-root-docs/new-ca-application.md
Service: security
GitHub Login: @kasirota
Microsoft Alias: kasirota

#please-close

The page has been updated and the application is currently closed.

The page has been updated and the application is currently closed.


Deleting database or clear tables

Hi,
I want to delete the encrypted room files or clear its tables.
The Room has a function which name is clearAllTables(), but I cannot get the database instance without a password.
Is there any other solution, or should I delete the file in the database folder?

Please use SQLCipher for Android directly — version 4.2.0 and higher offers SupportSQLite* classes directly, so you no longer need this library.
If you do not have a passphrase, your only option is to delete the database files.

What is your suggestion to find related files of the room database? Each database creates three files:
file, file-shm, and file-wal. Is there any solution to get all associated files of a database?

By default the database is stored in the location identified by getDatabasePath(), a method on Context.

Is it safe to delete all the files in this path? What if any libraries have a database for itself? Ido not want to delete those databases.

getDatabasePath() takes the name of a database file. It will return a File that points to a single file, representing your database. If you wish to try modify that File to check for and delete -shm and -wal files, you can do so. None of that will affect any other databases.

Thanks!


"failed to set personality to aarch64: Operation not permitted"

This is on a self hosted gitea runner, which shouldn't be of consequence, however that runner is on a arm64 processor (an Orange Pi 5 Pro)
I suspect this is just some valgrind setting?
I can't get valgrind to work on my mac either 😭

Sorry, I'm not root


[zh] sync admission-controllers.md

Sync with en.
content/zh-cn/docs/reference/access-authn-authz/admission-controllers.md

Preview: https://deploy-preview-38396--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/access-authn-authz/admission-controllers/

/lgtm
/approve


Robb Dimmers/Switches (already supported by Zigbee2MQTT dev-branche)

Device description (3 devices)
Zigbee Rotary dimmer by Robbshop
Dimmer switch (on/off/brightness)
MQTT message with device information
PUT here the device data you receive when publish message with topic
zigbee2mqtt/bridge/config/devices, as example
zigbee2mqtt/**<friendly name>**', payload '{"brightness":1,"linkquality":21,"state":"OFF","device":{"friendlyName":"**<friendly name>**","model":"ROB_200-014-0","ieeeAddr":"0xec1bbdfffe7f3e4f","networkAddress":30828,"type":"Router","manufacturerID":4644,"manufacturerName":"ROBB smarrt","powerSource":"Mains (single phase)","applicationVersion":0,"stackVersion":0,"zclVersion":3,"hardwareVersion":0,"dateCode":"NULL","softwareBuildID":"2.5.3_r47"}}

MQTT messages from device
Put here examples of MQTT messages with different states you've received from device, as example
Device Off - brightness 1 (Turning off when fully dimmed)
zigbee2mqtt/**<friendly name>**', payload '{"brightness":1,"linkquality":21,"state":"OFF","device":{"friendlyName":"**<friendly name>**","model":"ROB_200-014-0","ieeeAddr":"0xec1bbdfffe7f3e4f","networkAddress":30828,"type":"Router","manufacturerID":4644,"manufacturerName":"ROBB smarrt","powerSource":"Mains (single phase)","applicationVersion":0,"stackVersion":0,"zclVersion":3,"hardwareVersion":0,"dateCode":"NULL","softwareBuildID":"2.5.3_r47"}}

Device On - brightness 189 (device is set very bright when on)
MQTT publish: topic 'zigbee2mqtt/**<friendly name>**', payload '{"brightness":189,"linkquality":7,"state":"ON","device":{"friendlyName":"**<friendly name>**","model":"ROB_200-014-0","ieeeAddr":"0xec1bbdfffe7f3e4f","networkAddress":30828,"type":"Router","manufacturerID":4644,"manufacturerName":"ROBB smarrt","powerSource":"Mains (single phase)","applicationVersion":0,"stackVersion":0,"zclVersion":3,"hardwareVersion":0,"dateCode":"NULL","softwareBuildID":"2.5.3_r47"}}'

MQTT state change commands
If device supports state change put MQTT topics + payload examples to change device state here
Device Off
zigbee2mqtt/', payload '{"brightness":1,"linkquality":21,"state":"OFF","device":{"friendlyName":"","model":"ROB_200-014-0","ieeeAddr":"0xec1bbdfffe7f3e4f","networkAddress":30828,"type":"Router","manufacturerID":4644,"manufacturerName":"ROBB smarrt","powerSource":"Mains (single phase)","applicationVersion":0,"stackVersion":0,"zclVersion":3,"hardwareVersion":0,"dateCode":"NULL","softwareBuildID":"2.5.3_r47"}}
Device On
MQTT publish: topic 'zigbee2mqtt/', payload '{"brightness":189,"linkquality":7,"state":"ON","device":{"friendlyName":"","model":"ROB_200-014-0","ieeeAddr":"0xec1bbdfffe7f3e4f","networkAddress":30828,"type":"Router","manufacturerID":4644,"manufacturerName":"ROBB smarrt","powerSource":"Mains (single phase)","applicationVersion":0,"stackVersion":0,"zclVersion":3,"hardwareVersion":0,"dateCode":"NULL","softwareBuildID":"2.5.3_r47"}}'

Could you please update plugin and check

Yes! Updated and the devices showed in Domoticz. They work as expected, so thanks!!


[Minor] Changed node -> number

... to make the sentence meaningful

@rashi-ms
Can you review the proposed changes?
When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


croc: 10.0.9 -> 10.0.10

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/schollz/croc/releases.
meta.description for croc is: Easily and securely send things from one computer to another
meta.homepage for croc is: https://github.com/schollz/croc
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 10.0.10 with grep in /nix/store/rhx5bh9cpac6vkdw3q79hvc2435n6cvn-croc-10.0.10
found 10.0.10 in filename of file in /nix/store/rhx5bh9cpac6vkdw3q79hvc2435n6cvn-croc-10.0.10

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

croc

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/rhx5bh9cpac6vkdw3q79hvc2435n6cvn-croc-10.0.10 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A croc https://github.com/r-ryantm/nixpkgs/archive/9fc0b8080774a68e8a4e1fe4a2634f7f2f2c1095.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/9fc0b8080774a68e8a4e1fe4a2634f7f2f2c1095#croc

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/rhx5bh9cpac6vkdw3q79hvc2435n6cvn-croc-10.0.10
ls -la /nix/store/rhx5bh9cpac6vkdw3q79hvc2435n6cvn-croc-10.0.10/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

croc

Maintainer pings
cc @HugoReeves @equirosa @SuperSandro2000 for testing.

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

1 package built:

croc


feat: add a http interface to plugins

this interface allow to transparently handle requests authentication within the Authentication plugin to lift the burden on search and download plugins.
Also it centralise authentication management and allow for more complexe authentication mechanisms like refresh when required, etc.
Your checklist for this pull request
Please review the guidelines for contributing to this repository.

[ ] Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
[ ] Check the commit's or even all commits' message styles matches our requested structure.
[ ] Check your code additions will fail neither code linting checks nor unit test.

Description
Please describe your pull request.

Thank you!

This is only a first draft. @sbrunato wdyt ?


Create 0895-maximum-frequency-stack.py

File(s) Modified: 0895-maximum-frequency-stack.py
Language(s) Used: python
Submission URL: _https://leetcode.com/problems/maximum-frequency-stack/submissions/1147599761/_

This solution is similar to the existing solution


Create HELICS installer and artifact on AppVeyor

Install artifact is available at: https://ci.appveyor.com/project/nightlark/helics-src/build/artifacts
Appveyor can upload artifacts to a variety of places with either a deploy section in the config file, or by running curl/ftp to upload files to wherever we want them.

We'd have to make this file a templated file, see other .in files as an example.

if you want the full file name from cmake that would probably be a little different


EIP-7742: Replace usage of EIP-4844 constants with dynamic values

Similar to https://github.com/alloy-rs/alloy/issues/1709, we now have to calculate excess blob gas not with constants, but with values passed in from CL (or the header in historical sync). This is because the CL now determines target/max for blob count.
Anything in revm that relies on hardcoded target/max (currently 3/6) needs to use a dynamic value passed in in BlockEnv.
The logic is the exact same as in EIP-4844, with the only change being that we no longer use hardcoded constants.

Done in: https://github.com/bluealloy/revm/pull/1899 and https://github.com/bluealloy/revm/pull/1900


loudmouth install step fails on Debian

I'm getting an error installing loudmouth on Debian. Here is the error log:
Last 15 lines from /home/users/jesse/.cache/Homebrew/Logs/loudmouth/02.make:
libtool: link: /usr/bin/gcc-4.9 -Os -w -pipe -march=core2 -Wall -I/home/users/jesse/.linuxbrew/Cellar/gnutls/3.3.18/include -I/home/users/jesse/.linuxbrew/Cellar/nettle/2.7.1/include -I/home/users/jesse/.linuxbrew/Cellar/libtasn1/4.7/include -Wall -Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -Werror -Wl,-rpath -Wl,/home/users/jesse/.linuxbrew/lib -o .libs/test-dns test-dns.o  -L/home/users/jesse/.linuxbrew/lib -L/home/users/jesse/.linuxbrew/Cellar/glib/2.46.0/lib -lglib-2.0 ./.libs/libloudmouth-1.so -lnsl -L/home/users/jesse/.linuxbrew/Cellar/gnutls/3.3.18/lib -lgnutls -Wl,-rpath -Wl,/home/users/jesse/.linuxbrew/Cellar/loudmouth/<IP_ADDRESS>21201_1/lib
/usr/bin/ld: test-dns.o: undefined reference to symbol 'g_object_get'
/home/users/jesse/.linuxbrew/lib/libgobject-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

It appears the problem is that the linker is not told to include gobject. This patch fixes the problem on my system. Unfortunately I do not have much experience fixing build problems, so my fix may be excessively blunt.
Output of uname -a:
Linux hood 3.14-2-amd64 #1 SMP Debian 3.14.15-2 (2014-08-09) x86_64 GNU/Linux

It looks to me like an upstream build issue, Have you contacted the upstream authors with this build issue?

Does this issue still affect you? Have you contacted the upstream authors?


optimized cron

The request optimizes the way how the cron job execution is embedded in HTML.
It further adds a cleanup for the /tmp directory. (This was filled with 25k (!!!) old session files for our installation)

Other then that, LGTM.


Could not load file or assembly Newtonsoft.Json

Hi I try to Send photo and file with SendPhotoAsync and SendDocumentAsync. When i use from my main project the error will occur which i will explain, but when i create a test website solution and test in that it work well. if you need i will explain more about the project architecture.
But, about the Error, that`s it:

Could not load file or assembly 'Newtonsoft.Json, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

and Full base messsge:

System.IO.FileLoadException:``Could not load file or assembly 'Newtonsoft.Json, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Newtonsoft.Json, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'    at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter..ctor()    at System.Net.Http.Formatting.JsonMediaTypeFormatter..ctor()    at System.Net.Http.Formatting.MediaTypeFormatterCollection.CreateDefaultFormatters()    at System.Net.Http.Formatting.MediaTypeFormatterCollection..ctor()    at System.Net.Http.HttpContentExtensions.get_DefaultMediaTypeFormatterCollection()    at System.Net.Http.HttpContentExtensions.ReadAsAsync[T](HttpContent content, CancellationToken cancellationToken)    at Telegram.Bot.TelegramBotClient.<SendWebRequestAsync>d__139``1.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at System.Runtime.CompilerServices.TaskAwaiter``1.GetResult()    at Rubik_Telegram.Sending.Send.<SendPhotoByFileAsync>d__f.MoveNext() in ...\Send.cs:line 161 === Pre-bind state information === LOG: DisplayName = Newtonsoft.Json, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed  (Fully-specified) LOG: Appbase = file:///.../myprojectfolder/ LOG: Initial PrivatePath = ...\myprojectfolder\bin Calling assembly : System.Net.Http.Formatting, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35. LOG: This bind starts in default load context. LOG: Using application configuration file: ...\web.config LOG: Using host configuration file: C:\Users\...\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Newtonsoft.Json, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed LOG: Attempting download of new URL file:///C:/Users/.../AppData/Local/Temp/7/Temporary ASP.NET Files/vs/f7e4c2e3/711202e2/Newtonsoft.Json.DLL. LOG: Attempting download of new URL file:///C:/Users/.../AppData/Local/Temp/7/Temporary ASP.NET Files/vs/f7e4c2e3/711202e2/Newtonsoft.Json/Newtonsoft.Json.DLL. LOG: Attempting download of new URL file:.../bin/Newtonsoft.Json.DLL. WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Something is strange, both SendPhotoAsync and SendDocumentAsync, throw this exception but, the document send well, but the photo don`t send anyway.
Also i had this problem before in another project but with some solutions i solved that, and i did all of those solutions and all others said in Stack and other results in google, but those don`t work this time.
Thanks from any help.
Environment data
IDE and PRJ:

Visual Studio 2013 Ultimate Update 5.
.NET Framwork Version 4.5.51650
It`s a Class library project

Packages:
Json.NET

Created by: James Newton-King
Version 9.0.1

Microsoft ASP.NET Web API 2.2 Client Library

Created by: Microsoft.AspNet.WebApi.Client
Version: 5.2.3

Telegram Bot API

Created by: Robin Muller
Version: 10.3.1

Summery Environment data
NuGet Package Version: 10.3.1
.NET Version: 4.5
IDE: VS2013 Ultimate Update 5
App: ASP.NET Website

Hi D4NTESPARDA,
Try to add assembly binding redirect in your app.config to last version of Newtonsoft.Json:
`

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

  <dependentAssembly>

    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />

    <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
   </dependentAssembly>

 </assemblyBinding>

`

hi and thanks Bolisov, i did this before, but didn`t work.

Hi,
try these steps:

right click on your project.
click on "Manage Nuget packages"
in the Update Tab, update all the package.
rebuild your project.
Done

Does this solved the problem?

Yes.. update with latest

@D4NTESPARDA Feel free to reopen this if the issue isn't resolved.

Just for posterity, I want to mention that @matiuspico helped me out here.
I only had to upgrade Newtonsoft.Json (didn't upgrade anything else as I didn't want to break something.)
This was actually for ReactJS.NET, but I'm still glad I found this.

I have similar issue "System.InvalidOperationException: 'Could not load file or assembly 'Newtonsoft.Json, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.'" i have tried the above mentioned solution
but the issue is resolved for me

Without changing the version i was able to uninstall and reinstall the same version this worked for me.


apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+;

Describe the bug
I'm currently using application-gateway-kubernetes-ingress (AGKI) v1.40. I've just updated to AKS version 1.21.2 and seeing this warning:
apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+;
I've also created a fresh aks cluster using 1.22.2 and wasn't able to install AGKI on it.
To Reproduce
Create a cluster with AKS v.1.21.2 and install AGKI v1.4.0 => warning
Create a cluster with AKS v.1.22.2 and try to install AGKI v1.4.0 => error

https://github.com/Azure/application-gateway-kubernetes-ingress/pull/1253
Looks like there's already a PR open for this for some time.
I wander what's taking so long, this is a blocker for v1.22+

Do not do this!
I've just upgraded an existing AKS cluster to version 1.22.2 (very foolish)
now AGIC is broken; adding an Ingress does nothing. Listeners, rules etc. are no longer created in App GW
I can see that AGIC has upgraded, it was 1.4:
mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.5.0-rc1                 app=ingress-appgw
I have tried many things...
annotations:
# deprecated as of 1.22
#kubernetes.io/ingress.class: azure/application-gateway
changed	Ingress to add spec.ingressClassName
spec:
ingressClassName: azure-application-gateway
fixing the yaml (removed beta.)
nodeSelector:
~~beta.~~kubernetes.io/os:
And on discovering this error message: ingresses.networking.k8s.io is forbidden: cannot list resource "ingresses" in API group "networking.k8s.io" at the cluster scope.
I found that networking.k8s.io is missing from ClusterRole!

apiGroups:

networking.k8s.io
resources:
ingresses

@CJJ69 Thank for sharing! Will straight away get to fixing this.

Any update on this? I've updated our Pre-Prod clusters to 1.22 and had adjust AGIC to use 1.5.0rc1 to make this work.
But for now we're waiting to roll out the new version until this is solved.

Hi @akshaysngupta. Has this this issue been resolved or targeted to a release?


fix: disable lasso explicitly

:tada: This PR is included in version 2.1.8 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Nightly release soft failure

The procedure completes, but there is an error:
Run ./mvnw clean deploy --settings ../.github/asf-deploy-settings.xml -q
/home/runner/work/_temp/c91c3423-e087-45f8-95f4-a4103346343e.sh: line 1: ./mvnw: No such file or directory
``

Still failing
Run mvn clean deploy --settings ../.github/asf-deploy-settings.xml -q
Error:  Error executing Maven.
Error:  The specified user settings file does not exist: /home/runner/work/camel-k/camel-k/java/.github/asf-deploy-settings.xml
Error: Process completed with exit code 1.
``


Stop using process.umask()

Refs: https://github.com/nodejs/node/issues/32321
Summary: process.umask() (no args) will be deprecated and removed.
I couldn't quite divine what lib/config/defaults.js uses process.umask() for but in most cases you don't need to deal with the umask directly - the operating system will apply it automatically.
Example:
const mode = 0o777 & ~process.umask();
fs.mkdirSync(dir, mode);

Computing the file mode that way is superfluous, it can be replaced with just this:
fs.mkdirSync(dir, 0o777);

https://github.com/nodejs/node/issues/32321#issuecomment-608549694
cc @bnoordhuis

Add a chmod: false option to unpack.  In this mode, just create the file with the entry mode, and let it ride with whatever the OS gives us.
If chmod:false is not set, then create the file with the entry.mode, stat the file, and chmod if different.  This will be slower than the current approach, unfortunately.

Note: even though it's potentially slower, creating the file and then checking the mode is a more technically correct approach, as it is resilient against process.umask() changing during the unpack, or returning an incorrect value.

FWIW, I did some quick, completely unscientific benchmarks on Linux and changing create-close to create-fchmod-close slows it down by just under 15%:
// As root, run `echo 3 > /proc/sys/vm/drop_caches` first
'use strict';
const { O_CREAT, O_WRONLY } = require('fs').constants;
const { openSync, closeSync, unlinkSync } = require('fs');
let { fchmodSync } = require('fs');
if (process.argv[2]) fchmodSync = () => {};

const N = 1e4;
const files = [];
for (let i = 0; i < N; i++) files.push('/tmp/xyzzy' + i);

const start = Date.now();
for (const file of files) {
  const fd = openSync(file, O_CREAT|O_WRONLY);
  fchmodSync(fd, 0o666);
  closeSync(fd);
}
const end = Date.now();

console.log(start, end, end - start);
for (const file of files) unlinkSync(file);

15% sounds like a lot, however:

The benchmark doesn't write any data. Writing 4x4k blocks shrinks the relative gap to <5%.

There is only a statistically significant difference when the cache is already warmed up.

I assume cold caches are the common case for node-tar because you don't normally unpack the same tarball to the same location 10 times in a row. (Well, I don't, anyway.)

If you really need to use
process.umask()

(without args), then you may use get-umask  module. It suppresses those annoying warnings. And yeah, it's written by me.

Suppress warnings by using { noChmod: true }, so that it won't have to calculate anything.  Otherwise, there's no way around having to get the process umask, or else it's a big security problem.


Define a "Brillig stdlib" for common functions for easier display

Problem
Noir is currently replacing the usage of a number of directives with Brillig functions.
The example Noir program
fn main(x : Field, y : pub Field) {
    assert(x != y);
}

currently gets displayed as
Compiled ACIR for main (unoptimized):
current witness index : 5
public parameters indices : [2]
return value indices : []
EXPR [ (1, _1) (-1, _2) (-1, _3) 0 ]
BRILLIG: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(3))], q_c: 0 })]
outputs: [Simple(Witness(4))]
[JumpIfNot { condition: RegisterIndex(0), location: 3 }, Const { destination: RegisterIndex(1), value: Value { inner: 1 } }, BinaryFieldOp { destination: RegisterIndex(0), op: Div, lhs: RegisterIndex(1), rhs: RegisterIndex(0) }, Stop]

EXPR [ (1, _3, _4) (1, _5) -1 ]
EXPR [ (1, _3, _5) 0 ]
EXPR [ (-1, _5) 0 ]

What was once  DIR::INVERT (_3, out: _4) is now
BRILLIG: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(3))], q_c: 0 })] outputs: [Simple(Witness(4))] [JumpIfNot { condition: RegisterIndex(0), location: 3 }, Const { destination: RegisterIndex(1), value: Value { inner: 1 } }, BinaryFieldOp { destination: RegisterIndex(0), op: Div, lhs: RegisterIndex(1), rhs: RegisterIndex(0) }, Stop]
This makes it much harder to read ACIR code while debugging as the user needs to verify that this brillig bytecode is correct.
Happy Case
We should define a set of standard brillig functions such as inversion, quotient, etc. here in ACVM. When displaying brillig opcodes we can then hash the bytecode to compare against this known list of brillig functions. We can then display a human readable format similarly to what we do for the Directive opcodes.
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
Yes
Support Needs
No response

Will be handled as part of https://github.com/noir-lang/noir/issues/3907


fix Readme with gateway example

Re #6
Update Readme with same gateway example in whole document, avoiding misundersrtanding.

Thanks @juferchaud 😉


Is this project already existing in the app?

[X] I have searched the existing projects

Tell us about the project
Drupal is an open source content management system that is a Digital Public Good (Ref: https://app.digitalpublicgoods.net/a/10499). This is their gh repo https://github.com/drupal/drupal but it is just a public mirror, they have their own GitLab repository and issue queue. The list of DPG for PHP is quite slim so I think this would be a good addition. The issue queue has a Novice tag .
Is the Project a DPG (Digital Public Good)

[X] This Project is a DPG

Does the project list which Sustainable Development Goals it addresses in its labels?

[X] Yes
[ ] No

Code of Conduct

[X] I've read the Code of Conduct and understand my responsibilities as a member of the Ruby for Good community

Anything else?
No response

Drupal has been added :)


CFP: Support static (public) IP assignment

Problem Description
Our goal is to assign static public IPs to pods running in AWS, GCP and Azure. To achieve this, we would like Cilium to assign static public IPs to nodes and then use masquerading for pods. Masquerading is already a GA feature of Cilium, however, static IP assignment is not yet supported.
Note that in our case, we want these IPs to be public but the implementation will be the same regardless of whether they are public or private.
Proposal
AWS
In AWS, we will have to leverage Elastic IPs. The first version of the implementation could look something like this:

We manage the allocation of EIP pools "manually" (for example via Terraform)
We then let the Cilium Operator associate the IPs with instances or ENIs based on user-specified EIP tags

The simplest solution is to let users specify the desired EIP tags through the ENI CNI spec. Additionally, users can pass a boolean switch to choose whether the EIP is associated with the instance or the ENI.
Example
We allocate 2 sets of EIPs: one tagged with kubernetes_cluster:a and another one tagged with kubernetes_cluster:b.
Then in the CNI spec for nodes running in Cluster A, we set something like this:
    {
      "name": "cilium",
      "type": "cilium-cni",
      "eni": {
        "eip-tags": {
          "kubernetes_cluster": "a"
        },
        "eip-associate-with-instance": "true",
        ...

Then, when the Operator creates the ENI in Node.CreateInterface(), it would do something like this:
if resource.Spec.ENI.EIPTags != nil {
    n.manager.api.AssociateEIP(ctx, eniID, n.node.InstanceID(), resource.Spec.ENI.EIPTags, resource.Spec.ENI.EIPAssociateWithInstance)
}

The AssociateEIP function will call the relevant AWS APIs to associate the first EIP corresponding to the tags. You can find the function draft here:

 AssociateEIP
func (c *Client) AssociateEIP(ctx context.Context, eniID, instanceID string, eipTags ipamTypes.Tags, eipAssociateWithInstance bool) error {
	filters := make([]ec2_types.Filter, 0, len(eipTags))
	for k, v := range eipTags {
		filters = append(filters, ec2_types.Filter{
			Name:   aws.String(fmt.Sprintf("tag:%s", k)),
			Values: []string{v},
		})
	}

	describeAddressesInput := &ec2.DescribeAddressesInput{
		Filters: filters,
	}
	// TODO rate-limiting
	addresses, err := c.ec2Client.DescribeAddresses(ctx, describeAddressesInput)
	// TODO metrics
	if err != nil {
		return err
	}
	log.Infof("Found %d EIPs corresponding to tags %v", len(addresses.Addresses), eipTags)

	for _, address := range addresses.Addresses {
		// Only pick unassociated EIPs
		if address.AssociationId == nil {
			associateAddressInput := &ec2.AssociateAddressInput{
				AllocationId:       address.AllocationId,
				AllowReassociation: aws.Bool(false),
			}
			if eipAssociateWithInstance {
				associateAddressInput.InstanceId = aws.String(instanceID)
			} else {
				associateAddressInput.NetworkInterfaceId = aws.String(eniID)
			}
                        // TODO rate-limiting
			association, err := c.ec2Client.AssociateAddress(ctx, associateAddressInput)
			// TODO metrics
			if err != nil {
				// TODO some errors can probably be skipped and next EIP can be tried
				return err
			}
			log.Infof("Associated EIP %s with Instance %s (association ID: %s)", *address.PublicIp, instanceID, *association.AssociationId)
			return nil
		}
	}
	return fmt.Errorf("no unassociated EIPs found for tags %v", eipTags)
}

There is a fair number of edge cases which need to be addressed here but it gives an idea of the desired functionality.
As a next step, Cilium could not only manage the association of EIPs but also manage their allocation by provisioning them on-demand.
The downside of this implementation is that it is very AWS-specific and doesn't really use any abstraction which would be useful for Azure or GCP (see abstraction ideas in the GCP section).
Azure
In Azure, the static IP assignment mechanism is very similar: Public IP addresses can be created (and tagged) and then added to VM network interfaces.
With the ipam: azure mode, we could either add a new CNI parameter (similar to what was described for AWS) or, even better, use a cloud-agnostic abstraction (see the GCP section below).
GCP (and cloud-agnostic abstraction ideas)
In GCP, we will have to leverage Static External IP Addresses. The main idea is once again the same as for AWS and Azure: we will reserve static IPs "manually" (Terraform or something else) and will let Cilium assign the IP to the interface of the instance based on user-specified IP labels.
The difference with AWS and Azure is that Cilium runs in ipam:kubernetes mode in GCP. This means that we can't have a setup similar to what was described in previous sections. There are a couple of other possibilities:

Add new fields in the ciliumnode CRD spec (under .spec.ipam?). The most important field will be something like .spec.ipam.static-ip.tags. There could possibly be other fields for cloud-provider specific customizations. The Operator will watch the CiliumNode objects and will call the relevant Cloud Provider APIs when it sees the static-ip fields being set.
Add a new annotation on the nodes, similarly to what Calico has for pods: https://docs.tigera.io/calico/latest/networking/ipam/use-specific-ip. The Operator will then act on the annotation.
(I also thought that Cloud Provider static IPs could integrate with the Multi-Pool IPAM feature however it's only used for pod IPAM so it's not directly relevant here)

Using the first two ideas we could build an abstraction which would work for all three main Cloud Providers.
I know this proposal is a bit rough but I would love to get some preliminary feedback from the maintainers / the community on whether this feature makes sense and what the best implementation plan will be here.

May I know why you want to have a static public IP for a pod?

Not my CR. But I have similar request and are looking for solutions to it, hence my interest !
In my case i I have the need for client to connect over TCP/ proprietary protocol (so my options for routing is limited) to backend running inside K8S i.e. as a POD.
So I basically want to route TCP to a  (static) IP:PORT for each POD (i.e. backend instance). previous the backend was a VM assigned a public-IP.
Maybe I can route this as a tcp route ? Maybe I can use 'sni tls' ?
Would probably work if I set up a LB for each POD (i.e. backend instance) but that would be very costly ...
Being able to do this could be an option !?

May I know why you want to have a static public IP for a pod?

Hey, so just to give a bit more context, we have a need to perform NAT on Kubernetes managed instances with public IPs and we must control precisely the IP assignments in order to use well-known IP ranges that our customers reference

You have use the egress gateway to control the public IP address that pods will use for NAT for the source.

Right, we are actually using a custom-built service which is quite similar to the Cilium EGW. However, both our service and the Cilium EGW can't actually assign static IPs to nodes. If you look at the docs, they explicitly state that:

Cilium must make use of network-facing interfaces and IP addresses present on the designated gateway nodes. These interfaces and IP addresses must be provisioned and configured by the operator based on their networking environment.

So my proposal is to basically automate this IP address assignment. This will be useful for Cilium EGW users as well.

I dont get it. you can control the IP address of the egress gateway nodes in your environment. This is totally different from the static IP address of the pod. Once you assign the IP address to the egress gateway node, you can let the pod use that IP to perform the SNAT

Yes, that makes sense, that's exactly what we want to do. However, the bit that's missing from Cilium is precisely

Once you assign the IP address to the egress gateway node

This is the functionality which my proposal was meant to address, i.e assigning a static IP to the egress gateway node (sorry if this wasn't clear). Right now these assignments have to be done manually / outside of Cilium. We'd like to have Cilium manage these assignments automatically.

I dont think that's possible or easy to implement since host setup is heavily depending on the environment. You might need to work with your terraform/IAC tool for the node setup

I agree that it's not trivial to implement and that this involves Cloud Provider-specific implementations, however Cilium already has a fair amount of Cloud Provider-specific code and notably it already has code for doing IPAM in AWS, Azure and Alibaba Cloud (the feature I described strongly relates to IPAM)
Moreover, there aren't that many options to do static IP assignment in Cloud Providers currently. For example if you want to do it in AWS, you will have to Elastic IPs; if you want to do it in GCP, you will have to use "Static External IP Addresses", etc. This is what I tried to convey in my proposal above.

FWIW I have a draft version of the code which works for AWS, it's in our 1.14 fork but it should give a good idea of the proposed implementation: https://github.com/DataDog/cilium/pull/569
I added a new static-ip-tags map to the CNI config under the ipam section, it looks something like this:
"ipam": {
        "pre-allocate": 1,
        "static-ip-tags": {
          "pool": "a",
          "kubernetes_cluster": "cluster-1"
        },

When the Operator sees that these tags are defined on a CiliumNode object, it will try to find an EIP corresponding to these tags and will associate the EIP with the EC2 instance. All the logic is more or less integrated into the existing IPAM code.


Go icon almost disappears, depending on the UI Theme.

Maybe that's due to too light lines. I don't really know. But here's what happens:

In this example the theme is visual-studio-code.

If I knew how to fix it, I would.

Yikes, that's bad. Does adding the following chunk to your theme's CSS help?
.icon-file-text[data-name$=".go"]:before{
	-webkit-font-smoothing: subpixel-antialiased;
	-webkit-text-stroke-color: transparent !important;
	font-weight: bolder !important;
}

I use a light-coloured theme so I can't replicate too easily... but it seems like there's a faint black outline being applied to the icon (which isn't present on the other icons):

Fixed in v1.7.0.


[YOLOV7X-QAT] Cannot convert onnx to trt engine

[10/21/2024-17:11:29] [I]
[10/21/2024-17:11:29] [I] TensorRT version: 8.4.1
[10/21/2024-17:11:30] [I] [TRT] [MemUsageChange] Init CUDA: CPU +218, GPU +0, now: CPU 242, GPU 10401 (MiB)
[10/21/2024-17:11:33] [I] [TRT] [MemUsageChange] Init builder kernel library: CPU +351, GPU +327, now: CPU 612, GPU 10767 (MiB)
[10/21/2024-17:11:33] [I] Start parsing network model
[10/21/2024-17:11:33] [I] [TRT] ----------------------------------------------------------------
[10/21/2024-17:11:33] [I] [TRT] Input filename:   abandon_p0.963_r0.933_v3.0_ptq.onnx
[10/21/2024-17:11:33] [I] [TRT] ONNX IR version:  0.0.7
[10/21/2024-17:11:33] [I] [TRT] Opset version:    13
[10/21/2024-17:11:33] [I] [TRT] Producer name:    pytorch
[10/21/2024-17:11:33] [I] [TRT] Producer version: 1.12.0
[10/21/2024-17:11:33] [I] [TRT] Domain:
[10/21/2024-17:11:33] [I] [TRT] Model version:    0
[10/21/2024-17:11:33] [I] [TRT] Doc string:
[10/21/2024-17:11:33] [I] [TRT] ----------------------------------------------------------------
[10/21/2024-17:11:33] [W] [TRT] onnx2trt_utils.cpp:367: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[10/21/2024-17:11:33] [E] Error[3]: onnx::QuantizeLinear_2152: invalid weights type of Int8
[10/21/2024-17:11:33] [E] [TRT] ModelImporter.cpp:773: While parsing node number 9 [Identity -> "onnx::QuantizeLinear_2358"]:
[10/21/2024-17:11:33] [E] [TRT] ModelImporter.cpp:774: --- Begin node ---
[10/21/2024-17:11:33] [E] [TRT] ModelImporter.cpp:775: input: "onnx::QuantizeLinear_2152"
output: "onnx::QuantizeLinear_2358"
name: "Identity_9"
op_type: "Identity"
[10/21/2024-17:11:33] [E] [TRT] ModelImporter.cpp:776: --- End node ---
[10/21/2024-17:11:33] [E] [TRT] ModelImporter.cpp:778: ERROR: ModelImporter.cpp:180 In function parseGraph:
[6] Invalid Node - Identity_9
onnx::QuantizeLinear_2152: invalid weights type of Int8
[10/21/2024-17:11:33] [E] Failed to parse onnx file
[10/21/2024-17:11:33] [I] Finish parsing network model
[10/21/2024-17:11:33] [E] Parsing model failed
[10/21/2024-17:11:34] [E] Failed to create engine from model or file.
[10/21/2024-17:11:34] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v8401] # /usr/src/tensorrt/bin/trtexec --onnx=yolov7x_ptq.onnx --saveEngine=yolov7x_ptq.engine --int8
Looking forward to your reply？

I have know the reason, and resolved it。


The example in Part 3 of the tutorial has a compiler error.

Hello
I was finishing up the tutorial and decided to try the full code example from part 3 but got the following compiler error:
error[E0308]: mismatched types
  --> src/main.rs:50:31
   |
50 |         .button("Cancel", |s| s.pop_layer()));
   |                               ^^^^^^^^^^^^^ expected (), found enum `std::option::Option`
   |
   = note: expected type `()`
              found type `std::option::Option<std::boxed::Box<cursive::traits::View + 'static>>`

I managed to fix it like this:
        .button("Cancel", |s| match s.pop_layer() {
            Some(_) => (),
            None => (),
        }));

but I hesitated to submit a pull request because if I remember correctly the is a shorthand for that pattern match. (or maybe a better way to fix this).

Ah thanks for the report! Indeed, we changed pop_layer to return the view. The returned value can safely be ignored, but we must do it explicitly:
.button("Cancel", |s| {
    s.pop_layer();
});

Awesome. Thanks!


500 Internal Server Error in emulator - V3

I've recently upgraded my bot to the new V3 bot framework, and since then I've been getting 500 InternalServerErrors in the emulator and the "sorry, the bot is having trouble responding" messages in Slack, breakpoints anywhere in the method below don't get triggered at all so I can't really get a stack trace.
        public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
        {
            if (activity.Type == ActivityTypes.Message)
            {
                ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl));

                // return our reply to the user
                Activity reply = activity.CreateReply("hello world");
                await connector.Conversations.ReplyToActivityAsync(reply);
            }
            else
            {
                HandleSystemMessage(activity);
            }
            var response = Request.CreateResponse(HttpStatusCode.OK);
            return response;
        }

This code is the default VS template code, with the correct Web.config settings.
Below is what appears in the log when testing the connection to the bot:
InternalServerError
{
  "message": "An error has occurred.",
  "exceptionMessage": "Could not load type 'System.IdentityModel.Tokens.TokenValidationParameters' from assembly 'System.IdentityModel.Tokens.Jwt, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.",
  "exceptionType": "System.TypeLoadException",
  "stackTrace": "   at Microsoft.Bot.Connector.BotAuthentication.<OnAuthorizationAsync>d__16.MoveNext()\r\n   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)\r\n   at Microsoft.Bot.Connector.BotAuthentication.OnAuthorizationAsync(HttpActionContext actionContext, CancellationToken cancellationToken)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}

There is something really strange going on.
When you load the Template it installs the Package
System.IdentityModel.Tokens.Jwt with the version 4.02. When i try it with that version i get the exception
402: Unauthorized with:
Warning: 0 : Invalid token. System.ArgumentNullException: Value cannot be null.
When iupdate that package to the latest version (5.0.0) i get the same exception as Huskitch.
Well, i only get a 500 InternalServerError exception with the message "An error has occured".
Does it have something to do with the BotID in the web.config? Because on the page about the emulator, you see screenshots where you can enter a botid. I downloaded the latest version but i cant enter a botid.
Greetings

Okay.
Im pretty sure its because of your "System.IdentityModel.Tokens.Jwt" Version.
Mine was also at 5.0.0. which for some reason broke everything.
I converted everything back to the latest 4.02. Version and it kind of works.
I just get the Message:
"iisexpress.exe Warning: 0 : Invalid token. System.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: IDX10500: Signature validation failed. Unable to resolve SecurityKeyIdentifier: 'SecurityKeyIdentifier"
everytime my bot receives a message, but it still works.
Im pretty sure there is something wrong with the Botcredentials in the web.config and what the Emulator/BotConnector expects.
Greetings

I tried downgrading the JWT package to 4.02, and now I end up with this in the JSON emulator output

Had the same issue and couldnt resolve it. Thankfully i had a backup of my project from before the V3 update.
Im pretty sure some references are totally messed up. Maybe try to delete the package and reinstall. but i tried that too and it didnt work out.

Hi, I'm experiencing similar issues... Even the sample Echo Bot cloned directly from the repo doesn't work. Apparently it doesn't receive proper Authentication headers in BotAuthentication.cs -> OnAuthorizationAsync().

Hi. Try to reset the project references.

remove all references of Bot.Builder and Bo.Connector (and itself)
add via nuget Bot.Builder 3.0.1 and WebHost
not update anything in Nuget
adjust manually the assemblyBinding in terms of versios to reflect your project

   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">       <dependentAssembly>         <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />         <bindingRedirect oldVersion="<IP_ADDRESS>-4.0.20622.1351" newVersion="4.0.20622.1351" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="Microsoft.Rest.ClientRuntime" publicKeyToken="31bf3856ad364e35" culture="neutral" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="Microsoft.Bot.Connector" publicKeyToken="31bf3856ad364e35" culture="neutral" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>       <dependentAssembly>         <assemblyIdentity name="Microsoft.IdentityModel.Protocol.Extensions" publicKeyToken="31bf3856ad364e35" culture="neutral" />         <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />       </dependentAssembly>     </assemblyBinding>

Even if this worked (which it didn't for me), it seems like a temporary solution to the issue.

I uninstalled packages from NuGet, deleted "bin", "obj" and "packages", re-added everything and now the 500 error is gone, but the 401 still persists:
iisexpress.exe Warning: 0 : Invalid token. System.ArgumentNullException: Value cannot be null.
Parameter name: securityToken
   at System.IdentityModel.Tokens.JwtSecurityTokenHandler.ValidateToken(String securityToken, TokenValidationParameters validationParameters, SecurityToken& validatedToken) in c:\workspace\WilsonForDotNet45Release\src\System.IdentityModel.Tokens.Jwt\JwtSecurityTokenHandler.cs:line 658
   at Microsoft.Bot.Connector.JwtTokenExtractor.<ValidateTokenAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Connector.JwtTokenExtractor.<GetIdentityAsync>d__6.MoveNext()

Microsoft.Bot.Builder = 3.0.1
System.IdentityModel.Tokens.Jwt = <IP_ADDRESS>221351

@lamaq-git make sure that you set MicrosoftAppId and MicrosoftAppPassword to the value you got from dev portal. Also, if you run against emulator you can leave all the values blank to disable bot authentication.

I had to revert the version on three of the libraries in my project in order to get this to work.

Microsoft.Rest.ClientRuntime - 1.8.2
Newtonsoft.Json - 8.0.3
System.IdentityModel.Tokens.Jwt - <IP_ADDRESS>221351

@Huskitch and @NanashiGIT how did you do the upgrade to new nuget package? It seems that you upgraded the System.IdentityModel.Tokens.Jwt to latest which is not the right dependency that builder expects.
To upgrade a v1 bot dependencies to use v3 builder and making sure that your dependencies are installed in the right way, follow below steps:

Go to nuget package manager for your project
Uninstall Microsoft.Bot.Builder v1
Uninstall Microsoft.Bot.Connector
Install Microsoft.Bot.Builder 3.0.1

Steps above make sure that you have the right dependencies. From what I see, it seems that you are upgrading all of the packages in the nuget package manager and end up with the latest JWT dependency.

First i was on the correct 4.0.2 version. But then it began giving me the exception:
""iisexpress.exe Warning: 0 : Invalid token. System.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: IDX10500: Signature validation failed. Unable to resolve SecurityKeyIdentifier: 'SecurityKeyIdentifier"". So i tried updating it to the newest version (Because it said, the Builder needs JWT >= 4.0.2). But that broke everything.
And im 100% sure the MicrosoftAppId and MicrosoftAppPassword are correct. I've read somewhere, that the keys for the credentials might be a bit bugged (maybe emulator sends credentials not as MicrosoftAppId/MicrosoftAppPassword or something else). I dont know, but there is something broken.

@NanashiGIT  builder is dependent on System.IdentityModel.Tokens.Jwt 4.0.2 and when you upgrade to a new version of that package, .Net cannot load the right version of dll when loading dependencies. The error that you were getting when you had the right version of dependency was probably because of not having the right MicrosoftAppId and MicrosoftAppPassword set in your web.config or emulator.
I recommend setting those to empty, both in web.config and emulator (this disables auth), and make sure that your bot is working with auth turned off and after that set the values and check if auth is working correctly.

@msft-shahins This is on a completely new project, from the V3 Bot Builder template.

@msft-shahins I did disabled authentication for quite a bit and it worked. And as i said, the credentials are correct.

@Huskitch then in V3 bot builder template, only update builder in the nuget package manager update tab. Do not update other nuget packages.

@msft-shahins Whats with the BotId in the Webconfig?
Unlike in the screenshots of the emulator, i cant specify an id. I also dont know where to find that id in the Bot Portal.
May that be the culprit for the error messages?

@NanashiGIT if auth doesn't work and you have the right dependencies, I am suspicious that you are using a wrong AppId and AppPassword. Go to dev portal and find the MicrosoftAppId for your bot, then go to Microsoft dev portal app list, find the app id and make sure that you have the right password for that app.
Bot Id == Bot Handle you see in the dev portal UI. builder is using it internally, if you configure it with the InMemoryBotDataStore (which is not the default data store). It is not used for the authentication and we will remove it soon and use MicrosoftAppId as the unique identifier for bot.

@msft-shahins Thanks for your help.
I realized that i have 2 AppSecrets set up for my app (and i dont mean primary/secondary). Maybe thats it and i have to remove one.
I'll try that out tomorrow.

Also make sure that in web.config is correct. They are not called AppId and AppSecret anymore:
    <add key="MicrosoftAppId" value="" />
    <add key="MicrosoftAppPassword" value="" />

@msft-shahins I tried only updating the bot builder package, but then I get this:

@msft-shahins Thank you, I made MicrosoftAppId and MicrosoftAppPassword empty (both in web.config and emulator) and now I'm in the same state as @Huskitch ...

@Huskitch Can you share more details about when this exception happens? What are the configuration for bot and emulator? I guess your project still uses the wrong version of assembly. Make sure to clean your project and rebuild again after you fix dependencies to correct version. This might help you solve the problem.

@msft-shahins The exception happens when I send a message to the bot through the emulator, it shows 505 InternalServerError in the emulator and that exception in VS.
The versions for the nuget packages are as follows:
Microsoft.Bot.Builder: 3.0.1
Microsoft.IdentityModel.Protocol.Extensions: v<IP_ADDRESS>221351
Microsoft.Rest.ClientRuntime: 2.3.1
Newtonsoft.Json: 8.0.3
System.IdentityModel.Tokens.Jwt

The Web.config assembly bindings are:
   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Rest.ClientRuntime" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
    </assemblyBinding>

I've tried both with and without the correct appid and passwords.

@Huskitch Microsoft.Rest.ClientRuntime: 2.3.1 is the problem. It seems that you have updated that too. The correct dependencies are:
Microsoft.Bot.Builder- 3.0.1
Microsoft.IdentityModel.Protocol.Extensions- <IP_ADDRESS>221351
Microsoft.Rest.ClientRuntime - 1.8.2
Newtonsoft.Json - 8.0.3
System.IdentityModel.Tokens.Jwt - <IP_ADDRESS>221351

here is the packages.config for a project from template with correct dependencies:
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Autofac" version="3.5.2" targetFramework="net46" />
  <package id="Chronic.Signed" version="0.3.2" targetFramework="net46" />
  <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.Bot.Builder" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.IdentityModel.Protocol.Extensions" version="<IP_ADDRESS>221351" targetFramework="net46" />
  <package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net46" />
  <package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.1" targetFramework="net46" />
  <package id="Newtonsoft.Json" version="8.0.3" targetFramework="net46" />
  <package id="System.IdentityModel.Tokens.Jwt" version="<IP_ADDRESS>221351" targetFramework="net46" />
</packages>

@msft-shahins Just made a fresh project and made sure all of the dependencies are the same, now I'm getting this exception after sending a message to the bot:

@Huskitch can you set a breakpoint on the messages controller and check if you are getting the message from the emulator?

@msft-shahins Yeah, I get the message, the method runs fine up until this breakpoint:

@Huskitch can you check the reply activity that is getting generated? It seems to me that the post to emulator is failing. what is the emulator configuration that you are using to post the message?

This is the emulator setup:

I've tried both with and without appid and pw, (though it shouldn't matter right?).
Here's the activity object received:

And here's the reply object:

@Huskitch, your emulator url is wrong! It should be http://localhost:9000. It is basically the url that the emulator is listening on and is set in the ServiceUrl of incoming activity. You can read more about the reply mode here.

I'm getting a 500 error also, my Emulator URI is correct, app id and secret are blank and I have the correct Nuget package versions referenced.
The exceptions seem to be thrown somewhere internally after the StartAsync method of my LuisDialog returns.
This is what I see in the output window of VS:

Here's my emulator:

@msft-shahins  I've deleted the 2 keys and set a new one. But then i realized that this wont have anything to do with the emulator authenticating at the local running bot.
Anyway, unless i leave everything blank i still get the mentioned exception.
My web config keys are

Oops, turns out my issue was my own fault - I was using a LuisDialog and had a space at the end of the attribute so the authentication was failing. Removing the space leaves me with a working bot.

@NanashiGIT are you getting "SecurityTokenSignatureKeyNotFoundException" when you set the MicrosoftAppId and password? Are you getting the exception on the incoming request or when wants to post back the reply? can you share your MicrosoftAppId?

@msft-shahins I only get the error when setting the AppId and Password, so yes.
Im getting the exception even before the Post-Method is called. So on incoming requests.
My ID:
4998a523-b204-4f22-b137-37ba8e808e3a

@msft-shahins, I?m also having the same error:
InternalServerError {
"message": "An error has occurred.",
"exceptionMessage": "Could not load type 'System.IdentityModel.Tokens.TokenValidationParameters' from assembly 'System.IdentityModel.Tokens.Jwt, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.",
I'm having the error while calling the bot in the "Test connection to your bot" of the dev portal.
I have updated packages.config to the contents you mention above (+clean project + redeploy). And I upgraded a project to v3, and fixed the 3 keys in web.config. Ideas?

@lokijota it seems that your bot still depends on the newer System.IdentityModel.Tokens.Jwt (<IP_ADDRESS>). Make sure that you have the right dependency and everything works locally against emulator. Then do a clean deployment. If you are deploying to azure from Visual Studio, make sure to select Remove additional files at destination. I have noticed that sometimes the dependencies aren't refreshed correctly, if I don't select that option.

@msft-shahins, here's what I did:~

there was an assembly redirect in web.config:

I commented this line, cleaned, redeployed, and when I tested it, the Internal Server Error remained, but this time referring to the 4.x version of the Jwt assembly;

I had already set the "clear files at destination" option;

I removed the Jwt reference from the project, removed/added Bot.Builder again in Nuget, and redeployed. And again the 500 error mentioning the 5.x version.

frustrated... :-(
Any other idea?

remove this from your web.config:
 <dependentAssembly>
        <assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>

and also make sure that your bot works against emulator with your MicrosoftAppId and MicrosoftAppPassword before trying the deployment.

Hi,
I had another problem: the NewtonSoft assembly was at version 9.x . Fixed that, redeployed, and now it seems to be working, error 500 is gone. I still have a compilation warning:
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
... but whatever this is, the bot seems to be working now.

I can confirm that if you accidentally upgrade your nugget packages, you will have to downgrade the packages and update the dependencies in the web.config file. I used TheMakerBotShow  example to compare my project and everything worked find after updating.

Looking at the most recent reports on this thread, the latest outstanding issues related to assembly bindings. Are there any open runtime issues still present in your code?

I am closing this issue assuming that the improvements in auth reliability and exception translation released in nuget 3.1 addresses all of the issues in this thread.

Hello All,
I am facing the same issue like 500 internal server error. I changed the code to version 3. Please help me out

@nitk-rashid attach a debugger to your bot and see what exception is getting thrown by the bot when it receives the message.

One weird trick to get your bot to work in development:  Run it with the debugger attached.  It seems the BotAuthentication filter attribute will return early if MicrosoftAppId is empty, but only when debugger is attached.  See line 27.
https://docs.botframework.com/en-us/csharp/builder/sdkreference/d0/d3b/_bot_authentication_8cs_source.html

I'm getting this now, and unable to hit a breakpoint. Are these dependencies still needing to be from versions earlier this year?

Maybe it's about changing the scope of your methods in the messagescontroller from "public" to "private".

This framework was too unstable and the docs not clear enough so I stopped using it. (That and the requirement to publish it - not OK for on premise connectivity)

i create my bot using bot builder framework in asp.net .Bot work fine in emulator but give me error when i try to connect it with skype ...
"Your bot did not respond to our Ping request with a success code. Please verify your bot is running and responsive before Publishing your bot. The error received from your bot was: Unauthorized(401), BotAuthenticator failed to authenticate incoming request!"
please help me !!

@UsamaAslam - You should check existing issues for "401" errors or open a new issue for that. This thread is for 500 errors.

@stingyJack - sorry to disturb you but i already open new thread and i receive no response so that is why i post here . if you know any thing please inform me i will be very thankful to you

@usamaalam - If none of the existing closed  "401" issues matched your problem (not likely - a similar error message present is in several), you will just have to wait for the maintainer of this module to reply back.


[Bug]: UI improvements

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
There is misplacement of text and images.
Regarding css, it can be improved for the mentioned buttons.

Expected behavior
A clear attractive homepage with the proper image and attractive CSS for the buttons
Add ScreenShots
No response
On which device are you experiencing this bug?
Chrome, Windows
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[ ] I'm a VSOC'24 contributor
[X] I have starred the repository

Hi, I would love to work on this issue, if you can assign me this task.

Would you assign this to me ? I want to work on it!

@NehaBajjuri maybe there is some problem in your screen size or resolution , otherwise in my System also the page design is properly working

Sorry to close this issue .But u can still work on other issues.