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

Document vendoring from private git repos #723

Merged
merged 6 commits into from
Oct 16, 2024
Merged

Document vendoring from private git repos #723

merged 6 commits into from
Oct 16, 2024

Conversation

osterman
Copy link
Member

@osterman osterman commented Oct 15, 2024

what

  • Document how to vendor from private GitHub repos
  • Document template syntax for vendoring

why

  • The syntax is a bit elusive, and it's a common requirement

Summary by CodeRabbit

  • New Features

    • Enhanced documentation for the vendoring process, including a new "Vendoring Manifest Schema" section and clearer examples.
    • Introduced a collapsible section for better organization of the vendor.yaml file example.
  • Bug Fixes

    • Improved formatting and clarity of existing documentation for better readability.
  • Chores

    • Added prettier as a development dependency to streamline code formatting.
    • Updated .prettierignore to exclude MDX files from formatting operations.

Copy link
Contributor

coderabbitai bot commented Oct 15, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request involve updates to documentation files related to the vendoring process in Atmos, enhancements to the CollapsibleText component, and modifications to project configuration files. Key changes include formatting adjustments and expanded content in components-manifest.mdx and vendor-manifest.mdx, the addition of a new development dependency in package.json, and updates to the CSS for the CollapsibleText component. Additionally, a new entry was added to .prettierignore to exclude MDX files from Prettier processing.

Changes

