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

chore(GHA): add action for testing against MPL HEAD #1187

Merged
merged 21 commits into from
Jul 12, 2024

Conversation

josecorella
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@josecorella josecorella marked this pull request as ready for review July 12, 2024 00:01
@josecorella josecorella requested a review from a team as a code owner July 12, 2024 00:01
texastony
texastony previously approved these changes Jul 12, 2024
Copy link
Contributor

@texastony texastony left a comment

Choose a reason for hiding this comment

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

Nice.

@josecorella
Copy link
Contributor Author

java test vectors will fail with this approach because the pinned version of the MPL 1.4.0 defines the test vector version as 1.0-SNAPSHOT while this pr updates the test vectors to depend on the same version for the mpl and the test vectors. The right thing to do here is to revert the change that changes the dependency definition of the test vectors so that we can merge this pr. The mpl-head-ci action failling daily is "ok" because it tells us that there needs to be project changes in order to merge with latest mpl head. This is why we wrote the action.

@texastony
Copy link
Contributor

java test vectors will fail with this approach because the pinned version of the MPL 1.4.0 defines the test vector version as 1.0-SNAPSHOT while this pr updates the test vectors to depend on the same version for the mpl and the test vectors. The right thing to do here is to revert the change that changes the dependency definition of the test vectors so that we can merge this pr. The mpl-head-ci action failling daily is "ok" because it tells us that there needs to be project changes in order to merge with latest mpl head. This is why we wrote the action.

When I was working on the KMS Exception issue,
one of the issues I struggled with was getting local changes picked up.

The build system relies on mvn_local_deploy.
This allows a locally build TestVector project to be utilized.
The issue I had was that I had a yee-old TestVector locally built and installed in my Maven Cache.

I believe that tying the Test Vector version to the MPL's version
ensures that all consumers update both at the same time.

Which will be necessary,
as the TestVectors will always need to be updated to consume the latest MPL,
or it will not be achieving it's objective of testing the MPL.

Recognizing that the TestVectors will always need to Version with the MPL,
it seems appropriate that TestVectors should have the same version.

This is not necessary; the TestVectors could follow any versioning number,
so long as that number is always incremented when the MPL's version is incremented.

But it feels unnecessary to have two separate numbers without a justification.

@josecorella
Copy link
Contributor Author

java test vectors will fail with this approach because the pinned version of the MPL 1.4.0 defines the test vector version as 1.0-SNAPSHOT while this pr updates the test vectors to depend on the same version for the mpl and the test vectors. The right thing to do here is to revert the change that changes the dependency definition of the test vectors so that we can merge this pr. The mpl-head-ci action failling daily is "ok" because it tells us that there needs to be project changes in order to merge with latest mpl head. This is why we wrote the action.

When I was working on the KMS Exception issue, one of the issues I struggled with was getting local changes picked up.

The build system relies on mvn_local_deploy. This allows a locally build TestVector project to be utilized. The issue I had was that I had a yee-old TestVector locally built and installed in my Maven Cache.

I believe that tying the Test Vector version to the MPL's version ensures that all consumers update both at the same time.

Which will be necessary, as the TestVectors will always need to be updated to consume the latest MPL, or it will not be achieving it's objective of testing the MPL.

Recognizing that the TestVectors will always need to Version with the MPL, it seems appropriate that TestVectors should have the same version.

This is not necessary; the TestVectors could follow any versioning number, so long as that number is always incremented when the MPL's version is incremented.

But it feels unnecessary to have two separate numbers without a justification.

I might have not been clear in my comment blurb. I am not saying we need to keep track of two separate versions. At this time the DBESDK has not been bumped from 1.4.0 to 1.5.1

I do not want to bump in this PR. What I am saying is that the action mpl-head-ci is built to test against the latest changes of MPL, when it fails it means that there was a change in the MPL that this repo needs to update in order to build with the latest mpl such that we can bump to the latest released MPL. I left comments in the build.gradle.kts file to ensure we update the syntax.

@josecorella josecorella merged commit b2f70ca into main Jul 12, 2024
33 checks passed
@josecorella josecorella deleted the jocorell/gha-build-mpl-head branch July 12, 2024 01:35
Copy link
Contributor

@seebees seebees left a comment

Choose a reason for hiding this comment

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

