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

Prevent normalization of binaries and whitespace sensitive files #929

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

osterman
Copy link
Member

@osterman osterman commented Jan 10, 2025

what

  • Ensure git respects binary files on checkout

why

  • We changed the file formatting for better cross-platform support

See: https://github.com/cloudposse/atmos/actions/runs/12714711809/job/35446199346

dirty checkout ``` Please check in your pipeline what can be changing the following files: M .github/banner.png M docs/demo.gif M docs/img/atmos-logo-1[28](https://github.com/cloudposse/atmos/actions/runs/12714711809/job/35446199346#step:11:29).png M docs/img/atmos-logo.ai M docs/img/atmos-logo.eps M docs/img/atmos-logo.jpg M docs/img/atmos-logo.pdf M docs/img/atmos-logo.png M docs/img/atmos-validate-infra-vpc-in-tenant1-ue2-dev.png M docs/img/atmos-validate-infra-vpc-in-tenant1-ue2-prod.png M website/src/components/Screengrabs/atmos--help.html M website/src/components/Screengrabs/atmos-atlantis--help.html M website/src/components/Screengrabs/atmos-atlantis-generate--help.html M website/src/components/Screengrabs/atmos-atlantis-generate-repo-config--help.html M website/src/components/Screengrabs/atmos-aws--help.html M website/src/components/Screengrabs/atmos-aws-eks--help.html M website/src/components/Screengrabs/atmos-aws-eks-update-kubeconfig--help.html M website/src/components/Screengrabs/atmos-completion--help.html M website/src/components/Screengrabs/atmos-completion-bash.html M website/src/components/Screengrabs/atmos-completion-fish.html M website/src/components/Screengrabs/atmos-completion-powershell.html M website/src/components/Screengrabs/atmos-completion-zsh.html M website/src/components/Screengrabs/atmos-describe--help.html M website/src/components/Screengrabs/atmos-describe-affected--help.html M website/src/components/Screengrabs/atmos-describe-component--help.html M website/src/components/Screengrabs/atmos-describe-config--help.html M website/src/components/Screengrabs/atmos-describe-dependents--help.html M website/src/components/Screengrabs/atmos-describe-stacks--help.html M website/src/components/Screengrabs/atmos-describe-workflows--help.html M website/src/components/Screengrabs/atmos-docs--help.html M website/src/components/Screengrabs/atmos-helmfile--help.html M website/src/components/Screengrabs/atmos-helmfile-generate--help.html M website/src/components/Screengrabs/atmos-helmfile-generate-varfile--help.html M website/src/components/Screengrabs/atmos-terraform--help.html M website/src/components/Screengrabs/atmos-terraform-clean--help.html M website/src/components/Screengrabs/atmos-terraform-deploy--help.html M website/src/components/Screengrabs/atmos-terraform-generate--help.html M website/src/components/Screengrabs/atmos-terraform-generate-backend--help.html M website/src/components/Screengrabs/atmos-terraform-generate-backends--help.html M website/src/components/Screengrabs/atmos-terraform-generate-varfile--help.html M website/src/components/Screengrabs/atmos-terraform-generate-varfiles--help.html M website/src/components/Screengrabs/atmos-terraform-shell--help.html M website/src/components/Screengrabs/atmos-terraform-workspace--help.html M website/src/components/Screengrabs/atmos-validate--help.html M website/src/components/Screengrabs/atmos-validate-component--help.html M website/src/components/Screengrabs/atmos-validate-stacks--help.html M website/src/components/Screengrabs/atmos-vendor--help.html M website/src/components/Screengrabs/atmos-vendor-pull--help.html M website/src/components/Screengrabs/atmos-version.html M website/src/components/Screengrabs/atmos-workflow--help.html M website/src/components/Screengrabs/demo-stacks/deploy-dev.ansi M website/src/components/Screengrabs/demo-stacks/deploy-dev.html M website/src/components/Screengrabs/demo-stacks/deploy-prod.html M website/src/components/Screengrabs/demo-stacks/deploy-staging.html M website/src/components/Screengrabs/demo-stacks/deploy.html M website/src/components/Screengrabs/demo-stacks/write-your-components.html M website/src/components/Screengrabs/tree-CAF--gitignore.html M website/src/components/Screengrabs/tree.html M website/static/img/atmos-logo.png M website/static/img/atmos-validate-infra-vpc-in-tenant1-ue2-dev.png M website/static/img/atmos-validate-infra-vpc-in-tenant1-ue2-prod.png M website/static/img/cli/atmos.yaml/atmos-default-cli-config-message.png M website/static/img/cli/atmos/atmos-cli-command-1.png M website/static/img/cli/atmos/atmos-cli-command-2.png M website/static/img/cli/help/atmos-help-command-2.png M website/static/img/cli/help/atmos-help-command-3.png M website/static/img/cli/help/atmos-help-command.png M website/static/img/cli/version/atmos-version-command-1.png M website/static/img/cli/workflow/atmos-workflow-command-1.png M website/static/img/cli/workflow/atmos-workflow-command-2.png M website/static/img/cli/workflow/atmos-workflow-command-3.png M website/static/img/cli/workflow/atmos-workflow-command-4.png M website/static/img/demo.gif M website/static/img/github-actions/apply.png M website/static/img/github-actions/create-extended.png M website/static/img/github-actions/create.png M website/static/img/github-actions/destroy.png M website/static/img/github-actions/drift-issue-list.png M website/static/img/github-actions/drift-issue.png M website/static/img/github-actions/drift-summary.png M website/static/img/github-actions/github-app.png M website/static/img/github-actions/github-deployment-environment.png M website/static/img/tutorial-3-static-site.png M website/static/img/tutorials-3-tutorials-shell.png ```
## references - #928

