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

assume version 1 for older lockfiles without a version key #13399

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented Oct 28, 2021

As reported in Slack, Python lockfiles created in Pants v2.7.x do not have a version key in the lockfile metadata. Pants v2.8.x generates lockfiles with the version key in the metdata and expects the files to contain that key. It had no fallback for older lockfiles without the version key. This broke an upgrade for one user from v2.7.0rc2 to v2.8.0rc0.

Solution: Pants should just assume version 1 if it does not find the version key in lockfile metadata.

[ci skip-rust]

[ci skip-rust]

[ci skip-build-wheels]
Copy link
Contributor

@chrisjrn chrisjrn left a comment

Choose a reason for hiding this comment

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

This should be fine

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thanks!

@Eric-Arellano Eric-Arellano modified the milestones: 2.8.x, 2.7.x Oct 28, 2021
@tdyas tdyas merged commit 184d51e into pantsbuild:main Oct 28, 2021
@tdyas tdyas deleted the fix_lockfile_decoding_version branch October 28, 2021 18:48
chrisjrn pushed a commit to chrisjrn/pants that referenced this pull request Oct 28, 2021
…d#13399)

As reported in Slack, Python lockfiles created in Pants v2.7.x do not have a `version` key in the lockfile metadata. Pants v2.8.x generates lockfiles with the `version` key in the metdata and expects the files to contain that key. It had no fallback for older lockfiles without the `version` key. This broke an upgrade for one user from v2.7.0rc2 to v2.8.0rc0. 

Solution: Pants should just assume version 1 if it does not find the `version` key in lockfile metadata.

[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
stuhood pushed a commit that referenced this pull request Oct 28, 2021
…k of #13399) (#13406)

As reported in Slack, Python lockfiles created in Pants v2.7.x do not have a `version` key in the lockfile metadata. Pants v2.8.x generates lockfiles with the `version` key in the metdata and expects the files to contain that key. It had no fallback for older lockfiles without the `version` key. This broke an upgrade for one user from v2.7.0rc2 to v2.8.0rc0. 

Solution: Pants should just assume version 1 if it does not find the `version` key in lockfile metadata.

(Backport of 184d51e to 2.8.x release branch)
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.

4 participants