-
Notifications
You must be signed in to change notification settings - Fork 881
fix(agent): add tracking for JetBrains Gateway and Fleet #10491
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work around 👍. Future proof when SetEnv is corrected as well
@@ -1,6 +1,5 @@ | |||
[default.extend-identifiers] | |||
alog = "alog" | |||
Jetbrains = "JetBrains" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove this to fix the lint check. Otherwise, typos CLI complains about
https://github.com/coder/coder/pull/10491/files#diff-e2fb60d4b313fc2ad42c37ce065c0c880e04615b339a843e14892338d0bb4396R268
There is no way to skip checking a single line.
The best we can do is skip the whole file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. And this is a github linter, no golang-ci lint. That you could skip one line.
This does not work. We only check for env variables when the initial connection is est blished, ut the variables I am looking for are being injected later when we select the IDE and connect via it and possibly when we open the integrated terminal. I am closing it for now. |
Context
This PR is more of a workaround than a fix. It fixes an issue where a session's
MagicType
was not correctly identified when connecting to a workspace via JetBrains Gateway or Fleet. As a result, the session was not being tracked in the agent's stats. To identify them correctly, this PR adds a check for theTERMINAL_EMULATOR
andTERM_PROGRAM
environment variables. The current approach does not segregate between Fleet and Gateway usage and consolidates both underMagicSessionTypeJetBrains
.Fixes #9673.
Testing
I am trying to test it via a PR deployment.
Future work
For the future, we can separate tracking Gleet and Gateway usage.