-
Notifications
You must be signed in to change notification settings - Fork 5
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
[DC-1117] Fix dataset name validation for createSnapshot #1703
Merged
s-rubenstein
merged 15 commits into
develop
from
sr/dc-1117-update-create-snapshot-endpoint
Jun 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6aedfa6
Fix dataset name validation for createSnapshot
s-rubenstein eca193a
Fetch datasets only once
s-rubenstein fed6d6f
Make source dataset a parameter for createSnapshot flight
s-rubenstein 2187ad2
Only pass around ID
s-rubenstein a73de1a
Store ID
s-rubenstein f88070d
Pull lists
s-rubenstein e6af73c
Fix compilation
s-rubenstein 19e2cd4
Remove old comment
s-rubenstein defe7b5
Fix spotless
s-rubenstein 6175cbc
Fix tests
s-rubenstein a294a32
Merge branch 'develop' into sr/dc-1117-update-create-snapshot-endpoint
s-rubenstein a6b9413
Add bad request exception and content validation
s-rubenstein 41eae96
Fix merge
s-rubenstein 967ac74
Fix merge again and remove unused code
s-rubenstein f129d18
Fix grammar
s-rubenstein 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 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.
Now this is done both here and in
SnapshotCreateFlight
. If we need it in both places (and this is the only placeSnapshotCreateFlight
is called), then maybeDataset
should be a flight parameter.Also it looks like this work is repeated in the code that calls this, in
SnapshotApiController.createSnapshot()
: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.
Honestly, it looks like there's even a todo to move the auth check to the flight? The
Dataset
here is only used to set the default billing profile if there isn't one. I think this code could use some serious refactoring. Happy to get into it, but I think that might actually be pretty high scope creep because I would want to push a lot of this in there. Maybe tomorrow we can figure out what changes actually make sense to do? Or what work we are going to push if we want to prioritize the refactor. (Which might mean reprioritizing v2 createSnapshot)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.
I poked around with v2, definitely I would say is out of scope - that's a pretty serious refactor of how we do things. I am going to try to push some of the steps that are done in the controller and service into the job though, which might help.
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.
Would you take a look at #1705 when you have the chance? I think that's the real fix here.
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.
Discussed offline - I think we have more design to happen here.