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

Appropriate default for JOB_CONFIGURATION_FILE #1438

Open
sbliven opened this issue Oct 14, 2024 · 0 comments
Open

Appropriate default for JOB_CONFIGURATION_FILE #1438

sbliven opened this issue Oct 14, 2024 · 0 comments
Labels
enhancement New feature or request Release Jobs Jobs migration
Milestone

Comments

@sbliven
Copy link

sbliven commented Oct 14, 2024

Appropriate default for JOB_CONFIGURATION_FILE

Summary

SciCat should have an appropriate default job configuration.

Current Behaviour

The job configuration file is read from the JOB_CONFIGURATION_FILE. It currently defaults to (src/config/configuration.ts:47):

  const jobConfigurationFile =
    process.env.JOB_CONFIGURATION_FILE ||
    ("src/jobs/config/jobConfig.example.json" as string);

This was convenient for development, but should now be set to a secure final value.

Expected Behaviour

I would say that the default behavior when JOB_CONFIGURATION_FILE is unset should be to look for "jobConfig.json" in the current directory. This mirrors the location for functionalAccounts.json. If the file is not found it should be treated as an empty config, eg

{
  "configVersion": "",
  "jobs": []
}

If #1120 is implemented then Scicat checks for ./jobConfig.{json,yaml,yml} and uses the first one found.

If JOB_CONFIGURATION_FILE is set then it is loaded. An error should be thrown if the file is not found.

@sbliven sbliven added enhancement New feature or request Release Jobs Jobs migration labels Oct 14, 2024
@sbliven sbliven added this to the Release Jobs milestone Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Release Jobs Jobs migration
Projects
Status: Todo
Development

No branches or pull requests

1 participant