@osterman osterman requested a review from a team as a code owner January 10, 2025 20:49
Copy link

mergify bot commented Jan 10, 2025

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@mergify mergify bot added triage Needs triage needs-cloudposse Needs Cloud Posse assistance labels Jan 10, 2025
@osterman osterman added the do not merge Do not merge this PR, doing so would cause problems label Jan 10, 2025
Copy link
Contributor

coderabbitai bot commented Jan 10, 2025

Warning

Rate limit exceeded

@osterman has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 081931a and ce74e9e.

📒 Files selected for processing (1)
  • .gitattributes (1 hunks)
📝 Walkthrough

Walkthrough

This pull request involves a comprehensive reformatting of HTML help documentation files for the Atmos CLI across multiple components. The changes primarily focus on restructuring and reintroducing existing content with slight variations in formatting, whitespace, and visual representation. No functional changes to the underlying command logic or descriptions were made, suggesting a documentation presentation update.

Changes

File Path Change Summary
website/src/components/Screengrabs/ Multiple HTML help files for Atmos CLI commands reformatted
atmos-completion-fish.html Added new completion-related functions for Fish shell
atmos-completion-powershell.html Reintroduced PowerShell completion script
demo-stacks/deploy-*.html Enhanced output formatting for deployment scripts

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Docs as Help Documentation
    participant CLI as Atmos CLI

    Dev->>Docs: Request command help
    Docs-->>Dev: Display reformatted help content
    Dev->>CLI: Execute command
    CLI-->>Dev: Consistent functionality
Loading

Possibly related PRs

Suggested Labels

no-release

Suggested Reviewers

  • aknysh
  • kevcube

Sparta stands strong: documentation looks clean, functionality remains unbroken! 🛡️


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. (Beta)
  • @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: 2

🧹 Nitpick comments (3)
website/src/components/Screengrabs/atmos-completion-fish.html (2)

4-4: Consider using a Fish-specific environment variable for debug file.

The script uses $BASH_COMP_DEBUG_FILE which is Bash-specific. For better Fish shell integration, consider using a Fish-specific environment variable name.

-    set -l file "$BASH_COMP_DEBUG_FILE"
+    set -l file "$FISH_COMP_DEBUG_FILE"

184-201: Consider enhancing documentation for space prevention logic.

While the implementation is correct, the space prevention logic is complex and would benefit from more detailed documentation explaining the edge cases and the reason for adding a second completion.

Add a more detailed comment block:

+            # Space prevention logic:
+            # 1. Split completion on tab to separate the completion from its description
+            # 2. Check if the completion already ends with a special character
+            # 3. If not, add a second completion with a trailing dot to prevent space
+            #    This works because Fish won't add a space after a completion ending in dot
website/src/components/Screengrabs/atmos-terraform--help.html (1)

32-32: Maintain consistent quote style

Use single quotes instead of backticks to maintain consistency with the rest of the documentation.

- `--append-user-agent` flag allows you to customize the User-Agent string appended to Terraform requests for enhanced observability and traceability.
+ '--append-user-agent' flag allows you to customize the User-Agent string appended to Terraform requests for enhanced observability and traceability.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c399118 and 081931a.

⛔ Files ignored due to path filters (34)
  • .github/banner.png is excluded by !**/*.png
  • docs/demo.gif is excluded by !**/*.gif
  • docs/img/atmos-logo-128.png is excluded by !**/*.png
  • docs/img/atmos-logo.jpg is excluded by !**/*.jpg
  • docs/img/atmos-logo.pdf is excluded by !**/*.pdf
  • docs/img/atmos-logo.png is excluded by !**/*.png
  • docs/img/atmos-validate-infra-vpc-in-tenant1-ue2-dev.png is excluded by !**/*.png
  • docs/img/atmos-validate-infra-vpc-in-tenant1-ue2-prod.png is excluded by !**/*.png
  • website/static/img/atmos-logo.png is excluded by !**/*.png
  • website/static/img/atmos-validate-infra-vpc-in-tenant1-ue2-dev.png is excluded by !**/*.png
  • website/static/img/atmos-validate-infra-vpc-in-tenant1-ue2-prod.png is excluded by !**/*.png
  • website/static/img/cli/atmos.yaml/atmos-default-cli-config-message.png is excluded by !**/*.png
  • website/static/img/cli/atmos/atmos-cli-command-1.png is excluded by !**/*.png
  • website/static/img/cli/atmos/atmos-cli-command-2.png is excluded by !**/*.png
  • website/static/img/cli/help/atmos-help-command-2.png is excluded by !**/*.png
  • website/static/img/cli/help/atmos-help-command-3.png is excluded by !**/*.png
  • website/static/img/cli/help/atmos-help-command.png is excluded by !**/*.png
  • website/static/img/cli/version/atmos-version-command-1.png is excluded by !**/*.png
  • website/static/img/cli/workflow/atmos-workflow-command-1.png is excluded by !**/*.png
  • website/static/img/cli/workflow/atmos-workflow-command-2.png is excluded by !**/*.png
  • website/static/img/cli/workflow/atmos-workflow-command-3.png is excluded by !**/*.png
  • website/static/img/cli/workflow/atmos-workflow-command-4.png is excluded by !**/*.png
  • website/static/img/demo.gif is excluded by !**/*.gif
  • website/static/img/github-actions/apply.png is excluded by !**/*.png
  • website/static/img/github-actions/create-extended.png is excluded by !**/*.png
  • website/static/img/github-actions/create.png is excluded by !**/*.png
  • website/static/img/github-actions/destroy.png is excluded by !**/*.png
  • website/static/img/github-actions/drift-issue-list.png is excluded by !**/*.png
  • website/static/img/github-actions/drift-issue.png is excluded by !**/*.png
  • website/static/img/github-actions/drift-summary.png is excluded by !**/*.png
  • website/static/img/github-actions/github-app.png is excluded by !**/*.png
  • website/static/img/github-actions/github-deployment-environment.png is excluded by !**/*.png
  • website/static/img/tutorial-3-static-site.png is excluded by !**/*.png
  • website/static/img/tutorials-3-tutorials-shell.png is excluded by !**/*.png
📒 Files selected for processing (43)
  • website/src/components/Screengrabs/atmos--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-atlantis--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-atlantis-generate--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-atlantis-generate-repo-config--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-aws--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-aws-eks--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-aws-eks-update-kubeconfig--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-completion--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-completion-fish.html (1 hunks)
  • website/src/components/Screengrabs/atmos-completion-powershell.html (1 hunks)
  • website/src/components/Screengrabs/atmos-completion-zsh.html (1 hunks)
  • website/src/components/Screengrabs/atmos-describe--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-describe-affected--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-describe-component--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-describe-config--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-describe-dependents--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-describe-stacks--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-describe-workflows--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-docs--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-helmfile--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-helmfile-generate--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-helmfile-generate-varfile--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-clean--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-deploy--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-generate--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-generate-backend--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-generate-backends--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-generate-varfile--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-generate-varfiles--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-shell--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-terraform-workspace--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-validate--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-validate-component--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-validate-stacks--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-vendor--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-vendor-pull--help.html (1 hunks)
  • website/src/components/Screengrabs/atmos-version.html (1 hunks)
  • website/src/components/Screengrabs/atmos-workflow--help.html (1 hunks)
  • website/src/components/Screengrabs/demo-stacks/deploy-dev.ansi (1 hunks)
  • website/src/components/Screengrabs/demo-stacks/deploy-dev.html (1 hunks)
  • website/src/components/Screengrabs/demo-stacks/deploy-prod.html (1 hunks)
  • website/src/components/Screengrabs/demo-stacks/deploy-staging.html (1 hunks)
