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

chore: Trigger TBP on pg for scheduled run on release #36399

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

abhvsn
Copy link
Contributor

@abhvsn abhvsn commented Sep 18, 2024

Description

We want to trigger TBP workflow on pg on a scheduled basis similar to what we have for release branch to be aware of failures on pg branch because of the continuous merges from release. We searched if scheduled job can be triggered for non default branch but that is not possible. With this PR we are adding a job in the workflow to trigger the workflow_dispatch event with ref to pg branch. Other options which we may want to explore is reusable workflows.

/test sanity

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features
    • Introduced a new job for handling PostgreSQL workflows during release events.
  • Changes
    • Removed the is-pg-build parameter from the build workflow.
    • Simplified the CI process by limiting job triggers to the master branch.

@abhvsn abhvsn requested a review from sharat87 as a code owner September 18, 2024 14:52
@abhvsn abhvsn self-assigned this Sep 18, 2024
@abhvsn abhvsn added the ok-to-test Required label for CI label Sep 18, 2024
Copy link
Contributor

coderabbitai bot commented Sep 18, 2024

Walkthrough

The recent changes involve modifications to GitHub Actions workflows, particularly in the handling of PostgreSQL builds. The is-pg-build parameter has been removed from the build configuration, indicating a shift in workflow logic. Additionally, the test workflow has been refined to trigger builds only for the master branch, while a new job for managing PostgreSQL builds during release events has been introduced. These updates streamline the CI/CD process by centralizing operations around the master branch.

Changes

File Path Change Summary
.github/workflows/build-docker-image.yml Removed the is-pg-build parameter from the workflow configuration.
.github/workflows/test-build-docker-image.yml Simplified job triggers to focus on the master branch; added invoke-tbp-workflow-for-pg job for handling PostgreSQL releases.

Possibly related PRs

  • chore: Refer release base image on pg branch #36322: This PR modifies the .github/workflows/build-docker-image.yml file by removing the differentiation based on the is-pg-build input, which is directly related to the changes made in the main PR that also involves the removal of the is-pg-build parameter.

Suggested labels

skip-changelog

Suggested reviewers

  • sharat87
  • AnaghHegde

In the world of code, changes take flight,
Removing the old, embracing the light.
Branches now focused, a clearer path drawn,
PostgreSQL builds, in new ways to spawn.
With workflows refined, we march on ahead,
To a future of coding, where all fears are shed! ✨


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 generate interesting stats about this repository and render them as a table.
    -- @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 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.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Sep 18, 2024
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: 1

Outside diff range and nitpick comments (1)
.github/workflows/test-build-docker-image.yml (1)

62-68: Great job introducing a structured approach for handling releases!

The new invoke-tbp-workflow-for-pg job is a clever way to dispatch another workflow specifically for the pg branch during release events. The job is correctly conditioned to run only for non-push events on the release branch, ensuring it doesn't interfere with regular builds.

However, please update the reusable workflow call at line 65 to follow the format owner/repo/path/to/workflow.yml@ref or ./path/to/workflow.yml as per GitHub Actions best practices. This will make the workflow more maintainable and easier to understand.

Tools
actionlint

65-65: reusable workflow call "benc-uk/workflow-dispatch@v1" at "uses" is not following the format "owner/repo/path/to/workflow.yml@ref" nor "./path/to/workflow.yml". see https://docs.github.com/en/actions/learn-github-actions/reusing-workflows for more details

(workflow-call)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9f7e624 and 26da6b5.

Files selected for processing (2)
  • .github/workflows/build-docker-image.yml (0 hunks)
  • .github/workflows/test-build-docker-image.yml (4 hunks)
Files not reviewed due to no reviewable changes (1)
  • .github/workflows/build-docker-image.yml
Additional context used
actionlint
.github/workflows/test-build-docker-image.yml

65-65: reusable workflow call "benc-uk/workflow-dispatch@v1" at "uses" is not following the format "owner/repo/path/to/workflow.yml@ref" nor "./path/to/workflow.yml". see https://docs.github.com/en/actions/learn-github-actions/reusing-workflows for more details

(workflow-call)


129-129: input "skip-tests" is typed as string by reusable workflow "./.github/workflows/server-build.yml". bool value cannot be assigned

(expression)


130-130: input "is-pg-build" is typed as string by reusable workflow "./.github/workflows/server-build.yml". bool value cannot be assigned

(expression)

Additional comments not posted (4)
.github/workflows/test-build-docker-image.yml (4)

26-26: Excellent work simplifying the workflow!

By limiting the push event to only trigger actions for the master branch, you have streamlined the workflow and reduced unnecessary builds. This change is logical and well-implemented.


111-111: Nicely done focusing the CI processes on the master branch!

By updating the condition for the ci-test job to only execute for non-push events or the master branch, you have further streamlined the testing and deployment pipeline. This change aligns well with the overall workflow simplification strategy.


124-124: Good job maintaining consistency in the CI processes!

Updating the condition for the server-unit-tests job to only execute for non-push events or the master branch is consistent with the changes made to the ci-test job. This further streamlines the testing pipeline and maintains a clear focus on the master branch.


135-135: Excellent work maintaining a consistent CI strategy!

Updating the condition for the client-unit-tests job to only execute for non-push events or the master branch is in line with the changes made to the other CI jobs. This maintains a consistent focus on the master branch and further streamlines the testing pipeline.

Comment on lines 129 to +130
skip-tests: false
is-pg-build: ${{ github.ref == 'refs/heads/pg' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops! It looks like there's a type mismatch in the reusable workflow inputs.

The skip-tests and is-pg-build inputs are being assigned boolean values, but the reusable workflow ./.github/workflows/server-build.yml expects these inputs to be of type string. This mismatch can lead to unexpected behavior or errors in the server-unit-tests job.

To fix this issue, you should convert the boolean values to strings before passing them to the reusable workflow. For example:

with:
  skip-tests: ${{ false }}
  is-pg-build: ${{ github.ref == 'refs/heads/pg' }}

Would you like me to open a GitHub issue to track this task, or do you want to make the changes yourself?

Tools
actionlint

129-129: input "skip-tests" is typed as string by reusable workflow "./.github/workflows/server-build.yml". bool value cannot be assigned

(expression)


130-130: input "is-pg-build" is typed as string by reusable workflow "./.github/workflows/server-build.yml". bool value cannot be assigned

(expression)

@abhvsn abhvsn requested a review from mohanarpit September 18, 2024 16:45
@abhvsn abhvsn merged commit 115ed5a into release Sep 19, 2024
22 checks passed
@abhvsn abhvsn deleted the chore/run-tbp-on-pg-with-scheduled-run branch September 19, 2024 17:04
Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Sep 26, 2024
)

## Description
We want to trigger TBP workflow on pg on a scheduled basis similar to
what we have for release branch to be aware of failures on pg branch
because of the continuous merges from release. We searched if scheduled
job can be triggered for non default branch but that is not possible.
With this PR we are adding a job in the workflow to trigger the
`workflow_dispatch` event with ref to pg branch. Other options which we
may want to explore is [reusable
workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows).

/test sanity

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new job for handling PostgreSQL workflows during release
events.
- **Changes**
	- Removed the `is-pg-build` parameter from the build workflow.
- Simplified the CI process by limiting job triggers to the `master`
branch.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@coderabbitai coderabbitai bot mentioned this pull request Oct 15, 2024
2 tasks
@coderabbitai coderabbitai bot mentioned this pull request Oct 30, 2024
2 tasks
@coderabbitai coderabbitai bot mentioned this pull request Nov 20, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants