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

fix: explicitly need to pull docker images, fixes #1525 #1526

Merged
merged 1 commit into from
May 17, 2024
Merged

Conversation

gak
Copy link
Contributor

@gak gak commented May 17, 2024

The output is a bit messy but it at least will show progress, rather than hiding the output.

@gak gak requested a review from alecthomas as a code owner May 17, 2024 04:26
@gak gak requested review from a team, deniseli and matt2e and removed request for a team May 17, 2024 04:26
@ftl-robot ftl-robot mentioned this pull request May 17, 2024
}
defer reader.Close()

_, err = io.Copy(os.Stderr, reader)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grab a logger from the context with logger := log.FromContext(ctx) and use logger.WriterAt(log.Info) to get a writer that will go through the logger.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From memory the output is designed for a terminal though, but I think there's an option to modify it...maybe? Should be fine for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, still messy but at least it's going through the logger.

@@ -151,6 +151,11 @@ func (s *schemaImportCmd) setup(ctx context.Context) error {
}
_ = l.Close()

err = container.Pull(ctx, "ollama/ollama")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL we are using ollama

@matt2e matt2e added the approved Marks an already closed PR as approved label May 17, 2024
@gak gak force-pushed the gak/docker-pull branch from 3d32ecd to 6e34cf9 Compare May 17, 2024 04:38
@gak gak merged commit 384c2e7 into main May 17, 2024
24 checks passed
@gak gak deleted the gak/docker-pull branch May 17, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Marks an already closed PR as approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants