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

fix: updated commands for generator on website #3545

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SahilDahekar
Copy link
Contributor

@SahilDahekar SahilDahekar commented Jan 4, 2025

Description

  • Updated the commands on /tools/generator page to work with new generator and templates for both normal cli and docker

Screenshots

Before :

Normal command -

Screenshot from 2025-01-04 20-30-42

Docker command -

image

After :

Normal command -

image

Docker command -

image

Related issue(s)

Fixes #3522

Summary by CodeRabbit

  • New Features

    • Updated AsyncAPI generator template to version 3.0.0.
    • Added --use-new-generator flag to generator commands.
    • Enhanced Docker command with --network host option.
  • Improvements

    • Specified explicit template version for HTML template.
    • Updated generator configuration for consistent versioning.

Copy link

coderabbitai bot commented Jan 4, 2025

Walkthrough

The pull request focuses on updating AsyncAPI generator templates and configurations to version 3.0.0. Changes are made across multiple configuration files and a React component, specifically updating template references, adding the --use-new-generator flag, and modifying the Docker command execution. These modifications aim to address potential compatibility and functionality issues with the AsyncAPI generator.

Changes

File Change Summary
components/GeneratorInstallation.tsx - Updated template state to @asyncapi/[email protected]
- Modified params state to include --use-new-generator
- Added --network host to Docker command
config/generator-flags.json - Updated @asyncapi/html-template to version 3.0.0
- Added --use-new-generator flag
config/generator-templates.json - Updated HTML template entry to include @3.0.0 version suffix

Assessment against linked issues

Objective Addressed Explanation
Fix non-working generator command [#3522]
Resolve deprecated library issue [#3522]

Possibly related PRs

Suggested labels

autoapproved, autoupdate

Suggested reviewers

  • asyncapi-bot-eve
  • quetzalliwrites
  • VaishnaviNandakumar
  • J0SAL
  • BhaswatiRoy

Poem

🐰 A rabbit's tale of version might,
Templates dancing in version's light,
@3.0.0 now takes the stage,
Generator's magic turns a new page!
Hop, hop, hooray for code so bright! 🚀


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0b9436e and 4fcff19.

📒 Files selected for processing (2)
  • config/generator-flags.json (1 hunks)
  • config/generator-templates.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • config/generator-templates.json
  • config/generator-flags.json

Finishing Touches

  • 📝 Generate Docstrings

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 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.

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

netlify bot commented Jan 4, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4fcff19
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/677f541728858a000899c448
😎 Deploy Preview https://deploy-preview-3545--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (4d002ce) to head (4fcff19).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3545   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          668       668           
=========================================
  Hits           668       668           

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

@SahilDahekar SahilDahekar changed the title fix:updated commands for generator on website fix: updated commands for generator on website Jan 4, 2025
@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Jan 4, 2025

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 34
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-3545--asyncapi-website.netlify.app/

Copy link

@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 (2)
components/GeneratorInstallation.tsx (1)

65-65: Docker command updated with --network host.
Consider adding a note in the documentation about potential security or networking implications when using the host network.

config/generator-flags.json (1)

22-23: Java Spring Boot template pinned and flagged for the new generator.
Ensure relevant documentation is updated so users know that 3.0.0 is the default now.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fb0a3bf and 0b9436e.

📒 Files selected for processing (3)
  • components/GeneratorInstallation.tsx (2 hunks)
  • config/generator-flags.json (1 hunks)
  • config/generator-templates.json (1 hunks)
🔇 Additional comments (9)
components/GeneratorInstallation.tsx (2)

24-24: Pinning the template to a specific version helps avoid unexpected breaking changes.
Great job specifying @asyncapi/[email protected]. This prevents users from accidentally pulling future major versions with potentially breaking changes.


26-26: Adding --use-new-generator ensures compatibility with the updated generator.
This aligns with the PR objective to maintain consistent usage with the new generator.

config/generator-templates.json (1)

2-8: Version pinning is consistent across all templates.
Explicitly referencing @asyncapi/…@3.0.0 helps ensure the correct version is used. This is aligned with best practices for stable deployments.

config/generator-flags.json (6)

2-3: Update to @asyncapi/[email protected] and appended --use-new-generator.
Pinning and adding the new generator flag aligns with the objective of ensuring compatibility with the latest generator changes.


6-7: Markdown template pinned and updated flags.
Looks good. Keep an eye on upstream updates to ensure ongoing compatibility.


10-11: Node.js production server flags integrated with the new generator.
Be sure to verify that the -p server=production parameter remains valid for all usage scenarios.


14-15: Node.js WebSockets template pinned to 3.0.0 with new generator flag.
This is consistent with the rest of the pinned templates.


18-19: Java Spring Cloud Stream template pinned & updated.
No issues found.


26-27: Python Paho template pinned & updated.
Everything looks consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The official website's command to try is not even working in the first place
2 participants