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: optimize upgrade tests by downloading binaries #2433

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

gartnera
Copy link
Member

@gartnera gartnera commented Jul 3, 2024

Description

Download binaries rather than compiling from source in the upgrades tests when possible. This makes the light upgrade tests only ~2 minutes slower than the normal e2e tests.

Use release binaries from zeta-chain/ci-testing-node which include some needed fixes for release/v17.

User can opt into building from source by doing UPGRADE_TEST_FROM_SOURCE=true make start-upgrade-test-light.

Closes #2179

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Summary by CodeRabbit

  • New Features

    • Introduced conditional builds for zetanode-upgrade to allow building from binaries or source.
  • Chores

    • Refined Dockerfile stages for improved build clarity and flexibility.

@gartnera gartnera added the no-changelog Skip changelog CI check label Jul 3, 2024
Copy link
Contributor

coderabbitai bot commented Jul 3, 2024

Walkthrough

The changes primarily focus on updating the Dockerfile-localnet and Makefile to streamline the process of handling zetanode-upgrade tasks. The Dockerfile-localnet introduces a new stage and modifies existing stages, while the Makefile now conditionally builds from either source or binaries based on the presence of a specific environment variable, enhancing efficiency in upgrade tests.

Changes

Files Change Summary
Dockerfile-localnet Renamed old-build to old-build-source, added old-runtime-source, and modified old-runtime stage with new COPY commands and ARG BUILDARCH
Makefile Updated zetanode-upgrade to conditionally build from source or binaries based on UPGRADE_TEST_FROM_SOURCE, and adjusted build steps and messages accordingly

Assessment against linked issues

Objective Addressed Explanation
Download binaries rather than compiling in upgrade tests (#2179, #2146, #2147)

Poem

Amidst the code in Docker's lair,
A zetanode upgrade with utmost care,
From source or binary, the choice is clear,
Efficiency leaps, no need to fear.
With Docker's magic and Makefile's might,
Our software soars to a new height. 🚀


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>.
    • 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 show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@gartnera gartnera added the UPGRADE_LIGHT_TESTS Run make start-upgrade-test-light label Jul 3, 2024
@github-actions github-actions bot added the ci Changes to CI pipeline or github actions label Jul 3, 2024
@gartnera gartnera force-pushed the upgrade-tests-old-image branch from eca49f1 to 1fd00e3 Compare July 8, 2024 17:01
@github-actions github-actions bot removed the ci Changes to CI pipeline or github actions label Jul 8, 2024
@gartnera gartnera force-pushed the upgrade-tests-old-image branch from 1fd00e3 to 6e52c2b Compare July 8, 2024 17:05
@gartnera gartnera changed the title ci: optimize upgrade tests by pulling image ci: optimize upgrade tests by downloading binaries Jul 8, 2024
@gartnera gartnera force-pushed the upgrade-tests-old-image branch from 6e52c2b to b471960 Compare July 8, 2024 17:14
@gartnera gartnera force-pushed the upgrade-tests-old-image branch from b471960 to 1f35b46 Compare July 8, 2024 17:17
@gartnera gartnera marked this pull request as ready for review July 8, 2024 18:09
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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f45a56b and 1f35b46.

Files selected for processing (2)
  • Dockerfile-localnet (2 hunks)
  • Makefile (1 hunks)
Files skipped from review due to trivial changes (1)
  • Makefile
Additional comments not posted (3)
Dockerfile-localnet (3)

Line range hint 64-72:
LGTM!

The renaming of the old-build stage to old-build-source and the steps to clone, fetch, checkout, and install the old version are clear and align with the objective. These changes are approved.


73-77: LGTM!

The addition of the old-runtime-source stage and the COPY commands from cosmovisor-build and old-build-source are consistent with the objective of supporting the option to build from source. These changes are approved.


81-88: LGTM!

The modifications to the old-runtime stage, including the addition of ARG BUILDARCH and the COPY commands, along with downloading binaries from GitHub releases, align with the objective of optimizing the upgrade tests. These changes are approved.

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1f35b46 and aa95fe8.

Files selected for processing (2)
  • Dockerfile-localnet (2 hunks)
  • Makefile (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • Dockerfile-localnet
  • Makefile

@gartnera gartnera added this pull request to the merge queue Jul 10, 2024
Merged via the queue into develop with commit b602ded Jul 10, 2024
27 of 30 checks passed
@gartnera gartnera deleted the upgrade-tests-old-image branch July 10, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Skip changelog CI check UPGRADE_LIGHT_TESTS Run make start-upgrade-test-light
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download binaries rather than compiling in upgrade tests
3 participants