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

Always post model version info on worker startup (platform 1) #949

Closed
wants to merge 3 commits into from

Conversation

sambles
Copy link
Contributor

@sambles sambles commented Jan 17, 2024

Always post model version info on worker startup

Added new environment variable OASIS_DISABLE_WORKER_SETTINGS_REG={True | False}. When set to true a workers model_settings.json file is skipped when a worker connects to a queue.

Example:

OASIS_DISABLE_WORKER_SETTINGS_REG=True   # Only disables sending `model_settings`
OASIS_DISABLE_WORKER_REG=False           # Disables all registration (when true, nothing is sent to the API) 

With the above set when a worker joins a queue it will:

  • Check the API for a model entry in the DB (supplier, name, version)
  • If not found, creates a new model
  • Adds the oasis component versions to the API DB
Example: worker image tagged 1.28.4
curl -X 'GET' 'http://localhost:8000/api/v1/models/2/versions/'
{
  "ver_ktools": "fmcalc : version: 3.11.0 - git update: ",
  "ver_oasislmf": "1.28.4",
  "ver_platform": "1.28.4"
}

@sambles sambles added the Enhancement Small improvement or refinement. label Jan 17, 2024
@sambles sambles self-assigned this Jan 17, 2024
@sambles sambles linked an issue Jan 17, 2024 that may be closed by this pull request
@sambles sambles changed the title Always post model version info on worker startup (backpork) Always post model version info on worker startup (backport) Jan 17, 2024
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@sambles sambles changed the title Always post model version info on worker startup (backport) Always post model version info on worker startup (platform 1) Jan 17, 2024
@sambles sambles marked this pull request as draft January 17, 2024 14:57
@sambles
Copy link
Contributor Author

sambles commented Jan 30, 2024

Not needed

@sambles sambles closed this Jan 30, 2024
@sambles sambles deleted the fix/model-versions-autoreg_backport branch January 30, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Fetch a model's versions when auto-registration is disabled
1 participant