Merge pull request #20998 from guerler/move_revisions

Move database revision tags to separate file
This commit is contained in:
Aysam Guerler
2025-10-09 07:57:27 +03:00
committed by GitHub
2 changed files with 20 additions and 29 deletions
@@ -0,0 +1,18 @@
# Update this file with tags for each new release.
# Note: the key should NOT be a prefix of an existing revision hash in alembic/versions_gxy/.
# For example, if we have a hash 231xxxxxxxxx and use 231 as the key for release 23.1,
# then using 231 as a partial revision identifier like `sh manage_db.sh upgrade 231`
# will map to release 23.1 instead of revision 231xxxxxxxxx.
REVISION_TAGS = {
"22.01": "base",
"22.05": "186d4835587b",
"23.0": "caa7742f7bca",
"23.1": "e93c5d0b47a9",
"23.2": "8a19186a6ee7",
"24.0": "55f02fd8ab6c",
"24.1": "04288b6a5b25",
"24.2": "a4c3ef999ab5",
"25.0": "c716ee82337b",
"25.1": "cd26484899fb",
}
+2 -29
View File
@@ -10,6 +10,7 @@ from galaxy.model.migrations.base import (
BaseDbScript,
BaseParserBuilder,
)
from galaxy.model.migrations.dbrevisions import REVISION_TAGS
from galaxy.model.migrations.scripts import (
get_configuration,
get_configuration_from_file,
@@ -24,34 +25,6 @@ CONFIG_DIR_NAME = "config"
GXY_CONFIG_PREFIX = "GALAXY_CONFIG_"
TSI_CONFIG_PREFIX = "GALAXY_INSTALL_CONFIG_"
# Update this dict with tags for each new release.
# Note: the key should NOT be a prefix of an existing revision hash in alembic/versions_gxy/.
# For example, if we have a hash 231xxxxxxxxx and use 231 as the key for release 23.1,
# then using 231 as a partial revision identifier like `sh manage_db.sh upgrade 231`
# will map to release 23.1 instead of revision 231xxxxxxxxx.
REVISION_TAGS = {
"release_22.01": "base",
"22.01": "base",
"release_22.05": "186d4835587b",
"22.05": "186d4835587b",
"release_23.0": "caa7742f7bca",
"23.0": "caa7742f7bca",
"release_23.1": "e93c5d0b47a9",
"23.1": "e93c5d0b47a9",
"release_23.2": "8a19186a6ee7",
"23.2": "8a19186a6ee7",
"release_24.0": "55f02fd8ab6c",
"24.0": "55f02fd8ab6c",
"release_24.1": "04288b6a5b25",
"24.1": "04288b6a5b25",
"release_24.2": "a4c3ef999ab5",
"24.2": "a4c3ef999ab5",
"release_25.0": "c716ee82337b",
"25.0": "c716ee82337b",
"release_25.1": "cd26484899fb",
"25.1": "cd26484899fb",
}
class ParserBuilder(BaseParserBuilder):
def _get_command_object(self):
@@ -81,7 +54,7 @@ class DbScript(BaseDbScript):
return f"gxy@{revision_id}"
def _revision_tags(self):
return REVISION_TAGS
return {f"release_{k}": v for k, v in REVISION_TAGS.items()} | REVISION_TAGS
def _set_dburl(self, config_file: Optional[str] = None) -> None:
gxy_config, tsi_config, _ = get_configuration_from_file(os.getcwd(), config_file)