Looks good

Comment on lines +16 to +24
mpl-version:
description: "MPL version to use"
required: false
type: string
mpl-head:
description: "Running on MPL HEAD"
required: false
default: false
type: boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to make it so you can only pass one?

@@ -42,6 +51,20 @@ jobs:
with:
dafny-version: ${{ inputs.dafny }}

- name: Update MPL submodule if using MPL HEAD
if: ${{ inputs.mpl-head == true }}
Copy link
Contributor

Choose a reason for hiding this comment

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

What if head and version are true? Our ci is getting complicated :)

@@ -28,6 +28,7 @@ var dafnyRuntimeJavaVersion = props.getProperty("dafnyRuntimeJavaVersion")
var smithyDafnyJavaConversionVersion = props.getProperty("smithyDafnyJavaConversionVersion")

group = "software.amazon.cryptography"
// change to ${mplVersion} for next MPL update
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR but can we put this under our release process?

rishav-karanjit pushed a commit that referenced this pull request Jul 12, 2024
## [3.5.1](v3.5.0...v3.5.1) (2024-07-12)

### Maintenance

* bump dafny verification version to 4.7 ([#1181](#1181)) ([e7801ec](e7801ec))
* Fix nightly build (aside from verification) ([#1029](#1029)) ([862420e](862420e))
* **GHA:** add action for testing against MPL HEAD ([#1187](#1187)) ([b2f70ca](b2f70ca))
* **GHA:** fix daily ci ([#1194](#1194)) ([a1427e0](a1427e0))
* update project.properties to be SNAPSHOT ([#1087](#1087)) ([6f2825e](6f2825e))
ajewellamz pushed a commit that referenced this pull request Jul 23, 2024
## [3.6.0](v3.5.0...v3.6.0) (2024-07-23)

### Features

* allow indirect attribute names with MultiKeyStore ([#1208](#1208)) ([4ab97bc](4ab97bc))

### Maintenance

* bump dafny verification version to 4.7 ([#1181](#1181)) ([e7801ec](e7801ec))
* **CI/CD:** use latest conventional-changelog-conventionalcommits ([#1195](#1195)) ([510227e](510227e))
* Fix nightly build (aside from verification) ([#1029](#1029)) ([862420e](862420e))
* **GHA:** add action for testing against MPL HEAD ([#1187](#1187)) ([b2f70ca](b2f70ca))
* **GHA:** fix daily ci ([#1194](#1194)) ([a1427e0](a1427e0))
* **MPL:** Bump MPL to 1.5.1 ([#1201](#1201)) ([808a5b4](808a5b4))
* Sonatype Migration to User Tokens ([#1216](#1216)) ([a3b4ef9](a3b4ef9))
* Try to update existing issues ([31c6b98](31c6b98))
* Try to update existing issues ([4471295](4471295))
* update project.properties to be SNAPSHOT ([#1087](#1087)) ([6f2825e](6f2825e))
ajewellamz added a commit that referenced this pull request Jul 23, 2024
* chore(release): 3.6.0

## [3.6.0](v3.5.0...v3.6.0) (2024-07-23)

### Features

* allow indirect attribute names with MultiKeyStore ([#1208](#1208)) ([4ab97bc](4ab97bc))

### Maintenance

* bump dafny verification version to 4.7 ([#1181](#1181)) ([e7801ec](e7801ec))
* **CI/CD:** use latest conventional-changelog-conventionalcommits ([#1195](#1195)) ([510227e](510227e))
* Fix nightly build (aside from verification) ([#1029](#1029)) ([862420e](862420e))
* **GHA:** add action for testing against MPL HEAD ([#1187](#1187)) ([b2f70ca](b2f70ca))
* **GHA:** fix daily ci ([#1194](#1194)) ([a1427e0](a1427e0))
* **MPL:** Bump MPL to 1.5.1 ([#1201](#1201)) ([808a5b4](808a5b4))
* Sonatype Migration to User Tokens ([#1216](#1216)) ([a3b4ef9](a3b4ef9))
* Try to update existing issues ([31c6b98](31c6b98))
* Try to update existing issues ([4471295](4471295))
* update project.properties to be SNAPSHOT ([#1087](#1087)) ([6f2825e](6f2825e))
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.

3 participants