Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Atmos stack manifest JSON schema. Fix docs #842

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Update Atmos stack manifest JSON schema. Fix docs #842

merged 4 commits into from
Dec 10, 2024

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Dec 10, 2024

what

  • Update Atmos stack manifest JSON schema
  • Fix docs

why

  • Add the new attribute metadata.enabled to the Atmos stack manifest validation schema
  • Fix some typos in the docs

Summary by CodeRabbit

  • New Features

    • Added an enabled property (boolean) to the metadata definition in various Atmos Stack Manifest JSON schemas, enhancing configuration capabilities.
  • Documentation

    • Updated the "Terraform Backends" document for clarity and added details on supported backends and configuration examples.
    • Enhanced the "Override Configurations" document with explicit examples for using the overrides section in stack manifests.
    • Revised the Atlantis integration document to clarify configuration options and workflows.
    • Restructured the "Configure Terraform Backend" document, emphasizing remote backend use and providing detailed configuration instructions.
  • Chores

    • Updated the Atmos tool version in the Dockerfile for the quick-start advanced examples.

@aknysh aknysh added the no-release Do not create a new release (wait for additional code changes) label Dec 10, 2024
@aknysh aknysh self-assigned this Dec 10, 2024
@aknysh aknysh requested review from a team as code owners December 10, 2024 20:25
@aknysh aknysh requested review from Gowiem and jamengual December 10, 2024 20:25
@github-actions github-actions bot temporarily deployed to preview December 10, 2024 20:28 Destroyed
Copy link
Contributor

coderabbitai bot commented Dec 10, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces updates to the JSON schema for Atmos Stack Manifest files by adding a new boolean property, enabled, to the metadata definition across multiple schema files. This addition allows components to specify whether they are enabled or not, without altering existing properties or validation logic. Additionally, the Dockerfile for a quick-start example has been modified to update the Atmos tool version from 1.121.0 to 1.122.0. Documentation enhancements have also been made to clarify the configuration of Terraform backends and the integration of Atlantis.

Changes

File Path Change Summary
examples/demo-context/schemas/atmos-manifest.json Added "enabled": { "type": "boolean" } in metadata definition.
examples/demo-helmfile/schemas/atmos-manifest.json Added "enabled": { "type": "boolean" } in metadata definition.
examples/demo-localstack/schemas/atmos-manifest.json Added "enabled": { "type": "boolean" } in metadata definition.
examples/quick-start-advanced/Dockerfile Updated ATMOS_VERSION from 1.121.0 to 1.122.0.
examples/quick-start-advanced/stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json Added "enabled": { "type": "boolean" } in metadata definition.
website/docs/core-concepts/components/terraform/backends.mdx Enhanced clarity and organization regarding Terraform backends; added examples and explanations.
website/docs/core-concepts/stacks/overrides.mdx Expanded details on overrides section; included YAML examples and use-cases.
website/docs/integrations/atlantis.mdx Updated configuration options and workflows for Atlantis integration; added examples.
website/docs/quick-start/advanced/configure-terraform-backend.mdx Restructured content on Terraform backend configuration; added new sections and examples.
website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json Added "enabled": { "type": "boolean" } in metadata definition.

Possibly related PRs

Suggested labels

minor

Suggested reviewers

  • hans-d
  • osterman

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a88ef6f and 1943669.

📒 Files selected for processing (5)
  • examples/demo-context/schemas/atmos-manifest.json (1 hunks)
  • examples/demo-helmfile/schemas/atmos-manifest.json (1 hunks)
  • examples/demo-localstack/schemas/atmos-manifest.json (1 hunks)
  • examples/quick-start-advanced/stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json (1 hunks)
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • examples/quick-start-advanced/stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • examples/demo-context/schemas/atmos-manifest.json
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • examples/demo-helmfile/schemas/atmos-manifest.json
🔇 Additional comments (2)
examples/demo-localstack/schemas/atmos-manifest.json (2)

323-326: Strong addition of the enabled flag! 🛡️

The new boolean property provides a clean way to toggle components without removing their configuration. This follows the principle of maintaining configuration as code while allowing for dynamic control.


328-345: Enhanced property descriptions provide better clarity! 📚

The updated descriptions for component, inherits, terraform_workspace, and terraform_workspace_pattern improve schema documentation. However, let's verify that these changes are consistently applied across all related schema files.

✅ Verification successful

Property descriptions are consistently applied across all schema files! ✅

The verification shows that all schema files have identical descriptions for the properties:

  • component: "Terraform/OpenTofu/Helmfile component"
  • inherits: "A list of Atmos components that the current component inherits from"
  • terraform_workspace: "Terraform workspace"
  • terraform_workspace_pattern: "Terraform workspace pattern"
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent metadata property descriptions across schema files

