Repository navigation
fix: poll race, live poll interval, stuck-threshold fix, SSO hint profile - #69
Merged
Merged
Conversation
The hint passed the Account name as --profile, but Accounts and profiles differ (libnd uses libnd-view), so the suggested command failed. The pipeline section dropped the profile altogether. Closes #66
fix.Plan used a hard-coded 30 minutes, so with stuck_threshold_minutes set lower a stack alerted as stuck well before the f key offered to cancel its update. Plan now takes the threshold; the dashboard gets it from config at start and on every reload. Closes #65
ForceRefresh and ReloadConfig started extra poll goroutines alongside the ticker's. Whichever finished last won, so a slow older cycle could overwrite a newer one. A cycle-long mutex, separate from the state lock so Snapshot() isn't held up by fetches, now serializes them. Closes #63
Start read the interval once, so a new poll_interval_seconds from the manage screen was ignored until restart. ReloadConfig now hands a changed interval to the running ticker. An unchanged one is not sent, so a run of edits can't keep resetting the ticker and postpone polling. Closes #64
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.
Closes #63, closes #64, closes #65, closes #66. One commit per issue.
Fixes
aws sso login --profile libnd, but the profile islibnd-view. The pipeline section dropped the profile entirely.ProjectState.Profile. A project with no Account gets plainaws sso login.fix.Plan(proj, stalledAfter)now takes the threshold.config.Settings.StuckThreshold()at start and on every config reload. The poller uses the same helper.fkey now offers "cancel stalled update" when the stuck alert fires.pollMu, now serializes cycles.Snapshot()isn't blocked by in-flight fetches.poll_interval_secondsneeded a restart.ReloadConfignow hands a changed interval to the running ticker, which callsticker.Reset.Tests (each written failing first)
TestLoginHintNamesTheProfilecovers the pipeline, stacks and ECS sections, plus default credentials. The existing stacks test had asserted the buggy--profile libnd, so I updated it.TestPlan_stalledStackUsesTheGivenThresholdandTestFixKeyUsesTheStuckThresholdcover the new threshold.TestRefreshDoesNotRaceAnInFlightPollholds a slow cycle open, runs a refresh, and checks that the refresh's result wins.TestReloadConfigAppliesNewPollIntervalcovers the new interval taking effect.TestReloadConfigKeepsTickerWhenIntervalUnchangedcovers the guard. I checked that it fails when mutated to always reset the ticker.go test -race ./...passes andgolangci-lintreports 0 issues.