-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(s3-asset): add httpUrl and s3ObjectUrl #7509
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
@eladb Mind having a quick look as well?
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.
LGTM
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.
@rix0rrr can you take a quick look? (probably conflicts with some of your changes)
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
2ebf967
to
3317f8b
Compare
Added the test as suggested. Another option would be something like this: const escape = (str: string) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
const region = escape(stack.region);
const urlSuffix = escape(stack.urlSuffix);
const bucketName = escape(assetLocation.bucketName);
const objectKey = escape(assetLocation.objectKey);
const {
httpUrl,
s3ObjectUrl,
s3Url,
} = assetLocation;
test.ok(RegExp(`^https://s3\.${region}\.${urlSuffix}/${bucketName}/${objectKey}$`).test(httpUrl));
test.ok(RegExp(`^s3://${bucketName}/${objectKey}$`).test(s3ObjectUrl));
test.equal(s3Url, httpUrl); // for backwards compatibility |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@christophgysin Looks like we (I) waited to long...and now there is a conflict. Can you have a look? Looks great otherwise 👍 |
@iliapolo I will update the PR |
3317f8b
to
f2c7dd6
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@eladb It seems that the Semantic Pull Request job is stuck? Is there anything I can do to move this forward? |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Commit Message
feat(s3-asset): add httpUrl/s3ObjectUrl (#7509)
fixes #7221
End Commit Message
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license