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

Problem: testground image uploaded flow is not aligned in release #1629

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Oct 9, 2024

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

Summary by CodeRabbit

  • New Features

    • Enhanced GitHub Actions workflow to trigger on release/** branches, improving deployment flexibility.
  • Chores

    • Removed outdated configuration files (local.toml and manifest.toml) related to benchmarking, streamlining the project structure.

@mmsqe mmsqe requested a review from a team as a code owner October 9, 2024 01:09
@mmsqe mmsqe requested review from calvinaco and leejw51crypto and removed request for a team October 9, 2024 01:09
Copy link
Contributor

coderabbitai bot commented Oct 9, 2024

Walkthrough

The changes in this pull request involve modifications to the GitHub Actions workflow in .github/workflows/container.yml, specifically adding a new branch pattern for the push event trigger to include release/**. Additionally, two configuration files, local.toml and manifest.toml, related to benchmarking in the Testground environment, have been deleted. These deletions remove settings that defined benchmark parameters and runner configurations.

Changes

File Path Change Summary
.github/workflows/container.yml Added - release/** to the push event trigger; modified VERSION variable processing.
testground/benchmark/compositions/local.toml Deleted configuration file containing benchmark settings and metadata.
testground/benchmark/manifest.toml Deleted configuration file with settings for the benchmarking tool, including runner configurations.

Possibly related PRs

Suggested reviewers

  • calvinaco
  • devashishdxt
  • yihuang

Poem

🐇 In the meadow where the workflows play,
New branches bloom, brightening the day.
With settings gone, the path is clear,
A hop, a skip, the benchmarks cheer!
Versioning's neat, no 'v' in sight,
Let's celebrate this coding 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.

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.

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

🧹 Outside diff range and nitpick comments (2)
.github/workflows/container.yml (2)

38-38: LGTM: Improved VERSION variable assignment

The modification to the VERSION variable assignment is an improvement. It consolidates the version processing into a single line, enhancing clarity and efficiency. The additional sed command to remove the leading 'v' from the version string is a good practice for semantic versioning.

For even better readability, consider adding a comment explaining the purpose of each sed command:

- VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,' | sed -e 's/^v//')
+ # Extract the last part of the ref (branch or tag name) and remove leading 'v' if present
+ VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,' | sed -e 's/^v//')

Hardcoded 'main' Branch Reference Found

The workflow contains a hardcoded reference to the 'main' branch:

  • [ "$VERSION" == "main" ] && VERSION=latest

Since the workflow now also triggers on release/** branches, this hardcoding may lead to inconsistent version handling for release branches. Consider updating the version logic to appropriately handle both main and release/** branches.

🔗 Analysis chain

Line range hint 1-54: Verify workflow compatibility with release branches

The changes to include release branches in the workflow trigger and improve version handling are good. However, it's important to ensure that the rest of the workflow is compatible with release branches.

Please review the entire workflow to confirm that all steps, especially those related to building and pushing the image, are appropriate for release branches. You may want to run the following script to check for any potential issues:

This script will help identify any areas that might need attention to ensure full compatibility with release branches.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for potential issues in the workflow file related to release branches

# Test: Search for hardcoded references to 'main' branch that might need adjustment
echo "Checking for hardcoded 'main' branch references:"
rg --type yaml 'main' .github/workflows/container.yml

# Test: Verify if there are any conditional steps that might need to include release branches
echo "Checking for conditional steps:"
rg --type yaml 'if:' .github/workflows/container.yml

# Test: Check for any version-related operations that might need adjustment
echo "Checking for version-related operations:"
rg --type yaml 'version|tag' .github/workflows/container.yml

Length of output: 585

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 7c3ac87 and 2de2f1a.

📒 Files selected for processing (3)
  • .github/workflows/container.yml (2 hunks)
  • testground/benchmark/compositions/local.toml (0 hunks)
  • testground/benchmark/manifest.toml (0 hunks)
💤 Files with no reviewable changes (2)
  • testground/benchmark/compositions/local.toml
  • testground/benchmark/manifest.toml
🧰 Additional context used
🔇 Additional comments (1)
.github/workflows/container.yml (1)

7-7: LGTM: Addition of release branch pattern

The addition of the release/** pattern to the push event trigger is appropriate. This change ensures that the workflow runs for release branches, which aligns with the PR objective of addressing the testground image upload flow in the release process.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 17.87%. Comparing base (7c3ac87) to head (2de2f1a).
Report is 1 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (7c3ac87) and HEAD (2de2f1a). Click for more details.

HEAD has 12 uploads less than BASE
Flag BASE (7c3ac87) HEAD (2de2f1a)
2 0
integration_tests 20 10
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1629       +/-   ##
===========================================
- Coverage   36.31%   17.87%   -18.44%     
===========================================
  Files         123       72       -51     
  Lines        9715     5168     -4547     
===========================================
- Hits         3528      924     -2604     
+ Misses       5773     4121     -1652     
+ Partials      414      123      -291     

see 69 files with indirect coverage changes

@yihuang yihuang added this pull request to the merge queue Oct 9, 2024
Merged via the queue into crypto-org-chain:main with commit ac4652d Oct 9, 2024
34 of 35 checks passed
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.

2 participants