jerryshao opened a new issue, #13587:
URL: https://github.com/apache/gravitino/issues/13587

   ### Describe the subtask
   
   The executable of a shell job template must be a file that the Gravitino 
server fetches into the job's staging directory. A template can't run a command 
that is already installed, such as `python` or `bash`, directly. It has to ship 
a wrapper script instead. A job executor that runs jobs in a prepared 
environment, such as a container image, needs the same ability.
   
   Treat a shell executable that is a bare command name, with no scheme and no 
`/` such as `python`, as a command to look up on the `PATH` of the environment 
the job runs in:
   
   - Add `JobResourceUtils#isCommandName(String)`, so every job executor 
follows the same rule.
   - `JobResourceUtils#localizeJobTemplate` keeps such an executable as is 
instead of fetching it. Scripts are still fetched into the staging directory, 
so a template like `python` + `job.py` runs `python` with the script next to it.
   - `ShellProcessBuilder` runs a command name through the `PATH` of the 
Gravitino server, and no longer tries to make it executable as a file.
   - Document the executable forms in `docs/manage-jobs-in-gravitino.md`.
   
   Behavior change: a shell template whose executable is a bare name used to 
fail because the file couldn't be fetched. It now runs the command.
   
   Depends on #13567.
   
   ### Parent issue
   
   #13554
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to