Page MenuHomeDevCentral

Alkane definition of the error message
Open, NormalPublic

Description

When init.sh and update.sh are missing, Alkane correctly reports OS error "No such file or directory".

It could be an opportunity to help the user with the expected location of the recipe script.

      ID: www_admin_mail_build
Function: cmd.run
    Name: alkane deploy admin.mail.nasqueron.org
  Result: False
 Comment: Command "alkane deploy admin.mail.nasqueron.org" run
 Started: 18:28:43.434874
Duration: 23.851 ms
 Changes:   
          ----------
          pid:
              73476
          retcode:
              2
          stderr:
              [2024-06-12T18:28:43Z ERROR alkane::runner] Process can't spawn: Os { code: 2, kind: NotFound, message: "No such file or directory" }
          stdout:

Event Timeline

dereckson triaged this task as Normal priority.
dereckson updated the task description. (Show Details)
dereckson added a project: good-first-issue.
dereckson added a subscriber: dereckson.

Hi, would love to work on this task. Can anyone provide anymore information please?

Hi Luca :)

Welcome aboard.

Alkane

Alkane is a tool we use to deploy websites. It runs shell or Python scripts containing deployment instruction. The goal is to be able to deploy sites the same way regardless if it's triggered from our configuration as code system (Salt) or CD system (Jenkins).

To create the change, you can follow https://agora.nasqueron.org/How_to_contribute_code

Alkane repository is located at rALK.

Error context

Alkane runs an external script on the server.

When that script doesn't exist, the error in the description is triggered by this line of source code: https://devcentral.nasqueron.org/source/alkane/browse/main/src/runner/mod.rs$96

In the description above, Alkane was called through our configuration as code, but we can repro it from command line too:

$ alkane deploy admin.mail.nasqueron.org
[2024-… ERROR alkane::runner] Process can't spawn: Os { code: 2, kind: NotFound, message: "No such file or directory" }

That error would be more informative if the full path of the command it tries to run is added to the error message, so we would directly know what file is missing.

The reason we use a logging library and don't print the error directly is the same code can be called from CLI or HTTP.