website
website copied to clipboard
feat: enable tools view regeneration on a build time
Description
- Added manual tools regeneration.
- In
regenerate-tools.yml, the default function,buildTools, will be used. - During a build, the
buildToolsManualfunction is used. This function utilizes the currently availabletools-automated.json, ensuring automated tools don't regenerate with every build. This ensures changes are visible in PR preview.
Resolves #2124
Deploy Preview for asyncapi-website ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | da35a34f7605be5f559995b1665e7234a5e917ff |
| Latest deploy log | https://app.netlify.com/sites/asyncapi-website/deploys/660cd159f518ae0009f72871 |
| Deploy Preview | https://deploy-preview-2264--asyncapi-website.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
⚡️ Lighthouse report for the changes in this PR:
| Category | Score |
|---|---|
| 🔴 Performance | 30 |
| 🟢 Accessibility | 98 |
| 🟢 Best practices | 100 |
| 🟢 SEO | 100 |
| 🔴 PWA | 30 |
Lighthouse ran on https://deploy-preview-2264--asyncapi-website.netlify.app/
looks pretty clean to me, @akshatnema thoughts?
I'm not in support of including the building of tools in build time because if we make these scripts at the build level, tools.json will be updated or regenerated at every start of the website. And we don't have such frequent changes in the tools. So, we can make a workflow such that whenever there will be changes in tools-manual.json, it can trigger PR workflow to update tools.json in the PR.
So, We can have a new workflow such that if there are any changes to tools-manual.json, a new PR will be triggered to update tools.json.
A few things we have to take into account:
-
We have to add a
/do-not-mergelabel to the newly generatedPRsince we already have a workflow that automatically approves and merges PRs generated by theasyncapi-bot. This PR should not be merged until the contributor's PR is merged. We can use this PR for preview at the PR level. -
If there are any new commits in the contributor's PR, then we need to update/regenerate
tools.jsonin the generated PR accordingly to reflect the new changes. There is no need to create a new PR for these updates. -
After the successful merge of the contributor's PR, we have to remove the
/do-not-mergetag from the generated PR, so that it can also be merged.
The problem that may occur is that if adding the /do-not-merge script takes more time than expected, then the PR could get merged during that period.
Another approach could be:
To push the changes into the contributor's PR directly. This could be possible when:
-
The PR is marked to Allow edits and access to secrets by maintainers, which is the default setting.
-
I am not sure, but I believe the
asyncapi-botdoes not have access, and only theasyncapi-bot-evehas maintainer rights, so only that account can push changes to the contributor's PR directly. I'm not sure about this.
What are your views @akshatnema, @derberg ?
@asyncapi-bot is working like a charm.😄
@akshatnema but building of tools during build just handles manual tools only, quick operation. During build we build also other things, like rss feed, or case studies - that also do not change often.
ci/cd automation is nice but the more custom workflows the harder migration is (you could see how long it took to migrate recently)
ci/cd automation is nice but the more custom workflows the harder migration is (you could see how long it took to migrate recently)
Ok, got your point well. But looking into present changes made by @princerajpoot20, I think we should have a separate file for building manual tools at build time. I'm not in preference to change the current build-tools automation because I've a different plan for it (to restructure the implementation of tools generation). Therefore, it would be nice, if we take building of manual tools in separate script file. WDYT? @derberg
⚡️ Lighthouse report for the changes in this PR:
| Category | Score |
|---|---|
| 🔴 Performance | 30 |
| 🟢 Accessibility | 98 |
| 🟢 Best practices | 92 |
| 🟢 SEO | 100 |
| 🔴 PWA | 33 |
Lighthouse ran on https://deploy-preview-2264--asyncapi-website.netlify.app/
@akshatnema really depends. The question is when do you plan these changes. Cause if not soon, then I say we merge as it is and later just refactor.
@derberg @akshatnema Ping Pong 😅
@princerajpoot20 Kindly resolve the conflicts first.
@princerajpoot20 any update on this issue?
Done. resolved conflicts.
@derberg @akshatnema PTAL
@princerajpoot20 please resolve the conflicts
This pull request has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.
There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
Walkthrough
The changes introduce a new asynchronous function, combineAutomatedAndManualTools, which enhances the existing buildTools function by incorporating error handling. A new function, buildToolsManual, retrieves automated tools and calls the new function, also with error handling. The exports have been updated to include both functions, and a conditional check ensures buildTools runs when the script is executed directly. Additionally, scripts/index.js has been modified to integrate buildToolsManual into the existing workflow.
Changes
| File | Change Summary |
|---|---|
| scripts/build-tools.js | Added combineAutomatedAndManualTools and buildToolsManual functions; updated exports. |
| scripts/index.js | Added import for buildToolsManual and modified start function to include a call to it. |
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
| Support tools view regeneration on a PR level for manual tools (#2124) | ✅ |
Possibly related PRs
- #3168: Modifies the workflow for testing in a Node.js project, potentially affecting the integration of the new
buildToolsManualfunction. - #3318: Updates the testing workflow, which could impact how the changes in the main PR are validated in the CI/CD pipeline.
Suggested labels
ready-to-merge, gsoc
Suggested reviewers
- derberg
- magicmatatjahu
- akshatnema
- sambhavgupta0705
- Mayaleeeee
- asyncapi-bot-eve
- BhaswatiRoy
🐰 In the garden where tools combine,
A manual touch, oh how divine!
With error logs to guide the way,
We build our dreams, come what may.
So hop along, let's make it right,
For every tool shines in the light! 🌟
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?
🪧 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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.
closing this as no response