Skip to content

ci: agent skills add chart#3443

Open
j-zimnowoda wants to merge 15 commits into
mainfrom
agent-skills-add-chart
Open

ci: agent skills add chart#3443
j-zimnowoda wants to merge 15 commits into
mainfrom
agent-skills-add-chart

Conversation

@j-zimnowoda

Copy link
Copy Markdown
Contributor

📌 Summary

This pull request introduces several improvements to the developer workflow, documentation, and test coverage for adding and exposing Helm charts and apps. The main focus is on enforcing template diff checks, adding reusable skills for common tasks, and improving testability and automation in the CI process.

🔍 Reviewer Notes

🧹 Checklist

  • Code is readable, maintainable, and robust.
  • Unit tests added/updated

Copilot AI review requested due to automatic review settings July 14, 2026 14:21
Comment thread ci/src/add-app-helm-chart.ts Fixed

function findHelmfileForRelease(helmfileDir: string, releaseName: string): string {
const files = fs.readdirSync(helmfileDir).filter((f) => f.endsWith('.yaml') || f.endsWith('.gotmpl'))
const rx = new RegExp(`^\\s*-\\s+name:\\s+${releaseName}\\s*$`, 'm')
}

const defaultRunCommand: CommandRunner = (command, options = {}) => {
const result = execSync(command, options)
@svcAPLBot

Copy link
Copy Markdown
Contributor

Comparison of Helm chart templating output:

# apl-operator/templates/deployment.yaml

# apl-operator/templates/rbac.yaml

# oauth2-proxy/templates/httproute.yaml

@@ spec.rules.0 @@
! - one map entry removed:
- filters:
- - type: CORS
-   cors:
-     allowMethods:
-     - GET
-     - OPTIONS
-     allowOrigins:
-     - "https://cloud.linode.com"
-     - "https://cloud.staging.linode.com"
-     - "https://cloud.dev.linode.com"

# rabbitmq-cluster-operator/templates/messaging-topology-operator/validating-webhook-configuration.yaml

# values-repo.yaml

@@ otomi.isPreInstalled @@
! ± value change
- true
+ false

j-zimnowoda and others added 2 commits July 14, 2026 16:24
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the repo’s CI and agent tooling around adding Helm charts/apps and validating templating changes. It introduces two new CI helper scripts (with Jest tests), adds a new headlamp Helmfile release stub + defaults entry, and updates documentation/workflows to enforce rendered template diff checks.

Changes:

  • Add CI scripts for (1) vendoring/wiring a new Helm chart into APL Core and (2) configuring public exposure scaffolding, both with unit tests.
  • Add a headlamp Helmfile release stub and default apps.headlamp entry.
  • Enforce/encourage template diff checks via docs, skills, workflow updates, and improved dyff.sh output for new/deleted directories.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
jest.config.ts Expands Jest roots to include ci/src so CI helper tests run under the main Jest config.
helmfile.d/snippets/defaults.yaml Adds default apps.headlamp toggle.
helmfile.d/helmfile-92.headlamp.yaml.gotmpl Introduces a new headlamp Helmfile release definition using the *default template.
ci/src/configure-public-exposure.ts Adds helper script to modify core.yaml, add *-artifacts release, scaffold HTTPRoute/auth resources, and ensure auth pod labels.
ci/src/configure-public-exposure.test.ts Adds unit tests for configure-public-exposure helpers.
ci/src/add-app-helm-chart.ts Adds helper script to vendor/wire a new Helm chart (resolve stable semver, update chart index, scaffold Helmfile/defaults/values/fixtures).
ci/src/add-app-helm-chart.test.ts Adds unit tests for semver/version resolution logic.
ci/package.json Adds a tests script to run CI script tests via the root Jest runner.
bin/dyff.sh Enhances dyff output to recursively show new/deleted directory contents.
AGENTS.md Adds a short “mandatory template diff check” note using bin/compare.sh.
.vscode/settings.json Adds chat.tools.terminal.autoApprove entries for common repo commands.
.github/workflows/ci-helm-chart.yml Switches to npm ci and runs CI script unit tests in the workflow.
.github/skills/test-gotemplate-renders/SKILL.md Adds a reusable skill doc for running bin/compare.sh on templating-related changes.
.github/skills/add-app-ingress/SKILL.md Adds a reusable skill doc to configure public app exposure via the new CI script.
.github/skills/add-app-helm-chart/SKILL.md Adds a reusable skill doc to add a Helm chart via the new CI script.
.github/copilot-instructions.md Updates Copilot guidance to emphasize mandatory template diff checks and trims older CLI command listings.

Comment on lines +228 to +245
const parts: string[] = [
'bases:',
' - snippets/defaults.yaml',
'---',
' - snippets/defaults.gotmpl',
'---',
'bases:',
' - snippets/env.gotmpl',
'---',
'bases:',
' - snippets/derived.gotmpl',
'---',
'{{ readFile "snippets/templates.gotmpl" }}',
'{{- $v := .Values }}',
'{{- $a := $v.apps }}',
'',
'releases:',
]
}

