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 · 4 comments · Fixed by #18332
Closed

job plan output missing diff on scaling block #18008

tgross opened this issue Jul 20, 2023 · 4 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
@nvanthao
Copy link
Contributor

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

Copy link

github-actions bot commented Jan 7, 2025

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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