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 dry run for atmos vendor pull to support ssh + detailed SCP urls alignment v2 #1156

Closed
wants to merge 1 commit into from

Conversation

Listener430
Copy link
Collaborator

@Listener430 Listener430 commented Mar 18, 2025

what

This is a copy of #1076 that got too big and had issues with codecov results upload.

This PR upgrades the output of dry run mode for vendor pull command.
After the change is applied, the dry run mode shows

  1. details on the SCP-style links converion,
  2. Injected tokens
  3. urls being vendored in a santized format
    yet there's no actual files download.

Before ( component vendoring dry-run output)

component_vendoring_dry_run_before

After ( component vendoring dry-run output)

component vendoring dry run after

component.yaml, refer to the respective test case for details

comonent yaml

Before ( generic vendoring dry-run output)

generic_vendoring_dry_run_before

After ( generic vendoring dry-run output)

generic_vendoring_after

vendor.yaml, refer to the respective test case for detaails

generic vendor yaml

why

Received feedback from in the parent PR

references

Copy of #1076

Summary by CodeRabbit

  • Documentation
    • Added new sections detailing how to use SSH and HTTPS for vendoring private Git repositories, including practical examples and URL handling tips.
    • Updated configuration documentation with new environment variables for Bitbucket and GitLab authentication, clarifying token usage and addressing API request limits.

@Listener430 Listener430 added the minor New features that do not break anything label Mar 18, 2025
@Listener430 Listener430 self-assigned this Mar 18, 2025
@Listener430 Listener430 requested a review from a team as a code owner March 18, 2025 14:22
Copy link
Contributor

coderabbitai bot commented Mar 18, 2025

📝 Walkthrough

Walkthrough

This pull request updates the Atmos documentation. In the vendor pull command docs, a new section details how to use SSH and HTTPS for vendoring, including URL formatting rules and authentication priorities. Additionally, the configuration docs now include new environment variables for Bitbucket and GitLab authentication. No changes were made to public APIs.

Changes

File Change Summary
website/docs/cli/commands/vendor/vendor-pull.mdx Added sections on "Vendoring from SSH" and "Git over HTTPS Vendoring", outlining URL formats, rewriting rules for SCP-style sources, and authentication details.
website/docs/cli/configuration/configuration.mdx Introduced new environment variables: ATMOS_BITBUCKET_TOKEN, ATMOS_BITBUCKET_USERNAME, and ATMOS_GITLAB_TOKEN; updated formatting for consistency in existing entries.

Assessment against linked issues

Objective Addressed Explanation
Fix Vendoring Issues with Globs and Symlinks (DEV-2964) Documentation updates only; no code fixes or tests addressing glob filtering and symlink issues were included.

Possibly related PRs

Suggested reviewers

  • osterman
  • aknysh
  • Gowiem

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.

❤️ 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.
  • @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: 0

🧹 Nitpick comments (4)
website/docs/cli/commands/vendor/vendor-pull.mdx (3)

111-120: New "Vendoring from SSH" Section Clarity
The new SSH vendoring section is a valuable addition that clearly outlines both SCP‐style and explicit SSH approaches. It meets the PR objective for enhanced dry run output and detailed URL conversion. Consider adding a brief note on security best practices when handling SSH keys in automated systems.


121-128: SCP-style Source Example is Clear
The SCP-style example effectively demonstrates how Atmos rewrites an SCP-style URL. If possible, you might add a short sentence explaining the transformation logic (e.g. that the colon separator is replaced by the ssh:// syntax), to help users understand the underlying conversion better.


214-222: Refine Wording and Ellipsis in HTTPS Resolution Rules
In the "How HTTPS URLs Are Resolved" section, consider revising the phrase “it is used as-is” to a stronger expression such as “it remains unchanged.” Additionally, replace the three-dot ellipsis (...) with the typographical ellipsis character () for a cleaner look. For example:

-If a **full HTTPS URL** is provided (`git::https://github.com/...`), it is used as-is.
+If a **full HTTPS URL** is provided (`git::https://github.com/…`), it remains unchanged.
🧰 Tools
🪛 LanguageTool

[style] ~216-~216: Consider using a different verb to strengthen your wording.
Context: ...lved When resolving Git sources, Atmos follows these rules: 1. If a *full HTTPS URL...

(FOLLOW_OBEY)


[style] ~218-~218: Consider using the typographical ellipsis character here instead.
Context: ...1. If a full HTTPS URL is provided (git::https://github.com/...), it is used as-is. No token data is i...

(ELLIPSIS)

website/docs/cli/configuration/configuration.mdx (1)

681-684: New Environment Variables for Authentication
The new entries for ATMOS_BITBUCKET_TOKEN, ATMOS_BITBUCKET_USERNAME, and ATMOS_GITLAB_TOKEN are well documented and integrate nicely with the rest of the configuration details. Consider adding a short usage note or example in the description to illustrate their practical application in real-world scenarios.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 03ac289 and e977f60.

📒 Files selected for processing (2)
  • website/docs/cli/commands/vendor/vendor-pull.mdx (2 hunks)
  • website/docs/cli/configuration/configuration.mdx (2 hunks)
🧰 Additional context used
🪛 LanguageTool
website/docs/cli/commands/vendor/vendor-pull.mdx

[style] ~216-~216: Consider using a different verb to strengthen your wording.
Context: ...lved When resolving Git sources, Atmos follows these rules: 1. If a *full HTTPS URL...

(FOLLOW_OBEY)


[style] ~218-~218: Consider using the typographical ellipsis character here instead.
Context: ...1. If a full HTTPS URL is provided (git::https://github.com/...), it is used as-is. No token data is i...

(ELLIPSIS)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Build (macos-latest, macos)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Lint (golangci)
  • GitHub Check: Lint (golangci)
  • GitHub Check: website-deploy-preview
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary
🔇 Additional comments (2)
website/docs/cli/commands/vendor/vendor-pull.mdx (2)

137-145: Explicit SSH Sources Example Reviewed
The explicit SSH source example is concise and correctly shows that no URL rewriting is applied when the ssh:// prefix is provided. This aligns well with the intended functionality.


265-265: Dry-run Flag Addition Confirmed
The addition of the --dry-run flag to the command flags table is clear and well documented. This enhancement makes dry run behavior explicit and aligns with the overall PR improvements.

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.64%. Comparing base (03ac289) to head (e977f60).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1156   +/-   ##
=======================================
  Coverage   21.64%   21.64%           
=======================================
  Files         172      172           
  Lines       19292    19292           
=======================================
  Hits         4176     4176           
  Misses      14336    14336           
  Partials      780      780           
Flag Coverage Δ
unittests 21.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Listener430
Copy link
Collaborator Author

Managed to fix #1076, closing this out as a duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor New features that do not break anything size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant