Skip to content

Automatically update the REVISIONS_HEADS_MAP in db.py#33616

Merged
ephraimbuddy merged 6 commits into
apache:mainfrom
astronomer:automate_revisions_head_map
Aug 22, 2023
Merged

Automatically update the REVISIONS_HEADS_MAP in db.py#33616
ephraimbuddy merged 6 commits into
apache:mainfrom
astronomer:automate_revisions_head_map

Conversation

@ephraimbuddy
Copy link
Copy Markdown
Contributor

This has been the responsibility of the release manager and is manually done. In 2.7.0, I mistakenly added a wrong value for the revision which means that anyone upgrading with airflow db migrate --version 2.7.0 will end up having incorrect migration.
This PR automates this and always updates it to the correct value through pre-commit

Comment thread airflow/utils/db.py Outdated
This has been the responsibility of the release manager and manually done.
In 2.7.0, I mistakenly added a wrong value for the revision which means that
anyone upgrading with `airflow db migrate --version 2.7.0` will end up having incorrect
migration.
This PR automates this and always updates it to the correct value through pre-commit
@ephraimbuddy ephraimbuddy force-pushed the automate_revisions_head_map branch from 3bb1c4e to f41ab17 Compare August 22, 2023 18:08
@ephraimbuddy ephraimbuddy force-pushed the automate_revisions_head_map branch from 052e986 to c526961 Compare August 22, 2023 18:32
Comment thread airflow/utils/db.py Outdated
@ephraimbuddy ephraimbuddy merged commit 513c1d2 into apache:main Aug 22, 2023
@ephraimbuddy ephraimbuddy deleted the automate_revisions_head_map branch August 22, 2023 20:56
@jedcunningham jedcunningham added this to the Airflow 2.7.1 milestone Aug 24, 2023
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Aug 27, 2023
ephraimbuddy added a commit that referenced this pull request Aug 28, 2023
* Automatically update the REVISIONS_HEADS_MAP in db.py

This has been the responsibility of the release manager and manually done.
In 2.7.0, I mistakenly added a wrong value for the revision which means that
anyone upgrading with `airflow db migrate --version 2.7.0` will end up having incorrect
migration.
This PR automates this and always updates it to the correct value through pre-commit

* fixup! Automatically update the REVISIONS_HEADS_MAP in db.py

* Account for missing versions in revision heads map

* Provide the full path of the DB file in message

* Make REVISION_HEADS_MAP private

* Only add from 2.0.0 up

(cherry picked from commit 513c1d2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CLI area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants