Skip to content

feat(config): add read-only configuration mode - #918

Merged
JosephKav merged 6 commits into
masterfrom
feat/config/readonly
Jul 5, 2026
Merged

feat(config): add read-only configuration mode#918
JosephKav merged 6 commits into
masterfrom
feat/config/readonly

Conversation

@JosephKav

@JosephKav JosephKav commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator
settings:
  data:
    readonly: true

or ARGUS_SETTINGS_DATA_READONLY=true or -data.readonly flag

disables writing to the config.yml, but additions/edits are still allowed in the UI (disable the routes to prevent this).
DB is still needed/written to.

closes #787, #855, #917

@JosephKav JosephKav added enhancement New feature or request go Pull requests that update Go code labels Jul 4, 2026
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.71%. Comparing base (21c4ad7) to head (0059f6f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #918      +/-   ##
==========================================
+ Coverage   99.71%   99.71%   +0.01%     
==========================================
  Files         199      200       +1     
  Lines       12721    12777      +56     
==========================================
+ Hits        12683    12739      +56     
  Misses         33       33              
  Partials        5        5              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JosephKav
JosephKav force-pushed the feat/config/readonly branch from 4265ddc to 4f222a5 Compare July 4, 2026 16:32
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

✅ Playwright Test Results

Count
✅ Passed 303
❌ Failed 0
🔄 Flaky 1
⏭️ Skipped 4

Duration: 979.0s

View screenshots & full report

@JosephKav
JosephKav force-pushed the feat/config/readonly branch 4 times, most recently from ebfc184 to 27d1dc0 Compare July 4, 2026 18:51
@JosephKav
JosephKav force-pushed the feat/config/readonly branch from 27d1dc0 to 1aa3e46 Compare July 4, 2026 23:32
Argus-Bot
Argus-Bot previously approved these changes Jul 4, 2026
JosephKav added 3 commits July 5, 2026 00:46
- `settings.data.readonly: true` in YAML, `ARGUS_SETTINGS_DATA_READONLY=true`,
  in the environment, or `-data.readonly` in the CLI
- allow runtime create, edit, and delete operations without persisting
  them to disk
- expose `settings.data` in the `/api/v1/config` API response
router is used by TestMain which is both 'unit' and 'integration',
so it needs to be in a file that is compiled under both tags.
- config/help_test.go: testLoadBasic held loadMu's write lock until
  t.Cleanup, but other tests take loadMu.RLock() later in the same test -
  self-deadlock. Lock now scoped to just the flag snapshot/decode.
- internal/test/channel_assert_test.go: parallel subtests wrote a shared
  calledStdout map; replaced with a per-subtest closure.
- internal/test/stdout.go: mutex ownership was tracked by comparing
  t.Name(), which breaks on duplicate names; replaced with a `released` bool.
- service/latest_version/filter/docker/registry_ghcr_test.go: fix
  TestGHCRAuthDefaults_GetQueryTokenSelf__parallel by snapshotting data.queryToken
  before spawning goroutines, adding a sync.WaitGroup to wait for concurrent
  GetQueryTokenSelf() calls, and updating assertions to check the original token
  and that validUntil is refreshed to a usable future time.
- service/latest_version/refresh_test.go: parallel subtests shared/mutated
  one tLookup fixture; each now gets its own instance.
- service/status: fix a real deadlock - SetApprovedVersion held s.mu.RLock()
  across announceApproved's own s.mu.RLock(), which hangs if a writer queues
  in between. announceApproved now takes the version as a param; the RLock
  is scoped to sendDatabase only.
- service/status/status_test.go: parallel subtests shared a mutated tc.want
  pointer, and FuzzSetVersions used an unsynchronised `running` bool -
  fixed with a local copy and a stopDrain channel.
@JosephKav JosephKav changed the title feat(config): readonly mode feat(config): add read-only configuration mode Jul 4, 2026
@JosephKav
JosephKav force-pushed the feat/config/readonly branch from 1aa3e46 to a1ffbae Compare July 4, 2026 23:52
Argus-Bot
Argus-Bot previously approved these changes Jul 5, 2026
JosephKav added 2 commits July 5, 2026 01:41
before running -test.* or -config.check
- bump @biomejs/biome from 2.5.1 to 2.5.2
- bump @radix-ui/react-collapsible from ^1.1.14 to ^1.1.15
- bump @radix-ui/react-label from ^2.1.10 to ^2.1.11
- bump @radix-ui/react-separator from ^1.1.10 to ^1.1.11
- bump @radix-ui/react-toggle from ^1.1.12 to ^1.1.13
- bump @radix-ui/react-toggle-group from ^1.1.13 to ^1.1.14
- bump @types/node from 26.0.1 to 26.1.0
- bump lucide-react from^1.22.0 to ^1.23.0
- bump radix-ui from^1.6.0 to ^1.6.1
- bump vite from 8.1.2 to 8.1.3
@JosephKav
JosephKav merged commit 082334d into master Jul 5, 2026
8 checks passed
@JosephKav
JosephKav deleted the feat/config/readonly branch July 5, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Support for readonly mode

2 participants