Skip to content

Chore: standardize helper namespace, fix PVC hardcode, add CI - #102

Open
anchapin wants to merge 5 commits into
developfrom
chore/ci-helper-namespace
Open

Chore: standardize helper namespace, fix PVC hardcode, add CI#102
anchapin wants to merge 5 commits into
developfrom
chore/ci-helper-namespace

Conversation

@anchapin

Copy link
Copy Markdown
Collaborator

Closes #99 (prep work)

Helper namespace, PVC fix, and CI pipeline ahead of the external_batch Indexed Job feature (PR 2, stacked on this).

What changes

  • Helper namespace openstudio.*openstudio-server.* across 16 call sites in 7 templates; adds standard helm-create helpers openstudio-server.{name,fullname,chart}. Aligns the chart with the standard helm convention.
  • Hardcoded claimName: nfs-pvc in 3 deploy templates (web, web-background, rserve) → {{ .Values.nfs_pvc.name }}. Fixes a silent override trap. No behavior change at defaults.
  • New .github/workflows/helm-unittest.ymlhelm lint + helm unittest + smoke helm template render on every push and PR. Adds the chart's first CI.
  • New openstudio-server/tests/.gitkeep — scaffolding directory for future helm-unittest files.
  • New README.md "Contributing & Tests" section.
  • Chart version 0.6.0 → 0.6.1 (patch).

Verified

  • helm lint ./openstudio-server clean
  • helm template at default values byte-identical to pre-change baseline
  • helm template --set nfs_pvc.name=custom-claim propagates the override to all 3 previously-hardcoded deploy templates

Risk

  • Only a 3rd-party helper namespace + 1 PVC fix. Existing installs unaffected at defaults.
  • The nfs_pvc.name override fix only changes behavior for operators who had a non-default value and were getting it silently ignored — which is a bug we're fixing.

Aligns the chart with the standard helm convention (chart-name qualified
helpers) so future templates — including the external_batch Indexed Job
in flight via #99 — can use the canonical openstudio-server.fullname,
openstudio-server.name, and openstudio-server.chart helpers.

Renames:
- openstudio.nodeGroupAffinity  -> openstudio-server.nodeGroupAffinity
- openstudio.resourceLimits      -> openstudio-server.resourceLimits
- openstudio.webBackgroundWorkers -> openstudio-server.webBackgroundWorkers
- openstudio.parseMemoryToMiB    -> openstudio-server.parseMemoryToMiB
- openstudio.imageWithRegistry   -> openstudio-server.imageWithRegistry

Added (standard helm create scaffolding):
- openstudio-server.name
- openstudio-server.fullname
- openstudio-server.chart

Updated 16 call sites across 7 templates (web, web-background, worker,
db, redis, rserve, hooks) plus one doc comment in values.yaml that
referenced the old helper name.

Verified with 'helm lint' and 'helm template' against the default
values; rendered output is byte-identical to the pre-rename baseline
(modulo the rtk tee log path).

Prep for #99.
…ates

Three deploy templates hardcoded 'claimName: nfs-pvc' (web, web-background,
rserve), even though values.yaml defines nfs_pvc.name and the existing
templates/nfs/nfs-pvc.yaml reads from it. The hardcode silently ignored
any non-default override of nfs_pvc.name.

Now all three claimName references are sourced from .Values.nfs_pvc.name,
matching the PVC pattern in templates/nfs/nfs-pvc.yaml. Behavior at
default values is identical (nfs_pvc.name defaults to 'nfs-pvc').

Verified: helm lint clean; helm template output is byte-identical to
the pre-change baseline at default values; with --set nfs_pvc.name=custom
the new value propagates to all three volumes.

Prep for #99 (the external_batch Indexed Job will mount the same NFS
PVC and now correctly honors the user's override).
…tch bump

Adds the chart's first CI pipeline and a place for chart unit tests
helps cargo. The CI catches helper-namespace and PVC-name regressions
before they reach review, and the test scaffolding lands before any
new tests are added so subsequent PRs can drop _test.yaml files into
the existing directory.

Changes:

- .github/workflows/helm-unittest.yml — lint, unit, and smoke-template
  jobs on every push and PR to develop or main. Pinned helm v3.16.4
  via azure/setup-helm; helm-unittest plugin installed via the
  one-line helm plugin install command from the upstream README.

- openstudio-server/tests/.gitkeep — scaffolding directory for future
  helm-unittest _test.yaml files. No tests added in this PR; existing
  templates have no tests yet, and adding them would explode the
  scope of this maintenance PR.

- README.md — new 'Contributing & Tests' section with the helm plugin
  install snippet, helm lint / helm unittest instructions, and a PR
  checklist for contributors.

- Chart.yaml — version 0.6.0 -> 0.6.1 (patch bump). No behavior change
  to the rendered chart at default values; CI is additive only.

Verified: helm lint clean; helm template with --set nfs_pvc.name=custom
propagates the override to all three previously-hardcoded deploy
templates, confirming the PVC fix works end-to-end.
Adds the result-*.md pattern to .gitignore so per-session agent
execution logs (rendered to the repo root by some orchestration tools)
don't get staged for commit. The canonical home for these logs is
.gitignored .agents/results/.

Follow-up to PR #102's CI workflow, which can produce these files
locally when invoked via the agent orchestration pipeline.
The first run of PR #102's new helm-unittest CI job failed with:

  Error: plugin is installed but unusable: failed to load plugin at
  "/home/runner/.local/share/helm/plugins/helm-unittest/plugin.yaml":
  error unmarshaling JSON: while decoding JSON: json: unknown field
  "platformHooks"

helm-unittest v1.1.2's plugin.yaml declares a 'platformHooks' field
that Helm v3.16.4 doesn't recognize. The field was added in Helm
v3.17.0 as part of plugin install lifecycle support. v3.21.4 is the
latest stable Helm 3.x release and supports platformHooks.

Verified locally with /tmp/opencode/linux-amd64/helm (v3.21.4):
- helm lint clean
- helm unittest 14/14 pass
- helm template with --set nfs_pvc.name=custom-nfs-claim renders 3
  instances of claimName: custom-nfs-claim (the CI's grep check)

Fixes PR #102 CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add optional Kubernetes Indexed Job template for external_batch simulation execution

1 participant