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

fix(upgrade): Improving NoCodeUpgrade logic to account for Bootstrap logic #3301

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

jjoyce0510
Copy link
Collaborator

In a recent version of DataHub, we introduced a BootstrapManager that is responsible for executing steps when GMS boots up. These include ingesting default set of policies and the stock data platforms. This process does not support upgrading from a version of DataHub before the NoCodeUpgrade was introduced because even if the table is created and the bootstrap does succeed, the service will not qualify for upgrade since that table already has rows.

The solution we introduced is to change the NoCodeUpgrade qualification process to check whether the number of rows not created by the system user are 0. As part of this, we are also standardizing the concept of "system actor" to be an actor with the primary key identifier "urn:li:corpuser:__datahub_actor". This was chosen to avoid future conflict potential and to ensure that the existing concept of corpuser was reused. Previously, we'd had multiple notions of a system actors including

  • urn:li:corpuser:datahub
  • urn:li:corpuser:UNKNOWN
  • urn:li:principal:datahub
  • urn:li:corpuser:system

Going forward, we will standardize on urn:li:corpuser:__datahub_system as the official system actor. This means that we may need an upgrade for companies that already have the previous names of system actors in their DBs. We will consider whether this is required ( not yet ) and publish an upgrade if necessary in the future. For now, this should solve the immediate problem of upgrading to the latest from an old version of DataHub.

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)

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!

Copy link
Contributor

@shirshanka shirshanka left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@shirshanka shirshanka merged commit 33f4d2e into datahub-project:master Sep 28, 2021
xdl pushed a commit to G-Research/datahub that referenced this pull request Oct 4, 2021
xdl added a commit to G-Research/datahub that referenced this pull request Oct 5, 2021
jgiannuzzi pushed a commit to G-Research/datahub that referenced this pull request Oct 6, 2021
swaroopjagadish pushed a commit to swaroopjagadish/datahub that referenced this pull request Oct 7, 2021
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