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: Add logs for default DB url for CI test workflows #36506

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

abhvsn
Copy link
Contributor

@abhvsn abhvsn commented Sep 24, 2024

Description

Summary by CodeRabbit

  • New Features

    • Introduced a new job step to check the database type in the CI workflow, ensuring proper database configurations.
    • Added a step to determine if the build is for PostgreSQL in the server build workflow, providing clarity on build types.
  • Bug Fixes

    • Improved conditional execution in the CI workflow to enhance reliability.

/test Sanity

🔍 Cypress test results

Caution

🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11104222888
Commit: df82014
Cypress dashboard.
Tags: @tag.Sanity
Spec:
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts
List of identified flaky tests.
Mon, 30 Sep 2024 11:01:27 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Added a conditional check for the database URL in the CI workflow to ensure proper database configurations are in place.
    • Introduced a step to identify the database type during the server build process, enhancing build clarity.
  • Bug Fixes

    • Implemented error handling for missing database URLs to prevent build failures.

@abhvsn abhvsn requested a review from sharat87 as a code owner September 24, 2024 11:36
Copy link
Contributor

coderabbitai bot commented Sep 24, 2024

Walkthrough

The changes introduced in this pull request enhance the GitHub Actions workflows by adding new steps that check the database URL and determine the database type being used. A conditional step named "Check DB URL" has been added to the CI workflow, while a new job called "Default database URL" has been introduced in the server build workflow. These modifications allow for better handling of database configurations during the CI process.

Changes

File Path Change Summary
.github/workflows/ci-test-custom-script.yml Added a conditional step "Check DB URL" to determine the database type based on the URL.
.github/workflows/server-build.yml Introduced a new job "Default database URL" to echo the build type based on the input parameter.

Possibly related PRs

Suggested reviewers

  • sharat87
  • AnaghHegde

Poem

In the land of code where workflows reside,
New steps emerge, like a joyful tide.
"Check DB URL," a clever new quest,
To find out the type, we put it to test.
With PostgreSQL and Mongo in sight,
Our builds now shine, oh what a delight! 🎉


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 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 24, 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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9731728 and 4477b8c.

Files selected for processing (2)
  • .github/workflows/ci-test-custom-script.yml (1 hunks)
  • .github/workflows/server-build.yml (1 hunks)
Additional comments not posted (2)
.github/workflows/server-build.yml (2)

75-77: Class, let's examine this new step in our workflow.

Good morning, students! Today, we're going to learn about a new addition to our GitHub Actions workflow. Can anyone tell me what this step does?

- name: Default database URL
  run: echo "Is this a PG build? ${{ inputs.is-pg-build }}"

That's right! This step is like raising your hand in class to let everyone know what type of database we're using. It's very important because it helps us keep track of our build environment.

Now, can anyone tell me why this might be useful? Think about how it could help us troubleshoot issues or understand our test results better.

This addition is a good step towards improving our logging and visibility into the build process. Well done!

Class, for your homework, I want you to think about other pieces of information we might want to log in our workflow. Remember, clear communication is key in both coding and the classroom!


Line range hint 1-1: Class dismissed: Final thoughts on our workflow changes

Alright, class, let's wrap up our lesson on GitHub Actions workflows. We've seen a small but important addition to our "Appsmith Server Workflow." Can anyone summarize what we learned today?

That's correct! We added a new step to log whether we're using a PostgreSQL build. This might seem like a small change, but in the world of software development, every bit of information can be crucial.

Remember, students, clear logging and good communication in your code are just as important as your math homework. They help us understand what's happening in our systems and make troubleshooting easier.

For your final assignment, I want you to think about how this change might impact our overall development process. How could knowing the database type for each build help us in the future?

Class dismissed! Don't forget to push your changes and always be curious about improving your workflows!

.github/workflows/ci-test-custom-script.yml Outdated Show resolved Hide resolved
@abhvsn abhvsn requested a review from AnaghHegde September 25, 2024 09:59
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@abhvsn abhvsn requested a review from AnaghHegde September 26, 2024 10:58
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

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4477b8c and 8ef9a63.

📒 Files selected for processing (1)
  • .github/workflows/ci-test-custom-script.yml (1 hunks)
🧰 Additional context used
🪛 actionlint
.github/workflows/ci-test-custom-script.yml

203-203: workflow command "set-output" was deprecated. use echo "{name}={value}" >> $GITHUB_OUTPUT instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions

(deprecated-commands)


203-203: workflow command "set-output" was deprecated. use echo "{name}={value}" >> $GITHUB_OUTPUT instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions

(deprecated-commands)


203-203: workflow command "set-output" was deprecated. use echo "{name}={value}" >> $GITHUB_OUTPUT instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions

(deprecated-commands)

.github/workflows/ci-test-custom-script.yml Outdated Show resolved Hide resolved
@abhvsn abhvsn added the ok-to-test Required label for CI label Sep 26, 2024
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