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

Support empty data repositories #153

Merged
merged 1 commit into from
Apr 23, 2018
Merged

Conversation

pluehne
Copy link
Contributor

@pluehne pluehne commented Apr 16, 2018

By accident, newly created data repositories didn’t work with the updater. The reason is that the updater checked the data schema version but failed, because no meta.tsv file (which contains the data schema version) was present.

This adds a check that, if the meta.tsv file is not yet present, simply succeeds with the update, through which the data repository is populated with an up-to-date schema anyway.

In contrast to #146, this allows users to get started with an empty repository instead of having to create a meta.tsv manually and reading through some more documentation.

Closes #145.

@pluehne pluehne added the bug label Apr 16, 2018
@pluehne pluehne self-assigned this Apr 16, 2018
@pluehne pluehne added this to To Do in Hubble Enterprise 0.3.0 via automation Apr 16, 2018
@pluehne pluehne moved this from To Do to In Progress in Hubble Enterprise 0.3.0 Apr 23, 2018
larsxschneider
larsxschneider previously approved these changes Apr 23, 2018
metaFilePath = os.path.join(dataDirectory, "meta.tsv")

# If the data repository is empty, no schema compatibility check is necessary
if not os.path.exists(metaFilePath):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor nit, you don't check the emptiness of the data repository. You just check if the meta.tsv is not there yet. I think you should either adjust the comment or change the code 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’d rather adjust the code, because it wouldn’t make sense to check the data repository in this case. I agree that the comment could have been more concise. I’ll adjust this.

By accident, newly created data repositories didn’t work with the
updater. The reason is that the updater checked the data schema version
but failed, because no meta.tsv file (which contains the data schema
version) was present.

This adds a check that, if the meta.tsv file is not yet present, simply
succeeds with the update, through which the data repository is populated
with an up-to-date schema anyway.
@pluehne pluehne force-pushed the patrick/fix-missing-meta.tsv branch from 7312292 to 4d5a807 Compare April 23, 2018 14:35
@pluehne
Copy link
Contributor Author

pluehne commented Apr 23, 2018

@larsxschneider: I addressed your suggestion, please review again 🙂.

@larsxschneider larsxschneider merged commit dda201a into master Apr 23, 2018
Hubble Enterprise 0.3.0 automation moved this from In Progress to Done Apr 23, 2018
@larsxschneider larsxschneider deleted the patrick/fix-missing-meta.tsv branch April 23, 2018 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants