-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Added requestId member on all CloudFrontEvent types #43696
Conversation
The requestId member is defined on all origin/viewer requests/responses, it is described here : https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html There is one example for each request/response and they all have a cf.config.requestId. Added new requests examples in tests in order to have all 4 types available
@nhodin Thank you for submitting this PR! Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. 🔔 @darbio @skarum @StefH @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase @repl-chris @aneilbaboo @jeznag @louislarry @dpapukchiev @ohookins @trevor-leach @jagregory @dalen @loikg @skyzenr @redlickigrzegorz @juancarbonel @pwmcintyre @alex-bolenok-centralreach @marianzange @apepper - please review this PR in the next few days. Be sure to explicitly select Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"pr_number": 43696,
"author": "nhodin",
"owners": [
"darbio",
"skarum",
"StefH",
"tobyhede",
"buggy",
"y13i",
"wwwy3y3",
"OrthoDex",
"MichaelMarner",
"daniel-cottone",
"kostya-misura",
"coderbyheart",
"palmithor",
"daniloraisi",
"simonbuchan",
"Haydabase",
"repl-chris",
"aneilbaboo",
"jeznag",
"louislarry",
"dpapukchiev",
"ohookins",
"trevor-leach",
"jagregory",
"dalen",
"loikg",
"skyzenr",
"redlickigrzegorz",
"juancarbonel",
"pwmcintyre",
"alex-bolenok-centralreach",
"marianzange",
"apepper"
],
"dangerLevel": "ScopedAndTested",
"headCommitAbbrOid": "6564ad3",
"headCommitOid": "6564ad32b7a2e1a1eed06cb419b3cf26582bc970",
"mergeIsRequested": true,
"stalenessInDays": 1,
"lastCommitDate": "2020-04-07T13:57:39.000Z",
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43696/files",
"hasMergeConflict": false,
"authorIsOwner": false,
"isFirstContribution": false,
"popularityLevel": "Popular",
"anyPackageIsNew": false,
"packages": [
"aws-lambda"
],
"files": [
{
"filePath": "types/aws-lambda/common/cloudfront.d.ts",
"kind": "definition",
"package": "aws-lambda"
},
{
"filePath": "types/aws-lambda/test/cloudfront-tests.ts",
"kind": "test",
"package": "aws-lambda"
}
],
"otherApprovalCount": 0,
"ownerApprovalCount": 2,
"maintainerApprovalCount": 0,
"hasDismissedReview": false,
"travisResult": "pass",
"reviewersWithStaleReviews": [],
"approvalFlags": 2,
"isChangesRequested": false
} |
@nhodin Thank you for submitting this PR! 🔔 @darbio @skarum @StefH @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase @repl-chris @aneilbaboo @jeznag @louislarry @dpapukchiev @ohookins @trevor-leach @jagregory @dalen @loikg @skyzenr @redlickigrzegorz @juancarbonel @pwmcintyre @alex-bolenok-centralreach @marianzange @apepper - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
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.
Looks good. I checked with the original PR that added them (#40355) to see the justification, and it specifically calls out the same documentation with "requestId is only available for viewer events", so it looks like either the docs were wrong or cloudfront has been updated since.
} & ( | ||
| { readonly eventType: 'origin-request' | 'origin-response' } | ||
| { readonly eventType: 'viewer-request' | 'viewer-response'; readonly requestId: string }); | ||
readonly eventType: 'origin-request' | 'origin-response'|'viewer-request' | 'viewer-response'; |
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.
completely trivial nit: spacing around the middle |
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.
Indeed, sorry... I am able to fix this before the merge ?
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.
It may require me to re-approve, but that's no problem.
@nhodin Everything looks good here. Great job! I am ready to merge this PR on your behalf.
and I'll merge it the next time I look at this PR. |
A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
@nhodin Everything looks good here. Great job! I am ready to merge this PR on your behalf.
and I'll merge it the next time I look at this PR. |
@simonbuchan Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
1 similar comment
@simonbuchan Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
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.
Looks like the bot has changed a little, and you can merge it yourself now! It also looks like it's detected there's isn't another review necessary, but just in case.
Thanks @simonbuchan ! But i don't find any Merge button in this page :( Is there another way to do it ? |
The bot is very new - and we're working out the copy and issues ATM. Can try following the directions in #43696 (comment) please @nhodin |
Ready to merge |
@orta thanks for your help, sorry that I didn't see that comment earlier.. |
You're welcome - there's a lot of noise, but I think this is the first from "0 -> Self Merge" we've seen. |
🎉 |
I just published |
The requestId member is defined on all origin/viewer requests/responses, it is described here : https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html
There is one example for each request/response and they all have a cf.config.requestId.
Added new requests examples in tests in order to have all 4 types availabl
npm test
.)npm run lint package-name
(ortsc
if notslint.json
is present).If changing an existing definition:
tslint.json
containing{ "extends": "dtslint/dt.json" }
. If for reason the any rule need to be disabled, disable it for that line using// tslint:disable-next-line [ruleName]
and not for whole package so that the need for disabling can be reviewed.