Repository navigation
fix: aws - cloudfront - wafv2-enabled scope, stamp .post1 #22
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,15 +26,16 @@ jobs: | |
| persist-credentials: false | ||
|
|
||
| # This repo only ever ships prereleases stamped with a +HASH local | ||
| # version segment (…aN+HASH). A version without both is a misconfiguration | ||
| # version segment (…aN+HASH, or …aN.postM+HASH for a hotfix on a | ||
| # release branch). A version without both is a misconfiguration | ||
| # — fail loudly before building or publishing anything. | ||
| - name: Assert prerelease version | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| version=$(grep -m1 '^version' pyproject.toml | cut -d'"' -f2) | ||
| if [[ ! "$version" =~ a[0-9]+[+][0-9a-zA-Z.]+$ ]]; then | ||
| echo "::error::cloud-custodian-prerelease must ship a stamped prerelease version (…aN+HASH); got '$version'" | ||
| if [[ ! "$version" =~ a[0-9]+(\.post[0-9]+)?[+][0-9a-zA-Z.]+$ ]]; then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Add automated coverage for this release guard's accepted and rejected version forms, including Prompt for AI agents
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Valid, but not fixing on the release branch will fix on mainline (stacklet/intergration) |
||
| echo "::error::cloud-custodian-prerelease must ship a stamped prerelease version (…aN+HASH or …aN.postM+HASH); got '$version'" | ||
| exit 1 | ||
| fi | ||
| echo "Releasing prerelease version $version" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| # Generated via tools/dev/devpkg.py | ||
| version = "0.9.52a5+a83dda5c9" | ||
| version = "0.9.52a5.post1+a83dda5c9" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| { | ||
| "status_code": 200, | ||
| "data": { | ||
| "ResponseMetadata": {}, | ||
| "DistributionList": { | ||
| "Marker": "", | ||
| "MaxItems": 100, | ||
| "IsTruncated": false, | ||
| "Quantity": 1, | ||
| "Items": [ | ||
| { | ||
| "Id": "E1EXAMPLE1234", | ||
| "ARN": "arn:aws:cloudfront::123456789012:distribution/E1EXAMPLE1234", | ||
| "Status": "Deployed", | ||
| "LastModifiedTime": { | ||
| "hour": 0, | ||
| "microsecond": 0, | ||
| "second": 0, | ||
| "year": 2024, | ||
| "month": 1, | ||
| "day": 1, | ||
| "minute": 0 | ||
| }, | ||
| "DomainName": "d111111abcdef8.cloudfront.net", | ||
| "Aliases": { | ||
| "Quantity": 0, | ||
| "Items": [] | ||
| }, | ||
| "Origins": { | ||
| "Quantity": 1, | ||
| "Items": [ | ||
| { | ||
| "Id": "S3-example", | ||
| "DomainName": "example-bucket.s3.amazonaws.com", | ||
| "OriginPath": "" | ||
| } | ||
| ] | ||
| }, | ||
| "DefaultCacheBehavior": { | ||
| "TargetOriginId": "S3-example", | ||
| "ViewerProtocolPolicy": "redirect-to-https" | ||
| }, | ||
| "CacheBehaviors": { | ||
| "Quantity": 0, | ||
| "Items": [] | ||
| }, | ||
| "CustomErrorResponses": { | ||
| "Quantity": 0, | ||
| "Items": [] | ||
| }, | ||
| "Comment": "", | ||
| "PriceClass": "PriceClass_All", | ||
| "Enabled": true, | ||
| "ViewerCertificate": { | ||
| "CloudFrontDefaultCertificate": true, | ||
| "MinimumProtocolVersion": "TLSv1", | ||
| "CertificateSource": "cloudfront" | ||
| }, | ||
| "Restrictions": { | ||
| "GeoRestriction": { | ||
| "RestrictionType": "none", | ||
| "Quantity": 0 | ||
| } | ||
| }, | ||
| "WebACLId": "arn:aws:wafv2:us-east-1:123456789012:global/webacl/example-cloudfront-acl/11111111-2222-3333-4444-555555555555", | ||
| "HttpVersion": "http2", | ||
| "IsIPV6Enabled": true | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "status_code": 200, | ||
| "data": { | ||
| "ResponseMetadata": {}, | ||
| "PaginationToken": "", | ||
| "ResourceTagMappingList": [ | ||
| { | ||
| "ResourceARN": "arn:aws:cloudfront::123456789012:distribution/E1EXAMPLE1234", | ||
| "Tags": [] | ||
| } | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "status_code": 200, | ||
| "data": { | ||
| "ResponseMetadata": {}, | ||
| "NextMarker": "", | ||
| "WebACLs": [ | ||
| { | ||
| "Name": "example-cloudfront-acl", | ||
| "Id": "11111111-2222-3333-4444-555555555555", | ||
| "Description": "", | ||
| "LockToken": "22222222-3333-4444-5555-666666666666", | ||
| "ARN": "arn:aws:wafv2:us-east-1:123456789012:global/webacl/example-cloudfront-acl/11111111-2222-3333-4444-555555555555" | ||
| } | ||
| ] | ||
| } | ||
| } |
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.
The new
.postMversion grammar has no automated coverage, even though this manually dispatched guard previously blocked releases after an untested regex change. This is non-blocking, but tests should cover ordinary stamped prereleases, stamped post releases, missing prerelease or local segments, and.postwithout digits to prevent another publishing failure.Knowledge Base Used: Require the release version hash stamp
Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
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.
Valid, but not fixing on the release branch will fix on mainline (stacklet/intergration)
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.
That makes sense. Since this PR is limited to the release-branch hotfix, keeping the release-guard coverage follow-up on
stacklet/integrationavoids expanding the backport. No further change is needed here.Tip: You can customize Greptile's behavior for this repo with
.greptile/rules.mdand.greptile/config.json.