Skip to content

Migrate sidecar client to V3 API#364

Merged
danmux merged 1 commit into
mainfrom
dm-claude/v3-sidecar-api
Jun 25, 2026
Merged

Migrate sidecar client to V3 API#364
danmux merged 1 commit into
mainfrom
dm-claude/v3-sidecar-api

Conversation

@danmux

@danmux danmux commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switch all sidecar endpoints from /api/v2/sidecar/ to /api/v3/sidecar/
  • Resource-creation requests (create sidecar, create snapshot) send V3 data envelopes; scoped actions (exec, add-key) stay flat
  • Responses decoded from V3 envelope using pre-initialized typed pointers
  • Add GetCommand method
  • Update fakes and all tests

🤖 Generated with Claude Code

@z00b z00b 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.

looks like ListSnapshots is still on /v2/

Comment thread internal/testing/fakes/circleci.go Outdated

id := c.Param("id")
for _, s := range f.Snapshots {
c.JSON(http.StatusOK, gin.H{

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.

claude tells me that moving this c.JSON outside of the if s.ID == id clause changes the intent.

Comment thread internal/circleci/circleci_test.go Outdated

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.

this name is not quite accurate now?

return &Sidecar{
ID: env.Data.ID,
Name: attrs.Name,
OrgID: refs.Org.ID,

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.

do we not want the image value in here as well?

sc.OrgID = id
}
}
}

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.

image ?

@danmux danmux force-pushed the dm-claude/v3-sidecar-api branch from 515b5ff to 3539077 Compare June 2, 2026 09:27
@danmux danmux force-pushed the dm-claude/v3-sidecar-api branch 3 times, most recently from ff0bee8 to 3bb7d18 Compare June 25, 2026 21:54
Switch all sidecar endpoints from /api/v2/sidecar/ to /api/v3/sidecar/.
Resource-creation requests (create sidecar, create snapshot) now send
V3 data envelopes; scoped actions (exec, add-key) stay flat. Responses
decoded from V3 envelope using pre-initialized typed pointers. Add
GetCommand method. Update fakes and all tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@danmux danmux force-pushed the dm-claude/v3-sidecar-api branch from 3bb7d18 to 6a71183 Compare June 25, 2026 22:03
@danmux danmux merged commit 62c35de into main Jun 25, 2026
6 checks passed
@danmux danmux deleted the dm-claude/v3-sidecar-api branch June 25, 2026 23:00
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