Skip to content

Update scan_for_unreleased_dependencies.ps1#10961

Merged
JimSuplizio merged 1 commit intomasterfrom
DepScanUpdate
May 8, 2020
Merged

Update scan_for_unreleased_dependencies.ps1#10961
JimSuplizio merged 1 commit intomasterfrom
DepScanUpdate

Conversation

@JimSuplizio
Copy link
Contributor

@JimSuplizio JimSuplizio commented May 8, 2020

There was issue this week where a library was allowed to ship GA with beta dependencies. The fix here is to ensure that any dependency that not an external_dependency (aka, something we build/ship) has its version checked. If the version is beta and the library being shipped is GA, then we fail. The output would look like this:
inputGroupId=com.azure
inputArtifactId=azure-core-amqp
serviceDirectory=C:\src\azure-sdk-for-java\sdk\core
Found pom file with matching groupId(com.azure)/artifactId(azure-core-amqp), pomFile=C:\src\azure-sdk-for-java\sdk\core\azure-core-amqp\pom.xml
Library is not releasing as Beta, version=1.1.1
Error: Cannot release non-beta libraries with beta dependencies. dependency={x-version-update;com.azure:azure-core;current}, version=1.6.0-beta.1

Copy link
Member

@srnagar srnagar left a comment

Choose a reason for hiding this comment

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

LGTM!

@JimSuplizio JimSuplizio added the EngSys This issue is impacting the engineering system. label May 8, 2020
@JimSuplizio JimSuplizio merged commit 3777e2d into master May 8, 2020
@JimSuplizio JimSuplizio deleted the DepScanUpdate branch May 8, 2020 19:52
continue
} else {
# If this is an external dependency then continue
if ($versionUpdateTag -match "external_dependency}") {
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 it is actually a good idea to do a check for both internal and external dependencies. I'd suggest we use the SemVer.ps1 script we have under common and check to see if our version and if it is not prerelease then we should error for any dependency that is marked as a prerelease.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@weshaggard, sure. I can look and see if this is feasible for external_dependencies on Monday. There are, unfortunately, beta external dependencies. Also, I'd have to verify that the SemVer.ps1 does correctly parse all of the external dependency versions first as Maven is a bit more liberal with what it allows for versions.

Copy link
Member

Choose a reason for hiding this comment

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

I hope we don't depend on external prereleases in our GA packages that will definitely be a recipe for potential disaster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do but only in a scope. I'm less concerned about external dependencies since the maven-enforcer-plugin was added and every dependency is now being scrutinized (track 2 only though).

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

Labels

EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants