Conversation
…he chart never had
khusmann
force-pushed
the
ordered-config-workbench
branch
from
September 30, 2026 00:37
cd4bc04 to
84e924f
Compare
…and fail list-form files the chart merges into
…y what a string replaces, and clean up the remaining error paths
This branch has not been deployed
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.
Step 2 of #944, and resolves #948. Stacked on #945 — base is
ordered-config-library, so this diff shows only the Workbench changes. Retarget tomainonce #945 merges.Important
CI fails until #945 merges and publishes
rstudio-library0.1.38.Chart.yamlrequires 0.1.38,helm dependency updateresolves fromhelm.rstudio.com, and the newest published is 0.1.37.Chart.lockis therefore still pinned at 0.1.35 and can only be regenerated after that release. Draft until then.Ordered config files
Adopts the list form from #945 for the files whose behavior depends on the order of their sections or entries —
config.server.profiles,config.server.launcher.*.resources.conf,config.profiles.launcher.*.profiles.conf,config.session.repos.conf:Previously that rendered alphabetically, so a user named
jsmithlost their own settings to every group they belong to.configmap-general.yaml— the chart merges its default[*]section intoconfig.profiles, which a plainmergeOverwritewould clobber when the value is a list. It now merges into the written[*]entry in place, keeping its position, or prepends one if the admin wrote none.NOTES.txtwarns in both directions, because which form is right is decided by the file rather than by preference:The second half is the one that is easy to miss: Helm merges a map but replaces a list, so writing an order-agnostic file as a list silently drops whatever default the chart ships for it —
launcher.confloses its[server]section, which the launcher needs, with no error. Neither warning has an arity gate, so a single-section map warns too.Files that are not ini —
r-versions,notifications.conf,*.json— are exempt, since a list is how you legitimately write those.Filename dispatch lives in one place.
_helpers.tpldefinesconfig.orderSensitiveandconfig.nonIni;configmap-session.yamluses them to pick a renderer andNOTES.txtuses them to raise both warnings. Three consumers, one source of truth — the alternative was three copies of the same filename lists, which is howci/andlint/drifted apart in #952.values.yaml—config.session.repos\.confbecomes a single-entry list, since otherwise every default install would warn about the chart's own default.Session files are routed by format — resolves #948
configmap-session.yamlhanded the wholeconfig.sessionmap toconfig.ini, regardless of each file's actual format. They are not all ini:r-versions,notifications.confconfig.dcf—Key: Value, blank-line separated records*.jsonconfig.jsonconfig.ini, unchangedr-versionstherefore rendered asKey=Value, which Workbench cannot parse: it falls back to a legacy mode, treats each line as a directory path, and logsdoes not point to a valid directoryper line. No R versions were registered.notifications.confhas the same shape and the same problem;rstudio-prefs.jsonwas latent, working only because its default is a raw string.All three renderers already existed in
rstudio-library, so this is routing rather than new rendering logic. Two details:config.jsonwould re-encode it withtoPrettyJsonand turn{}into the quoted string"{}", breaking the currentrstudio-prefs.jsondefault.notifications.confdefault to DCF added a stray blank line.repos.confmust contain aCRANentryMaking the default a list means a user-supplied value replaces it rather than merging. Ordering cannot be expressed by merging, so replacement is the only coherent semantics — but it removes an accidental safety net. Workbench discards
repos.confentirely when nothing is namedCRAN(SessionOptions.cpp:588), taking the admin's own repositories with it, and nothing in the rendered file shows this.NOTES.txtnow warns when the key is absent, in any form — map, list, or raw string — and stays quiet when the file is suppressed withrepos.conf: null. The chart does not inject aCRANentry, because injecting a public URL is wrong for air-gapped installs; the warning points at the fix instead, which is to name one of your own repositoriesCRAN.Also fixed here
_helpers.tpl— with more than oneconfig.pamfile, the pamvolumeMountswere emitted in Go map order (sprigkeyswithoutsortAlpha). Three renders of the identical command gave two different orderings, sohelm templatewas not reproducible and the Deployment's pod template changed between renders with no configuration change. Now sorted.README.md.gotmpl— thelauncher.kubernetes.profiles.confexample claimed the[*]section's arrays are "appended" to user and group sections, and showed output with:separators and values that appear in no input. No such appending exists — onlyjob-json-overridesis merged across sections — and profiles render with=. Corrected, along with a note that not merging is correct, since profiles are resolved by precedence.Documentation
The list form, that only sections are ordered while options within them are still sorted, that
repos.confreplaces rather than merges and must containCRAN, and a new section explaining thatr-versionsis DCF.Verification
config.server.profiles. Its map-form half is derived fromNOTES.txt's own list rather than restated: a map default for an order-sensitive file would make a default install warn.lint/andci/, except where a previously-broken shape now renders correctly. Thelint/fixtures are byte-identical tomain— routing means ther-versionsrecords they already contained now render valid DCF for the first time since 2021.CRAN, plusnulland a default install.