const content = fs.readFileSync(valuesFile, 'utf8')
if (content.includes('otomi.io/auth:') && content.includes('otomi.io/auth-policy:')) {
Comment on lines +344 to +345
const hasAuth = lines.slice(podLabelsIdx + 1, insertAt).some((line) => line.trim().startsWith('otomi.io/auth:'))
const hasAuthPolicy = lines.slice(podLabelsIdx + 1, insertAt).some((line) => line.trim().startsWith('otomi.io/auth-policy:'))
Comment thread .vscode/settings.json
Comment on lines 61 to 72
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"chat.tools.terminal.autoApprove": {
"npx tsx ci/src/configure-public-exposure.ts headlamp": true,
"npx tsx ci/src/add-app-helm-chart.ts headlamp": true,
"export ENV_DIR=$PWD/tests/fixtures": true,
"bin/compare.sh": true,
"npm run validate-values": true,
"npm run validate-templates": true
}
}
Copilot AI review requested due to automatic review settings July 14, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.

Comment on lines +229 to +246
const parts: string[] = [
'bases:',
' - snippets/defaults.yaml',
'---',
' - snippets/defaults.gotmpl',
'---',
'bases:',
' - snippets/env.gotmpl',
'---',
'bases:',
' - snippets/derived.gotmpl',
'---',
'{{ readFile "snippets/templates.gotmpl" }}',
'{{- $v := .Values }}',
'{{- $a := $v.apps }}',
'',
'releases:',
]
Comment on lines +112 to +114
const files = fs.readdirSync(helmfileDir).filter((f) => f.endsWith('.yaml') || f.endsWith('.gotmpl'))
const rx = new RegExp(`^\\s*-\\s+name:\\s+${releaseName}\\s*$`, 'm')
const matches = files.filter((file) => rx.test(fs.readFileSync(path.join(helmfileDir, file), 'utf8')))
Comment thread AGENTS.md
Comment on lines +5 to +13
When code changes any file under `charts/`, `values/`, or `helmfile.d/`, run:

if no ENV_DIR is set then

```bash

export ENV_DIR=$PWD/tests/fixtures
bin/compare.sh
```
- [ ] Create values/<name>/<name>.gotmpl.
- [ ] Add tests fixture app file in tests/fixtures/env/apps/<name>.yaml.
- [ ] Add corresponding app entries in tests/integration/\*.yaml.
- [ ] If public exposure is needed, run the configure-public-app-exposure skill afterward.
- Chart version is auto-selected as latest stable semver; pre-release versions are ignored.
- Main implementation is in ci/src/add-app-helm-chart.ts.
- .github/skills/add-app-helm-chart/scripts/add-app-helm-chart.sh is a compatibility wrapper.
- Script confirms rendering path by running bin/compare.sh.
Copilot AI review requested due to automatic review settings July 15, 2026 10:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI review requested due to automatic review settings July 16, 2026 06:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

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.

4 participants