Skip to content

Conversation

@davelopez
Copy link
Contributor

@davelopez davelopez commented May 24, 2023

Extracted from #16003

Restricts some mutation operations through the API on items that are purged or archived. This is probably not enforced thoroughly enough, but it should work for a significant number of situations that are already inconsistent.

For example, you can no longer drag and drop or copy datasets to a purged history.

TODO:

  • add some tests

How to test the changes?

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@davelopez davelopez added kind/enhancement kind/refactoring cleanup or refactoring of existing code, no functional changes area/API area/histories labels May 24, 2023
@davelopez davelopez mentioned this pull request May 24, 2023
4 tasks
Avoids some mutation operations through the API on items that are purged or archived.
@davelopez davelopez force-pushed the improve_history_immutability_checks branch from bc1d610 to 4cc9d48 Compare May 24, 2023 14:53
@davelopez davelopez marked this pull request as ready for review May 24, 2023 16:39
@github-actions github-actions bot added this to the 23.1 milestone May 24, 2023
@davelopez davelopez force-pushed the improve_history_immutability_checks branch from 66fcbb6 to 5837ae4 Compare May 24, 2023 18:17
@davelopez
Copy link
Contributor Author

I made checks for immutability in most of the places it seemed sensible to and added a bunch of tests trying to modify immutable histories and datasets belonging to these histories, running jobs, workflows, etc and it seems to work fine.

Of course, I may have missed other important locations so someone with 🦅 👁️ is very much appreciated 😊

Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

I don't think it's critical that we hit all the spots, so this looks great!

@davelopez
Copy link
Contributor Author

Thank you Marius! I will merge then!

@davelopez davelopez merged commit 1759e4c into galaxyproject:dev May 25, 2023
@davelopez davelopez deleted the improve_history_immutability_checks branch May 25, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/API area/histories kind/enhancement kind/refactoring cleanup or refactoring of existing code, no functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants