compose app packgeLocation implementation - #280
Conversation
| discover_app_packages_from_harbor() { | ||
| echo "🔍 Discovering app packages from Harbor OCI Registry..." >&2 | ||
|
|
There was a problem hiding this comment.
Is it possible to have a separate PR for formatting the codebase?
|
|
||
| // Stop and remove container | ||
| removeCmd := exec.CommandContext(ctx, c.dockerBinary, "rm", "-f", containerID) | ||
| removeCmd := exec.CommandContext( |
There was a problem hiding this comment.
A lot of formatting happening in this file as well.
| var container ComposeContainer | ||
| if err := json.Unmarshal([]byte(line), &container); err != nil { | ||
| fmt.Printf("[DEBUG] Failed to parse line as JSON: %s, error: %v\n", line, err) | ||
| fmt.Printf( |
There was a problem hiding this comment.
Printf should be avoided in the library code. Either we should inject a logger, or create a multierror in this case and return it. Anyways, parsing should not fail as long as we don't have docker version incompatibility with the sdk.
| defer func() { | ||
| // errcheck: handle os.Remove error | ||
| if err := os.Remove(archivePath); err != nil && !os.IsNotExist(err) { | ||
| fmt.Printf("Warning: failed to remove archive: %v\n", err) |
There was a problem hiding this comment.
We can ignore this error, or seems like now we need to use the logger in the library code. Printf is not a good idea.
There was a problem hiding this comment.
I have removed this function
|
|
||
| tr := tar.NewReader(gzr) | ||
|
|
||
| composeNames := map[string]bool{ |
There was a problem hiding this comment.
This is good, but the generateAbsProjectFilepath still relies on docker-compose.yml, so need to introduce this change over there as well.
There was a problem hiding this comment.
Good catch, I have corrected this.
88bbc0a to
bbccac1
Compare
Signed-off-by: vireshnavalli <viresh-r.navalli@capgemini.com>
Signed-off-by: vireshnavalli <viresh-r.navalli@capgemini.com>
Signed-off-by: vireshnavalli <viresh-r.navalli@capgemini.com>
Signed-off-by: vireshnavalli <viresh-r.navalli@capgemini.com>
margo/specification#179
#272