Story #7621

[API] Job model validates that the script exists in the repository at script_version

Added by Brett Smith over 3 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
Start date:
10/21/2015
Due date:
% Done:

0%

Estimated time:
Story points:
1.0

Description

Functional requirements

This should be an inexpensive check, and it could help shorten the debug cycle for common job setup problems. e.g., script not under crunch_scripts/, wrong branch specified in script_version, etc.

On job creation or relevant update, validate:

  • The specified script exists
  • It has the executable bit set

Implementation

When the API server is checking the repository, use git ls-tree to verify that the script exists and is executable at the specified script_version.

Verify that this works on Git 1.7.10. If it doesn't, figure out when the necessary Git functionality was added, and document that version requirement.


Related issues

Related to Arvados - Bug #7620: [Crunch] crunch-job expect the scripts under a non-existing crunch_scripts/ folderClosed2015-10-21

History

#1 Updated by Brett Smith about 3 years ago

  • Description updated (diff)

#2 Updated by Brett Smith about 3 years ago

  • Target version set to Arvados Future Sprints

#3 Updated by Tom Clegg about 3 years ago

tom@host:~/src/arvados/.git (GIT_DIR!)$ git ls-tree master crunch_scripts/foo; echo $?
0
tom@host:~/src/arvados/.git (GIT_DIR!)$ git ls-tree master crunch_scripts/hash; echo $?
100755 blob cdd5ebaff27781f93ab85e484410c0ce9e97770f    crunch_scripts/hash
0

#4 Updated by Brett Smith about 3 years ago

  • Description updated (diff)
  • Story points set to 1.0

Also available in: Atom PDF