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

Feat: Allow local images #134

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Feat: Allow local images #134

merged 4 commits into from
Dec 2, 2024

Conversation

Meldiron
Copy link
Contributor

@Meldiron Meldiron commented Nov 30, 2024

In development mode, prevent pulling images.

If no image is pulled yet, first run will take extra time. But this gives great benefit when local images are different than remote. Without this change, executor always pulls latest from remote, overriding any local changes.

Manual QA:

CleanShot 2024-11-30 at 15 19 02@2x

Comment on lines +1494 to +1497
if (Http::getEnv('OPR_EXECUTOR_IMAGE_PULL', 'enabled') === 'disabled') {
// Useful to prevent auto-pulling from remote when testing local images
Console::info("Skipping image pulling");
} else {

Choose a reason for hiding this comment

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

Suggested change
if (Http::getEnv('OPR_EXECUTOR_IMAGE_PULL', 'enabled') === 'disabled') {
// Useful to prevent auto-pulling from remote when testing local images
Console::info("Skipping image pulling");
} else {
if (Http::getEnv('OPR_EXECUTOR_IMAGE_PULL', 'enabled') === 'disabled') {
// Useful to prevent auto-pulling from remote when testing local images
Console::info("Skipping image pulling");
return;
}

Can we do something like this to remove the else block and make a bit less indentation to make it readable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly not in this scenario, code continues to start http server.

I like the idea, and it is possible to allow this, but that would make PR diff even bigger and more complex. I would like to avoid that as I want this PR merged quickly.

@Meldiron Meldiron merged commit d5890b7 into main Dec 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants