Skip to content

Conversation

@pujitm
Copy link
Member

@pujitm pujitm commented Jun 30, 2025

Summary by CodeRabbit

  • New Features

    • Introduced support for specifying and propagating a build number throughout the build process, including command-line options and workflow inputs.
    • TXZ package naming and URLs now include the build number for improved traceability.
  • Improvements

    • Enhanced robustness in locating TXZ files with improved fallback logic, especially in CI environments.
    • Improved flexibility and validation of environment schema for plugin builds.
  • Style

    • Minor formatting corrections for consistency and readability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 30, 2025

Walkthrough

This update introduces a required build number parameter throughout the plugin build process, starting from workflow inputs, propagating through build scripts, and integrating into file naming, URL generation, and environment schemas. The changes ensure the build number is consistently included in artifacts and workflow steps, improving traceability and reproducibility.

Changes

File(s) Change Summary
.github/workflows/build-plugin.yml, .github/workflows/main.yml Added/propagated BUILD_NUMBER input and output parameters; updated build commands and job dependencies accordingly.
plugin/builder/build-plugin.ts, plugin/builder/build-txz.ts Updated function signatures and calls to include buildNumber; incorporated build number in TXZ naming logic.
plugin/builder/cli/common-environment.ts Added buildNumber to environment schema and CLI options.
plugin/builder/cli/setup-plugin-environment.ts Made txzPath optional with fallback logic; improved .txz file resolution and schema flexibility; formatting updates.
plugin/builder/utils/bucket-urls.ts, plugin/builder/utils/consts.ts, plugin/builder/utils/paths.ts Refactored to use parameter objects for TXZ naming; updated interfaces and function signatures for build number support.
plugin/package.json Fixed JSON indentation; no functional changes.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant build-api job
    participant build-plugin-staging-pr job
    participant build-plugin-production job
    participant Build Scripts

    GitHub Actions->>build-api job: Start build-api
    build-api job->>build-api job: Generate build_number
    build-api job-->>GitHub Actions: Output build_number

    GitHub Actions->>build-plugin-staging-pr job: Pass BUILD_NUMBER from build-api
    GitHub Actions->>build-plugin-production job: Pass BUILD_NUMBER from build-api

    build-plugin-staging-pr job->>Build Scripts: Run build with --build-number
    build-plugin-production job->>Build Scripts: Run build with --build-number
    Build Scripts->>Build Scripts: Incorporate build_number in naming and URLs
Loading

Suggested reviewers

  • mdatelle
  • zackspear

Poem

A build number joins the dance,
Through workflows, scripts, it finds its chance.
From YAML lines to TXZ names,
Consistency now the claim to fame.
Artifacts trace their numbered kin—
Let the plugin-building fun begin!
🛠️✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between debafbe and ef15fd2.

📒 Files selected for processing (2)
  • plugin/builder/build-plugin.ts (4 hunks)
  • plugin/builder/utils/bucket-urls.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • plugin/builder/utils/bucket-urls.ts
  • plugin/builder/build-plugin.ts
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Build Web App
  • GitHub Check: Build Unraid UI Library (Webcomponent Version)
  • GitHub Check: Build API
  • GitHub Check: Test API
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Cloudflare Pages
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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 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.

@pujitm pujitm force-pushed the build/build-number branch from eb74c72 to debafbe Compare June 30, 2025 18:54
@github-actions
Copy link
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1449/dynamix.unraid.net.plg

@pujitm pujitm changed the title build: use slackware build number build: replace hash with build increment in slackware txz pkg Jun 30, 2025
@pujitm pujitm marked this pull request as ready for review June 30, 2025 19:30
@pujitm pujitm merged commit 3cfe9fe into main Jul 1, 2025
12 checks passed
@pujitm pujitm deleted the build/build-number branch July 1, 2025 14:57
pujitm added a commit that referenced this pull request Jul 1, 2025
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced support for specifying and propagating a build number
throughout the build process, including command-line options and
workflow inputs.
* TXZ package naming and URLs now include the build number for improved
traceability.

* **Improvements**
* Enhanced robustness in locating TXZ files with improved fallback
logic, especially in CI environments.
* Improved flexibility and validation of environment schema for plugin
builds.

* **Style**
  * Minor formatting corrections for consistency and readability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1210677942019563
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.

4 participants