Skip to content

feat: use v2 API for agent lifecycle updates #12278

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

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Feb 23, 2024

Agent uses the v2 API to post lifecycle updates.

Part of #10534

Copy link
Contributor Author

spikecurtis commented Feb 23, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @spikecurtis and the rest of your teammates on Graphite Graphite

@spikecurtis spikecurtis requested a review from mafredri February 23, 2024 09:49
@spikecurtis spikecurtis marked this pull request as ready for review February 23, 2024 09:50
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Some tests need updating (relying on removed agentClient.PostLifecycle), but otherwise LGTM!

agent/agent.go Outdated
lastReportedIndex++
continue
}
logger := a.logger.With(slog.F("payload", l))
Copy link
Member

Choose a reason for hiding this comment

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

Nit: The payload should be payload := &proto.UpdateLifecycleRequest{Lifecycle: l}, as that's what's being sent.

@spikecurtis spikecurtis force-pushed the spike/10534-lifecycle-update branch from 0e7b180 to 5586ecf Compare February 23, 2024 10:50
Copy link
Contributor Author

Thanks! Going to keep the PostLifecycle around, but deprecated so that we have tests against the v1 API.

We can retire it all when we drop v1 support.

@spikecurtis spikecurtis force-pushed the spike/10534-lifecycle-update branch from 5586ecf to c17735d Compare February 23, 2024 11:13
@spikecurtis spikecurtis merged commit aa7a9f5 into main Feb 23, 2024
@spikecurtis spikecurtis deleted the spike/10534-lifecycle-update branch February 23, 2024 11:24
Copy link
Contributor Author

Merge activity

@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants