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

ci: send message on release created and successfully validated #1185

Merged
merged 28 commits into from
Oct 2, 2024

Conversation

arealmaas
Copy link
Collaborator

@arealmaas arealmaas commented Sep 24, 2024

Description

  • Will send a message in Slack about a new release once it has finished all dry-runs.
  • Will send a new message per commit in main

Potential improvements:

  • Update this message whenever the release is updated. We cannot specify ID so we need to store this somewhere along with the PR-number..
  • Add more actions to the message. "Approve" for example should just do that. Approve the PR and merge it automatically.
  • Add action to promote to production

Summary by CodeRabbit

  • New Features

    • Introduced a new job that sends formatted notifications to Slack upon successful deployment, enhancing communication regarding pull requests.
  • Bug Fixes

    • Minor formatting corrections made to improve the clarity of deployment configurations.

@arealmaas arealmaas requested review from a team as code owners September 24, 2024 15:42
Copy link
Contributor

coderabbitai bot commented Sep 24, 2024

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces a new job named send-slack-message to the CI/CD workflow, which is dependent on the successful completion of two prior jobs. This job formats the pull request body for Slack and sends a message to a designated Slack channel, including an approval button linked to the pull request. Additionally, minor formatting adjustments were made to the dry-run-deploy-apps-staging job.

Changes

Files Change Summary
.github/workflows/ci-cd-pull-request-release-please.yml Added a new job send-slack-message to send a formatted Slack message with a PR approval button; minor indentation correction in dry-run-deploy-apps-staging.

Possibly related issues


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.

@arealmaas arealmaas changed the title chore: slack message on release pr WIP chore: slack message on release pr Sep 25, 2024
@arealmaas arealmaas changed the title WIP chore: slack message on release pr WIP chore(main): release 1.20.0 Are Testing Sep 30, 2024
@arealmaas arealmaas changed the title WIP chore(main): release 1.20.0 Are Testing ci: send message on release created and successfully validated Oct 1, 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: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 28a9c8b and 14878fb.

📒 Files selected for processing (1)
  • .github/workflows/ci-cd-pull-request-release-please.yml (1 hunks)
🧰 Additional context used
🪛 yamllint
.github/workflows/ci-cd-pull-request-release-please.yml

[error] 110-110: too many blank lines

(1 > 0) (empty-lines)

🔇 Additional comments (3)
.github/workflows/ci-cd-pull-request-release-please.yml (3)

66-66: LGTM: Improved indentation for better readability

The indentation adjustment for the region field in the dry-run-deploy-apps-staging job enhances the overall readability and consistency of the YAML file. This change aligns with best practices for YAML formatting.


67-109: LGTM: Well-implemented Slack notification job

The new send-slack-message job effectively implements the PR objective of sending a Slack notification when a release is created and validated. Good job on:

  • Depending on the successful completion of dry run jobs
  • Using appropriate actions for Slack message formatting and sending
  • Including an approval button in the Slack message

The implementation aligns well with the PR objectives and provides a solid foundation for release notifications.


Line range hint 60-60: Clarify the status of the TODO comment

There's a TODO comment about considering alternative ways to resolve certain secrets:

# todo: consider resolving these in another way since they are created in the infra-step

A previous review asked if this TODO could be removed. Can you clarify if this has been addressed or if it's still relevant? If it's no longer needed, consider removing it to keep the workflow file clean.

🧰 Tools
🪛 yamllint

[error] 110-110: too many blank lines

(1 > 0) (empty-lines)

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: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 14878fb and 76b7291.

📒 Files selected for processing (1)
  • .github/workflows/ci-cd-pull-request-release-please.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/ci-cd-pull-request-release-please.yml (2)

67-70: LGTM: New Slack notification job added

The new send-slack-message job is well-placed in the workflow, depending on the completion of the dry-run jobs. This ensures that the Slack message is sent only after the necessary checks have been performed.


72-76: LGTM: Markdown conversion for Slack

The use of LoveToKnow/slackify-markdown-action to convert the pull request body to Slack-compatible markdown is a good practice. It ensures that the message will be properly formatted in Slack.

Copy link

sonarcloud bot commented Oct 2, 2024

@arealmaas arealmaas merged commit dc96c94 into main Oct 2, 2024
22 checks passed
@arealmaas arealmaas deleted the ci/slack-message-on-release branch October 2, 2024 12:43
arealmaas added a commit that referenced this pull request Oct 3, 2024
# Description
- Will send a message in Slack about a new release once it has finished
all dry-runs.
- Will send a new message per commit in `main`

Potential improvements:
- Update this message whenever the release is updated. We cannot specify
ID so we need to store this somewhere along with the PR-number..
- Add more actions to the message. "Approve" for example should just do
that. Approve the PR and merge it automatically.
- Add action to promote to production




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

- **New Features**
- Introduced a new job that sends formatted notifications to Slack upon
successful deployment, enhancing communication regarding pull requests.

- **Bug Fixes**
- Minor formatting corrections made to improve the clarity of deployment
configurations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants