Repository navigation
Refuse PUTs into missing buckets, check new bucket names, and move the health check - #187
Merged
Merged
Conversation
…e health check An S3 PUT into a bucket that doesn't exist now fails with NoSuchBucket, as in S3, instead of creating the bucket. A new bucket's name must follow S3's naming rules. Buckets an older build created keep working. The health check moved to /-/health, so a bucket named health can be listed. Fixes #164
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #164
404 NoSuchBucket, as in S3. It used to create the bucket, so a typo made a bucket you couldn't find or remove. The check runs before the body is stored..., and not an IP address. OtherwiseInvalidBucketName, with a message that says the rules./healthto/-/health. A new bucket's name can't start with-, so it can't hide a bucket. A bucket namedhealthlists like any other.Tests: new HTTP tests cover a PUT into a missing bucket (404, data log unchanged), the naming rules, old bucket names, and the health route. Existing tests now create their buckets first, and the one and two letter bucket names in them became valid names. Eight mutants each fail a test: no bucket check on PUT, no name check, and dropping the IP, double dot, edge or length rule. Also checking old names on create, and the health route back at
/health. I ran the quick start, curl and boto3 by hand againstserve-s3.Docs: CHANGELOG, QUICKSTART_S3, and the write table in on-disk-format §6.