Kubernetes-Vault uses a different format for the -auth file.

So I've been reduced to installing jq and doing this in a shell script before vault-sidekick runs:
export VAULT_TOKEN=$(cat /var/run/secrets/boostport.com/vault-token | jq .clientToken | cut -d'"' -f 2)

I think I've traced the issue - here's an example file - code is here:
dfroese@: cat vault-token
{"clientToken":"removed-the-token-that-was-here","accessor":"1removed-the-accessor-that-was-here","leaseDuration":21600,"renewable":true,"vaultAddr":"https://vault.is.here.com"}
[]:~/Desktop/skt
dfroese@: go run main.go
Error: json: cannot unmarshal number into Go value of type string
Data: map[string]string{"accessor":"removed-the-accessor-that-was-here", "clientToken":"removed-the-token-that-was-here"}
Client Token: removed-the-token-that-was-here

Would you be open to a PR that was able to handle this sort of file? I think I've traced through the code and have an idea how I'd implement it.
It would be really nice if vault-sidekick could use that file as well - then I wouldn't have to create custom Docker images for each sidekick and could just pass vault-sidekick flags in the k8s manifest.
Thanks for this project - it fills a definite need!

Here's a link to kubernetes-vault:
https://github.com/Boostport/kubernetes-vault

I have a small amount of code that does what I want and works well:
https://github.com/darron/vault-sidekick/commit/15817c517362341e4ec61e25ad2efe6bead9a15e
It changes:

Adds a flag to options: vaultAuthFileFormat that's set to default normally.
Adds an ENV variable to vaultAuthFile - getEnv("AUTH_FILE", "") - so it can be specified in the container ENV.
Adds a second argument to readConfigFile to handle the vaultAuthFileFormat.

It seems to work for us just fine - any comments? Is this something you'd merge?

hi @darron ... apologizes, didn't see the github notification of the issue. Yep, this looks reasonable and shouldn't be difficult to add ... I'll take a look at adding

Thanks @gambol99 - appreciate it!
Let me know if there's anything else you'd like me to do! I can submit a PR, refactor, etc.

Thanks for merging - closing this.


Fix ExponentiallyDecayingReservoir constant rescaling based on the clock

This fixes a bug in ExponentiallyDecayingReservoir in which the
hour prior to the system precise clock (System.nanotime()) rolling
from Long.MAX_VALUE to Long.MIN_VALUE caused every interaction
with the reservoir to rescale.
It's easy to forget that the tick value is allowed to overflow.
In heavily loaded systems, this results in substantial performance
degredation due to write lock acquisition for each update.

If accepted, I'd really appreciate a backport to 3.2.x :-)

To provide a bit of context, I had a production service with >99% of its threads stuck in ExponentiallyDecayingReservoir.lockForRescale, the application grinds to a halt and it's no clear if it can ever recover.

@carterkozak Thanks for reporting this and for your contribution!

If accepted, I'd really appreciate a backport to 3.2.x :-)

Why this old version exactly? Is there any chance for you to upgrade to Metrics 4.1.x?
Metrics 3.2.x hasn't received any updates in a long time:
https://github.com/dropwizard/metrics/tree/v<IP_ADDRESS>#versions

Thanks for the review, @joschi!
I put together a lock-free implementation which performs well under contention earlier today, would you be interested in taking it upstream? https://github.com/palantir/tritium/pull/860

Why this old version exactly? Is there any chance for you to upgrade to Metrics 4.1.x?

Work in progress :-) Hopefully we'll be able to upgrade in the next few months.

Hi @joschi, I've opened #1656 with the lock-free implementation I mentioned in my previous comment. Curious for your thoughts and feedback on it.

@carterkozak LGTM, thanks for your contribution!


IGNITE-1217: add suffix to commit comment " - Fixes #."

ignite-1217: add suffix to commit comment " - Fixes #."

Already merged.


Dark mode fix nav

Pull Request Template
Summarise what this PR fixes: I fixed the navbar that wasn't changing its colors when the dark mode was switched
Fixes #: #123
Checklist:

[x] I have summarised what this PR fixes above
[x] I have provided the issue ID/URL above
[x] This PR fixes only the issue mentioned above (create separate PRs for separate issues)
[x] I was the first one to claim the issue or I created the issue

@S9D looks like there is a conflict. Could you please resolve the issue and resubmit?

sure but now that I look at that again  I think there is a better solution for this issue that someone else PRed


Feature Request: Support for element screenshots

