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

job plan output missing diff on scaling block #18008

Closed
tgross opened this issue Jul 20, 2023 · 3 comments · Fixed by #18332
Closed

job plan output missing diff on scaling block #18008

tgross opened this issue Jul 20, 2023 · 3 comments · Fixed by #18332
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli theme/scheduling type/bug

Comments

@tgross
Copy link
Member

tgross commented Jul 20, 2023

When a nomad job plan results in an update, the diff between the old and new is shown even if the update is an in-place update (one that doesn't replace the allocation). For example, and update to an update block looks like this:

$ nomad job plan httpd.nomad.hcl
+/- Job: "httpd"
+/- Task Group: "web" (1 in-place update)
  +/- Update {
        AutoPromote:      "false"
        AutoRevert:       "false"
        Canary:           "0"
        HealthCheck:      "checks"
        HealthyDeadline:  "300000000000"
    +/- MaxParallel:      "1" => "2"
        MinHealthyTime:   "30000000000"
        ProgressDeadline: "600000000000"
      }
      Task: "http"
...

But when changes are made to the scaling block, they're not reported in the diff even though the scheduler correctly identifies an in-place update:

$ nomad job plan httpd.nomad.hcl
+/- Job: "httpd"
+/- Task Group: "web" (1 in-place update)
  Task: "http"

...

This issue was raised internally and the above outputs are from near the HEAD of main. Not sure which versions are impacted but likely to be from whenever we first introduced scaling.

@nvanthao
Copy link
Contributor

nvanthao commented Aug 23, 2023

Hi @tgross ,

I'm seeing this on at least 3 versions: 1.4.3, 1.5.6 and 1.6.1

Looks like we have no diff implemented for scaling block

func (tg *TaskGroup) Diff(other *TaskGroup, contextual bool) (*TaskGroupDiff, error) {

I would like to work on this bug. Please let me know if you have any concern.

@lgfa29
Copy link
Contributor

lgfa29 commented Aug 23, 2023

Hi @nvanthao 👋

Thank you for the interest! I don't think there's any specific concerns here, and your assessment seems correct. Feel free to work on a PR to fix this and let us know if you need any help 🙂

@lgfa29 lgfa29 added the stage/accepted Confirmed, and intend to work on. No timeline committment though. label Aug 23, 2023
@lgfa29 lgfa29 added this to Needs Triage in Nomad - Community Issues Triage via automation Aug 23, 2023
@lgfa29 lgfa29 moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Aug 23, 2023
@nvanthao
Copy link
Contributor

Thanks @lgfa29 I'm working on this now and will update us with the PR later.

@nvanthao nvanthao linked a pull request Aug 25, 2023 that will close this issue
Nomad - Community Issues Triage automation moved this from Needs Roadmapping to Done Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli theme/scheduling type/bug
Projects
Development

Successfully merging a pull request may close this issue.

3 participants