Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some shell functions available to job scripts #3346

Open
hjoliver opened this issue Sep 3, 2019 · 1 comment
Open

Make some shell functions available to job scripts #3346

hjoliver opened this issue Sep 3, 2019 · 1 comment
Milestone

Comments

@hjoliver
Copy link
Member

hjoliver commented Sep 3, 2019

ref: #3336 (comment)

The poll function from tests/lib/bash/test_header is particularly useful (although it could do with modifying for flexible interval and timeout).

Options:

  • include some test_header functions in job.sh
    • automatically available to all jobs, but risk of unnecessary bloat?
  • put functions a new file, e.g. util.sh and either
    • source automatically alongside job.sh
    • or require users to explicitly source it in their job scripts
@hjoliver hjoliver added this to the cylc-9 milestone Sep 3, 2019
@hjoliver hjoliver mentioned this issue Sep 3, 2019
6 tasks
@oliver-sanders
Copy link
Member

include some test_header functions in job.sh

I'm quite cautious of building up infrastructure around the job script, particularly if we aspire to move away from the bash job submission script in the future.

or require users to explicitly source it in their job scripts

It's not that clunky:

[runtime]
    [[foo]]
        script = """
            . $CYLC_DIR/lib/bash/functions
            poll ...
        "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants