Skip to content

fix: Fix properly selecting workspace apps by agent #3684

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 12 commits into from
Aug 29, 2022

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Aug 24, 2022

What this does

When accessing a coder app, you now need to specify the correct agent.

Prior to this, the behavior was:

len(Agents) Agent Specified Result
0 "" fail
0 "not-exists" fail
1 "" agent
1 "agent" agent
1 "not-exists" agent
>1 "" agent
>1 "agent" agent
>1 "not-exists" agent

Now Truth Table

len(Agents) Agent Specified Result
0 "" fail
0 "not-exists" fail
1 "" agent
1 "agent" agent
1 "not-exists" fail
>1 "" fail
>1 "agent" agent
>1 "not-exists" fail

Notes

I moved this to a middleware so I can reuse the app route logic for un-named apps (using ports instead of names on subdomains).

Added a good unit test suite for it 👍

@Emyrk Emyrk marked this pull request as ready for review August 24, 2022 20:24
@Emyrk Emyrk requested a review from kylecarbs August 24, 2022 20:58
@Emyrk Emyrk changed the title fix: Fix properly naming workspace agents fix: Fix properly selecting workspace apps by agent Aug 25, 2022
@Emyrk Emyrk merged commit 34d902e into main Aug 29, 2022
@Emyrk Emyrk deleted the stevenmasley/select_agent branch August 29, 2022 12:56
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