valohai / valohai-cli

:heavy_dollar_sign: Command line client for Valohai
MIT License
14 stars 8 forks source link

Commits not recognized in projects with custom yaml paths #241

Closed noorula closed 2 years ago

noorula commented 2 years ago

When running a non-adhoc execution from the cli in a project with custom path for valohai.yaml you get the following error:

😩  Warning: Commit 5cd5042ec25980e1b9f32c2978f3dc8bc2e9ed0e is not known for the project. Have you pushed it?
Aborted!

It also seems that when fetching the repository to the project, there is a suffix added to the commit hash. Could this be the problem?

😊  Success! Fetched: main (5cd5042ec25980e1b9f32c2978f3dc8bc2e9ed0e-mysubdir)
😊  Success! 1 new commits were fetched!

Running the execution from the UI and as an adhoc job both work fine.

ruksi commented 2 years ago

I was unable to reproduce the issue, could I get a bit more information e.g. the customer project and commands they ran?

  1. I created a new git repo for a new Valohai project: https://github.com/ruksi/cosa-nostra and using gun-trade/valohai.yaml as the YAML path (there is no root valohai.yaml)
  2. ran vh exec run greet
  3. It worked:
=>   /home/ruksi/Projects/cosa-nostra/valohai.yaml does not exist, assuming remote project
=>   Using project cosa-nostra in remote mode (in /home/ruksi/Projects/cosa-nostra)
=>   Using remote project cosa-nostra's newest commit 8c00d1fd134d5e48f7b11d68afd748ec1b2f296d-gun-trade
😁  Success! Execution #3 created. See http://127.0.0.1:8000/p/mafia/cosa-nostra/execution/018442d3-9da1-b386-4749-78622e1c5a50/
ruksi commented 2 years ago

Did they manually specify the --commit or something?

noorula commented 2 years ago

I was able to repro this myself yesterday. 🤔 It's an old project with old Git repo that I reorganized, i.e. created a new subdirectory for the valohai.yaml as that is what the customer is trying to do as well. I wonder if that's the difference here?

ruksi commented 2 years ago

:thinking: maybe it's related to local vs remote mode, I'll try to replicate it a bit more

drazendee commented 2 years ago

(related to Zendesk ticket #1145)