Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Invalid endpoint in badge url when region is us-east-1 #1

Open
lorengordon opened this issue Feb 11, 2019 · 2 comments
Open

Invalid endpoint in badge url when region is us-east-1 #1

lorengordon opened this issue Feb 11, 2019 · 2 comments

Comments

@lorengordon
Copy link

s3-us-east-1 is not a valid S3 endpoint.

for phase in event['detail']['additional-information']['phases']:
if phase.get('phase-status') == 'FAILED':
badge = 'https://s3-{0}.amazonaws.com/codefactory-{0}-prod-default-build-badges/failing.svg'.format(event['region'])
content = '![Failing]({0} "Failing") - See the [Logs]({1})'.format(badge, event['detail']['additional-information']['logs']['deep-link'])
break
else:
badge = 'https://s3-{0}.amazonaws.com/codefactory-{0}-prod-default-build-badges/passing.svg'.format(event['region'])
content = '![Passing]({0} "Passing") - See the [Logs]({1})'.format(badge, event['detail']['additional-information']['logs']['deep-link'])

See:

https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region

@lorengordon
Copy link
Author

Well, may be immaterial, since CodeCommit (in us-east-1) does not resolve the image links anyway.

@j0lly
Copy link
Contributor

j0lly commented Feb 15, 2019

Hi @lorengordon thanks for reaching out with this.
You right, the s3 dns naming will breaks in us-east-1, let me change that.
As per your second comment, do you mind explaining what you did and what is not working?

Thanks,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants