Skip to content

[webservice] Check run migration status using MyMDC

Cyril Danilevski requested to merge feat/mymdc_run_check into master

Description

This MR changes the run migration check from using filesystem attributes to using the better curated MyMDC database.

I've introduced an enum for describing the different storages (known as repositories in MyMDC parlance.) And I've reduced MigrationError quite a bit, perhaps it can go all together and be replaced with, dunno, AttributeError (although that's pushing the definition of attribute, here...)

For the functionality itself, it's worth remembering that there are always two copies of a run, if it's been migrated. It used to be:

  • online GPFS and offline GPFS;
  • offline GPFS and dCache-disk;
  • dCache-disk and dCache-tape (this one being transparent to us.)*

Recently, due to storage limitations, certain runs (namely commissioning runs), can now be directly copied to dCache-disk, resulting in any of:

  • online GPFS and offline GPFS;
  • offline GPFS and dCache-disk;
  • dCache-disk and dCache-tape;
  • and now online GPFS and dCache-disk.

When directly migrated to dCache-disk, we cannot make the assumption that the run has been fully migrated anymore, and filesystem attributes seem not to be supported, hence the need for checking against MyMDC for a better curated database.

  • further caveats when the retention policy of 10 years is reached.

How Has This Been Tested?

I've updated the integration tests and I've tested the feature against a patched MyMDC call, as the feature is not available on the production instance, and the test instance does not have this data!
So there should be some more testing against MyMDC proper that should be conducted.

Relevant Documents (optional)

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I added tests where appropriate.

Reviewers

@calibration

Merge request reports