Skip to content

fix(controller): move a ModelConfig condition's transition time only on a status change - #3340

Merged
EItanya merged 1 commit into
kagent-dev:mainfrom
giantswarm:upstream/harness-ready-condition
Nov 8, 2026
Merged

EItanya merged 1 commit into
kagent-dev:mainfrom
giantswarm:upstream/harness-ready-condition

Conversation

@QuentinBisson

@QuentinBisson QuentinBisson commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The ModelConfig status writer moves a condition's lastTransitionTime whenever its reason, message or observedGeneration changes. Agent conditions, and SandboxTemplate through apimeta.SetStatusCondition, move it only when the status changes, as the API conventions define it. A ModelConfig that stays False therefore reports a new transition time every time its error text or generation changes.

Change

Agent and ModelConfig share one helper that keeps the transition time while a condition's status holds. A new test covers a changed reason, message and generation under an unchanged status, and a status change.

This PR previously wrote Harness Ready/Booted conditions; #3454 removed Harness.status, so it is reduced to the transition-time rule that part shared with Agent and ModelConfig.

@QuentinBisson
QuentinBisson requested a review from a team as a code owner October 24, 2026 00:37
@github-actions github-actions Bot added the bug Something isn't working label Oct 24, 2026
QuentinBisson added a commit to giantswarm/kagent-upstream that referenced this pull request Oct 24, 2026
)

kagent-dev#3340 files the Harness conditions (Ready from the WorkerPool,
Booted from the golden boots); the status merge patch files on its own later.
The git fetch retry rows wait for kagent-dev#3099, which rewrites
CloneGitCommit, and carry the notes for the re-cut; the durable copy is
superseded by kagent-dev#3099's task-time skill install. The SKILL.md frontmatter row
points at google/adk-go#1957 and kagent-dev#1958.

Signed-off-by: QuentinBisson <[email protected]>
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Oct 24, 2026
@QuentinBisson
QuentinBisson force-pushed the upstream/harness-ready-condition branch 2 times, most recently from 3f5bb45 to 3285888 Compare October 29, 2026 10:06
Comment thread go/core/internal/controller/status.go Outdated
"slices"
"strings"

atev1alpha1 "go.ate.dev/substrate/pkg/api/v1alpha1"

@QuentinBisson QuentinBisson Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this broke when #3338 moved the Substrate API packages. They move too fast for me :D

@QuentinBisson
QuentinBisson force-pushed the upstream/harness-ready-condition branch from 3285888 to c77728e Compare October 29, 2026 10:26
garlicKim21 pushed a commit to garlicKim21/kagent that referenced this pull request Oct 30, 2026
Remove `Harness.status` and the derived gRPC/UI readiness field, plus
ADK `network`, `share_tools`, and `ADKNetworkConfig`. Harness status has
no writer on main, and neither ADK consumes these config fields, so drop
them before the first RC.

Regenerates the CRDs and clients and removes the obsolete status RBAC,
fixtures, and tests. The removed protobuf fields have no reservations,
since this is the final pre-RC API break. Includes narrow Buf exceptions
for these removals.

Validated code generation and compatibility checks, focused Go/CRD
tests, Go lint, 87 Python config tests, 697 UI unit tests, UI
typecheck/lint, the Harness flow in Chromium and Firefox, and 21 Helm
RBAC tests.

Overlaps with kagent-dev#3340, which adds writers for the Harness status being
removed here.

---------

Signed-off-by: Eitan Yarmush <[email protected]>
@QuentinBisson
QuentinBisson force-pushed the upstream/harness-ready-condition branch from c77728e to 300ae03 Compare November 2, 2026 11:03
@QuentinBisson QuentinBisson changed the title fix(controller): write the Harness Ready and Booted conditions fix(controller): move a ModelConfig condition's transition time only on a status change Nov 2, 2026
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Nov 2, 2026
@QuentinBisson
QuentinBisson force-pushed the upstream/harness-ready-condition branch from 300ae03 to ab64fc4 Compare November 7, 2026 01:48
@EItanya

EItanya commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

I think this can also be backported

jerry-jibu pushed a commit to jerry-jibu/kagent that referenced this pull request Nov 14, 2026
Backports seven PRs from `main` to `release/v1.0.x` for the 1.0 release.
Each is cherry-picked with `-x` in its original merge order, and none
needed changes. Every file these commits touch now matches `main`
exactly.

| PR | Commit | Why |
| --- | --- | --- |
| kagent-dev#3558 | `2e2acf58c` | fix(ci): restore upgrade tests from RC3 |
| kagent-dev#3545 | `7c9c52105` | fix(ui): show when the Substrate lists were
read, not a running age |
| kagent-dev#3395 | `aaf1ca882` | feat(session): revert crashed runtimes through
RevertSession (needed for a customer) |
| kagent-dev#3562 | `5c490d83b` | refactor: remove helpers orphaned by the KMCP
removal (low risk; keeps the branch close to `main`) |
| kagent-dev#3563 | `c6adf72f9` | refactor(api): move MCP header resolution out of
`v1alpha3`, so the 1.0 API package describes only data |
| kagent-dev#3340 | `347acbe55` | fix(controller): move a ModelConfig condition's
transition time only on a status change (labeled `cherrpick-1.0`) |
| kagent-dev#3560 | `ccb2dd350` | adk/mcp: defer tool discovery until invocation,
so slow MCP discovery no longer fails agent resumes |

Please use **Rebase and merge** so each backported PR stays its own
commit on the release branch.

Validation before kagent-dev#3560 was added (CI covers the full set):
- `go build ./...` and `go vet ./...`
- `go test -race` with envtest for `api`, `core/cli`,
`core/internal/{controller,database,grpcserver,mcp,service,substrate}`,
`core/pkg/migrations`, and `pkg/logging`
- `make -C go lint`: 0 issues
- UI `tsc --noEmit` and `substrateReadAge.test.tsx`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eitan Yarmush <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Ada Lundhe <[email protected]>
Signed-off-by: timflannagan <[email protected]>
Signed-off-by: QuentinBisson <[email protected]>
Signed-off-by: Shashank Ram <[email protected]>
Co-authored-by: Nicholas Bucher <[email protected]>
Co-authored-by: Ada Lündhé <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Tim Flannagan <[email protected]>
Co-authored-by: Quentin Bisson <[email protected]>
Co-authored-by: Shashank <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cherrpick-1.0 Should be cherrypicked to 1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants