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

feat: Update to v2 #1907

Open
wants to merge 5 commits into
base: release/v2.0.0
Choose a base branch
from
Open

feat: Update to v2 #1907

wants to merge 5 commits into from

Conversation

dpaasman00
Copy link
Contributor

@dpaasman00 dpaasman00 commented Oct 9, 2024

Proposed Change

Reworks updater to update an installation from v1 to v2.

  • Reads endpoint, secret_key, and agent_id values from existing manager.yaml and uses them to create basic supervisor.yaml
  • Uses healthcheck extension on agent to determine if startup is successful once service is restarted
  • Cleans up various files from v1 install that are no longer needed in a v2 install

Test following this guide: https://docs.google.com/document/d/1ZaSXnJIu-rjctiihBdBLvHymuaB7GFIW8I56biN5v8Q/edit?tab=t.0

Checklist
  • Changes are tested
  • CI has passed

@dpaasman00 dpaasman00 marked this pull request as ready for review October 9, 2024 11:43
Comment on lines 404 to 416
// Retrieve agent id and convert to UUID
agentID, ok := manager["agent_id"].(string)
if !ok {
return fmt.Errorf("read in agent id")
}
agentULID, err := ulid.Parse(agentID)
if err != nil {
return fmt.Errorf("parse agent id into a ULID: %w", err)
}
ulidBytes, err := agentULID.MarshalBinary()
if err != nil {
return fmt.Errorf("marshal ulid to bytes: %w", err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

With #1907 merged, we'll want to check if it's a UUID as well.

Side note, it does suck a bit that this will cause the agent to report itself with a new ID. I don't think there's a way around it though.

updater/internal/updater/updater.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants