jlewi / hydros

hydros automates hydrating and committing configuration
Apache License 2.0
4 stars 0 forks source link

hydros build doesn't work with relative path #73

Closed jlewi closed 5 months ago

jlewi commented 7 months ago

If I run the following command

hydros --dev-logger=true build -f image.yaml
2024-01-31T15:06:08.602-0800    INFO    images/controller.go:416    Resolved manifest path  {"manifestPath": "/Users/jlewi/git_roboweb/logbook/image.yaml", "basePath": "/Users/jlewi/git_roboweb/logbook"}

It appears to hang.

Using the full path works

hydros --dev-logger=true build -f /Users/jlewi/git_roboweb/logbook/image.yaml
jlewi commented 5 months ago

Its hanging here https://github.com/jlewi/hydros/blob/2d35fa0424852e34d4916568a9aaa5b46ddc75e4/pkg/images/controller.go#L423

Trying to locate the git root

jlewi commented 5 months ago

git locateRoot ends up being called on "image.yaml" Looks like there are two bugs

  1. git locateRoot doesn't abort
  2. We are calling locateRoot with the relative path not the absolute path.