-
Notifications
You must be signed in to change notification settings - Fork 90
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
Package name validation #1998
Merged
Merged
Package name validation #1998
Changes from 18 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
7a95e2e
use NameInput and CommitInput
fiskus 3537771
use helperText prop
fiskus ecc7b19
more straight edge between 3 levels of abstraction
fiskus 40ffbf8
show warning when package already exists
fiskus 2343072
use specific components
fiskus 6c9a2f9
persistent package name
fiskus 0a0eb9e
tune up warning messages
fiskus 09316a5
remove unused validator
fiskus a6ebd87
workaround for react-form bug on losing focus
fiskus dfcb895
cosmetic change
fiskus 78a5cf4
tweak text
fiskus 93d0843
fix async/await bug
fiskus 752c41b
Merge branch 'master' of github.com:quiltdata/quilt into package-name…
fiskus e668c35
skip name validation when name is not modified
fiskus 00f54e9
onChanged -> onChange
fiskus d34c442
revert workaround for infinite spinner
fiskus 6d09e95
manually manage validating state
fiskus 1715499
remove flickering
fiskus 102a540
Merge branch 'master' of github.com:quiltdata/quilt into package-name…
fiskus f00cd4b
check if package is present
fiskus 687e8a1
reset state onExit
fiskus 4018020
Consistency
fiskus 726cd8f
check of package revisions list
fiskus f77aac5
use listOfObjects directly
fiskus 998ea32
merge with master
fiskus 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
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
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
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
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.
i think we should check for package existence here, not for data existence (either by querying the package index or listing the
.quilt/named_packages/$handle
dir)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 don't know anything about this, please, provide more details
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.
see the contents of
.quilt/named_packages
dir: it has all the packages registered in the bucket and has the$handle/$pointer_file
structure, so to check if the package exists in the bucket you should list objects under.quilt/named_packages/$handle/
prefix -- if there are any, the package exists, otherwise it does not.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've added method
requests.ensurePackageIsPresent
, where i check for.quilt/named_packages/package_name/latest
.headObject(".quilt/named_packages/package_name")
(just directory, without package revision) suddenly doesn't workThere 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 think listing revisions is more reliable, bc the
latest
tag may be absent for some reasonthat's expected, bc head request only works for objects, and there's no such object, there's only prefix, so you should use
listObjectsV2
for that prefix (you can limit number of keys to 1 to just see if there's anything under that prefix, no matter what)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 changed
requests.ensurePackageIsPresent
. Now it usesrequest.bucketListing
(which useslistObjectsV2
). I just check if any file under.named_packages/package_name