Skip to content

Procedure to deprecate old versions of software#20767

Merged
sethrj merged 7 commits intospack:developfrom
adamjstewart:features/deprecated
Feb 9, 2021
Merged

Procedure to deprecate old versions of software#20767
sethrj merged 7 commits intospack:developfrom
adamjstewart:features/deprecated

Conversation

@adamjstewart
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart commented Jan 9, 2021

See proposal in #15896

  • Implement version-level deprecated arg
  • Implement package-level deprecated arg
  • Documentation
  • Testing?

Example usage:

$ spack fetch [email protected]
==> Warning: [email protected] is deprecated and may be removed in a future Spack release.
==>   Fetch anyway? [y/N] n
==> Error: Will not fetch [email protected]
If you are willing to be a maintainer for this version of the package, submit a PR to remove `deprecated=False`, or use `--deprecated` to skip this check.

I'm not sure how to implement the package-level arg, but we can always apply the arg to all versions of a package.

@adamjstewart adamjstewart added feature A feature is missing in Spack fetching labels Jan 9, 2021
tty.debug('No fetch required for {0}: package has no code.'
.format(self.name))

start_time = time.time()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Previously, "fetch time" would include the time that Spack waited at the prompt for the user to confirm or deny no-checksum/deprecated versions.

sethrj
sethrj previously approved these changes Jan 10, 2021
Copy link
Copy Markdown
Contributor

@sethrj sethrj 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! I think that once we consider removing particular versionss, though, we'll need to have a placeholder for range of removed versions that gives an error when one is selected during concretization (e.g. deleted_versions(':2.56.4')). Otherwise, we will likely see more bizarre concretization errors like this one.

@adamjstewart
Copy link
Copy Markdown
Member Author

Ping @spack/merge-to-develop

cosmicexplorer
cosmicexplorer previously approved these changes Feb 1, 2021
Copy link
Copy Markdown
Contributor

@cosmicexplorer cosmicexplorer left a comment

Choose a reason for hiding this comment

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

I'm not sure how to implement the package-level arg, but we can always apply the arg to all versions of a package.

I think this sounds like a good idea!

@sethrj
Copy link
Copy Markdown
Contributor

sethrj commented Feb 9, 2021

Yay deprecations! Next, removals.

@sethrj sethrj merged commit 7ccb999 into spack:develop Feb 9, 2021
@adamjstewart adamjstewart deleted the features/deprecated branch February 9, 2021 18:58
@becker33
Copy link
Copy Markdown
Member

becker33 commented Feb 9, 2021

@adamjstewart is there interaction between this PR and the spack deprecate command that we should consider?

@adamjstewart
Copy link
Copy Markdown
Member Author

I could see that being useful. I've never used that command. It's for deprecating versions with security vulnerabilities, right? Or is it for deprecating modules? One possible option would be to add a flag to search for installed software that is deprecated.

@becker33
Copy link
Copy Markdown
Member

It's for deprecating versions with security vulnerabilities (or with correctness bugs). It basically just symlinks one spec into the location of another.

@carns
Copy link
Copy Markdown
Contributor

carns commented Feb 15, 2021

FYI, I tried out the deprecated tag for a package.py just now. It works great, but I noticed that it resolved/installed all dependencies before displaying the prompt informing the user that the package/version is deprecated. Not a big deal, but it might be nicer to present this prompt immediately before taking further action.

@adamjstewart
Copy link
Copy Markdown
Member Author

I agree. I'm not sure how to do this though. Probably similar to how conflicts works, but with an option to ignore it.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Feb 18, 2021

@becker33 @adamjstewart @scheibelp @tldahlgren @tgamblin Did anybody think how to handle these version deprecations during a release cycle? Would it make sense to use a v0.17:

version('1.2.3', sha256='...', deprecated='v0.17')

or a similar value instead of a Boolean? The issue I see is that if we use just True or False it would be a nightmare to check what to remove for any given major release of Spack, since for every deprecated line we'll have to go to the git log and check when it was added in develop. If instead we use vMAJOR.MINOR we can just grep for the previous version number when we'll cut a release and the procedure would be much faster.

@adamjstewart
Copy link
Copy Markdown
Member Author

That's not a bad idea. But we can also grep for deprecated=True right after a new release and remove anything for the next release.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Feb 18, 2021

I think that means we should ensure that no deprecated=True goes into develop during the days when we cut a release. Anyhow, I just want to make sure we have a clear strategy for that. Would it take a lot of changes to go with strings as proposed above?

@adamjstewart
Copy link
Copy Markdown
Member Author

It wouldn't take very many changes to do this. I think it's still fine for deprecated=True to slip into develop, as we only promise that versions won't be removed without deprecation in a release, it's fine in develop. For example:

Day 1: deprecate version
Day 2: new release of Spack
Day 3: remove version

I don't see a problem with the above scenario. For anyone moving from release to release they will have a full release cycle to warn them.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Feb 18, 2021

    Day 2: new release of Spack
---> deprecated=True slips in develop after release
    Day 3: remove version

@adamjstewart
Copy link
Copy Markdown
Member Author

Ah, yes, that's not allowed. Aside from code review, I guess the easiest way to enforce that with unit tests would be your version suggestion.

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

Labels

feature A feature is missing in Spack fetching

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants