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

Use ResourceLoader to ingest compose files #592

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mjaethers
Copy link

Related to PR #555 and Issue #554

To achieve consistency in the way resources are loaded for docker compose the config files are now ingested via ResourceLoader. For local files the existing localResourceLoader is used.

To add new ways of loading compose files in the future a new ResourceLoader should be implemented and added to the project options.

Signed-off-by: Matthew Humphreys <ge65yay@tum.de>
Copy link
Collaborator

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

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

need to experiment a bit with it, but LGTM in general design

}
local, err := loader.Load(ctx, p)
if err != nil {
continue
Copy link
Collaborator

Choose a reason for hiding this comment

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

why ignore error ?

Copy link
Author

Choose a reason for hiding this comment

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

My thinking was that if Load() failed it would make sense to simply keep trying with another ResourceLoader as it could be caused by an overzealous Accept() implementation, but I realize now that the way it is currently set up if all the Load()s fail there'll be no error thrown until it tries to read an empty compose.

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.

None yet

2 participants