Skip to content

Incomplete error-handling in build-dev dagger function  #644

@adityachopra29

Description

@adityachopra29

I was testing out the new approach to build harbor-cli from source, which uses dagger commands, and they were not working out for me.

Error faced

I picked up the dagger command from the README:

Image
  • This got fixed quickly by adding the source flag in the command, after which I got the following error :
Image
  • As visible in the screenshot, The dagger command did not return any binary, and was neither giving any error as to why it was failing.

  • This is because of the following portion in the code :

Image

The build-dev command does not return any error log, when the init function is not working.
After making the relevant changes, I found out that my downstream had not cloned any of the tags, because of which the command:

git describe --tags --abbrev=0

was failing and hence everything was failing. On fixing this the build command was working successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions