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

cloud-docs/run-environment: Don't overload the term "run" #638

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apparentlymart
Copy link
Contributor

@apparentlymart apparentlymart commented May 16, 2024

What

I have revised the "Concurrency and Run Queuing" section of the "Run Environment" page in the HCP Terraform documentation, to avoid overloading the meaning of "run".

Rendered Preview

Why

This "Run Environment" page belongs to a collection of pages that together describe our capital-R concept of "Run" in HCP Terraform, which refers to the combination of a plan phase and an optional apply phase. "Normal" runs form a per-workspace queue where each run must be resolved (its plan either approved or declined) before proceeding with the next.

(That per-workspace queue of runs is not the same as the global queue of "jobs" that this section is discussing: a run that has already completed its planning and is waiting for approval does not exist in the job queue until someone approves the plan, causing the plan to be applied.)

This particular section was previously using "run" both in its usual meaning and with a new meaning of "job that can be picked up by a worker", which made this section hard to follow when considered in relation to everything else in this chapter of the documentation.

The prior text was already using the word "job" once to describe what was being taken from queues, and so here I've revised the text to consistently use that noun to refer to the kind of thing that is constrained by our concurrency limits. I think that explains the situation a little more clearly while avoiding getting too deep into the implementation details.

I also made the separate editorial decision that jobs take actions and so what they do should be described actively using e.g. the gerund "applying" instead of the nouned-verb "applies" (which is ambiguous with a verb as in "the agent applies the plan", making the prior sentence harder to parse).

Otherwise, I attempted to keep the message largely the same as it was before, but just using hopefully-clearer terminology.

Since the heading text also changed, I tincluded an additional anchor with the previously-used section slug to catch any existing links directly to this section.


Merge Checklist

Pull Request

  • One or more labels describe the type of change (e.g. clarification) and associated product (e.g. HCP Terraform ).
  • Description links to related pull requests or issues, if any.

Content

  • Redirects have been added to website/redirects.js for moved, renamed, or deleted pages. (n/a)
  • API documentation and the API Changelog have been updated. (n/a)
  • Links to related content where appropriate (e.g., API endpoints, permissions, etc.). (n/a)
  • Pages with related content are updated and link to this content when appropriate. (n/a)
  • Sidebar navigation files have been updated for added, deleted, reordered, or renamed pages. (n/a)
  • New pages have metadata (page name and description) at the top. (n/a)
  • New images are 2048 px wide. (n/a)
  • New code blocks have the correct syntax and line breaks to eliminate horizontal scroll bars. (n/a)
  • UI elements (button names, page names, etc.) are bolded. (n/a)
  • The Vercel website preview successfully deployed.

Reviews

  • I or someone else reviewed the content for technical accuracy.
  • I or someone else reviewed the content for typos, punctuation, spelling, and grammar.

@apparentlymart apparentlymart added documentation Improvements or additions to documentation enhancement New feature or request clarification HCP Terraform labels May 16, 2024
Copy link

vercel bot commented May 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terraform-docs-common ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 5:13pm

The "run environment" page belongs to a collection of pages that describe
the capital-R concept of "Run" in HCP Terraform, which refers to the
combination of a plan phase and an optional apply phase. "Normal" runs
form a per-workspace queue where each run must be resolved (its plan either
approved or declined) before proceeding with the next.

This particular section, however, was using "run" both in its usual meaning
_and_ with a new meaning of "job that can be picked up by a worker", which
made this section hard to follow when considered in the broader context
where it's placed.

The prior text was already using the word "job" to describe what was being
taken from queues, and so here I've revised the text to consistently use
that noun to refer to the kind of thing that is constrained by our
concurrency limits. I think that explains the situation a little more
clearly while avoiding getting _too_ deep into the implementation details.

I also made the separate editorial decision that jobs take actions and so
what they do should be described as active agents, e.g. using the gerund
"applying" instead of the nouned-verb "applies" (which is ambiguous with
the present-tense verb as in "the agent _applies_ the plan".

Otherwise I attempted to keep the message largely the same as it was
before, but just using hopefully-clearer terminology.
@apparentlymart apparentlymart force-pushed the cloud-docs-job-queue-consistency branch from 9b7a948 to 4a2c020 Compare May 16, 2024 17:03
@apparentlymart apparentlymart marked this pull request as ready for review May 16, 2024 17:22
Copy link
Contributor

@trujillo-adam trujillo-adam left a comment

Choose a reason for hiding this comment

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

Thanks for taking a run at this one!

@@ -29,17 +29,19 @@ If you are using the SaaS version of HCP Terraform, this means your VCS provider

Terraform Enterprise instances must have network connectivity to any connected VCS providers or managed infrastructure providers.

## Concurrency and Run Queuing
<a name="concurrency-and-run-queuing"></a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<a name="concurrency-and-run-queuing"></a>
<a name="concurrency-and-run-queuing"></a>

We can do this in another PR, but instead of adding this anchor, we should search for the links to this heading update them.


If the global queue has more runs than the workers can handle at once, some of them must wait until a worker becomes available. When the queue is backed up, HCP Terraform gives different priorities to different kinds of runs:
HCP Terraform uses multiple concurrent worker VMs, which take jobs from a global queue of operations that are ready to execute. (This includes both creating new plans and then applying those plans once they've been approved.)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
HCP Terraform uses multiple concurrent worker VMs, which take jobs from a global queue of operations that are ready to execute. (This includes both creating new plans and then applying those plans once they've been approved.)
HCP Terraform uses multiple concurrent worker VMs, which take jobs from a global queue of operations that are ready to execute. This includes both creating new plans and then applying those plans once they've been approved.

Per the style guide, avoid using parentheses in prose.

- Creation of normal plans has the next-highest priority.
- Creation of speculative plans has the lowest priority.

HCP Terraform can also delay some jobs to make performance more consistent across organizations. If an organization requests a large number of jobs at once, HCP Terraform queues some of them immediately, and delays the rest until some of the initial batch have finished; this allows every organization to continue executing jobs even during periods of especially heavy load.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
HCP Terraform can also delay some jobs to make performance more consistent across organizations. If an organization requests a large number of jobs at once, HCP Terraform queues some of them immediately, and delays the rest until some of the initial batch have finished; this allows every organization to continue executing jobs even during periods of especially heavy load.
HCP Terraform can also delay some jobs to make performance more consistent across organizations. If an organization requests a large number of jobs at once, HCP Terraform queues some of them immediately and delays the rest until some of the initial batch have finished. Doing so allows every organization to continue executing jobs even during periods of especially heavy load.

I don't think the semicolon is wrong here, but I'd rather use two sentences to keep it simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification documentation Improvements or additions to documentation enhancement New feature or request HCP Terraform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants