Repository navigation
Add config/global/1.0 schema for root atmos.yaml file - #2731
rennokki (rennokki) wants to merge 2 commits into
Conversation
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
Warning This PR exceeds the recommended limit of 10,000 lines.Large PRs are difficult to review and may be rejected due to their size. Please verify that this PR does not address multiple issues. |
📝 WalkthroughWalkthroughAdds public and embedded JSON Schemas for root ChangesAtmos Config Schema
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant AtmosCLI
participant SchemaRegistry
participant SchemaFetcher
participant YAMLValidator
Developer->>AtmosCLI: run atmos validate schema config
AtmosCLI->>SchemaRegistry: resolve config schema and filename matches
SchemaRegistry->>SchemaFetcher: fetch atmos://schema/config/global/1.0
SchemaFetcher-->>YAMLValidator: provide embedded schema
YAMLValidator-->>AtmosCLI: return validation results
YAMLValidator-->>Developer: report valid or invalid atmos.yaml
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdfb949905
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds a first-class JSON Schema for the root atmos.yaml / atmos.yml config and wires it into Atmos validation + documentation, so editors and CLI validation can target the root config directly.
Changes:
- Added a published website schema for root Atmos CLI config (
website/static/.../atmos-config.json) and referenced it in docs for IDE integration. - Added default schema registry entry + executor logic to validate root config via
atmos validate schema config. - Added tests to fetch/validate the new schema and a “coverage ratchet” test to ensure
AtmosConfigurationtop-level YAML keys remain represented in the config schema.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| website/static/schemas/atmos/atmos-config/1.0/atmos-config.json | New published JSON Schema for root atmos.yaml/atmos.yml editor validation. |
| website/docs/validation/json-schema.mdx | Docs: adds root config schema validation and IDE $schema directive snippet. |
| website/docs/cli/configuration/schemas.mdx | Docs: expands schemas configuration to cover root config schema + usage. |
| pkg/validator/schema_validator_test.go | Tests: validates embedded config schema against valid/invalid fixtures. |
| pkg/datafetcher/schema_condition_validation_test.go | Tests: simplifies schema sets used in condition validation tests. |
| pkg/datafetcher/fetch_schema_test.go | Tests: ensures the new atmos://schema/config/global/1.0 fetch key works. |
| pkg/datafetcher/atmos_config_schema_coverage_test.go | New test ratchet to ensure AtmosConfiguration YAML keys are covered by config schemas. |
| pkg/config/default.go | Adds default schemas.config registry entry for root config validation. |
| internal/exec/validate_schema.go | Adds default schema selection for config and expands match-defaulting logic. |
| internal/exec/validate_schema_test.go | Tests: verifies config default schema selection behavior. |
| agent-skills/skills/atmos-schemas/SKILL.md | Internal skill docs updated to include the new atmos-config schema layer. |
| agent-skills/skills/atmos-schemas/references/schema-structure.md | Reference docs updated to document atmos-config schema structure and locations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
agent-skills/skills/atmos-schemas/SKILL.md (2)
439-456: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win"Four manifest schema files" incorrectly includes the global config schema.
Line 439 states "The four manifest schema files" but the bullet list at line 454 includes the "Global config schema," which is not a manifest schema. This is misleading.
📝 Suggested fix
-The four manifest schema files are mostly identical but have some differences: +The schema files have some differences:🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent-skills/skills/atmos-schemas/SKILL.md` around lines 439 - 456, Update the introductory description to distinguish the three manifest schema files from the Global config schema; identify the manifest comparison as covering only the Website, Stack-config, and Atmos manifest schemas, while describing the Global config schema separately as the root atmos.yaml configuration schema.
136-140: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winConfiguration precedence section only covers manifest schema.
With the new
schemas.config.schemaoption, the precedence for the config schema should also be documented here for completeness.📝 Suggested addition
4. Default embedded schema (compiled into the binary) + +For `schemas.config.schema`: +1. `--schemas-config-schema` CLI flag (if supported) +2. `ATMOS_SCHEMAS_CONFIG_SCHEMA` environment variable (if supported) +3. `schemas.config.schema` in `atmos.yaml` +4. Default embedded schema `atmos://schema/config/global/1.0`🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@agent-skills/skills/atmos-schemas/SKILL.md` around lines 136 - 140, Expand the “Configuration precedence” section in SKILL.md to document the equivalent precedence for the config schema configured by `schemas.config.schema`, covering its CLI flag, environment variable, atmos.yaml value, and embedded default. Keep the existing manifest-schema precedence unchanged and clearly distinguish the two schema options.website/docs/cli/configuration/schemas.mdx (1)
194-198: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd
atmos validate schemato Related Commands.The page now documents
atmos validate schema config(line 138), but the Related Commands card list doesn't includeatmos validate schema. Adding it would help users discover the command.📝 Suggested addition
<DocCardList items={[ {type: 'link', href: '/cli/commands/validate/usage', label: 'atmos validate', description: 'Validate Atmos stacks and components'}, {type: 'link', href: '/cli/commands/validate/stacks', label: 'atmos validate stacks', description: 'Validate stack manifests against JSON Schema'}, + {type: 'link', href: '/cli/commands/validate/schema', label: 'atmos validate schema', description: 'Validate files against custom schema validators'}, {type: 'link', href: '/cli/commands/validate/component', label: 'atmos validate component', description: 'Validate components with OPA policies'}, ]} />🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@website/docs/cli/configuration/schemas.mdx` around lines 194 - 198, Add an `atmos validate schema` entry to the `DocCardList` items in the Related Commands section, with a link to the schema command documentation and a description matching the documented schema validation behavior. Preserve the existing validate command entries.
🧹 Nitpick comments (2)
pkg/datafetcher/schema/config/global/1.0.json (1)
1-4543: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated schema content across two files (mirrors website/static copy).
This file and
website/static/schemas/atmos/atmos-config/1.0/atmos-config.jsonare byte-identical. The coverage test presumably guards drift, but consider generating one from the other (or from a single source) to avoid two ~4500-line JSON files needing manual sync on every future change.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/datafetcher/schema/config/global/1.0.json` around lines 1 - 4543, Eliminate the duplicated Atmos configuration schema maintenance between the root schema and the website static copy. Establish one canonical schema source and generate or otherwise derive the other copy from it, updating the relevant schema-generation or synchronization workflow while preserving both consumers’ existing paths and byte-equivalent content.pkg/datafetcher/atmos_config_schema_coverage_test.go (1)
144-161: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider using
reflect.StructTag.Getfor robust yaml tag parsing.The manual
structFieldYAMLKeyfunction splits the raw tag string by spaces and searches for theyaml:prefix. This works for all currentAtmosConfigurationfields, butreflect.StructTag(strings.Trim(field.Tag.Value, "")).Get("yaml")` handles the standard tag format more robustly (e.g., tag values containing spaces) and is the idiomatic Go approach.♻️ Optional refactor using reflect.StructTag
import ( "encoding/json" "go/ast" "go/parser" "go/token" + "reflect" "os" "path/filepath" "strings" "testing" "github.com/stretchr/testify/require" ) func structFieldYAMLKey(field *ast.Field) string { if field.Tag == nil { return "" } - tag := strings.Trim(field.Tag.Value, "`") - for _, part := range strings.Split(tag, " ") { - if !strings.HasPrefix(part, "yaml:") { - continue - } - value := strings.TrimPrefix(part, "yaml:") - value = strings.Trim(value, `"`) - if idx := strings.Index(value, ","); idx >= 0 { - value = value[:idx] - } - return value - } - return "" + tag := reflect.StructTag(strings.Trim(field.Tag.Value, "`")) + yamlTag := tag.Get("yaml") + if idx := strings.Index(yamlTag, ","); idx >= 0 { + return yamlTag[:idx] + } + return yamlTag }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/datafetcher/atmos_config_schema_coverage_test.go` around lines 144 - 161, Update structFieldYAMLKey to parse the field tag through reflect.StructTag.Get("yaml") instead of manually splitting and trimming the raw tag string. Preserve the existing behavior of returning only the YAML key before any comma options, and return an empty string when no YAML tag exists.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/exec/validate_schema.go`:
- Around line 126-131: The fallback matches in the schema validation logic are
missing supported dotfile config names. Update the sourceKey handling in the
validation function to include .atmos.yaml and .atmos.yml alongside the existing
names, and synchronize the corresponding default registry in
pkg/config/default.go so both lists contain all four supported config files.
In `@pkg/datafetcher/schema/config/global/1.0.json`:
- Around line 1341-1414: Loosen the schemas for command, command_argument, and
command_flag by removing fields from their required lists that are optional in
documented minimal custom-command definitions. Preserve property types, enums,
and additionalProperties constraints, while ensuring valid minimal atmos.yaml
custom-command forms pass validation.
In `@pkg/validator/schema_validator_test.go`:
- Line 225: Rename the variable assigned from the invalid-config fixture in the
test from validConfig to invalidConfig, and update its subsequent use when
writing to invalidPath so the test consistently reflects the fixture’s invalid
content.
---
Outside diff comments:
In `@agent-skills/skills/atmos-schemas/SKILL.md`:
- Around line 439-456: Update the introductory description to distinguish the
three manifest schema files from the Global config schema; identify the manifest
comparison as covering only the Website, Stack-config, and Atmos manifest
schemas, while describing the Global config schema separately as the root
atmos.yaml configuration schema.
- Around line 136-140: Expand the “Configuration precedence” section in SKILL.md
to document the equivalent precedence for the config schema configured by
`schemas.config.schema`, covering its CLI flag, environment variable, atmos.yaml
value, and embedded default. Keep the existing manifest-schema precedence
unchanged and clearly distinguish the two schema options.
In `@website/docs/cli/configuration/schemas.mdx`:
- Around line 194-198: Add an `atmos validate schema` entry to the `DocCardList`
items in the Related Commands section, with a link to the schema command
documentation and a description matching the documented schema validation
behavior. Preserve the existing validate command entries.
---
Nitpick comments:
In `@pkg/datafetcher/atmos_config_schema_coverage_test.go`:
- Around line 144-161: Update structFieldYAMLKey to parse the field tag through
reflect.StructTag.Get("yaml") instead of manually splitting and trimming the raw
tag string. Preserve the existing behavior of returning only the YAML key before
any comma options, and return an empty string when no YAML tag exists.
In `@pkg/datafetcher/schema/config/global/1.0.json`:
- Around line 1-4543: Eliminate the duplicated Atmos configuration schema
maintenance between the root schema and the website static copy. Establish one
canonical schema source and generate or otherwise derive the other copy from it,
updating the relevant schema-generation or synchronization workflow while
preserving both consumers’ existing paths and byte-equivalent content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2811aaea-362e-44c5-82ca-ab191c20b435
📒 Files selected for processing (13)
agent-skills/skills/atmos-schemas/SKILL.mdagent-skills/skills/atmos-schemas/references/schema-structure.mdinternal/exec/validate_schema.gointernal/exec/validate_schema_test.gopkg/config/default.gopkg/datafetcher/atmos_config_schema_coverage_test.gopkg/datafetcher/fetch_schema_test.gopkg/datafetcher/schema/config/global/1.0.jsonpkg/datafetcher/schema_condition_validation_test.gopkg/validator/schema_validator_test.gowebsite/docs/cli/configuration/schemas.mdxwebsite/docs/validation/json-schema.mdxwebsite/static/schemas/atmos/atmos-config/1.0/atmos-config.json
| { | ||
| "type": "string", | ||
| "pattern": "^!include" | ||
| "description": { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "required": { | ||
| "type": "boolean" | ||
| }, | ||
| "default": { | ||
| "type": "string" | ||
| }, | ||
| "type": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "local", | ||
| "s3", | ||
| "remote", | ||
| "vault", | ||
| "static", | ||
| "azurerm", | ||
| "gcs", | ||
| "cloud" | ||
| "component", | ||
| "stack", | ||
| "" | ||
| ] | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name", | ||
| "description", | ||
| "required", | ||
| "default" | ||
| ] | ||
| }, | ||
| "backend": { | ||
| "title": "backend", | ||
| "description": "Backend section", | ||
| "$ref": "#/definitions/backend_manifest" | ||
| }, | ||
| "remote_state_backend_type": { | ||
| "title": "remote_state_backend_type", | ||
| "description": "Remote state backend type", | ||
| "oneOf": [ | ||
| { | ||
| "type": "string", | ||
| "pattern": "^!include" | ||
| "command_flag": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "name": { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "shorthand": { | ||
| "type": "string" | ||
| }, | ||
| "type": { | ||
| "type": "string" | ||
| }, | ||
| "description": { | ||
| "type": "string" | ||
| }, | ||
| "usage": { | ||
| "type": "string" | ||
| }, | ||
| "required": { | ||
| "type": "boolean" | ||
| }, | ||
| "default": {}, | ||
| "semantic_type": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "local", | ||
| "s3", | ||
| "remote", | ||
| "vault", | ||
| "static", | ||
| "azurerm", | ||
| "gcs", | ||
| "cloud" | ||
| "component", | ||
| "stack", | ||
| "" | ||
| ] | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name", | ||
| "shorthand", | ||
| "type", | ||
| "description", | ||
| "usage", | ||
| "required", | ||
| "default" | ||
| ] | ||
| }, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the relevant schema ranges.
file="pkg/datafetcher/schema/config/global/1.0.json"
wc -l "$file"
sed -n '1330,1435p' "$file"
printf '\n----\n'
sed -n '1490,1595p' "$file"
printf '\n----\n'
# Search for documented examples of custom commands / arguments / flags.
rg -n -C 3 '"name": "terraform"|arguments:|flags:|command_argument|command_flag|custom command|commands:' . -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**'Repository: cloudposse/atmos
Length of output: 50375
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Narrow search to docs and schema references.
rg -n -C 4 'name:\s*(terraform|component|stack)|arguments:|flags:|custom command|command_argument|command_flag|component_config|verbose' \
. \
-g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**' -g '!**/*.min.*'Repository: cloudposse/atmos
Length of output: 50373
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="pkg/datafetcher/schema/config/global/1.0.json"
echo "== schema lines =="
sed -n '1340,1425p' "$file"
echo
sed -n '1555,1585p' "$file"
echo
echo "== candidate docs/examples =="
rg -n -C 3 'name:\s*(terraform|component|stack)|arguments:|flags:|required:\s*false|command_argument|command_flag|custom command' \
. \
-g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**' -g '!**/*.min.*' | head -n 200Repository: cloudposse/atmos
Length of output: 18672
Loosen the custom-command schema — command, command_argument, and command_flag are over-constrained here. The documented minimal custom-command forms omit many of these fields, so the current required lists make common atmos.yaml files fail schema validation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/datafetcher/schema/config/global/1.0.json` around lines 1341 - 1414,
Loosen the schemas for command, command_argument, and command_flag by removing
fields from their required lists that are optional in documented minimal
custom-command definitions. Preserve property types, enums, and
additionalProperties constraints, while ensuring valid minimal atmos.yaml
custom-command forms pass validation.
There was a problem hiding this comment.
Maybe we should address this using a oneOf rule that is specific, with a fallback to any original behaviour?
There was a problem hiding this comment.
@rennokki, good instinct to want stronger validation than just wide-open, but oneOf won't work cleanly here.
The problem: command, command_argument, command_flag are always plain objects — there's no structural variant to switch on (unlike task_step, which already uses oneOf for string-vs-object). If we made a "strict" branch (all fields required) and a "loose" branch (nothing required) with the same properties/additionalProperties: false, any document satisfying the strict branch also satisfies the loose one. oneOf requires exactly one match, so that would actually break valid full documents too.
anyOf avoids that ambiguity, but a genuinely permissive fallback (additionalProperties: true) defeats the purpose of catching typos, which is why additionalProperties: false is there in the first place.
Simplest fix: just drop the over-broad required arrays on all three and keep additionalProperties: false for typo protection. If you still want some enforcement, anyOf with meaningful discriminators works better than a generic fallback, e.g. for command:
"command": {
"type": "object",
"additionalProperties": false,
"properties": { "...": "unchanged" },
"anyOf": [
{ "required": ["steps"] },
{ "required": ["commands"] },
{ "required": ["component"] },
{ "required": ["component_config"] }
]
}That enforces "a command must actually do something" without blocking minimal, valid configs. Want me to apply this to command, command_argument, and command_flag?
There was a problem hiding this comment.
Skipping a strict oneOf for command / command_argument / command_flag for now. As noted in the thread, these are always plain objects with no structural variant to discriminate on, so a strict+loose oneOf would always satisfy the loose branch. The current optional-field design is intentional for real-world configs (e.g. quick-start-advanced). Map-form env vars remain on command.env; structured array entries use command_env with key + value or valueCommand.
There was a problem hiding this comment.
@rennokki, understood — makes sense. Plain-object schemas without a structural discriminator would make oneOf unreliable, so keeping required loose with additionalProperties: false for typo protection is the pragmatic choice here. Thanks for confirming the command.env vs command_env split too.
✏️ Learnings added
Learnt from: rennokki
Repo: cloudposse/atmos PR: 2731
File: pkg/datafetcher/schema/config/global/1.0.json:1341-1414
Timestamp: 2026-07-15T07:46:02.097Z
Learning: In `pkg/datafetcher/schema/config/global/1.0.json`, the `command`, `command_argument`, and `command_flag` schema definitions are intentionally kept as plain objects with loose/optional `required` fields (not a strict `oneOf`), because these definitions have no structural variant to discriminate on — a strict+loose `oneOf` split would always satisfy the loose branch, making it ineffective. `additionalProperties: false` is retained for typo protection. Map-form environment variables use `command.env` (object), while structured array entries use the `command_env` definition (object with `key` + `value`/`valueCommand`).
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
|
Do you guys merge or rebase when keeping the branches up-to-date? |
c8640ab to
f700865
Compare
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@agent-skills/skills/atmos-schemas/SKILL.md`:
- Around line 454-456: Update the documentation entry for the global config
schema to describe the correct total as “four schema files,” or explicitly
distinguish the three manifest schemas from this non-manifest root configuration
schema; preserve the existing paths and coverage-test reference.
- Around line 128-133: Update the Configuration precedence documentation in
SKILL.md to explicitly describe precedence for schemas.config.schema, including
CLI flags, environment variables, and defaults; alternatively, narrow the
section heading and wording to apply only to schemas.atmos.manifest so the
config schema is not implied to be covered.
- Around line 240-244: Update the schema guidance table or surrounding
instructions to distinguish manifest changes from root atmos.yaml configuration
changes. For manifest-related updates, prioritize the public atmos-manifest and
embedded stack-config schemas; for global configuration changes, prioritize the
public atmos-config and embedded config/global schemas. Keep the existing schema
references and ensure each branch identifies the appropriate primary files.
In `@pkg/config/default.go`:
- Around line 108-114: Update the config SchemaRegistry entry in the default
configuration so its Matches list includes the schema-advertised .atmos.yaml and
.atmos.yml filenames, keeping runtime matching aligned with the schema.
In `@pkg/datafetcher/schema/config/global/1.0.json`:
- Around line 140-150: Update the base_path schema definition to avoid
overlapping oneOf branches: replace oneOf with anyOf while retaining both the
include_string reference and unrestricted string branch, or remove the redundant
include_string branch and keep the string type. Ensure !include values validate
successfully.
- Around line 1311-1339: Update the command_env schema’s oneOf definition to
reserve it for structured entries: remove the map-form branch, and require key
plus exactly one of value or valueCommand. Preserve support for map-form
environment variables through the existing command.env schema.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8bf11fd5-5d0b-481d-8994-d9004af2e568
📒 Files selected for processing (13)
agent-skills/skills/atmos-schemas/SKILL.mdagent-skills/skills/atmos-schemas/references/schema-structure.mdinternal/exec/validate_schema.gointernal/exec/validate_schema_test.gopkg/config/default.gopkg/datafetcher/atmos_config_schema_coverage_test.gopkg/datafetcher/fetch_schema_test.gopkg/datafetcher/schema/config/global/1.0.jsonpkg/datafetcher/schema_condition_validation_test.gopkg/validator/schema_validator_test.gowebsite/docs/cli/configuration/schemas.mdxwebsite/docs/validation/json-schema.mdxwebsite/static/schemas/atmos/atmos-config/1.0/atmos-config.json
🚧 Files skipped from review as they are similar to previous changes (9)
- pkg/validator/schema_validator_test.go
- pkg/datafetcher/fetch_schema_test.go
- agent-skills/skills/atmos-schemas/references/schema-structure.md
- website/docs/cli/configuration/schemas.mdx
- website/docs/validation/json-schema.mdx
- internal/exec/validate_schema_test.go
- pkg/datafetcher/atmos_config_schema_coverage_test.go
- website/static/schemas/atmos/atmos-config/1.0/atmos-config.json
- internal/exec/validate_schema.go
|
💥 This pull request now has conflicts. Could you fix it rennokki (@rennokki)? 🙏 |
|
Erik Osterman (Cloud Posse) (@osterman) Andriy Knysh (@aknysh) The new |
|
Thanks for taking this on, rennokki (@rennokki)! A root We ended up solving it in #2761 with a different construction: the schema is generated from the Atmos configuration structs ( Your PR still directly improved the result: it flagged that the embedded So I'm going to close this in favor of #2761 — but genuinely, thank you for pushing on it. Once it ships you'll get Would love your eyes on it if you have a chance to try it against your configs — you clearly know this surface well. |
|
Closed in favor of #2761 |
what
Added schema for the root
atmos.yamlfile.why
While the current schemas do help for non-
atmos.yamlfile suggestions in the IDE (for example,stacks/**/*.yaml), the root configuration never had a direct JSON schema. Most of the changes done had to be manually checked and "guessed" sometimes, having no way to see what other features exist or how they are called while writing the root configuration for atmos.references
closes #2351
Summary by CodeRabbit
atmos.yaml/atmos.ymlusing the Atmos config JSON schema.matchesbehavior for root config validation.atmos validate schema configand editor$schemaguidance.