Skip to content

Align override configuration format with APIOps toolkit schema#102

Open
Copilot wants to merge 18 commits into
mainfrom
copilot/fix-github-issue-96
Open

Align override configuration format with APIOps toolkit schema#102
Copilot wants to merge 18 commits into
mainfrom
copilot/fix-github-issue-96

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 1, 2026

Fixes #96

This PR aligns override configuration handling and documentation with the APIOps Toolkit format so existing toolkit-style overrides work consistently in apiops-cli.

What changed

  • Updated override parsing to treat APIOps Toolkit list format as canonical:
    • namedValues, backends, apis, diagnostics, loggers must be lists of items with name and properties.
  • Added normalization in the config loader from toolkit list items to the internal keyed representation used by publish logic.
  • Added explicit validation errors when override sections use the old keyed-map shape.
  • Kept backward-friendly handling for toolkit list items that omit properties by falling back to inline item fields.
  • Updated generated override template comments to show toolkit-compatible structure.
  • Updated docs/examples across publish/getting-started/configuration/quickstart/environment-overrides to use the same format.
  • Updated integration and unit tests to cover:
    • valid toolkit format,
    • invalid keyed-map/mixed formats,
    • invalid entries,
    • missing-properties fallback behavior.

Why

Issue #96 requires apiops-cli to be a drop-in replacement for APIOps Toolkit override files. This change removes format ambiguity and makes docs, templates, parser behavior, and tests consistent with the toolkit-aligned model.

Copilot AI and others added 2 commits June 1, 2026 22:04
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged decision from GitHubExpert coordination: PR #102 title and
description updated to reflect real scope (override format alignment,
issue #96). Title update deferred due to API token scope limitations.

- Added orchestration log entry
- Added session log entry
- Merged decision inbox into decisions.md
- Updated scribe history

Closes #96

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI changed the title chore: merge main to fix workspace extractor test Align override configuration format with APIOps toolkit schema Jun 1, 2026
Copilot AI requested a review from petehauge June 1, 2026 22:07
Comment thread docs/guides/environment-overrides.md
Comment thread docs/guides/environment-overrides.md
Comment thread docs/guides/environment-overrides.md
Comment thread docs/guides/environment-overrides.md
Comment thread docs/guides/environment-overrides.md
Copilot AI changed the title Align override configuration format with APIOps toolkit schema Restore relevant environment-overrides guidance while preserving Toolkit list schema Jun 1, 2026
Copilot AI requested a review from petehauge June 1, 2026 22:49
@petehauge petehauge changed the title Restore relevant environment-overrides guidance while preserving Toolkit list schema Align override configuration format with APIOps toolkit schema Restore relevant environment-overrides guidance while preserving Toolkit list schema Jun 1, 2026
@petehauge petehauge changed the title Align override configuration format with APIOps toolkit schema Restore relevant environment-overrides guidance while preserving Toolkit list schema Align override configuration format with APIOps toolkit schema Jun 1, 2026
Copilot stopped work on behalf of petehauge due to an error June 1, 2026 23:16
@petehauge petehauge marked this pull request as ready for review June 2, 2026 18:09
@petehauge petehauge requested review from EMaher and Copilot June 2, 2026 18:51
Copy link
Copy Markdown

Copilot AI left a comment

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 aligns apiops-cli override configuration parsing, templates, documentation, and test coverage with the APIOps Toolkit override schema (list items with name + properties), to support reusing existing toolkit-style override files (Fixes #96).

Changes:

  • Normalizes toolkit-style override YAML sections into the internal keyed-map shape and rejects keyed-map section shapes with explicit validation errors.
  • Updates override templates and multiple docs to show toolkit-compatible override structure.
  • Extends unit/integration tests to cover toolkit normalization, invalid/mixed formats, and publish round-trip behavior with overrides.

Reviewed changes

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

Show a summary per file
File Description
src/lib/config-loader.ts Adds override YAML normalization + validation for toolkit list format.
src/templates/configs/override-config.ts Updates generated override template examples to - name / properties.
tests/unit/lib/config-loader.test.ts Adds unit tests for normalization, invalid shapes, and fallback behavior.
tests/unit/templates/configs/config-templates.test.ts Updates template assertions to match toolkit list-format examples.
tests/integration/all-resource-types/run-roundtrip-test.ps1 Updates integration override generation to toolkit list format and adds compare transcript logging.
docs/commands/publish.md Updates publish override examples and guidance to toolkit structure.
docs/reference/configuration.md Updates configuration reference snippet to toolkit structure.
docs/guides/environment-overrides.md Reworks overrides guide to document toolkit-compatible list format and rules.
docs/guides/migration-from-v1.md Updates migration guidance to state v1 publisher config maps directly to v2 overrides.
docs/getting-started.md Updates getting-started override example YAML to toolkit structure.
specs/quickstart.md Updates quickstart override example YAML to toolkit structure.
.squad/decisions.md Adds a decision record related to PR metadata correction.
.squad/agents/scribe/history.md Records scribe processing of PR metadata correction coordination.
.squad/agents/githubexpert/history.md Adds GitHubExpert learnings/history entries related to PR metadata correction + merge process.
.devcontainer/devcontainer-lock.json Adds devcontainer feature lockfile for reproducible devcontainer provisioning.

Comment thread src/lib/config-loader.ts
Comment on lines +13 to +15
/** Internal normalized override shape keyed by resource name. */
type OverrideSection = Record<string, Record<string, unknown>>;

Comment thread src/lib/config-loader.ts
Comment on lines +112 to +114
const loaded = yaml.load(content);
const parsed = isPlainObject(loaded) ? loaded : {};
const normalized = normalizeOverrideConfig(parsed);
Comment thread specs/quickstart.md
Comment on lines 47 to +51
Create `overrides.prod.yaml` for environment-specific values:

```yaml
namedValues:
backend-url:
value: "https://api.prod.example.com"
- name: backend-url
Comment thread docs/getting-started.md
Comment on lines 79 to +83
Create `overrides.prod.yaml` for environment-specific values:

```yaml
namedValues:
backend-url:
value: "https://api.prod.example.com"
- name: backend-url
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.

Overrides file is using a different format than APIOPs Toolkit

3 participants