This repository was archived by the owner on Nov 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 301
Pull Endpoints image if it doesn't exist #786
Merged
Merged
Conversation
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
Contributor
Author
Manual Tests1. Image is not available locally$ docker images -f reference=amazon/amazon-ecs-local-container-endpoints
REPOSITORY TAG IMAGE ID CREATED SIZE
$ ecs-cli local up
INFO[0000] Creating network: ecs-local-network...
INFO[0015] Created network ecs-local-network with ID b42fe58c8a43cdd61c5c25baf0f83574803f0746df155dd84edfb3c6693e3024
INFO[0015] Pulling image amazon/amazon-ecs-local-container-endpoints
INFO[0018] Pulled image amazon/amazon-ecs-local-container-endpoints
INFO[0018] Created the amazon-ecs-local-container-endpoints container with ID fecd0d8bb61397c5882dbc6905053b6181bcb6e3654997a0e046f8198c46ffe2
INFO[0019] Started container with ID fecd0d8bb61397c5882dbc6905053b6181bcb6e3654997a0e046f8198c46ffe22. Image exists and we do "local up"$ docker images -f reference=amazon/amazon-ecs-local-container-endpoints
REPOSITORY TAG IMAGE ID CREATED SIZE
amazon/amazon-ecs-local-container-endpoints latest ccb85faf9315 7 weeks ago 17.4MB
$ ecs-cli local up
INFO[0000] The network ecs-local-network already exists
INFO[0000] The amazon-ecs-local-container-endpoints container already exists with ID fecd0d8bb61397c5882dbc6905053b6181bcb6e3654997a0e046f8198c46ffe2
INFO[0000] Started container with ID fecd0d8bb61397c5882dbc6905053b6181bcb6e3654997a0e046f8198c46ffe2 3. Image download fails due to a network failureI turned off my wifi while downloading the image here is the experience: $ ecs-cli local up
INFO[0000] The network ecs-local-network already exists
INFO[0000] Pulling image amazon/amazon-ecs-local-container-endpoints
FATA[0120] Failed to download the image amazon/amazon-ecs-local-container-endpoints due to context deadline exceeded |
| } | ||
| defer rc.Close() | ||
|
|
||
| ioutil.ReadAll(rc) |
Contributor
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.
How does this work?
https://golang.org/pkg/io/ioutil/#ReadAll seems to return two values, both of which are ignored here...
Contributor
Author
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.
After our discussion offline, I tested with turning off the wifi during img download (see 3. under Manual Tests). Added an error check here, thanks for pointing it out :)
PettitWesley
approved these changes
Jun 12, 2019
Contributor
PettitWesley
left a comment
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.
!
!
^
/ \
/___\
|= =|
| |
| |
| |
| |
| |
| |
| |
| |
| |
/|##!##|\
/ |##!##| \
/ |##!##| \
| / ^ | ^ \ |
| / ( | ) \ |
|/ ( | ) \|
(( ))
(( : ))
(( : ))
(( ))
(( ))
( )
.
.
.
hencrice
reviewed
Jun 12, 2019
hencrice
approved these changes
Jun 13, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description of changes:
As a user that's running
ecs-cli local upand doesn't have the amazon/amazon-ecs-local-container-endpoints downloaded locally.I want
ecs-cli local upto pull the image for me.So that I don't have to pull the image myself.
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Link to issue or PR for the integration tests:The integ tests need to pull the image to pass.Documentation
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.