Skip to content

Handle simultaneous update and deprecate/restore - #79

Merged
MJGaughran merged 4 commits into
mainfrom
hla-1150-simultaneous-update-deprecate
Sep 3, 2026
Merged

MJGaughran merged 4 commits into
mainfrom
hla-1150-simultaneous-update-deprecate

Conversation

@MJGaughran

Copy link
Copy Markdown
Contributor

At the moment, if you update a Module's contents as well as deprecate or restore it, only the update takes effect on sync. This means that the compare command will fail the next time it is run, as the modulefile is not in the correct location.

This only needed a fix to validation as deploy was already capable of handling Modules that fell into more than one category.

When creating the tests, it was clear that some places used "active" and others "live" to refer to a non-deprecated module, so I have cleared this up.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.48%. Comparing base (4f5ee44) to head (08fde82).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
- Coverage   99.48%   99.48%   -0.01%     
==========================================
  Files          27       27              
  Lines         979      978       -1     
==========================================
- Hits          974      973       -1     
  Misses          5        5              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptsOSL ptsOSL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me.

Out of curiosity, is it possible to create a new release with deprecated=true? And could this cause issues

@MJGaughran

MJGaughran commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Looks good to me.

Out of curiosity, is it possible to create a new release with deprecated=true? And could this cause issues

You can with --from-scratch or --allow-all.

We don't explicitly test it for a new deployment, but as --from-scratch implies --allow-all, this particular case is covered in the test: https://github.com/DiamondLightSource/deploy-tools/blob/main/tests/test_validate.py#L82

@MJGaughran
MJGaughran merged commit 484c9dd into main Sep 3, 2026
11 checks passed
@MJGaughran
MJGaughran deleted the hla-1150-simultaneous-update-deprecate branch September 3, 2026 17:29
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