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-5442 - updating file storage path to reflect updates to a next DataSetVersion's version number #5183

Conversation

duncan-at-hiveit
Copy link
Collaborator

This PR:

  • adds an additional stage to the final import orchestration of a next DataSetVersion, in which the storage directory path is updated to reflect any changes in the DataSetVersion's version number during its mapping phase.
  • if the version number is unchanged from the default version number originally assigned when the next DataSetVersion was created, no path update is necessary.

Thereafter, the import process should continue as usual, using the now-updated file storage path.

I've added a convenience `DataSetVersion.DefautlNextVersion()" method which will give us the expected next version number of a DataSetVersion (using the existing implementation of updating the minor version). We can then use this method to assign a default version number to a brand new next DataSetVersion, plus use it again to get the default file storage path that may or may not need updating prior to completing the import process.

@duncan-at-hiveit duncan-at-hiveit force-pushed the EES-5442-update-version-in-file-storage-path-before-final-import branch 2 times, most recently from df82a16 to 56b6634 Compare August 28, 2024 13:43
@@ -3,6 +3,7 @@
using GovUk.Education.ExploreEducationStatistics.Public.Data.Processor.Extensions;
using GovUk.Education.ExploreEducationStatistics.Public.Data.Processor.Model;
using GovUk.Education.ExploreEducationStatistics.Public.Data.Services.Interfaces;
using LinqToDB;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Whilst this works, probably should be using SingleAsync from Microsoft.EntityFrameworkCore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Aha good spot, updated thanks.

@duncan-at-hiveit duncan-at-hiveit force-pushed the EES-5442-update-version-in-file-storage-path-before-final-import branch 2 times, most recently from 9b27956 to bef3172 Compare August 28, 2024 15:05
…taSetVersions latest version prior to final import
@duncan-at-hiveit duncan-at-hiveit force-pushed the EES-5442-update-version-in-file-storage-path-before-final-import branch from bef3172 to c79f1a3 Compare August 28, 2024 15:10
@duncan-at-hiveit duncan-at-hiveit merged commit 02cca5b into dev Aug 28, 2024
7 checks passed
@duncan-at-hiveit duncan-at-hiveit deleted the EES-5442-update-version-in-file-storage-path-before-final-import branch August 28, 2024 15:21
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