File Path Change Summary
website/docs/core-concepts/vendor/components-manifest.mdx Minor formatting adjustments; expanded examples on vendoring components; no changes to component.yaml schema.
website/docs/core-concepts/vendor/vendor-manifest.mdx Added CollapsibleText import; enhanced vendor.yaml example; introduced "Vendoring Manifest Schema" and "Template Parameters" sections.
website/package.json Added prettier as a new development dependency with version ^3.3.3.
website/src/components/CollapsibleText/index.css Reorganized button styles; changed maximum height for expanded text from 1000px to none.
.prettierignore Added entry to ignore all MDX files from Prettier processing (**/*.mdx).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Documentation
    participant CollapsibleText

    User->>Documentation: Access vendoring documentation
    Documentation->>User: Display formatted content
    User->>Documentation: View vendoring examples
    Documentation->>User: Show expanded examples
    User->>CollapsibleText: Interact with collapsible section
    CollapsibleText->>User: Expand to show more content
Loading

🐰 "In the garden where knowledge grows,
New paths of clarity, everyone knows.
With collapsible texts and YAML so bright,
We hop through the docs, what a delightful sight!
Prettier keeps our code neat and clean,
In our vendor world, we reign supreme!" 🌼


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 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 to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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: 5

🧹 Outside diff range comments (6)
website/docs/core-concepts/vendor/components-manifest.mdx (3)

Line range hint 21-21: Consider adding a brief explanation of monorepos

To improve clarity for readers who might be unfamiliar with the term, consider adding a brief explanation of what a monorepo is at the beginning of the "Vendoring Components from a Monorepo" section.


Line range hint 78-84: Make the warning about glob behavior more prominent

The warning about the glob library's behavior with ** contains important information. Consider making this warning more prominent, perhaps by using a different style of callout or moving it closer to the relevant code example.


Line range hint 100-104: Clarify the difference between modules and components

In the "Vendoring Modules as Components" section, it might be helpful to briefly explain the difference between a module and a component in the context of Atmos. This could help readers understand why they might choose to vendor a module as a component.

website/docs/core-concepts/vendor/vendor-manifest.mdx (3)

Line range hint 167-277: Comprehensive explanation of Vendoring Manifest Schema

The new "Vendoring Manifest Schema" section is an excellent addition to the documentation. It provides detailed explanations of all important attributes in the vendor.yaml file, including version, source, targets, included_paths, excluded_paths, component, and tags. The inclusion of advanced usage information, such as Go templates and Sprig functions, is particularly valuable.

To further enhance this section, consider adding a brief example demonstrating the use of Sprig functions in the targets attribute. This would help users better understand how to implement these advanced features in their own configurations.


Line range hint 317-438: Enhanced explanation of Hierarchical Imports

The expanded "Hierarchical Imports in Vendoring Manifests" section greatly improves the documentation. The multiple examples of vendor.yaml files clearly illustrate how the import chain works, and the addition of the terminal output example provides users with a clear expectation of the command's behavior.

To further enhance this section, consider adding a brief explanation of the benefits of using hierarchical imports, such as improved organization and maintainability of large configurations.

🧰 Tools
🪛 LanguageTool

[style] ~455-~455: To make your text as clear as possible to all readers, do not use this foreign term. Possible alternatives are “below” or “further on” (in a document).
Context: ...argets: - "components/terraform/infra/vpc3" included_paths: - "...

(INFRA)


Line range hint 439-495: Clear instructions for Vendoring from OCI Registries

The "Vendoring from OCI Registries" section provides clear and comprehensive instructions on how to use OCI registries for vendoring. The example of vendoring the vpc component from an AWS public ECR registry is particularly helpful in illustrating the correct usage of the OCI scheme.

To make this section even more valuable, consider adding a brief explanation of why one might choose to vendor from an OCI registry, highlighting any specific advantages or use cases.

🧰 Tools
🪛 LanguageTool

[style] ~455-~455: To make your text as clear as possible to all readers, do not use this foreign term. Possible alternatives are “below” or “further on” (in a document).
Context: ...argets: - "components/terraform/infra/vpc3" included_paths: - "...

(INFRA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 94e0226 and 9bc73f2.

⛔ Files ignored due to path filters (1)
  • website/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • .prettierignore (1 hunks)
  • website/docs/core-concepts/vendor/components-manifest.mdx (1 hunks)
  • website/docs/core-concepts/vendor/vendor-manifest.mdx (5 hunks)
  • website/package.json (1 hunks)
  • website/src/components/CollapsibleText/index.css (2 hunks)
🧰 Additional context used
🪛 LanguageTool
website/docs/core-concepts/vendor/vendor-manifest.mdx

[grammar] ~280-~280: The verb form ‘manifest’ does not appear to fit in this context.
Context: .../dd> ## Template Parameters The vendor manifest supports basic template parameters, whi...

(SINGULAR_NOUN_VERB_AGREEMENT)


[style] ~455-~455: To make your text as clear as possible to all readers, do not use this foreign term. Possible alternatives are “below” or “further on” (in a document).
Context: ...argets: - "components/terraform/infra/vpc3" included_paths: - "...

(INFRA)

🔇 Additional comments (6)
website/src/components/CollapsibleText/index.css (1)

42-42: Syntactical change noted.

The modification from content: ''; to content: ""; is a minor syntactical adjustment with no functional impact. Both single and double quotes are valid in CSS for string values.

This change is likely due to a linting rule or personal preference for consistency.

website/docs/core-concepts/vendor/components-manifest.mdx (2)

13-13: Improved clarity in the introduction

The rewording of this sentence enhances the explanation of the "vendoring" concept. It now clearly states that vendoring involves making copies of third-party components or dependencies in your own repository. This change makes the concept more accessible to readers who might be unfamiliar with the term.


Line range hint 1-185: Overall assessment: High-quality documentation with room for minor enhancements

The documentation in this file is comprehensive, well-structured, and provides valuable information about component manifests and vendoring in Atmos. The minor change made improves the clarity of the introduction. While the content is generally excellent, a few suggestions have been made for further enhancements, mainly focused on providing additional context and improving the prominence of important information.

website/docs/core-concepts/vendor/vendor-manifest.mdx (3)

11-11: Improved documentation structure with CollapsibleText component

The addition of the CollapsibleText component and its usage to wrap the vendor.yaml example enhances the readability and organization of the documentation. This change allows users to expand or collapse the large code example as needed, improving the overall user experience.

Also applies to: 53-152


278-315: Clear explanation of Template Parameters usage

The new "Template Parameters" section is a valuable addition to the documentation. It provides clear explanations and examples of how to use the {{ .Component }} and {{ .Version }} template parameters in the targets attribute. The inclusion of information about go-template functions and accessing environment variables adds depth to the documentation, catering to more advanced use cases.

The examples provided are concise and illustrative, which will help users understand and implement these features in their own configurations.

🧰 Tools
🪛 LanguageTool

[grammar] ~280-~280: The verb form ‘manifest’ does not appear to fit in this context.
Context: .../dd> ## Template Parameters The vendor manifest supports basic template parameters, whi...

(SINGULAR_NOUN_VERB_AGREEMENT)


Line range hint 1-495: Excellent improvements to the Atmos vendoring documentation

The changes made to this documentation file significantly enhance the explanation and usability of the Atmos vendoring feature. The additions include:

  1. Improved organization with the CollapsibleText component
  2. A comprehensive explanation of the Vendoring Manifest Schema
  3. Clear instructions on using Template Parameters
  4. Expanded information on Hierarchical Imports
  5. Detailed guidance on Vendoring from OCI Registries

These improvements provide users with a more complete and accessible guide to using Atmos vendoring. The examples and explanations are clear and informative, catering to both new and advanced users.

The minor suggestions provided in the review comments can further refine this already excellent documentation update.

.prettierignore Outdated Show resolved Hide resolved
website/src/components/CollapsibleText/index.css Outdated Show resolved Hide resolved
website/src/components/CollapsibleText/index.css Outdated Show resolved Hide resolved
website/package.json Show resolved Hide resolved
website/docs/core-concepts/vendor/vendor-manifest.mdx Outdated Show resolved Hide resolved
jamengual
jamengual previously approved these changes Oct 15, 2024
Copy link

@jamengual jamengual left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@osterman osterman requested review from aknysh and removed request for johncblandii and nitrocode October 15, 2024 14:32
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

🧹 Outside diff range comments (1)
website/docs/core-concepts/vendor/vendor-manifest.mdx (1)

Line range hint 167-277: Comprehensive explanation of Vendoring Manifest Schema

The addition of the "Vendoring Manifest Schema" section greatly enhances the documentation. It provides clear and detailed explanations of each attribute in the vendor.yaml file, which will be very helpful for users.

There's a minor grammatical issue in the introductory sentence. Consider revising it as follows:

- The vendor manifest supports basic template parameters, which is useful for versioning and other dynamic values.
+ The vendor manifest supports basic template parameters, which are useful for versioning and other dynamic values.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 9bc73f2 and ad47cd6.

📒 Files selected for processing (3)
  • .prettierignore (1 hunks)
  • website/docs/core-concepts/vendor/vendor-manifest.mdx (6 hunks)
  • website/src/components/CollapsibleText/index.css (2 hunks)
🧰 Additional context used
🪛 LanguageTool
website/docs/core-concepts/vendor/vendor-manifest.mdx

[grammar] ~280-~280: The verb form ‘manifest’ does not appear to fit in this context.
Context: .../dd> ## Template Parameters The vendor manifest supports basic template parameters, whi...

(SINGULAR_NOUN_VERB_AGREEMENT)

🔇 Additional comments (10)
.prettierignore (2)

1-3: Approved: Well-documented addition to ignore MDX files

The addition to ignore MDX files in Prettier is appropriate and well-documented. It aligns with the PR objectives of improving documentation handling. The comment clearly explains the reason for this change, and the provided URL offers valuable additional context.


3-3: LGTM: Correct ignore pattern

The ignore pattern **/*.mdx is correct for ignoring all MDX files in the project directory and its subdirectories.

website/src/components/CollapsibleText/index.css (3)

8-15: LGTM! Button styles improved.

The button styles have been well-organized, improving readability. The change from hex to rgba for the background color addresses the compatibility issue mentioned in a previous review comment.


38-38: LGTM! Improved flexibility for expanded content.

The change to max-height: none; allows the content to expand to its full height, addressing the flexibility issue mentioned in a previous review comment. This implementation aligns with the suggested improvement.


42-42: LGTM! Minor style adjustment.

The change from single quotes to double quotes for the empty string in the content property is a valid syntactical adjustment. Both forms are acceptable in CSS, so this change is merely a matter of coding style preference.

website/docs/core-concepts/vendor/vendor-manifest.mdx (5)

11-11: Improved document structure with CollapsibleText

The addition of the CollapsibleText component and its usage to wrap the vendor.yaml example enhances the document's readability. This allows users to expand or collapse the large code example, improving the overall user experience.

Also applies to: 53-152


278-315: Clear explanation of Template Parameters usage

The new "Template Parameters" section is a valuable addition to the documentation. It clearly explains how to use {{ .Component }} and {{ .Version }} template parameters, and provides practical examples. The information about using go-template functions and accessing environment variables for private repositories is particularly useful.

🧰 Tools
🪛 LanguageTool

[grammar] ~280-~280: The verb form ‘manifest’ does not appear to fit in this context.
Context: .../dd> ## Template Parameters The vendor manifest supports basic template parameters, whi...

(SINGULAR_NOUN_VERB_AGREEMENT)


Line range hint 317-441: Enhanced explanation of Hierarchical Imports

The updates to the "Hierarchical Imports in Vendoring Manifests" section significantly improve the documentation. The addition of multiple example files and the detailed explanation of how Atmos processes the import chain provide a much clearer understanding of this feature. This will be extremely helpful for users working with complex vendoring configurations.

🧰 Tools
🪛 LanguageTool

[grammar] ~280-~280: The verb form ‘manifest’ does not appear to fit in this context.
Context: .../dd> ## Template Parameters The vendor manifest supports basic template parameters, whi...

(SINGULAR_NOUN_VERB_AGREEMENT)


Line range hint 443-470: Improved example for Vendoring from OCI Registries

The updates to the "Vendoring from OCI Registries" section enhance the documentation with a clearer example. The use of template parameters {{ .Component }} and {{ .Version }} in the example demonstrates best practices for flexible configuration. This will help users better understand how to vendor components from OCI registries, particularly from AWS public ECR.


Line range hint 1-470: Comprehensive improvements to Atmos vendoring documentation

The changes to this documentation file significantly enhance the explanation of Atmos vendoring. The additions and updates provide more comprehensive information, clearer examples, and better structure. Key improvements include:

  1. Addition of the CollapsibleText component for better readability
  2. Detailed explanation of the Vendoring Manifest Schema
  3. Clear documentation on Template Parameters usage
  4. Enhanced explanation of Hierarchical Imports with multiple examples
  5. Improved example for Vendoring from OCI Registries

These changes will greatly benefit users in understanding and implementing Atmos vendoring in their projects.

@aknysh aknysh added the no-release Do not create a new release (wait for additional code changes) label Oct 16, 2024
@aknysh aknysh merged commit a9b64ef into main Oct 16, 2024
25 checks passed
@aknysh aknysh deleted the update-docs branch October 16, 2024 05:44
Copy link

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

3 participants