refactor(config): separate source loading from resolution#830
Open
natalie-o-perret wants to merge 10 commits intomasterfrom
Open
refactor(config): separate source loading from resolution#830natalie-o-perret wants to merge 10 commits intomasterfrom
natalie-o-perret wants to merge 10 commits intomasterfrom
Conversation
00da573 to
62dede7
Compare
When exo runs inside a PTY spawned by testscript, the testscript wrapper binary (mainExo) is the PTY session leader. On Ctrl+C: 1. SIGINT goes to the whole foreground process group: wrapper + exo. 2. The wrapper has no signal.Notify, so Go's default SIGINT handler kills it immediately. 3. On session-leader exit, the kernel sends SIGHUP to the remaining process group members — including exo. With no SIGHUP handler, exo is killed before it can print "Error: Operation Cancelled". Fix: add syscall.SIGHUP to the signal.Notify in Execute() so SIGHUP cancels the context instead of killing the process. Also overhaul readPasswordInterruptible to cover all SIGINT timing paths: sigCh fires first, unix.Read returns EINTR first, or ctx.Done fires first (when cobra's goroutine cancels the context before signal.Notify runs).
Contributor
Author
|
[SC-178713] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #817.
Splits config source loading from resolution into a small, testable layer. Each source (env vars, config file profile, built-in defaults) is loaded independently, then merged by
resolve()with explicit precedence:CLI flags > env vars > config file profile > built-in defaults
What changed:
cmd/config_resolution.gowithenvSources,fileSources, andresolve(). Replaces the oldenvAccountOverrides/useEnvOnlyAccount/finalizeCurrentAccounttangle.--configvsEXOSCALE_CONFIGprecedence: the env-to-flag mapping was missing aChangedguard, soEXOSCALE_CONFIGsilently won. CLI flags now always win.EXOSCALE_ZONE: it now overrides the default zone from the active config profile as documented.resolve(), 2 new e2e scenarios for the fixed behaviors.Testing: