celestiaorg / celestia-app

Celestia consensus node
https://celestiaorg.github.io/celestia-app/
Apache License 2.0
345 stars 292 forks source link

chore: ci regex matching clean up and docker workflow update #3908

Closed MSevey closed 1 month ago

MSevey commented 1 month ago

Overview

This PR adds the required input for the using the docker workflow when manually triggered.

This PR also updates the regex matching to a more general wildcard regex for more flexibility in the future to avoid issues like images not being built due to adding arabica to the tag.

coderabbitai[bot] commented 1 month ago
:memo: Walkthrough ## Walkthrough The changes involve modifications to the CI workflow files in the `.github/workflows` directory. These modifications primarily simplify the branch and tag patterns for triggering workflows by replacing specific regex patterns with a more general wildcard pattern (`v*`). Additionally, new input parameters have been introduced in the Docker build and publish workflow to enhance reference handling. ## Changes | File Path | Change Summary | |----------------------------------------------|-------------------------------------------------------------------------------------------------------| | `.github/workflows/ci-release.yml` | Simplified branch and tag patterns to `v*`. | | `.github/workflows/codeql.yml` | Updated branch filter to `v*` and reformatted cron schedule syntax; no functional changes. | | `.github/workflows/docker-build-publish.yml`| Simplified branch and tag patterns to `v*` and added `checkout_ref` input parameter to job configs. | ## Possibly related PRs - #3905: The changes in this PR also modify the `.github/workflows/docker-build-publish.yml` file, specifically updating tag patterns and adding a new input parameter, which relates to the general pattern changes made in the main PR. ## Suggested labels `external` ## Suggested reviewers - evan-forbes - rootulp

:scroll: Recent review details **Configuration used: .coderabbit.yaml** **Review profile: CHILL**
:inbox_tray: Commits Files that changed from the base of the PR and between e24c0e8f72ea571bec637625a232b858c23a92e8 and 496c6d51142fcb9f21635f4f3f1d1124dd1aece6.
:ledger: Files selected for processing (3) * .github/workflows/ci-release.yml (1 hunks) * .github/workflows/codeql.yml (4 hunks) * .github/workflows/docker-build-publish.yml (3 hunks)
:white_check_mark: Files skipped from review due to trivial changes (1) * .github/workflows/codeql.yml
:mute: Additional comments not posted (6)
.github/workflows/ci-release.yml (3)
`11-11`: **Tag pattern updated to use wildcard** The tag pattern has been updated to use a more general wildcard regex `"v*"`. This change is in line with the PR objective and should prevent issues with building images for specific tags like 'arabica'. Let's verify if this change affects any other parts of the workflow: ```shell #!/bin/bash # Description: Check if the new tag pattern is used consistently across the workflow # Test: Search for other tag patterns in the file rg --type yaml 'tags:' .github/workflows/ci-release.yml -A 5 ``` --- Line range hint `1-30`: **Docker workflow update not found in this file** The PR objectives mention updating the Docker workflow with necessary input parameters for manual triggering. However, these changes are not present in this file. Let's check if there are any Docker-related workflows in the repository: ```shell #!/bin/bash # Description: Search for Docker-related workflow files # Test: Look for workflow files that might contain Docker-related content fd -e yml -e yaml . .github/workflows | xargs rg --type yaml -l 'docker|image|container' ``` If the Docker workflow update is missing, would you like me to help create a new workflow file or update an existing one to include the necessary input parameters for manual triggering? --- `9-9`: **Branch pattern updated to use wildcard** The branch pattern has been updated to use a more general wildcard regex `"v*"`. This change aligns with the PR objective of implementing a more flexible pattern for future developments. Let's verify if this change affects any other parts of the workflow:
.github/workflows/docker-build-publish.yml (3)
`8-8`: **Simplified branch pattern improves flexibility** The change from specific version patterns to the more general "v*" pattern is a good improvement. This simplification aligns with the PR objective of implementing a more general wildcard regex. It will match all version branches while reducing maintenance overhead for updating specific version patterns in the future. --- `10-10`: **Generalized tag pattern addresses PR objective** The change to a more general "v*" pattern for tags is an excellent improvement. This simplification not only makes the workflow more flexible but also directly addresses the PR objective of preventing issues with building images when specific tags (like 'arabica') are added. The new pattern will match all version tags while allowing for additional naming conventions in the future. --- `27-27`: **Added flexibility with `checkout_ref` parameter** The addition of the `checkout_ref` parameter to both `docker-security-build` and `docker-txsim-build` jobs is a valuable improvement. This change directly addresses the PR objective of introducing necessary input parameters for manual workflow triggers. It allows for greater flexibility in the CI process by enabling builds from specific branches, tags, or commits when manually triggered. To ensure this change is implemented correctly, let's verify the workflow structure: Also applies to: 38-38
--- 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?
:heart: Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
:placard: Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): > :bangbang: **IMPORTANT** > Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged. - 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. ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.