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

docs: explain schedule state values #24160

Merged
merged 4 commits into from
Oct 17, 2024
Merged

docs: explain schedule state values #24160

merged 4 commits into from
Oct 17, 2024

Conversation

schmichael
Copy link
Member

@schmichael schmichael commented Oct 9, 2024

GET /v1/client/allocation/:alloc_id/pause?task=:task_name is a tiny but critical API for observability of tasks with a schedule. This PR explains each of the values which might be returned.

Preview: https://nomad-csj1dlx3r-hashicorp.vercel.app/nomad/api-docs/allocations#override-pause-schedule-state

Internal: NET-11261

GET /v1/client/allocation/:alloc_id/pause?task=:task_name is a tiny but
critical API for observability of tasks with a schedule. This PR
explains each of the values which might be returned.
@schmichael schmichael requested review from gulducat and aimeeu October 9, 2024 17:39
@schmichael schmichael added theme/website nomadproject.io infrastructure issues and enhancements backport/website This will backport PR changes to `stable-website` && the latest release-branch backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/ent/1.9.x+ent Changes are backported to 1.9.x+ent labels Oct 9, 2024
Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

I have more thoughts than one might wish! let me know if you're swamped and would like me to go update the things that I'm bringing up here.

@@ -1039,5 +1039,22 @@ $ nomad operator api /v1/client/allocation/23f520cc-629a-46ff-395f-0661e7aa939e/
}
```

#### Field Reference
Copy link
Member

Choose a reason for hiding this comment

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

commenting here, though it mostly applies elsewhere.

this is the ScheduleState for reads, but for writes, there is a different ScheduleState. its values are listed over in the CLI doc: https://github.com/hashicorp/nomad/blob/v1.9.0/website/content/docs/commands/alloc/pause.mdx#pause-options (http server code here)

  1. do we want a reference section like this up under override on this page, with values that match -state in the CLI doc?
  2. do we want the CLI doc to include more detail under -status to align with what's being added here?
  3. maybe the CLI help output, too? https://github.com/hashicorp/nomad/blob/v1.9.0/command/alloc_pause.go#L36-L44

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the POST/PUT API docs which I think is good for now.

@aimeeu
Copy link
Contributor

aimeeu commented Oct 16, 2024

@schmichael Thanks for this update! I'll review after you've addressed Daniel's feedback.

@schmichael
Copy link
Member Author

Docs fixed, preview link updated, thanks for the thorough review!

Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

lgtm! 🐾

Copy link
Contributor

@aimeeu aimeeu left a comment

Choose a reason for hiding this comment

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

A few nits.
There's some complex passive voice constructs, but I honestly couldn't think of a better alternative.

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
@schmichael schmichael merged commit cbbe6bb into main Oct 17, 2024
28 checks passed
@schmichael schmichael deleted the docs-sched-state branch October 17, 2024 18:42
Juanadelacuesta pushed a commit that referenced this pull request Nov 4, 2024
* docs: explain schedule state values

GET /v1/client/allocation/:alloc_id/pause?task=:task_name is a tiny but
critical API for observability of tasks with a schedule. This PR
explains each of the values which might be returned.

* correct docstring

* add missing state and expand PUT docs

---------

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Feb 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/ent/1.9.x+ent Changes are backported to 1.9.x+ent backport/website This will backport PR changes to `stable-website` && the latest release-branch theme/website nomadproject.io infrastructure issues and enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants