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

EES-5416 Fix release files not being unlinked when draft data set versions deleted #5153

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

ntsim
Copy link
Collaborator

@ntsim ntsim commented Aug 15, 2024

This PR fixes a bug where ReleaseFiles would continue to reference draft data set versions after they had been deleted. This was due to a couple of issues:

  1. For v1+ data set versions, changes to the version number (e.g. when breaking changes are added) were not being made to the ReleaseFile.PublicApiDataSetVersion column as well. We now update this when the version number changes.
  2. The incorrect version number was being used when querying for ReleaseFile.PublicApiDataSetVersion. We were querying with the 'public' version number (using non-standard major.minor), whereas the PublicApiDataSetVersion is stored with a standard semversion number (using major.minor.patch).

To help differentiate between these two version numbers better we've made the following changes to DataSetVersion:

  • Version getter is now PublicVersion (the major.minor number)
  • FullSemanticVersion method is now SemVersion (the major.minor.patch number)

Breaking changes ⚠️

As part of this, the blob / file storage path has been changed to use the semversion, rather than the public version. This is a breaking change to existing file paths on dev.

Existing API data set versions will be affected until we clear down the files, otherwise, new API data set versions should work.

Why have patch version numbers?

Currently, we don't use patch version numbers, but we may need these in the future so we're trying to support them as early as possible in case.

One potential use case are data file replacements where we may want to update the underlying data. A data replacement could be considered a bug fix for data and hence has parallels with patch versions.

Replacements are currently not supported by API data sets, but they will be considered further in post-MVP.

@ntsim ntsim force-pushed the ees-5416 branch 2 times, most recently from 929aaef to 2a3c8fa Compare August 16, 2024 15:20
@ntsim ntsim requested a review from benoutram August 19, 2024 11:22
@ntsim ntsim force-pushed the ees-5416 branch 2 times, most recently from bcaa881 to 8d5ab2d Compare August 19, 2024 12:01
@ntsim ntsim merged commit 81e0c79 into dev Aug 19, 2024
7 checks passed
@ntsim ntsim deleted the ees-5416 branch August 19, 2024 16:43
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.

2 participants