Skip to content

Conversation

@aleh-null
Copy link
Collaborator

No description provided.

}
}

func TestToJSON2(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@aleh-null do we still need this test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably a good idea to have test on the actual dev container. WDYT of using https://github.com/marcozac/go-jsonc in the future?

Copy link
Collaborator

Choose a reason for hiding this comment

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

is it better?

Copy link
Collaborator Author

@aleh-null aleh-null left a comment

Choose a reason for hiding this comment

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

Just a rename suggesting. Otherwise LGTM.


// CheckLocalImage checks if an image with the given name exists locally.
// It returns true if the image exists, false if it doesn't, and an error if the check fails.
func (im *DockerImageManager) CheckLocalImage(ctx context.Context, name string) (bool, error) {
Copy link
Collaborator Author

@aleh-null aleh-null Sep 28, 2024

Choose a reason for hiding this comment

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

rename CheckLocalImage() -> LocalImageExists()

Copy link
Collaborator

Choose a reason for hiding this comment

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

done

return nil
}

func (r *DockerRunner) pullOrBuildImage(ctx context.Context, config Config, projectPath string) (string, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm, we do more that that. Maybe we should just abstract case config.IsImageDevContainer()

Copy link
Collaborator

Choose a reason for hiding this comment

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

extracted the IsImageDevContainer case in a separate method. we can abstract the whole image thing further into something like ImageProvider but i think it's an overkill for now.

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.

3 participants