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

Revert SHA256 field migration #127

Merged
merged 2 commits into from
Sep 22, 2022
Merged

Conversation

sophiewigmore
Copy link
Member

@sophiewigmore sophiewigmore commented Sep 21, 2022

Summary

In #123 the new checksum and source-checksum fields were introduced, converting all references to sha256 and source_sha256 fields (which are marked as deprecated in packit) into checksums. The problem with that change is that it is a breaking change, and any users of jam functionality would have sha256 fields converted to checksums. Jam shouldn't have opinions on what fields are allowed/not allowed, but should support all possible options.

This PR removes the migrations, and so that sha256 fields are not converted into checksums, and the changes are not breaking.

Test fixtures have been updated to use a mix of both the new checksum fields, as well as showing that sha256 can still be used.

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@sophiewigmore
Copy link
Member Author

This change means that automated buildpack.toml updates using jam will not update the sha256 and source_sha256 fields. Instead, buildpack.toml fields should be manually migrated to use the checksum and source-checksum fields.

@sophiewigmore sophiewigmore self-assigned this Sep 21, 2022
@sophiewigmore sophiewigmore marked this pull request as draft September 21, 2022 19:32
@sophiewigmore sophiewigmore marked this pull request as ready for review September 21, 2022 20:02
Comment on lines +46 to +48
sha256 = "some-sha"
source = "some-source"
source-checksum = "sha256:some-source-sha"
source_sha256 = "some-source-sha"
Copy link
Member Author

Choose a reason for hiding this comment

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

a test case like this with both checksum and sha256 fields is meant to show that when a version isn't added or deleted, it's un-modifed. As in, jam isn't going to modify the sha256 field on any version that isn't being added.

Copy link
Member Author

@sophiewigmore sophiewigmore 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 to me

@sophiewigmore sophiewigmore merged commit b5edac4 into main Sep 22, 2022
@sophiewigmore sophiewigmore deleted the checksum-backwards-compat branch September 22, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants