-
Notifications
You must be signed in to change notification settings - Fork 29
When deleting layers, move referenced data #8437
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
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
2552b5c
Handle simplest case, one layer with symlink to deleted layer
frcroth 7edc95a
Handle other layers that also link to removed dataset
frcroth 9f8b0fe
Move and relink mags
frcroth b718bed
Rewrite datasource properties for locally explored layers
frcroth 2be93a5
Fix handling of mag, update changelog
frcroth 2437fc3
Merge branch 'master' into move-symlinks-on-dataset-delete
frcroth f6edac4
Revert changes to application.conf
frcroth 41ba8ff
Remove code duplication
frcroth 6c54a51
Add logs whenever something is deleted
frcroth ab0ab84
Make remoteWkClient non optional
frcroth 6d45d08
Throw exceptions when write permission is not given
frcroth 6572e32
Merge branch 'master' into move-symlinks-on-dataset-delete
frcroth 8d14be3
Handle deletion of fully linked layer with all mags seperately linked
frcroth d026b65
fix format
frcroth 1f59a64
Merge branch 'master' into move-symlinks-on-dataset-delete
frcroth cbb431d
Merge branch 'master' into move-symlinks-on-dataset-delete
frcroth b3de4af
Merge branch 'master' into move-symlinks-on-dataset-delete
fm3 f6c5123
improve error msg on realpath scan
fm3 30f0d0f
Apply suggestions from code review
frcroth 14f8a82
Handle non-compact mag paths
frcroth 1711604
Merge branch 'master' into move-symlinks-on-dataset-delete
frcroth 6f7e6bd
Prevent exception on empty reduce
frcroth d808612
Merge branch 'master' into move-symlinks-on-dataset-delete
frcroth e104ab2
Merge branch 'master' into move-symlinks-on-dataset-delete
frcroth 4776358
Handle edge case of fully linked layer with symlinked mags and not mo…
frcroth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Ensure proper test coverage for new endpoint.
This new endpoint is critical for managing layer symlinks during deletion operations. Ensure comprehensive test coverage exists to verify its behavior with various dataset and layer configurations.
🏁 Script executed:
Length of output: 103
Action Required: Add Comprehensive Tests for the
getPaths
EndpointIt appears that no tests referencing the new
getPaths
endpoint or its usage ofLayerMagLinkInfo
were found in the test suite. Since this endpoint is critical for managing layer symlinks during deletion operations, please ensure that comprehensive tests are added to verify the behavior with various dataset and layer configurations.app/controllers/WKRemoteDataStoreController.scala
(lines 240-255)validateAccess
) correctly gates the endpoint.organizationDAO
,datasetDAO
, anddatasetLayerDAO
behave as expected.LayerMagLinkInfo
with varying dataset and layer scenarios.💡 Verification agent
🧩 Analysis chain
Add documentation and consider performance optimizations.
The implementation of
getPaths
is well-structured and follows the existing patterns in the controller. However, there are a few improvements to consider:Fox.serialCombined
performs operations sequentially, which could be a performance bottleneck with many layers - consider if these operations could be parallelizedConsider verifying if parallel execution using
Fox.combined
instead ofFox.serialCombined
is appropriate for this case:🏁 Script executed:
Length of output: 23365
Attention: Required changes on getPaths method for parallel execution
The updated method documentation is a good improvement, and parallelizing the data layer lookups can boost performance. However, based on our investigation:
Parallel Execution: The current diff replaces the sequential call
with
However, the definition of
Fox.combined
in our codebase expects a sequence ofFox[T]
values (i.e. a single-argument list). To safely execute these operations in parallel, please refactor the call by mapping the function over the layers before combining the results. For example, update the call to:This change ensures that each lookup is executed concurrently according to
Fox.combined
’s signature.Error Handling: While the core logic remains sound, please verify that comprehensive error handling is applied to all database operations to avoid unhandled failures.
Please incorporate these changes to resolve the concerns.