Skip to content

fix: clear upgrade_started_at when agent upgrades faster than one checkin interval - #7784

Open
ycombinator wants to merge 11 commits into
elastic:mainfrom
ycombinator:fix/upgrade-started-at-stuck-fast-upgrade
Open

fix: clear upgrade_started_at when agent upgrades faster than one checkin interval#7784
ycombinator wants to merge 11 commits into
elastic:mainfrom
ycombinator:fix/upgrade-started-at-stuck-fast-upgrade

Conversation

@ycombinator

@ycombinator ycombinator commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What is the problem?

When an Elastic Agent upgrades faster than one checkin interval (~60 seconds), Fleet Server never observes any intermediate upgrade_details states (downloading, extracting, watching). The agent completes its upgrade and restarts at the new version within a single checkin gap. In practice, this is unlikely to happen with an actual Elastic Agent. But it is possible with Horde drones and, in theory, it could happen with Elastic Agents too.

In this case:

  • upgrade_started_at is set on the agent document (written by Kibana's bulk_upgrade API) when the upgrade action is dispatched;
  • upgrade_details is null on the agent document;
  • The agent checks in with upgrade_details: null in the checkin body.

processUpgradeDetails calls markUpgradeComplete when the checkin body has upgrade_details: null. However, markUpgradeComplete had an early-return guard:

if agent.UpgradeDetails == nil {
    return nil
}

Since agent.UpgradeDetails is also nil (no intermediate states were ever stored), this was a no-op. upgrade_started_at was never cleared, leaving the agent permanently in the "updating" state in Fleet UI — even though it had successfully upgraded to the target version.

This was observed in a 30,000-agent scale test (build #6981) where one agent (eh-ThoseChillwave-LHTb) remained stuck in "updating" state, blocking Step10 from converging to online == 30,000.

How does this PR solve the problem?

The NOP guard is extended to also require upgrade_started_at to be empty:

if agent.UpgradeDetails == nil && agent.UpgradeStartedAt == "" {
    return nil
}

If upgrade_started_at is set but upgrade_details is nil, an upgrade was dispatched (by Kibana) but no intermediate states were ever recorded by Fleet Server. When the agent then checks in with upgrade_details: null, Fleet Server now correctly clears upgrade_started_at, sets upgraded_at, and marks the upgrade complete — regardless of whether any intermediate upgrade_details states were observed.

How to test locally

  1. Start a Fleet Server with an enrolled agent.
  2. Trigger an upgrade via Kibana's POST /api/fleet/agents/bulk_upgrade. This sets upgrade_started_at on the agent document.
  3. Before the agent sends any checkin with upgrade_details, manually set upgrade_details: null and the new version on the agent document (simulating a fast upgrade).
  4. Send a checkin with upgrade_details: null (the default for a running, non-upgrading agent).
  5. Verify that Fleet Server clears upgrade_started_at and sets upgraded_at on the agent document.

Alternatively, run the unit tests:

go test ./internal/pkg/api/ -run TestProcessUpgradeDetails -v

The new test case "agent has upgrade_started_at but no upgrade_details, checkin details are nil (fast upgrade race)" covers this scenario.

Design Checklist

  • The code is stateless (no local caching that could cause inconsistency between instances)
  • The code has been tested with more than 100K agents
  • There are fail safes in the code (e.g. timeouts, max values, graceful degradation)

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the tests
  • I have added an entry in ./changelog/fragments using the changelog tool

@ycombinator
ycombinator requested a review from a team as a code owner September 9, 2026 00:14
@ycombinator
ycombinator requested review from lorienhu and swiatekm and a lite review from Copilot September 9, 2026 00:14
@ycombinator ycombinator added the bug Something isn't working label Sep 9, 2026
@mergify

mergify Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label. Could you fix it @ycombinator? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The newly added unit test matcher can pass even if upgraded_at is missing, reducing the reliability of the regression test.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR fixes a fast-upgrade race where an Elastic Agent can finish upgrading within a single check-in interval, leaving upgrade_started_at stuck on the agent document and the agent permanently shown as “updating” in Fleet UI.

Changes:

  • Adjusts markUpgradeComplete to treat upgrade_started_at without upgrade_details as a completed upgrade and clear upgrade fields accordingly.
  • Adds a unit test covering the “fast upgrade race” scenario.
  • Adds a changelog fragment describing the bug and fix.
File summaries
File Description
internal/pkg/api/handleCheckin.go Extends the no-op guard so upgrade_started_at is cleared even when no upgrade_details were ever persisted.
internal/pkg/api/handleCheckin_test.go Adds a test case covering the fast-upgrade scenario (with one matcher issue noted in review).
changelog/fragments/1788912764-fix-upgrade-started-at-stuck-fast-upgrade.yaml Documents the bug and the behavior change in a release fragment.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/pkg/api/handleCheckin_test.go Outdated
@ycombinator ycombinator added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-active-all Automated backport with mergify to all the active branches labels Sep 9, 2026
Copilot AI review requested due to automatic review settings September 9, 2026 00:26
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The updated guard can incorrectly mark upgrades complete on the first check-in after bulk_upgrade (before the agent receives the upgrade action), potentially clearing upgrade_started_at prematurely.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread internal/pkg/api/handleCheckin.go Outdated
Comment thread internal/pkg/api/handleCheckin_test.go
@github-actions github-actions Bot mentioned this pull request Sep 9, 2026
Copilot AI review requested due to automatic review settings September 9, 2026 00:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new NOP guard can prevent self-healing of already-stuck agents (including during mixed-version rolling upgrades), leaving upgrade_started_at stuck indefinitely in some deployments.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread internal/pkg/api/handleCheckin.go Outdated
@ycombinator
ycombinator force-pushed the fix/upgrade-started-at-stuck-fast-upgrade branch from 5f56045 to cbc530d Compare September 9, 2026 10:33
Copilot AI review requested due to automatic review settings September 9, 2026 10:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The functional change is narrowly scoped, aligns with the described failure mode, and is covered by targeted unit tests.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread internal/pkg/api/handleCheckin.go Outdated
Copilot AI review requested due to automatic review settings September 9, 2026 11:14
ycombinator and others added 4 commits September 9, 2026 04:19
…ckin interval

When an agent upgrades faster than one checkin interval (~60s), Fleet Server
never observes any intermediate upgrade_details states. markUpgradeComplete
was a NOP when upgrade_details was nil on the agent doc, leaving
upgrade_started_at set indefinitely and the agent permanently "updating".

Extend the NOP guard to also require upgrade_started_at to be unset. When
upgrade_started_at is set but upgrade_details is nil, treat the next checkin
with nil upgrade_details as a successful completion.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Use a two-value map lookup + type assertion to check that
upgraded_at is present and is a non-empty string, rather than
relying on != "" which also passes when the key is absent (absent
map key returns nil, and nil != "" is true).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…n after dispatch

The previous fix (clear upgrade_started_at when upgrade_details is nil but
upgrade_started_at is set) would incorrectly mark an upgrade complete on the
first checkin after bulk_upgrade, before the agent has even received the
upgrade action.

Distinguish the two cases using the ver parameter (non-empty only when the
agent's reported version differs from its stored version):
- Fast upgrade race: ver != "" (agent restarted at new version) → clear
- First checkin after dispatch: ver == "" (same version) → NOP

Also adds a test case asserting no Update is called when the agent checks in
at the same version immediately after bulk_upgrade.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…dated in doc

If a fast-upgrade checkin hits an older fleet-server instance (rolling upgrade),
that instance updates the agent version in the doc but does not clear
upgrade_started_at. On subsequent checkins to the new fleet-server, ver == ""
(same version), so the NOP guard would apply indefinitely.

Add a staleness fallback: if upgrade_started_at is older than
upgradeStartedAtStalenessThreshold (10m), treat it as stale and clear it even
when ver == "". The threshold is set well above the maximum checkin poll
duration (~5m) to avoid prematurely clearing upgrade_started_at on the first
checkin after bulk_upgrade.

Also update the function-level comment on processUpgradeDetails to accurately
describe the new markUpgradeComplete semantics, and fix the "first checkin after
dispatch" test case to use a fresh timestamp so it correctly stays below the
staleness threshold.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@ycombinator
ycombinator force-pushed the fix/upgrade-started-at-stuck-fast-upgrade branch from ab6bc42 to 1c5fb80 Compare September 9, 2026 11:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new staleness/self-heal logic can incorrectly mark upgrades complete (including setting upgraded_at) without evidence of a successful upgrade, and the configured staleness threshold/comment mismatch needs correction.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

internal/pkg/api/handleCheckin.go:804

  • markUpgradeComplete sets upgraded_at even when there’s no evidence the upgrade actually completed (no stored upgrade_details and ver == ""). In the staleness branch this can incorrectly mark an upgrade as successful for agents that simply haven’t received the upgrade action yet (e.g., offline/delayed), producing a false upgraded_at timestamp.
	doc := bulk.UpdateFields{
		dl.FieldUpgradeDetails:   nil,
		dl.FieldUpgradeStartedAt: nil,
		dl.FieldUpgradedAt:       time.Now().UTC().Format(time.RFC3339),
	}
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread internal/pkg/api/handleCheckin.go Outdated
Comment thread internal/pkg/api/handleCheckin_test.go Outdated
… check

Kibana may store upgrade_started_at with fractional seconds (e.g.
"2024-01-01T00:00:00.000Z"), which time.RFC3339 cannot parse. A parse
failure caused an early return, silently defeating the stale self-heal
path. Try RFC3339Nano as a fallback; keep the NOP if both parses fail.

Adds a test case covering a fractional-second upgrade_started_at that
is beyond the staleness threshold.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new staleness threshold logic can become too small (or zero) with certain CheckinMaxPoll configurations, potentially clearing upgrade_started_at prematurely.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

internal/pkg/api/handleCheckin.go:651

  • The comment references upgradeStartedAtStalenessThreshold, but there is no such identifier in this file; the implementation uses stalenessThreshold(). This makes the doc misleading for future maintainers.
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread internal/pkg/api/handleCheckin.go
Copilot AI review requested due to automatic review settings September 9, 2026 11:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The new staleness guard currently treats an unparseable upgrade_started_at as a NOP (preventing self-heal) and the PR description doesn’t reflect the added staleness-clearing behavior.

Review details

Suppressed comments (3)

Previously missed (1) — in code that hasn't changed since the last review.

internal/pkg/api/handleCheckin.go:652

  • The comment mentions bypassing the guard when upgrade_started_at is older than "upgradeStartedAtStalenessThreshold", but that identifier doesn't exist here (the logic uses ct.stalenessThreshold()). Update the comment to match the actual implementation to avoid confusion.

This issue also appears in the following locations of the same file:

  • line 775
  • line 781

internal/pkg/api/handleCheckin.go:787

  • In the staleness guard, a parse failure of upgrade_started_at currently causes an early return, which can leave agents permanently stuck in "updating" if the timestamp is malformed (no self-heal path). Treat an unparseable value as stale so upgrade_started_at is cleared (without setting upgraded_at).
		t, err := time.Parse(time.RFC3339, agent.UpgradeStartedAt)
		if err != nil {
			t, err = time.Parse(time.RFC3339Nano, agent.UpgradeStartedAt)
		}
		if err != nil || time.Since(t) < ct.stalenessThreshold() {
			return nil
		}

internal/pkg/api/handleCheckin.go:780

  • The PR description says the fix is extending the NOP guard, but the implementation also adds a new "stale upgrade_started_at" self-heal path (clearing after 2× CheckinMaxPoll). If this behavior is intended, it should be called out explicitly in the PR description and release notes; otherwise consider removing it to keep the change narrowly scoped.
	// Exception: if upgrade_started_at is clearly stale (older than 2× CheckinMaxPoll), clear it
	// to self-heal agents stuck in the updating state after a rolling fleet-server upgrade where
	// the version was already updated by an older instance. The threshold uses 2× CheckinMaxPoll
	// so a legitimately long-running poll (up to CheckinMaxPoll) cannot be mistaken for staleness.
	// In the stale case upgraded_at is NOT set because the upgrade outcome is unknown.
	if agent.UpgradeDetails == nil && agent.UpgradeStartedAt != "" && ver == "" {
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@github-actions

This comment has been minimized.

The long-poll logic (line 415) treats CheckinMaxPoll < 1m as effectively
1m. stalenessThreshold must apply the same floor so that a near-zero
CheckinMaxPoll does not produce a threshold of ~0 and prematurely clear
upgrade_started_at on the first checkin after dispatch.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 11:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new staleness self-heal path currently becomes a no-op on upgrade_started_at parse errors, which can still leave agents stuck in “updating” indefinitely.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (2)

Previously missed (1) — in code that hasn't changed since the last review.

internal/pkg/api/handleCheckin.go:652

  • The comment references upgradeStartedAtStalenessThreshold, but no such identifier exists in this file; it looks like the intended reference is the stalenessThreshold() logic below. This can confuse future readers when debugging upgrade state transitions.

internal/pkg/api/handleCheckin.go:787

  • In the staleness self-heal branch, an unparseable upgrade_started_at currently triggers an early return, which can leave the agent stuck in an "updating" state indefinitely. Since this branch is explicitly intended to self-heal stuck agents, consider treating parse failures as stale and clearing the field.
		t, err := time.Parse(time.RFC3339, agent.UpgradeStartedAt)
		if err != nil {
			t, err = time.Parse(time.RFC3339Nano, agent.UpgradeStartedAt)
		}
		if err != nil || time.Since(t) < ct.stalenessThreshold() {
			return nil
		}
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread changelog/fragments/1788912764-fix-upgrade-started-at-stuck-fast-upgrade.yaml Outdated
Document both fixes included in the PR:
1. Fast-upgrade race: version change triggers upgrade completion.
2. Stale self-heal: upgrade_started_at older than 2×CheckinMaxPoll is
   cleared unconditionally to unblock the Fleet UI in mixed fleet-server
   deployments; upgraded_at is not set since the outcome is unknown.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 11:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The behavior change is well-scoped, covered by new unit tests, and only a minor doc-comment wording nit was found.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

internal/pkg/api/handleCheckin.go:652

  • The comment mentions upgradeStartedAtStalenessThreshold, but that identifier doesn’t exist; the staleness guard is implemented via stalenessThreshold(). Updating the wording avoids confusion for future readers.
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

TL;DR

E2E Test failed on two subtests: TestOpAMPWithUpstreamCollector and TestAgentGracefulForceUnenroll. The first is a known flaky path that builds upstream OTel Collector from source inside a 5-minute test window; the second failed without assertion text in the provided log, so its precise assertion point is not observable from this artifact alone.

Remediation

  • Re-run the Buildkite E2E step once to confirm flake behavior, with priority on TestOpAMPWithUpstreamCollector (already tracked as flaky in [Flaky Test] TestStandAloneRunningSuite/TestOpAMP signal: killed #6590).
  • For durable stability, avoid in-test upstream source build in testing/e2e/stand_alone_test.go (prebuilt/pinned collector artifact or cache strategy) and capture full verbose output (go test -v + subtest logs) for TestAgentGracefulForceUnenroll to identify its exact timeout/assertion boundary.
Investigation details

Root Cause

I verified one confirmed flaky-test pattern and one inconclusive test assertion due limited logs:

  1. TestStandAloneRunningSuite/TestOpAMPWithUpstreamCollector (test flakiness / infrastructure-sensitive)

    • Source path performs external network + build work in-test:
      • testing/e2e/stand_alone_test.go:675 clones https://github.com/open-telemetry/opentelemetry-collector-contrib
      • testing/e2e/stand_alone_test.go:684 runs make otelcontribcol
      • test-wide context is 5*time.Minute at testing/e2e/stand_alone_test.go:653
    • This makes the subtest sensitive to transient network/module/download/build slowness and is consistent with prior detective finding on this PR.
  2. TestStandAloneRunningSuite/TestAgentGracefulForceUnenroll (test failure, assertion point not present in provided artifact)

    • The subtest failed after 221.29s, but the supplied Buildkite log excerpt contains only the subtest summary line and no require/assertion message or panic stack.
    • The test itself includes several long Eventually waits (2–3 minutes) and external process orchestration (elastic-agent download/run + Kibana/ES status transitions), so timeout-style failure is plausible, but I cannot assert the exact failing check without the missing assertion output.

PR scope check: this PR changes only internal/pkg/api/handleCheckin.go, internal/pkg/api/handleCheckin_test.go, and a changelog fragment. Neither failing e2e test is directly edited by this PR.

Evidence

Verification

  • Not run locally here (the provided workflow context only includes the summarized Buildkite failure artifact).

Follow-up

If you can provide the full failing go test -v output or junit case details for TestAgentGracefulForceUnenroll from build 16712, I can narrow it to the exact failing assertion and give a surgical code/test fix recommendation instead of a flake classification.


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@ycombinator
ycombinator marked this pull request as draft September 9, 2026 14:35
Copilot AI review requested due to automatic review settings September 10, 2026 00:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The functional change is small, well-targeted, and includes unit test coverage for the newly handled upgrade edge cases.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

internal/pkg/api/handleCheckin.go:651

  • The comment references upgradeStartedAtStalenessThreshold, but the implementation uses the stalenessThreshold() helper. Using a non-existent identifier in comments is misleading when searching/grepping for the actual logic.
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Replace hardcoded time.Hour and time.Minute in stalenessThreshold with
config.DefaultCheckinMaxPoll and config.CheckinMaxPollFloor, and use
DefaultCheckinMaxPoll in InitDefaults as well.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings September 10, 2026 00:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

There are documentation/scope discrepancies in the updated comments/PR description that should be corrected to accurately reflect the newly introduced behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

internal/pkg/api/handleCheckin.go:651

  • The doc comment refers to upgradeStartedAtStalenessThreshold, but there is no such identifier in this file (the helper is stalenessThreshold). This makes the behavior harder to follow and suggests a stale rename in the comment.
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +775 to +779
// Exception: if upgrade_started_at is clearly stale (older than 2× CheckinMaxPoll), clear it
// to self-heal agents stuck in the updating state after a rolling fleet-server upgrade where
// the version was already updated by an older instance. The threshold uses 2× CheckinMaxPoll
// so a legitimately long-running poll (up to CheckinMaxPoll) cannot be mistaken for staleness.
// In the stale case upgraded_at is NOT set because the upgrade outcome is unknown.
@ycombinator
ycombinator marked this pull request as ready for review September 10, 2026 00:38
Copilot AI review requested due to automatic review settings September 10, 2026 00:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is narrowly scoped, includes unit test coverage for the new edge cases, and no blocking correctness issues were found.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

internal/pkg/api/handleCheckin.go:652

  • This doc comment mentions upgradeStartedAtStalenessThreshold, but the code uses stalenessThreshold(); referencing a non-existent identifier makes the behavior harder to follow when reading the function docs.
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants