Skip to content

chore: move agent functions from codersdk into agentsdk #5903

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 19 commits into from
Jan 29, 2023
Merged

Conversation

kylecarbs
Copy link
Member

This has become quite a large PR that could be cherry-picked, but it's mostly refactoring.

Each commit encapsulates a change well, so it's easy to understand all of them.

The codersdk was becoming bloated with consts for the workspace
agent that made no sense to a reader. `Tailnet*` is an example
of these consts.
It feels wrong to have this as a direct option because it's so infrequently
needed by API callers. It's better to directly modify headers in the two
places that we actually use it.
`codersdk.Response` lived in `error.go`, which is wrong.
It was odd conflating the codersdk that clients should use
with functions that only the agent should use. This separates
them into two SDKs that are closely coupled, but separate.
@kylecarbs kylecarbs self-assigned this Jan 29, 2023
@kylecarbs kylecarbs requested a review from coadler January 29, 2023 18:16
@kylecarbs kylecarbs changed the title chore: clean up codersdk chore: move agent functions from codersdk into agentsdk Jan 29, 2023
@kylecarbs kylecarbs merged commit 7ad8750 into main Jan 29, 2023
@kylecarbs kylecarbs deleted the cleanupnames branch January 29, 2023 21:47
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2023
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.

1 participant