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

feat(upgrade) Check version when determining to run RestoreGlossaryIndices step #5182

Merged

Conversation

chriscollins3456
Copy link
Collaborator

Previously, we would only check that the datahub upgrade urn existed for the restore glossary indices step to determine if we should run the step. If it existed we did not run, and if not, we ran it.

Now, we may have situations where someone may have run the upgrade step but we want them to run it again, so we can check a version! The DataHubUpgradeRequest aspect was already storing a version, and for this step we previously set it to 0. Now we check to get that aspect, and if it exists, and it has the same version as the const at the top of the file, skip the step. If it doesn't exist or the version is different, run the step.

Now to have users re-run the step we just need to change the VERSION at the top of the file. I do so here as we know we want some users to re-run this step.

Adds a new test for running with a new version (the diff looks confusing there)

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Copy link
Contributor

@dexter-mh-lee dexter-mh-lee left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

github-actions bot commented Jun 15, 2022

Unit Test Results (build & test)

382 tests  +1   382 ✔️ +1   9m 3s ⏱️ + 5m 20s
  89 suites ±0       0 💤 ±0 
  89 files   ±0       0 ±0 

Results for commit b095e16. ± Comparison against base commit b4bf1d4.

♻️ This comment has been updated with latest results.

@chriscollins3456 chriscollins3456 force-pushed the cc--upgrade-step-version branch from 1794f06 to b095e16 Compare June 15, 2022 21:59
@jjoyce0510 jjoyce0510 merged commit af0e348 into datahub-project:master Jun 16, 2022
maggiehays pushed a commit to maggiehays/datahub that referenced this pull request Aug 1, 2022
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.

3 participants