Skip to content

Conversation

daschatten-tb
Copy link
Contributor

Description

This PR adds the agent_id parameter to the url so jetbrains-gateway can handle multiple agents.


Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

Related Issues

Closes #166

@matifali matifali added the version:patch Add to PRs requiring a patch version upgrade label Jul 2, 2025
@matifali matifali changed the title Jetbrains gateway add agent id to url fix(jetbrains-gateway) add agent id to url Jul 2, 2025
@matifali matifali added version:patch Add to PRs requiring a patch version upgrade and removed version:patch Add to PRs requiring a patch version upgrade labels Jul 3, 2025
@matifali
Copy link
Member

matifali commented Jul 3, 2025

Thanks for the contribution @daschatten-tb . Can you also bump the patch version by running ./.github/scripts/version-bump.sh patch

@matifali
Copy link
Member

matifali commented Jul 3, 2025

Hi @daschatten-tb you could run bun fmt and it should auto format the files.

@matifali matifali merged commit e95d90d into coder:main Jul 3, 2025
4 checks passed
rowansmithau added a commit that referenced this pull request Oct 5, 2025
## Description

Fixes a regression added in #167 which implemented support for multiple
agents by appending the agent id to the URI, however in a single agent
environment it results in the agent id from the template apply (on
upload to Coder from client) being injected, and when a workspace is
later built using the template the agent id is no longer correct.

Resolves the error `The workspace “<name>” does not have an agent with
ID “<id>”` being thrown by Jetbrains Gateway app upon attempting to open
a Jetbrains app from within a Coder workspace.

When wishing to target a specific Coder Agent with the Jetbrains Gateway
module one should use the `agent_name` variable in the module
configuration to specify the desired agent name. This will append the
agent name to the URI.

## Type of Change

- [ ] New module
- [x] Bug fix
- [ ] Feature/enhancement
- [ ] Documentation
- [ ] Other

## Module Information

**Path:** `registry/coder/modules/jetbrains-gateway`  
**New version:** `v1.2.4`  
**Breaking change:** [ ] Yes [x] No

## Testing & Validation

- [x] Tests pass (`bun test`)
- [x] Code formatted (`bun run fmt`)
- [x] Changes tested locally

## Related Issues

Reported by customer on Zendesk ticket 4391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version:patch Add to PRs requiring a patch version upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jetbrains-gateway: append agent_id to url to support multiple agents

2 participants