Skip to content
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

Print status messages when pulling quickstart image #1546

Merged
merged 5 commits into from
Aug 16, 2024

Conversation

elizabethengelman
Copy link
Contributor

@elizabethengelman elizabethengelman commented Aug 14, 2024

What

Closes #1354

To make sure that the user is aware if they are using an up-to-date version of the quickstart image or not, this PR adds some additional logging with that information.

when the image is on the local machine

with internet connection

$ stellar network container start local
ℹ️ Starting local network
ℹ️ Pulling from stellar/quickstart
ℹ️ Digest: sha256:12d852bb5224f72415cb74624eabc2220c83cd16b2ea50646a6b078b219c430e
ℹ️ Status: Image is up to date for stellar/quickstart:testing
✅ Started container
🔎 Watch logs with `stellar network container logs local`
ℹ️ Stop the container with `stellar network container stop local`

without internet connection

$ stellar network container start local
ℹ️ Starting local network
⚠️ Failed to fetch image from dockerhub.
⚠️ Attempting to start local quickstart image instead. Please note this image may be out-of-date.
✅ Started container
🔎 Watch logs with `stellar network container logs local`
ℹ️ Stop the container with `stellar network container stop local`

when the image has not been pulled to the machine

with internet connection

$ stellar network container start local
ℹ️ Starting local network
ℹ️ Pulling from stellar/quickstart
ℹ️ Digest: sha256:12d852bb5224f72415cb74624eabc2220c83cd16b2ea50646a6b078b219c430e
ℹ️ Status: Downloaded newer image for stellar/quickstart:testing
✅ Started container
🔎 Watch logs with `stellar network container logs local`
ℹ️ Stop the container with `stellar network container stop local`

without internet connection

$ stellar network container start local
ℹ️ Starting local network
⚠️ Failed to fetch image from Docker Hub.
⚠️ Attempting to start local quickstart image instead. Please note this image may be out-of-date.
error: ⛔ ️Failed to create container: Docker responded with status code 404: No such image: stellar/quickstart:testing

Why

#1354 was to make sure that users are easily able to use the most up-to-date version of a given quickstart image. Since we were already doing docker pull and docker run on stellar network container start this is happening already by default, but was not very clear. This PR aims to make that a bit more visible. Also its important to note that if the user already has the most recent version of an image tag, it will not re-download it, but will just verify the local image's digest vs dockerhub to make sure that it's up-to-date.

Known limitations

n/a

@elizabethengelman elizabethengelman force-pushed the feat/container-start-logging branch from 354e6ca to 67c08f7 Compare August 15, 2024 16:11
@elizabethengelman elizabethengelman requested review from leighmcculloch and fnando and removed request for leighmcculloch August 15, 2024 16:19
@elizabethengelman elizabethengelman marked this pull request as ready for review August 15, 2024 16:19
@elizabethengelman elizabethengelman force-pushed the feat/container-start-logging branch from 9a83de4 to fd53cbd Compare August 15, 2024 16:30
@elizabethengelman elizabethengelman merged commit 5254c13 into stellar:main Aug 16, 2024
26 checks passed
@elizabethengelman elizabethengelman deleted the feat/container-start-logging branch August 16, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Automatically update quickstart to use the latest image
2 participants