Skip to content

Move database revision tags to separate file#20998

Merged
guerler merged 1 commit intogalaxyproject:devfrom
guerler:move_revisions
Oct 9, 2025
Merged

Move database revision tags to separate file#20998
guerler merged 1 commit intogalaxyproject:devfrom
guerler:move_revisions

Conversation

@guerler
Copy link
Copy Markdown
Contributor

@guerler guerler commented Oct 3, 2025

This change moves REVISION_TAGS into a constant-only dbrevisions.py file, simplifying maintenance.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@guerler guerler added this to the 26.0 milestone Oct 3, 2025
@guerler guerler added kind/refactoring cleanup or refactoring of existing code, no functional changes area/database Galaxy's database or data access layer labels Oct 3, 2025
@guerler guerler requested a review from jdavcs October 3, 2025 10:33
@guerler guerler marked this pull request as ready for review October 3, 2025 10:42
Comment thread lib/galaxy/model/migrations/dbscript.py Outdated
@jdavcs
Copy link
Copy Markdown
Member

jdavcs commented Oct 3, 2025

REVISION_TAGS is just a Python constant; it's not a configuration option that can take on different values. We only update it by adding a new tag each release, we never edit or delete: you would never, ever want to change any of those hashes. I wouldn't store this in a yaml file.

@guerler
Copy link
Copy Markdown
Contributor Author

guerler commented Oct 4, 2025

I see your point. The goal is not to suggest configurability, but to separate static release data from code. Right now release managers must edit a code file with logic just to add a new tag. Moving this into a data-only file avoids that. If YAML feels misleading, we could use a dbrevisions.json file instead. A minimal dbrevisions.py with just a dict would also work, but YAML or JSON seem clearer.

@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Oct 4, 2025

Every time we load stuff from disk in the module namespace we slow down the startup process. I'm with @jdavcs on this one. You can also validate that the head revision is listed in the migration tests for instance so bumping this would be up to whoever adds a migration.

@guerler guerler changed the title Move database revision tags to YAML file Move database revision tags to separate file Oct 4, 2025
@guerler
Copy link
Copy Markdown
Contributor Author

guerler commented Oct 8, 2025

Thanks for the review and suggestions. Does this look ok now @jdavcs?

Copy link
Copy Markdown
Member

@jdavcs jdavcs 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, thank you!

@guerler guerler merged commit 425ddc9 into galaxyproject:dev Oct 9, 2025
53 of 55 checks passed
@guerler guerler deleted the move_revisions branch October 9, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/database Galaxy's database or data access layer kind/refactoring cleanup or refactoring of existing code, no functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants