-
Notifications
You must be signed in to change notification settings - Fork 877
feat: Use environment variables and startup script in agent #1147
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
Codecov Report
@@ Coverage Diff @@
## main #1147 +/- ##
==========================================
- Coverage 66.31% 66.30% -0.02%
==========================================
Files 261 257 -4
Lines 16251 16141 -110
Branches 156 156
==========================================
- Hits 10777 10702 -75
+ Misses 4362 4337 -25
+ Partials 1112 1102 -10
Continue to review full report at Codecov.
|
e54c0bd
to
1155d45
Compare
agent/agent.go
Outdated
if !a.startupScript.Load() { | ||
// The startup script has not ran yet! | ||
a.startupScript.Store(true) |
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.
This is technically racey right? I think this needs to be a CAS (compare and swap).
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.
You are correct. I shall fix
These values were ignored. Environment variables are applied to new sessions, and are refreshed on reconnect. This is cool because a workspace could be updated with new environment variables without requiring a complete start/stop. The startup script is only ran once regardless of changes, which feels like the expected behavior.
return false | ||
} | ||
if runtime.GOOS == "windows" { | ||
// Windows uses UTF16! 🪟🪟🪟 |
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.
👻
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.
spooky is right
These values were ignored. Environment variables are applied to new sessions, and are refreshed on reconnect. This is cool because a workspace could be updated with new environment variables without requiring a complete start/stop. The startup script is only ran once regardless of changes, which feels like the expected behavior.
These values were ignored. Environment variables are applied to
new sessions and are refreshed on reconnect. This is cool because
a workspace could be updated with new environment variables without
requiring a complete start/stop.
The startup script is only run once regardless of changes, which
feels like the expected behavior.