Currently, Playwright supports taking element screenshots:
await page.goto('https://google.com', { waitUntil: 'domcontentloaded' })
const element = await page.$('[role="search"]')
await element.screenshot({...})```

Supporting the ElementHandle type upstream in the Playwright agent would be great!

released in 4.3.0


There is no 'plugins/vuetify.js' in nuxt

I'm using nuxt with vuetify. The instructions say to update plugins/vuetify.js to add the toast-snackbar but I don't have this in my default nuxt-vuetify config, which uses @nuxtjs/vuetify module.
I've tried to create a plugin anyway. But I'm getting an Unknown custom element: <v-snackbar> error after I added a plugins/toast.js file, added it to the plugins list in nuxt.config.js and put the following in it:
import Vue from 'vue'
import Vuetify, { VSnackbar, VBtn, VIcon } from 'vuetify/lib'
import VuetifyToast from 'vuetify-toast-snackbar'

Vue.use(Vuetify, {
  components: {
    VSnackbar,
    VBtn,
    VIcon
  }
})

Vue.use(VuetifyToast)

I'm not sure what to do.
"@nuxt/cli": {
      "version": "2.11.0",
"@nuxtjs/vuetify": {
      "version": "1.11.0",
"vuetify": {
      "version": "2.2.14",
"vuetify-toast-snackbar": {
      "version": "0.6.1",

here is what works for me, hope it will work for you as well:
under plugins, a file called vuetify.js
import Vue from 'vue'
import VuetifyToast from 'vuetify-toast-snackbar'

Vue.use(VuetifyToast)

in nuxt.config.js, in the plugins array, add this:
'@/plugins/vuetify',

let me know how it goes ;)

maybe try https://github.com/eolant/vuetify-toast-snackbar/issues/42#issuecomment-646499345


[ENHANCEMENT] can you release the weights of  all the models

Please release the weights of all the models :v2, v2a, v2_resized, v2a_resized, v1_damage, and v1_infra.
as it would act has pre trained weight for finetuning or transfer learning for similar projects in this area

From the README:
Pretrained Classifiers
We provide a set of pretrained classifiers on the LADI v2 dataset for downstream finetuning and deployment purposes. See the associated model cards on Hugging Face for instructions on how to use.
[LADI-v2-classifier-small](https://huggingface.co/MITLL/LADI-v2-classifier-small) - Recommended for deployment, based on [google/bit-50](https://huggingface.co/google/bit-50), trained on entire LADI v2 dataset
[LADI-v2-classifier-large](https://huggingface.co/MITLL/LADI-v2-classifier-large) - Based on [microsoft/swinv2](https://huggingface.co/microsoft/swinv2-large-patch4-window12to16-192to256-22kto1k-ft), trained on entire LADI v2 dataset

We also provide "reference" versions of each model which are trained only on the train split of the LADI v2 dataset, to aid in reproducing the results presented in the paper.
[LADI-v2-classifier-small-reference](https://huggingface.co/MITLL/LADI-v2-classifier-small)
[LADI-v2-classifier-large-reference](https://huggingface.co/MITLL/LADI-v2-classifier-large-reference)


[$250] Distance Request -"Distance" option does not appear in QAB for a gmail account

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.64-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
Issue found when executing PR https://github.com/Expensify/App/pull/39413
Action Performed:

Open the testing app and login with a gmail account
Submit an expense request using Distance request
Click on FAB menu and select "Record distance" from the QAB

Expected Result:
User should be navigated to the Distance tab
Actual Result:
No Distance tab / user is directed to the Manual request tab
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/2cfd3253-d0a3-4062-9456-d75c602447b8
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~013f4eac573fdf1cb2
Upwork Job ID:<PHONE_NUMBER>489765888
Last Price Increase: 2024-04-24

Issue OwnerCurrent Issue Owner: @getusha

@twisterdotcom  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

We think that this bug might be related to #wave-collect - Release 1

Proposal
Please re-state the problem that we are trying to solve in this issue.
The user is able to do P2P distance request even though they're not in P2PDistanceRequests beta.
What is the root cause of that problem?
The problem here is not that "Distance" does not show, it's expected that it will not show if the user is not in P2PDistanceRequests beta (the logic is here).
The issue is the user's able to do P2P distance request in the first place, even though they're not in P2PDistanceRequests beta. Once they did the P2P distance request, of course the "Distance" tab will not show when they attempt again, because the user indeed is not in the P2PDistanceRequests beta.

The issue is the user's able to do P2P distance request in the first place

The root cause of this is the user can still see the personalDetails options that contain individual users, because we don't have any restriction here if the includeP2P is false. As we can see, we have such restriction here, that's why we don't see any 1-1 chat when trying to do "Distance" request.
What changes do you think we should make in order to solve the problem?

Update this to
const havingLoginPersonalDetails = includeP2P ? options.personalDetails.filter((detail) => !!detail?.login && !!detail.accountID && !detail?.isOptimisticPersonalDetail) : [];

So it will not show any option in Contacts, if includeP2P is false (aka the user is not in P2PDistanceRequests beta)
What alternative solutions did you explore? (Optional)
NA

I'll take a peek in a bit

Here's what's happening.

P2P distance requests are still under beta
It's a front end only beta
There's a bug which allows users not on the beta to select individuals for distance requests
The p2p distance request is successfully created
The QAB is successfully updated, but it also properly prevents the user from submitting a distance request to the individual since they aren't on the beta

The solution should be to fix the bug in point 3. I will see if I can find the issue for that. I can't find any other issue like that. Please lmk if you find something, but otherwise let's fix it here.
https://github.com/Expensify/App/assets/26260477/69525fe8-8f75-41b9-ab15-4e2d56236858

The solution should be to fix the bug in point 3.

@neil-marcellini I agree with this, my proposal is doing just that.

Alright, shall we assign @nkdengineer?

Okay, this is with you then @getusha.

@GandalfGwaihir's proposal looks good to me.
🎀 👀 🎀 C+ Reviewed!

@getusha I believe my proposal is the first to have the correct RCA and solution (which was later confirmed by @neil-marcellini here), while everyone else was going in the wrong direction and only updated the proposal later.
@GandalfGwaihir's proposal is basically the same as mine, the only difference is that they use another equivalent variable includePersonalDetails (as opposed to includeP2P in my proposal). Actually the rendering performance of that suggestion is much worse, because even though we don't need the personal detaills, we're still running all these logic to get, filter, order the allPersonalDetailsOptions. And that solution will also still return the currentUserOption here, while the personal details should not be included.
Meanwhile, my proposal will not do any logic with the personalDetails list from the start.
Since the meaning of includeP2P and includePersonalDetails are the same, I think we should consolidate them instead of having both, and still make the allPersonalDetailsOptions empty from the start (if includeP2P is true) so that we don't run any unnecessary logic there.
@getusha Could you kindly take a second look at this? Thanks 🙏
cc @neil-marcellini

Since the meaning of includeP2P and includePersonalDetails are the same, I think we should consolidate them instead of having both, and still make the allPersonalDetailsOptions empty from the start (if includeP2P is true) so that we don't run any unnecessary logic there.

@nkdengineer i doubt they have the same purpose, can you expand on that more?

@nkdengineer i doubt they have the same purpose, can you expand on that more?

Yes they're the same purpose, let me update you in a bit.
@neil-marcellini We're re-discussing the solution (details here), please hold the assignment until it's clear which path we'll go with 🙇

@nkdengineer i doubt they have the same purpose, can you expand on that more

@getusha The includeP2P's meaning is "include peer to peer" sharing, which means no options of P2P chat or personal details should show. The includePersonalDetails is also for including/not including the personal details.
There's never a case where includeP2P is false, but the personal details is included. So we need to make sure the includeP2P works correctly by itself instead of depending on another variable to do part of its job. Also my solution is much more performant as already explained, we won't run operations on the personalDetailsList unnecessarily

I also don't see any possible case where my solution will cause a regression :)

@GandalfGwaihir so is mine, mine is the first to work without regressions, and also more performant than your solution.

Oh wow sorry for the delay on this one. I'll review proposals soon, hopefully today.

There seems to be some disagreement about who had the first valid proposal. I started by examining the first proposal by @GandalfGwaihir in its earliest version. The RCA in that version is incorrect, so I moved on to view the earliest version of the next proposal, which is by @nkdengineer. It also has an incorrect RCA, however the next edit has a correct RCA and it looks like a good solution. It was posted at 2024-04-24T17:23:40Z relative to my timezone. @GandalfGwaihir's next proposal edit was made at 2024-04-29T20:35:38Z. Therefore we should go with @nkdengineer's proposal @getusha

@getusha The PR is here.

PR is under review, commenting so this doesn't got overdue.

Payment Summary:

@getusha requires paid $250 here (Reviewer)
@nkdengineer paid $250 here (Contributor)

Bump on this checklist @getusha.

Bump @getusha.

This fell through the cracks, will complete the checklist.

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@getusha] The PR that introduced the bug has been identified. Link to the PR: https://github.com/Expensify/App/pull/40748
[@getusha] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/commit/2e21c24fed25b43d109d4ae7e269459b8a85cc35#r143839908
[@getusha] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/a
[@getusha] Determine if we should create a regression test for this bug. Yes
[@getusha] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Proposal

Login with an account that doesn't have P2PDistanceRequests enabled
Go FAB > Submit expense > Distance
Select any waypoint and go to participants page
Verify that contact option/p2p accounts doesn't appear in the list

Do we agree 👍 or 👎

@twisterdotcom accepted the offer, could you end it? ty!

Done


Replace the last of unittest with pytest

This replaces (by-and-large) any remaining unittest implementations with pytest implementations. This allows us to use fixtures on any test; the existing implementation does not let us use them on TestCase instances.
Would be great to merge this fairly soon, as there's some chance of merge conflicts (which git may not catch - e.g. someone writing self.assertEqual). I'll try and chase down any test breaks as soon as possible.

Hello @max-sixty! Thanks for submitting the PR.

There are no PEP8 issues in the file xarray/tests/__init__.py !

There are no PEP8 issues in the file xarray/tests/test_accessors.py !

In the file xarray/tests/test_backends.py, following                are the PEP8 issues :

Line 2437:29: E741 ambiguous variable name 'l'
Line 2437:49: E741 ambiguous variable name 'l'

There are no PEP8 issues in the file xarray/tests/test_combine.py !

There are no PEP8 issues in the file xarray/tests/test_conventions.py !

There are no PEP8 issues in the file xarray/tests/test_dask.py !

In the file xarray/tests/test_dataarray.py, following                are the PEP8 issues :

Line 445:9: E741 ambiguous variable name 'I'

There are no PEP8 issues in the file xarray/tests/test_dataset.py !

There are no PEP8 issues in the file xarray/tests/test_duck_array_ops.py !

There are no PEP8 issues in the file xarray/tests/test_extensions.py !

There are no PEP8 issues in the file xarray/tests/test_formatting.py !

In the file xarray/tests/test_indexing.py, following                are the PEP8 issues :

Line 27:9: E741 ambiguous variable name 'I'
Line 137:9: E741 ambiguous variable name 'I'
Line 157:9: E741 ambiguous variable name 'I'
Line 214:9: E741 ambiguous variable name 'I'
Line 526:5: E741 ambiguous variable name 'I'

In the file xarray/tests/test_merge.py, following                are the PEP8 issues :

Line 198:17: W605 invalid escape sequence '\S'

There are no PEP8 issues in the file xarray/tests/test_plot.py !

There are no PEP8 issues in the file xarray/tests/test_tutorial.py !

There are no PEP8 issues in the file xarray/tests/test_utils.py !

There are no PEP8 issues in the file xarray/tests/test_variable.py !

we can probably go ahead and safely merge this in its current state -- none of my comments are deal breakers

Thanks Maximilian!
On Sat, Oct 6, 2018 at 1:09 PM Maximilian Roos<EMAIL_ADDRESS>wrote:

Merged #2467 https://github.com/pydata/xarray/pull/2467 into master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pydata/xarray/pull/2467#event-1888659594, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABKS1ooi7R3npC2m27npvMxbEgYbLyXjks5uiOO7gaJpZM4XLHP3
.


Redirect url fails with Windows AD authentication - msauth links are blocked

Describe the bug
When I login with windows AD authentication, redirect url gets blocked on successful authentication. The redirect url would be somthing as msasuth://com.xxx.xxxxx
This works fine for azure cloud but not for windows AD with same web_auth2 library.
To Reproduce
Steps to reproduce the behavior:

Callback url scheme is set as msauth

Androidmanifest.xml file has below details -

On trying authenticating with a windows AD server, a pop up is shown to enter user name and password. After entering the user name and password, the in app browser shows msauth links blocked.

Same configuration works for Azure AD but not for windows AD using authorization code flow.

The tricky part is, when we immediately try to authenticate the system, it works fine.

Expected behavior
After successful authentication, should be redirected back to
Screenshots
If applicable, add screenshots to help explain your problem.
Device (please complete the following information!)

Device: [Android emulator]

OS: [e.g. iOS 8.1, Windows 10 21H2]
Browser: [Chrome]
flutter_web_auth_2 version: [2.0.0]

Additional context
Add any other context about the problem here.

Why does your data tag have the android:host tag also set?
If you try without, does it work?

Thanks for the reply. I have tried without that and it doesnt work without that as well.

Just a point to add, same redirect urls on azure AD works fine and fails with windows AD. Let me know if you need some more info.

It seems like this is an issue with the backend.
There are also similar bug reports on stack overflow:
https://stackoverflow.com/questions/72317727/market-links-are-blocked
All of them link at some point to bug reports for Custom Tabs.
They appearently have strict regulations on how a redirect should work.
Windows AD seems to have issues with following these regulations. At least that is the only way I could explain this behavior.

Hi,
Is this fixed with 2.0.2 now? I see a new version mentioning the fix?

Hi, no progress has been done on this.
I also did not mention a fix in the changelog as far as I can tell

ahh sorry. I dint read completely when I saw the release. Got confused with below one.
https://github.com/ThexXTURBOXx/flutter_web_auth_2/releases/tag/2.0.2
Meanwhile, any other suggestions for a fix? I tried having a dummy web page but that doesnt seem to work as well.

Sadly, I am unsure about other ways to handle this. You could try a different web browser or specifying a different callback scheme (if possible).
Otherwise, my hands are pretty much tied since I cannot "hack" custom tabs

As I said, I tried with https by creating a dummy webpage and that doesn't work as well.

In that case, it seems like there is something else wrong on your end.
Please follow the troubleshooting guide in that case.

Hi,
This is the android xml file details

And I am passing https as custom uri cheme. Do you think something wrong here?
I would really appreciate if we can have a quick 10 mins call on this?

https://XXXX/connect/authorize?response_type=code&client_id=o&redirect_uri=https%3A%2F%2F&scope=openid%20profile%20offline_access%20&state=f475lZ857l47M203296wxK2&code_challenge=zTQbo6qQoLgvN7FiUBA0_SYuY0ebFs6NWq_oo8cPM&code_challenge_method=S256
This is the url
custom uri schema passed is   https

I think, it might be good to start this all over:
Your initial bug report does not have the section Device (please complete the following information!) filled out.
This makes it much harder for me to figure out what is going on.
Please, also share the entire AndroidManifest.xml (you can censor entries that should not be shown).
Also, what is the difference between Windows AD and Azure AD?
The following link:

https://xxxx/connect/authorize?response_type=code&client_id=[...]

seems to not have msauth as a scheme. If you want flutter_web_auth_2 to react to https links, you almost certainly have to do it another way.
Additionally, you should get another error message now, since https links are definetly not blocked.
These are details that are essential in solving this problem, otherwise we will just keep going in circles.
I am not a fan of calls about issues since other users will not be informed about proper solutions in the future.

Instead of msauth redirect, I was trying to have a https scheme as a redirect uri to try as an alternative and still it doesnt work.
Azure AD is authenticated directly with Azure active directory using the the azure login.microsoft.com authorize url.
WIndows AD is authenticated with a backend developed ontop of Identity Server.
Below is the full android xml. I am not sure if its visible entirely for you. XMLs are not getting posted for some reason here.

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<queries>
    <intent>
    <action android:name="android.intent.action.SENDTO" />
    <data android:scheme="mailto" />
    </intent>
</queries>

still it doesnt work

Does it just not redirect back into the app or is there another error message somewhere?
You could also try to replace <data android:scheme="https"/> by the following:
If the callback URL is for example https://example.windows.com/somepath, then this:
<data
    android:host="example.windows.com"
    android:pathPrefix="/somepath"
    android:scheme="https"/>

The redirect uri is a website hostname Ex: https://XXX.XX.XX
It goes to IIS website page and stops there. Same issue as msauth where it gets blocked. But when u try to connect again it gets redirected because the browser already holds the details, it gets redirected. But the second try doesnt even work on the https redirect uri.

When we pass on the custom uri schema in calling the authenticate function from platform, I am just passing on https.
Should it be also https://

Okay, I think, these should be enough details to conclude that Custom Tabs do not support the way Windows AD seems to redirect the browser.
It could be best to report this as a bug to the Windows AD support instead as there is nothing else we can do here.
If not even registering the entire callback scheme in the AndroidManifest.xml works, there must be something else wrong.
Passing on just https is the right way btw.
I will keep this issue open until the issue is fixed on Windows AD's side of things.

Hi,
I did check with Microsoft community but ended up no where. Do you know if something was done as part of this? Or you had some time later after our previous conversation to have a look at this?
Thanks

Hi, sadly, I don't think I can do anything about that issue, I am sorry!

Possible troubleshooting steps have been added to the README


Set docker reservations and limit for all ops services

We don't have clear reservations for all ops-services.

this is a duplicate


[eas-cli] more branch mapping utils

Why
more branch mapping utils
Test Plan

[ ] new tests pass

/changelog-entry chore more branch mapping utils


No PInvoke for memcmp

Actual behavior
warning PInvoke001: Method, type or constant "memcmp" not found. Did you mean "u_memcmp" or "u_memcmpCodePointOrder"?
Is it expected that cswin32 can't generate a pinvoke for memcmp? Here's my workaround:
[DllImport("msvcrt.dll")]
private static extern int memcmp(IntPtr b1, IntPtr b2, long count);

Expected behavior
A clear and concise description of what you expected to happen.
Repro steps

NativeMethods.txt content:

memcmp

Context

CsWin32 version: 0.2.10-beta

CsWin32 generated interop APIs for Win32. Not the VC runtime.
Your workaround is fine. But you could do it without p/invoke too:
    public unsafe void memcpy(IntPtr src, IntPtr dest, int size) {
        new Span<byte>(src.ToPointer(), size).CopyTo(new Span<byte>(dest.ToPointer(), size);
    }

Ah, my mistake, thanks @AArnott! Regarding the workaround though, I'm calling memcmp not memcpy :)


Update Simulator default random seed

This updates the default seed used by the simulator when initializing the random number generator used within the wave function. Previously it used std::clock() which is time since process start, but that is implementation and platform dependent (see https://en.cppreference.com/w/cpp/chrono/c/clock). This is changed to instead use current time, and was tested to show sufficient randomness even with rapid repeated invocation.

@idavis That's a good point... The current behavior is the other way around. I think the right fix to get safe-by-default randomness is to replace the use of std::clock() in the simulator wave function itself. I switch to that pattern.

What do you guys think about this PR - #780?
It allows the user to choose whether the random sequence will be deterministic or not.

@kuzminrobin I think that PR makes sense, and would even be reasonable to include along with this one. After the change, this one is more about making sure the native fullstate simulator is safe-by-default. But since the C# wrapper already explicitly sets the seed, there is nothing wrong with the QIR wrapper doing the same. Having it be parametrizable is also a step toward addressing feedback we've received about wanting a way to make the simulator deterministic for testing (see https://github.com/microsoft/qsharp-runtime/issues/187#issuecomment-715626082 for example).


Update Subscription.php

Added returns to be able to debug issues

If there is an error, the client should raise an exception. Can you give more detail on the cases where this is a useful change?

@ptuchik please feel free to re-open if you like with the additional information requested. If you would like us to consider this for inclusion, you will also need to sign the CLA, as explained above. Pending those items, I'm going to close this for the time being.


Nav causing zoom out on mobile

The nav on the demo causes the browser to zoom out. Initially I thought this was tied to an incorrect meta viewport tag, but that doesn't seem to be the case.

What was the viewport tag that was causing this? I'm experiencing the same issue.

@amirkhan81 Make sure you have a viewport meta tag such as:
<meta name="viewport" content="width=device-width, initial-scale=1">

Hope that helps!

Having the same issue, my viewport is as follows:
meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0,user-scalable=no"

I think you're looking for the shrink-to-fit-no option, here's my meta tag:
meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0,user-scalable=no,shrink-to-fit=no"

Reopening as this does appear to be an issue in iOS 9. Thans @jahrichie!


Install PlemolJP with modified nixpkgs

Fixes #514

container image is now also +300MB
> podman image list
REPOSITORY            TAG                                       IMAGE ID      CREATED         SIZE
ghcr.io/kachick/home  8ae93d1007869f9a4dc4b9ebe4f1237bcc54f5a6  e3cb89c94506  52 minutes ago  2.76 GB


_get_slice_data fails to send slice data when Celery Workers are on another instance

_get_slice_data is relying on logging the user in on the main instance of Superset, not the workers.  Because login_user(user) is being called on the worker.  When the instance serving up assets, Gunicorn, is not running on the Celery workers, this will fail to get content because it has not been authenticated.
Expected results
Login should be handled by Gunicorn, and thus set the cookies required for authentication, not the Celery worker itself.
Actual results
Authentication is denied, and the worker is unable to get slice data, whereas getting slice visualization works properly.
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 385, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 648, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/superset/superset/tasks/schedules.py", line 367, in schedule_email_report
    deliver_slice(schedule)
  File "/home/superset/superset/tasks/schedules.py", line 334, in deliver_slice
    email = _get_slice_data(schedule)
  File "/home/superset/superset/tasks/schedules.py", line 267, in _get_slice_data
    rows = [r.split(b",") for r in response.content.splitlines()]
AttributeError: 'HTTPResponse' object has no attribute 'content'

Screenshots
If applicable, add screenshots to help explain your problem.
How to reproduce the bug

Have Celery workers startup running separately from the Gunicorn instance hosting the Flask app.
Setup a slice to send slice data, inline or as an attachment
Send Test report
See the failure.

Environment
(please complete the following information):

superset version: 0.34.0rc2
python version: 3.7
node.js version: N/A
npm version: N/A

Checklist
Make sure these boxes are checked before submitting your issue - thank you!

[x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[ ] I have reproduced the issue with at least the latest released version of superset.
[ ] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context
Add any other context about the problem here.

Hi @ericandrewmeadows, it would be great if you could test #8788 (on master now) and close this issue if it does solve the issue


Create nikhilGFG.cpp

Hey I have fix the issue kindly merge it if you want any changes do let me know.

@Nikhil3389  Please add  Question Link :  in each file and also there should be two files in each folder

readme.md , that will explain your question
solution.extension that will have the solution / code .

for more info please refer to CONTRIBUTING.md
once you have fixed all these things please send in a PR, we will be more than happy to accept .


Config API - changes for "Too Many Methods"

Too many methods are part of public API - this makes it very complicated to test, maintain and (sometimes) use
This is caused by:

each primitive type has its own method + methods for any type and methods for map, list and nodes

boolean
int
long
Double
String
Map
List
Config
Class<?>

supporting too many paradigms

returning T, Optional, Supplier, Supplier<Optional>
for each of these methods (except for Optional) supporting a method without and with a default value
this means that we have 6 methods for each type (using boolean as an example):

asBoolean()
asBoolean(boolean default)
asBooleanSupplier()
asBooleanSupplier(boolean default)
asOptionalBoolean()
asOptionalBooleanSupplier()

Proposal
Create a typed config value Config.Value<T> (requires the @Value to be moved as part of "Java Beans") that
would be returned by typed methods.
This would leave config with the following accessor methods:

Required:

Value<T> as(Class<? extends T> type)
Value<T> as(Function<Config, T> mappingFunction)
Value<List<T>> asList(Class<? extends T> type)
Value<List<T>> asList(Function<Config, T> mappingFunction)
Value<Map<String, String>> asMap()

Optional (shortcut):

T as(Class<? extends T> type, T defaultValue)
Value<Config> asNode()
Value<List<Config>> asNodeList()
Value<Boolean> asBoolean()
other shortcut methods for primitive types

The Value interface would have the following methods to access typed value (as supported in original API):

Optional<T> value()
T get() throws MissingValueException
T get(T defaultValue)
Supplier<T> asSupplier()
Supplier<T> asSupplier(T defaultValue)
Supplier<Optional<T>> asOptionalSupplier()
and a shortcut method void ifPresent(Consumer<? super T> consumer)

Example:
// unchanged for String, as Config implements Value<String>
config.get("client-id").value().ifPresent(this::clientId);

// current for primitive type
config.get("proxy-port").asOptionalInt().ifPresent(this::proxyPort);
// new for primitive type
config.get("proxy-port").as(Integer.class).ifPresent(this::proxyPort);

// current for type with a mapper
config.get("identity-uri").asOptional(URI.class).ifPresent(this::identityUri);
// new for type with a mapper
config.get("identity-uri").as(URI.class).ifPresent(this::identityUri);

// current for type with a factory method
config.get("oidc-config").asOptional(OidcConfig.class).ifPresent(this::oidcConfig);
// new for type with a factory method (part of "No reflection as()" problem
config.get("oidc-config").as(OidcConfig::create).ifPresent(this::oidcConfig);

// current using response value
int port = config.get("proxy-port").asInt(7001);
// new using response value (if we decide to have shortcuts for primitives)
int port = config.get("proxy-prot").asInt().getValue(7001);
// new otherwise
int port = config.get("proxy-port").as(Integer.class).getValue(7001);

See https://github.com/oracle/helidon/tree/config-api-changes

Config.Value is an option only in case we do not want to Config extends Value<String> - if we want to do this (which I think we should), Value has to be a top level class, and probably renamed to ConfigValue.

@tomas-langer Last example should be get() instead of getValue(), right?

After the last changes, you are right. Config will not extend ConfigValue, and so ConfigValue has the method "get()" rather than "getValue()"
Original was due to conflict with method "get("")" on config, that returns a sub-node.

see #209


app configuration with private endpoint not working

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

az --version
azure-cli                         2.41.0
core                              2.41.0
telemetry                          1.0.8
Dependencies:
msal                            1.20.0b1
azure-mgmt-resource             21.1.0b1
Python location '/opt/az/bin/python3'
Extensions directory '/home/azureuser/.azure/cliextensions'
Python (Linux) 3.10.5 (main, Oct 10 2022, 03:02:09) [GCC 9.4.0]
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal
Related command

az appconfig kv show  --key "keyname" --endpoint https://appconfig.privatelink.azconfig.io --auth-mode login --debug
Describe the bug

Cannot query app configuration via the private endpoint. If the app configuration's network accept public connections then using the public https domain works fine.
To Reproduce

create an app configuration and a text key value.
make sure you can query it
create virtual net with a subnet, do not delegate the subnet to any service
create a small ubuntu vm into the subnet created above,
Enable system managed identity on ubuntu vm and add reader role to it's self (used to be able to login using managed identity with azure cli)
ssh into the ubuntu vm, install azure cli , login with az login --identity and make sure you can query the public app configuration kv
setup a private endpoint for app configuration in the same vnet and subnet as the vm
switch app configuration to private network access (only through private endpoints)
in linux vm clear dns cache and try to query the app config public url  (403 while ip still is public from dig output)
in linux vm clear dns cache and try to query the private endpoint (fails with debug message added below)

Expected behavior

it should be able to change the appconfiguration IP to the private one and use it transparently whether using the public app configuration or its private endpoint URL
Environment summary

Additional context

cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f53ceb32b00>, <function OutputProducer.on_global_arguments at 0x7f53cea504c0>, <function CLIQuery.on_global_arguments at 0x7f53cea796c0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'appconfig': ['azure.cli.command_modules.appconfig']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: appconfig                 0.004         8        42
cli.azure.cli.core: Total (1)                 0.004         8        42
cli.azure.cli.core: Loaded 8 groups, 42 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : appconfig kv show
cli.azure.cli.core: Command table: appconfig kv show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f53cdc27e20>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/azureuser/.azure/commands/2022-10-19.21-33-29.appconfig_kv_show.4179.log'.
az_command_data_logger: command args: appconfig kv show --key {} --endpoint {} --label {} --auth-mode {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f53cdc48a60>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f53cdc732e0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f53cdc73400>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f53cea50550>, <function CLIQuery.handle_query_parameter at 0x7f53cea79750>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f53cdc73370>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=AppConfigurationManagementClient
urllib3.connectionpool: Starting new HTTP connection (1): <IP_ADDRESS>:80
urllib3.connectionpool: http://<IP_ADDRESS>:80 "GET /metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01 HTTP/1.1" 200 1744
msrestazure.azure_active_directory: MSI: Retrieving a token from http://<IP_ADDRESS>/metadata/identity/oauth2/token, with payload {'resource': 'https://management.core.windows.net/', 'api-version': '2018-02-01'}
msrestazure.azure_active_directory: MSI: Token retrieved
urllib3.connectionpool: Starting new HTTP connection (1): <IP_ADDRESS>:80
urllib3.connectionpool: http://<IP_ADDRESS>:80 "GET /metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01 HTTP/1.1" 200 1744
msrestazure.azure_active_directory: MSI: Retrieving a token from http://<IP_ADDRESS>/metadata/identity/oauth2/token, with payload {'resource': 'https://management.core.windows.net/', 'api-version': '2018-02-01'}
msrestazure.azure_active_directory: MSI: Token retrieved
cli.azure.cli.core.auth.adal_authentication: MSIAuthenticationWrapper.get_token: scopes=('https://appconfig.privatelink.azconfig.io/.default',), kwargs={}
urllib3.connectionpool: Starting new HTTP connection (1): <IP_ADDRESS>:80
urllib3.connectionpool: http://<IP_ADDRESS>:80 "GET /metadata/identity/oauth2/token?resource=https%3A%2F%2Fappconfig.privatelink.azconfig.io&api-version=2018-02-01 HTTP/1.1" 400 793
msrestazure.azure_active_directory: MSI: Retrieving a token from http://<IP_ADDRESS>/metadata/identity/oauth2/token, with payload {'resource': 'https://appconfig.privatelink.azconfig.io', 'api-version': '2018-02-01'}
cli.azure.cli.core.auth.adal_authentication: throw requests.exceptions.HTTPError when doing MSIAuthentication:
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/auth/adal_authentication.py", line 75, in set_token
    super().set_token()
  File "/opt/az/lib/python3.10/site-packages/msrestazure/azure_active_directory.py", line 600, in set_token
    token_entry = self._vm_msi.get_token(self.resource)
  File "/opt/az/lib/python3.10/site-packages/msrestazure/azure_active_directory.py", line 649, in get_token
    token_entry = self._retrieve_token_from_imds_with_retry(resource)
  File "/opt/az/lib/python3.10/site-packages/msrestazure/azure_active_directory.py", line 704, in _retrieve_token_from_imds_with_retry
    raise HTTPError(request=result.request, response=result.raw)
requests.exceptions.HTTPError

cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
cli.azure.cli.core.util: Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/auth/adal_authentication.py", line 75, in set_token
    super().set_token()
  File "/opt/az/lib/python3.10/site-packages/msrestazure/azure_active_directory.py", line 600, in set_token
    token_entry = self._vm_msi.get_token(self.resource)
  File "/opt/az/lib/python3.10/site-packages/msrestazure/azure_active_directory.py", line 649, in get_token
    token_entry = self._retrieve_token_from_imds_with_retry(resource)
  File "/opt/az/lib/python3.10/site-packages/msrestazure/azure_active_directory.py", line 704, in _retrieve_token_from_imds_with_retry
    raise HTTPError(request=result.request, response=result.raw)
requests.exceptions.HTTPError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 363, in handler
    show_exception_handler(ex)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/arm.py", line 429, in show_exception_handler
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 361, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/appconfig/keyvalue.py", line 646, in show_key
    key_value = azconfig_client.get_configuration_setting(key=key, label=label, accept_datetime=datetime)
  File "/opt/az/lib/python3.10/site-packages/azure/core/tracing/decorator.py", line 73, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/appconfiguration/_azure_appconfiguration_client.py", line 256, in get_configuration_setting
    key_value = self._impl.get_key_value(
  File "/opt/az/lib/python3.10/site-packages/azure/appconfiguration/_generated/operations/_azure_app_configuration_operations.py", line 368, in get_key_value
    pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/core/pipeline/_base.py", line 211, in run
    return first_node.send(pipeline_request)  # type: ignore
  File "/opt/az/lib/python3.10/site-packages/azure/core/pipeline/_base.py", line 71, in send
    response = self.next.send(request)
  File "/opt/az/lib/python3.10/site-packages/azure/core/pipeline/_base.py", line 71, in send
    response = self.next.send(request)
  File "/opt/az/lib/python3.10/site-packages/azure/core/pipeline/policies/_authentication.py", line 117, in send
    self.on_request(request)
  File "/opt/az/lib/python3.10/site-packages/azure/core/pipeline/policies/_authentication.py", line 94, in on_request
    self._token = self._credential.get_token(*self._scopes)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/auth/adal_authentication.py", line 46, in get_token
    self.set_token()
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/auth/adal_authentication.py", line 85, in set_token
    raise AzureResponseError('Failed to connect to MSI. Please make sure MSI is configured correctly.\n'
azure.cli.core.azclierror.AzureResponseError: Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned http error: 400, reason: Bad Request

cli.azure.cli.core.azclierror: Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned http error: 400, reason: Bad Request
az_command_data_logger: Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned http error: 400, reason: Bad Request
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f53cdc280d0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 0.624 seconds (init: 0.165, invoke: 0.460)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3380 in cache
telemetry.check: Negative: The /home/azureuser/.azure/telemetry.txt was modified at 2022-10-19 21:30:09.106686, which in less than 600.000000 s```

route to CXP team


Debian10

Add documentation page for Debian 10
Help reviewing https://github.com/ome/omero-install/pull/224
Web link to be updated when we have a page for Debian 10

Closing for now


Visual D 0.3.41 beta1

update DParser
some basic support for finding references
update documentation for changed site layout

Finding references! That's a really great step towards refactoring tools! :)
Super excited. Thanks again!

Finding references!

It's probably not good enough for refactoring yet, it also revealed some inconsistencies in the interaction with D_Parser. I have not tried it in Mono-D to see how well it works there...