-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating identity v2 beta versions for identity tests and reverting to GA version v1 for samples #15654
Updating identity v2 beta versions for identity tests and reverting to GA version v1 for samples #15654
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -25,6 +25,6 @@ | |||
"dependencies": { | |||
"@azure/container-registry": "next", | |||
"dotenv": "latest", | |||
"@azure/identity": "^1.1.0" | |||
"@azure/identity": "2.0.0-beta.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will be overwritten next time the publish command is run. I think this change should happen in dev-tool or specified in package.json's sampleConfiguration
entry:
"//sampleConfiguration": {
// Any dependency version specifications in this setting will be preferred
// over the dependencies specified in your ordinary dependencies or
// devDependencies.
"dependencyOverrides": {
// For example, this setting will cause the generated sample packages
// to include a dependency on a beta version of identity instead of the
// version that your package depends on (currently ^1.1.0)
"@azure/identity": "2.0.0-beta.3"
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe I am wrong. @witemple-msft does the versions in the samples' package.json come from the package's package.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd thought the sample's dependencies would be computed from the main package.json, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right, ignore my request then unless Will says otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deyaaeldeen I think the "dependencyOverride" setting in the main package's package.json is when we want to specify an exception for the samples - in this case if we want samples to depend on a version of identity other than the package's dependency, then we'll use that setting.
This pull request is protected by Check Enforcer. What is Check Enforcer?Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass. Why am I getting this message?You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged. What should I do now?If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows: What if I am onboarding a new service?Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment: |
@@ -29,7 +29,7 @@ | |||
"sideEffects": false, | |||
"dependencies": { | |||
"@azure/event-hubs": "^5.0.0", | |||
"@azure/identity": "^1.0.2" | |||
"@azure/identity": "2.0.0-beta.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the Identity GA for 2.x happening soon? I'm wondering why we're updating samples if we don't want users to bake a beta into their programs (ie, if they're using this as an example of what they have to reference).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's a good point. @sadasant Why do we want to update samples' identity dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also in some of the packages, the dependency for the samples is mentioned as a dev-dep in the package. So in making that transition, there might be situation where samples depend on an identity version other than the version that package takes dev dep on. Thoughts? @sadasant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to make sure that as many things that use Identity get to use v2 before we release it. v2 will release on September
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anything that runs on CI will potentially help us catch bugs before we release 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what it's worth, the browser sample is not run on CI. I also am hesitant to depend on a beta in a sample.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok to use beta for node samples, since those run in ci? @chradek
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our tests should be using the v2-beta of Identity to help with getting test coverage. Samples is for the end customers to use and should not use beta versions. Also, if we are getting some test coverage in samples that we are not getting in our tests, then we should take another look at our tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only samples that should use the beta would be samples that require said beta? If this sample works against the GA version of identity, I would think it should target the GA version of identity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok to use beta for node samples, since those run in ci?
I'll echo @ramya-rao-a and @xirzec that I don't think samples should use betas unless they need functionality that's only in the beta.
These show up in our published documentation for GA packages, so having a user start by using one of our samples that depends on a beta can lead to a poor experience. We haven't been shy about making breaking changes in between beta versions so I'd hate for a customer to end up depending on something still going through churn because they downloaded an official sample.
common/config/rush/pnpm-lock.yaml
Outdated
@@ -433,6 +433,30 @@ packages: | |||
node: '>=8.0.0' | |||
resolution: | |||
integrity: sha512-eOHstXRBRntoqBLi3bugYBEHpYkm0JiET6y5+P1fz7dqYRFN6hJW8qMJQtYIzIbpXJfRJTJdoiOS5fDQhsez0A== | |||
/@azure/identity/[email protected]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't look too often at these files - what is the _debug suffix here at the end of the version string mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like a dependency or a transitive dependency - called "debug" with version 4.3.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean! ✨
4b3f87a
to
9e5fd4b
Compare
@KarishmaGhiya Please update the PR title to reflect the changes being made and the PR description with the reasoning |
@@ -93,6 +93,9 @@ | |||
"requiredResources": { | |||
"Azure Service Bus": "https://docs.microsoft.com/azure/service-bus-messaging" | |||
}, | |||
"dependencyOverrides": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Container Registry the dependencyOverrides
was under requiredResources
while here the two are siblings...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes they should be siblings. I updated container registry package.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this just override the rush config? I'm curious why service-bus needs it but not event hubs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the serviceBus samples though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s go 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s go 🚀
sdk/eventhub/event-hubs/package.json
Outdated
@@ -106,7 +106,7 @@ | |||
"devDependencies": { | |||
"@azure/dev-tool": "^1.0.0", | |||
"@azure/eslint-plugin-azure-sdk": "^3.0.0", | |||
"@azure/identity": "^1.1.0", | |||
"@azure/identity": "2.0.0-beta.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, why does event hubs get beta.3 and everyone else gets beta.4? I feel left behind 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it should be on par with everyone 🥇
sdk/eventhub/event-hubs/package.json
Outdated
@@ -106,7 +106,7 @@ | |||
"devDependencies": { | |||
"@azure/dev-tool": "^1.0.0", | |||
"@azure/eslint-plugin-azure-sdk": "^3.0.0", | |||
"@azure/identity": "^1.1.0", | |||
"@azure/identity": "2.0.0-beta.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this intentionally beta.3 vs beta.4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I was in the middle of conversation with Daniel when I made this beta.3, then we decided to go with beta.4. Thanks!
@@ -93,6 +93,9 @@ | |||
"requiredResources": { | |||
"Azure Service Bus": "https://docs.microsoft.com/azure/service-bus-messaging" | |||
}, | |||
"dependencyOverrides": { | |||
"@azure/identity": "^1.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using ^1.3.0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what the service-bus samples originally supported - ^1.1.0. Didn't want to change that, unless package owner wants to. ^1.1.0 means it will support all versions from 1.1.0 to the latest (1.3.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -87,7 +87,7 @@ | |||
"devDependencies": { | |||
"@azure/dev-tool": "^1.0.0", | |||
"@azure/eslint-plugin-azure-sdk": "^3.0.0", | |||
"@azure/identity": "^1.1.0", | |||
"@azure/identity": "2.0.0-beta.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question about beta3 vs beta4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@jeremymeng We'll need to re-record only node tests for container registry. Browser unit tests work fine with just replacement of tenant-id |
…o GA version v1 for samples (Azure#15654) Co-authored-by: Jeremy Meng <[email protected]>
2.0.0-beta.4