# Find all atmos manifest schema files
echo "Checking schema files for consistent metadata descriptions..."
fd -e json -x grep -l "atmos-manifest" {} | while read -r file; do
  echo "=== Checking $file ==="
  # Check for consistent descriptions
  jq -r '.definitions.metadata.properties | select(.) | {component,inherits,terraform_workspace,terraform_workspace_pattern} | .[] | .description' "$file"
done

Length of output: 2952


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or @auto-summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @auto-title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
examples/demo-localstack/schemas/atmos-manifest.json (1)

323-325: Well-structured schema addition for component enablement.

The new enabled boolean property in the metadata section provides a clean way to control component activation. This addition enhances the framework's flexibility without breaking existing configurations.

Consider documenting common use cases for this flag, such as feature toggles or environment-specific component activation.

examples/demo-context/schemas/atmos-manifest.json (1)

323-325: Consider adding a description for the new enabled property.

The implementation looks good, but adding a description would help users understand the purpose and behavior of this property.

 "enabled": {
-  "type": "boolean"
+  "type": "boolean",
+  "description": "Controls whether the component is enabled or disabled in the stack"
 },
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 36a595e and a88ef6f.

📒 Files selected for processing (10)
  • examples/demo-context/schemas/atmos-manifest.json (1 hunks)
  • examples/demo-helmfile/schemas/atmos-manifest.json (1 hunks)
  • examples/demo-localstack/schemas/atmos-manifest.json (1 hunks)
  • examples/quick-start-advanced/Dockerfile (1 hunks)
  • examples/quick-start-advanced/stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json (1 hunks)
  • website/docs/core-concepts/components/terraform/backends.mdx (1 hunks)
  • website/docs/core-concepts/stacks/overrides.mdx (1 hunks)
  • website/docs/integrations/atlantis.mdx (1 hunks)
  • website/docs/quick-start/advanced/configure-terraform-backend.mdx (1 hunks)
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json (1 hunks)
🧰 Additional context used
📓 Learnings (1)
examples/quick-start-advanced/Dockerfile (2)
Learnt from: aknysh
PR: cloudposse/atmos#775
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2024-11-12T05:52:05.088Z
Learning: It is acceptable to set `ARG ATMOS_VERSION` to a future version like `1.105.0` in `examples/quick-start-advanced/Dockerfile` if that will be the next release.
Learnt from: osterman
PR: cloudposse/atmos#801
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2024-11-23T00:13:22.004Z
Learning: When updating the `ATMOS_VERSION` in Dockerfiles, the team prefers to pin to the next future version when the PR merges, even if the version is not yet released.
🔇 Additional comments (7)
examples/quick-start-advanced/Dockerfile (1)

9-9: LGTM! Version update aligns with team preferences.

The version bump to 1.122.0 follows the team's established practice of pinning to the next future version when the PR merges.

website/docs/core-concepts/stacks/overrides.mdx (1)

365-365: Documentation fix: Correct CLI command reference.

The command reference has been properly updated from atmosxw to atmos, ensuring accurate documentation.

examples/demo-helmfile/schemas/atmos-manifest.json (1)

323-325: Apply the same documentation improvement here.

For consistency with other schema files, consider adding a description for the enabled property.

examples/quick-start-advanced/stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json (1)

323-325: Clean and well-structured schema addition!

The new enabled boolean property is correctly defined in the metadata section, maintaining the schema's structure and validation capabilities.

website/docs/quick-start/advanced/configure-terraform-backend.mdx (1)

158-159: Excellent documentation enhancement!

The added comment clearly explains alternative ways to set the auto_generate_backend_file option, improving user experience.

website/docs/core-concepts/components/terraform/backends.mdx (1)

105-106: Great consistency in documentation!

The added comment maintains consistency with the quick-start guide, ensuring users have a uniform understanding of the auto_generate_backend_file configuration across different sections.

website/docs/integrations/atlantis.mdx (1)

676-676: LGTM! Version update is consistent.

The Atmos version update from 1.121.0 to 1.122.0 aligns with the version changes made in the quick-start example Dockerfile.

@github-actions github-actions bot temporarily deployed to preview December 10, 2024 20:41 Destroyed
@aknysh aknysh merged commit 1bf5dc2 into main Dec 10, 2024
29 checks passed
@aknysh aknysh deleted the docs-fixes branch December 10, 2024 20:46
Copy link

These changes were released in v1.123.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-release Do not create a new release (wait for additional code changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants