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

Fix release problem with secret-generator #417

Conversation

rtyley
Copy link
Member

@rtyley rtyley commented Dec 6, 2023

Releasing v1.0.0 with gha-scala-library-release-workflow (introduced with PR #416) worked fine, but trying to release v1.0.1 failed, due to the unusual configuration of the secret-generator subproject:

https://github.com/guardian/play-secret-rotation/actions/runs/7113763098/job/19366398526#step:4:153

[error] (aws-parameterstore-lambda / mimaPreviousClassfiles) sbt.librarymanagement.ResolveException: Error downloading com.gu.play-secret-rotation:secret-generator_2.13:1.0.0
[error]   Not found
[error]   Not found
[error]   not found: /home/runner/.ivy2/localcom.gu.play-secret-rotation/secret-generator_2.13/1.0.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/gu/play-secret-rotation/secret-generator_2.13/1.0.0/secret-generator_2.13-1.0.0.pom
[error] (aws-parameterstore-lambda / versionPolicyFindDependencyIssues) sbt.librarymanagement.ResolveException: Error downloading com.gu.play-secret-rotation:secret-generator_2.13:1.0.0

Why wasn't secret-generator configured to be published?

Nothing actually needs secret-generator as a library artifact - aws-parameterstore-lambda uses sbt-assembly to incorporate all it's dependencies into a single jar, so even though it uses secret-generator, it doesn't need it as a separate artifact. However, the new compatibility-based version-numbering functionality introduced in scalacenter/sbt-version-policy#187 wants to compare with previous versions of project dependencies, and it doesn't understand the dependency isn't published...

The easiest fix for this problem is just to publish the artifact, so I'm doing that here!

Note that after merging this PR, I also had to temporarily disable sbt-version-policy version numbering with 088d4f5, so that the next release would actually succeed (because it then wasn't looking for a previous secret-generator artifact) and publish the secret-generator artifact. Once release v1.0.1 succeeded, I re-enabled sbt-version-policy version numbering with cf46179. The next release (v2.0.0) then completed successfully 👍

Releasing v1.0.0 with https://github.com/guardian/gha-scala-library-release-workflow
worked fine, but trying to release v1.0.1 failed, due to the unusual configuration
of the `secret-generator` subproject:

https://github.com/guardian/play-secret-rotation/actions/runs/7113763098/job/19366398526#step:4:153

```
[error] (aws-parameterstore-lambda / mimaPreviousClassfiles) sbt.librarymanagement.ResolveException: Error downloading com.gu.play-secret-rotation:secret-generator_2.13:1.0.0
[error]   Not found
[error]   Not found
[error]   not found: /home/runner/.ivy2/localcom.gu.play-secret-rotation/secret-generator_2.13/1.0.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/gu/play-secret-rotation/secret-generator_2.13/1.0.0/secret-generator_2.13-1.0.0.pom
[error] (aws-parameterstore-lambda / versionPolicyFindDependencyIssues) sbt.librarymanagement.ResolveException: Error downloading com.gu.play-secret-rotation:secret-generator_2.13:1.0.0
```

Nothing actually needs `secret-generator` as a library artifact - `aws-parameterstore-lambda` uses `sbt-assembly` to incorporate all it's dependencies into a single jar, so even though it uses secret-generator, it doesn't need it as a separate artifact. However, the new compatibility-based version-numbering functionality introduced in scalacenter/sbt-version-policy#187 wants to compare with previous versions of project dependencies, and it doesn't understand the dependency isn't published...

It's easier to publish the artifact, so I'm doing that here!
@rtyley rtyley requested a review from a team as a code owner December 6, 2023 16:07
@rtyley rtyley merged commit 11a9aac into main Dec 6, 2023
2 checks passed
rtyley added a commit that referenced this pull request Dec 6, 2023
… to #417"

This reverts commit 088d4f5 - now that
https://github.com/guardian/play-secret-rotation/releases/tag/v1.0.1
has published a `secret-generator` artifact, we can re-enable
sbt-version-policy version numbering.

#417
@rtyley rtyley deleted the fix-release-problem-where-secret-generator-was-confusing-sbt-version-policy branch April 3, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant