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

jobspec: add diff for Task Group Scaling block #18332

Merged
merged 2 commits into from
Aug 28, 2023
Merged

Conversation

nvanthao
Copy link
Contributor

@nvanthao nvanthao commented Aug 25, 2023

Without this diff nomad job plan won't report changes in scaling block.

Before:

$ nomad job plan job.hcl
+/- Job: "foo"
+/- Task Group: "foo" (1 create, 1 in-place update)
  +/- Count: "1" => "2" (forces create)
      Task: "foo"

After:

nomad job plan job.hcl
+/- Job: "foo"
+/- Task Group: "foo" (1 create, 1 in-place update)
  +/- Count: "1" => "2" (forces create)
  +   Scaling {
      + Enabled: "true"
      + Max:     "10"
      + Min:     "2"
      + Policy {
        + check[0][active_connections][0][query]:                                "scalar(open_connections_example_cache)"
        + check[0][active_connections][0][source]:                               "prometheus"
        + check[0][active_connections][0][strategy][0][target-value][0][target]: "20"
        + cooldown:                                                              "1m"
        + evaluation_interval:                                                   "5s"
        }
      }
      Task: "foo"

This PR is only for diff in TaskGroup Scaling block and not diff in Task Scaling block.

@nvanthao nvanthao requested a review from lgfa29 August 25, 2023 14:01
@nvanthao nvanthao self-assigned this Aug 25, 2023
@nvanthao nvanthao linked an issue Aug 25, 2023 that may be closed by this pull request
@lgfa29 lgfa29 added backport/1.4.x backport to 1.4.x release line backport/1.5.x backport to 1.5.x release line backport/1.6.x backport to 1.6.x release line labels Aug 28, 2023
Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix @nvanthao 😄

@nvanthao
Copy link
Contributor Author

many thanks @lgfa29!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.4.x backport to 1.4.x release line backport/1.5.x backport to 1.5.x release line backport/1.6.x backport to 1.6.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

job plan output missing diff on scaling block
2 participants