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

scaling policy: use request namespace as target if unset in jobspec #24065

Merged
merged 2 commits into from
Oct 1, 2024

Commits on Sep 27, 2024

  1. scaling: use request namespace as target if unset in jobspec

    When jobs are submitted with a scaling policy, the scaling policy's target only
    includes the job's namespace if the `namespace` field is set in the jobspec and
    not from the request. Normally jobs are canonicalized in the RPC handler before
    being written to Raft. But the scaling policy targets are instead written during
    the conversion from `api.Job` to `structs.Job`. We populate the `structs.Job`
    namespace from the request here as well, but only after the conversion has
    occurred. Swap the order of these operations so that the conversion is always
    happening with a correct namespace.
    
    Fixes: #24039
    tgross committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    55b924d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b56ca83 View commit details
    Browse the repository at this point in the history