✅ Files skipped from review due to trivial changes (41)
  • website/src/components/Screengrabs/atmos-terraform-generate-backend--help.html
  • website/src/components/Screengrabs/atmos-validate-component--help.html
  • website/src/components/Screengrabs/atmos-describe-affected--help.html
  • website/src/components/Screengrabs/atmos-terraform-clean--help.html
  • website/src/components/Screengrabs/atmos-terraform-generate--help.html
  • website/src/components/Screengrabs/atmos-terraform-shell--help.html
  • website/src/components/Screengrabs/atmos-helmfile-generate--help.html
  • website/src/components/Screengrabs/atmos-completion--help.html
  • website/src/components/Screengrabs/atmos-describe-config--help.html
  • website/src/components/Screengrabs/atmos-terraform-deploy--help.html
  • website/src/components/Screengrabs/atmos-describe--help.html
  • website/src/components/Screengrabs/atmos-validate--help.html
  • website/src/components/Screengrabs/atmos-helmfile-generate-varfile--help.html
  • website/src/components/Screengrabs/atmos-vendor--help.html
  • website/src/components/Screengrabs/demo-stacks/deploy-dev.ansi
  • website/src/components/Screengrabs/atmos-atlantis--help.html
  • website/src/components/Screengrabs/atmos-workflow--help.html
  • website/src/components/Screengrabs/atmos-describe-dependents--help.html
  • website/src/components/Screengrabs/atmos-completion-zsh.html
  • website/src/components/Screengrabs/atmos-describe-stacks--help.html
  • website/src/components/Screengrabs/atmos-terraform-generate-backends--help.html
  • website/src/components/Screengrabs/atmos-atlantis-generate--help.html
  • website/src/components/Screengrabs/atmos-helmfile--help.html
  • website/src/components/Screengrabs/atmos--help.html
  • website/src/components/Screengrabs/atmos-aws-eks--help.html
  • website/src/components/Screengrabs/atmos-aws--help.html
  • website/src/components/Screengrabs/atmos-terraform-workspace--help.html
  • website/src/components/Screengrabs/demo-stacks/deploy-staging.html
  • website/src/components/Screengrabs/atmos-validate-stacks--help.html
  • website/src/components/Screengrabs/atmos-aws-eks-update-kubeconfig--help.html
  • website/src/components/Screengrabs/atmos-completion-powershell.html
  • website/src/components/Screengrabs/atmos-describe-component--help.html
  • website/src/components/Screengrabs/atmos-docs--help.html
  • website/src/components/Screengrabs/atmos-vendor-pull--help.html
  • website/src/components/Screengrabs/atmos-terraform-generate-varfiles--help.html
  • website/src/components/Screengrabs/atmos-atlantis-generate-repo-config--help.html
  • website/src/components/Screengrabs/atmos-describe-workflows--help.html
  • website/src/components/Screengrabs/demo-stacks/deploy-dev.html
  • website/src/components/Screengrabs/atmos-terraform-generate-varfile--help.html
  • website/src/components/Screengrabs/demo-stacks/deploy-prod.html
  • website/src/components/Screengrabs/atmos-version.html
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Summary
🔇 Additional comments (5)
website/src/components/Screengrabs/atmos-completion-fish.html (3)

58-82: Excellent caching implementation!

The caching mechanism is well-implemented with proper error handling and cleanup. The use of a global variable for caching follows Fish shell conventions, and the debug logging provides good visibility into the caching behavior.


85-109: Well-structured order preservation logic!

The order preservation check is implemented efficiently using proper bitwise operations and integrates well with the caching system. The error handling and debug logging provide good visibility into the decision-making process.


214-235: Robust completion registration setup!

The completion setup is thorough, handling both ordered and unordered completions appropriately. The pre-triggering of completions and cleanup of existing ones ensures a clean state for the new completions.

website/src/components/Screengrabs/atmos-terraform--help.html (2)

1-8: Well-formatted ASCII art logo!

The logo is properly structured with consistent color styling and maintains visual integrity.


35-72: Standard terraform help text looks good!

The terraform commands and options are accurately documented and well-organized.

@osterman osterman force-pushed the renormalize-files branch 2 times, most recently from f71dbcf to 29d04d7 Compare January 10, 2025 20:57
@osterman osterman changed the title Renormalize files Prevent normalization of binaries and whitespace sensitive files Jan 10, 2025
@osterman osterman added no-release Do not create a new release (wait for additional code changes) and removed do not merge Do not merge this PR, doing so would cause problems labels Jan 10, 2025
@mergify mergify bot removed the triage Needs triage label Jan 10, 2025
@osterman osterman merged commit a227b05 into main Jan 10, 2025
46 checks passed
@osterman osterman deleted the renormalize-files branch January 10, 2025 21:25
@mergify mergify bot removed the needs-cloudposse Needs Cloud Posse assistance label Jan 10, 2025
@osterman osterman mentioned this pull request Jan 11, 2025
Copy link

These changes were released in v1.146.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.

1 participant