Skip to content
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

Merged
merged 10 commits into from
Jun 11, 2021

Conversation

KarishmaGhiya
Copy link
Contributor

@KarishmaGhiya KarishmaGhiya commented Jun 9, 2021

  • The perf tests and manual tests dependency for identity is updated to 2.0.0-beta.4
  • The samples of packages are pinned to the GA versions of identity being supported by samples. Since samples are being used by end-users, they should be supported by GA versions and not beta version of a dependency.

Copy link
Contributor

@jeremymeng jeremymeng left a 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"
Copy link
Member

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"
    }
  }

cc @witemple-msft

Copy link
Member

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?

Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor Author

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.

@check-enforcer
Copy link

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:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

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:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run js - [service] - ci

@@ -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"
Copy link
Member

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).

Copy link
Contributor Author

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?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor

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 🙏

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Member

@xirzec xirzec Jun 10, 2021

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.

Copy link
Contributor

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.

@@ -433,6 +433,30 @@ packages:
node: '>=8.0.0'
resolution:
integrity: sha512-eOHstXRBRntoqBLi3bugYBEHpYkm0JiET6y5+P1fz7dqYRFN6hJW8qMJQtYIzIbpXJfRJTJdoiOS5fDQhsez0A==
/@azure/identity/2.0.0-beta.3_debug@4.3.1:
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean! ✨

@ramya-rao-a
Copy link
Contributor

@KarishmaGhiya Please update the PR title to reflect the changes being made and the PR description with the reasoning

@KarishmaGhiya KarishmaGhiya changed the title samples identity Updating versions of identity for identity tests and reverting for samples Jun 11, 2021
@KarishmaGhiya KarishmaGhiya changed the title Updating versions of identity for identity tests and reverting for samples Updating identity v2 beta versions for identity tests and reverting to GA version v1 for samples Jun 11, 2021
@@ -93,6 +93,9 @@
"requiredResources": {
"Azure Service Bus": "https://docs.microsoft.com/azure/service-bus-messaging"
},
"dependencyOverrides": {
Copy link
Contributor

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...

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s go 🚀

Copy link
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s go 🚀

@@ -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",
Copy link
Contributor

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 😄

Copy link
Contributor Author

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 🥇

@@ -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",
Copy link
Member

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?

Copy link
Contributor Author

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"
Copy link
Member

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?

Copy link
Contributor Author

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)

Copy link
Contributor Author

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",
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@KarishmaGhiya
Copy link
Contributor Author

KarishmaGhiya commented Jun 11, 2021

@jeremymeng We'll need to re-record only node tests for container registry. Browser unit tests work fine with just replacement of tenant-id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants