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(deps): upgrade to celestia-core v1.37.0-tm-v0.34.29 #3607

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jun 21, 2024

Motivation: because celestia-core v1.37.0 uses NMT v0.21.0 which contains this fix: celestiaorg/nmt#253

@rootulp rootulp self-assigned this Jun 21, 2024
@rootulp rootulp marked this pull request as ready for review June 21, 2024 15:50
@rootulp rootulp requested a review from a team as a code owner June 21, 2024 15:50
@rootulp rootulp requested review from evan-forbes and ninabarbakadze and removed request for a team June 21, 2024 15:50
Copy link
Contributor

coderabbitai bot commented Jun 21, 2024

Walkthrough

Walkthrough

The updates primarily focus on incrementing the version of Go from 1.22.3 to 1.22.4 across various configuration and manifest files, as well as dependency updates for some packages. This change ensures the use of the latest Go features and security updates within the project environment and dependencies.

Changes

File/Path Change Summary
Dockerfile Updated Go builder image to golang:1.22.4-alpine3.19.
Makefile Changed GOLANG_CROSS_VERSION from v1.22.3 to v1.22.4.
README.md Updated Go installation instructions from version 1.22.3 to 1.22.4.
go.mod Updated Go version to 1.22.4 and tendermint dependency.
go.work.example Changed Go version from 1.22.3 to 1.22.4.
test/.../Dockerfile Updated BUILD_BASE_IMAGE to golang:1.22.4-alpine3.19.
test/.../compositions/standard/plan.toml Updated build_base_image and go_version to 1.22.4.
test/.../go.mod Changed Go version to 1.22.4, and updated nmt and tendermint dependencies.
test/.../manifest.toml Updated build_base_image and go_version to 1.22.4 for the docker:generic builder.

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c858961 and ad042c8.

Files ignored due to path filters (3)
  • go.sum is excluded by !**/*.sum
  • test/interchain/go.sum is excluded by !**/*.sum
  • test/testground/go.sum is excluded by !**/*.sum
Files selected for processing (10)
  • Dockerfile (1 hunks)
  • Makefile (1 hunks)
  • README.md (1 hunks)
  • go.mod (2 hunks)
  • go.work.example (1 hunks)
  • test/interchain/go.mod (3 hunks)
  • test/testground/Dockerfile (1 hunks)
  • test/testground/compositions/standard/plan.toml (1 hunks)
  • test/testground/go.mod (3 hunks)
  • test/testground/manifest.toml (1 hunks)
Files skipped from review due to trivial changes (9)
  • Dockerfile
  • Makefile
  • README.md
  • go.mod
  • go.work.example
  • test/interchain/go.mod
  • test/testground/compositions/standard/plan.toml
  • test/testground/go.mod
  • test/testground/manifest.toml
Additional context used
Hadolint
test/testground/Dockerfile

[warning] 17-17: Always tag the version of an image explicitly (DL3006)


[info] 50-50: Use the --no-cache switch to avoid the need to use --update and remove /var/cache/apk/* when done installing packages (DL3019)


[warning] 50-50: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version> (DL3018)


[warning] 53-53: Use WORKDIR to switch to a directory (DL3003)


[warning] 63-63: Use WORKDIR to switch to a directory (DL3003)


[warning] 63-63: CgoEnabled is referenced but not assigned. (SC2154)


[warning] 68-68: Use WORKDIR to switch to a directory (DL3003)


[warning] 76-76: Always tag the version of an image explicitly (DL3006)


[warning] 77-77: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version> (DL3018)

Additional comments not posted (1)
test/testground/Dockerfile (1)

Line range hint 77-77: Pin versions when installing packages.

It's best practice to pin the versions of packages when using apk add to ensure the build environment is predictable and consistent.
[REFACTOR_SUGGESTion]

- RUN apk add --no-cache bash gcompat curl
+ RUN apk add --no-cache bash=5.0.17 gcompat=1.0.0 curl=7.69.1  # Replace with the exact versions you need

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:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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.

@rootulp rootulp marked this pull request as ready for review June 21, 2024 15:56
@rootulp rootulp requested review from staheri14 and removed request for ninabarbakadze June 21, 2024 15:57
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 (2)
test/testground/Dockerfile (2)

Line range hint 50-50: Optimize Docker layer caching and pin package versions.

Use the --no-cache switch when installing packages with apk to avoid the need to use --update and remove /var/cache/apk/* when done. Also, pin versions of packages to ensure reproducibility.

- RUN apk add gcompat
+ RUN apk add --no-cache gcompat=1.0.0  # Replace 1.0.0 with the exact version you need

[!TIP]
Codebase Verification

CgoEnabled variable is not defined elsewhere in the Dockerfile.

The search results indicate that CgoEnabled is only used and not defined elsewhere in the Dockerfile or related files. Therefore, assigning a default value as suggested in the review comment is necessary to avoid potential issues during the build process.

  • File: test/testground/Dockerfile
  • Lines: 65

Suggested Change:

- && CGO_ENABLED=${CgoEnabled} GOOS=linux GOARCH=amd64 go build -o ${PLAN_DIR}/testplan.bin ${BUILD_TAGS} ${TESTPLAN_EXEC_PKG}
+ && CGO_ENABLED=${CgoEnabled:-0} GOOS=linux GOARCH=amd64 go build -o testplan.bin ${BUILD_TAGS} ${TESTPLAN_EXEC_PKG}
Analysis chain

Line range hint 53-53: Use WORKDIR instead of repetitive cd commands.

Using WORKDIR simplifies the Dockerfile and avoids potential errors with directory paths. Also, ensure that CgoEnabled is correctly assigned before use.

- RUN cd ${PLAN_DIR} \
+ WORKDIR ${PLAN_DIR}
- && CGO_ENABLED=${CgoEnabled} GOOS=linux GOARCH=amd64 go build -o ${PLAN_DIR}/testplan.bin ${BUILD_TAGS} ${TESTPLAN_EXEC_PKG}
+ && CGO_ENABLED=${CgoEnabled:-0} GOOS=linux GOARCH=amd64 go build -o testplan.bin ${BUILD_TAGS} ${TESTPLAN_EXEC_PKG}

Also applies to: 63-63, 68-68

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify if CgoEnabled is defined elsewhere in the Dockerfile or Docker context.
grep -rnw '/path/to/Docker/context' -e 'CgoEnabled'

Length of output: 106



Script:

#!/bin/bash
# Search for the definition of CgoEnabled within the Dockerfile and relevant files in the repository.
# Adjusting the search to the actual repository context.
grep -rnw '.' -e 'CgoEnabled'

Length of output: 186

@@ -1,6 +1,6 @@
# BUILD_BASE_IMAGE is the base image to use for the build. It contains a rolling
# accumulation of Go build/package caches.
ARG BUILD_BASE_IMAGE=docker.io/golang:1.22.3-alpine3.19
ARG BUILD_BASE_IMAGE=docker.io/golang:1.22.4-alpine3.19
Copy link
Contributor

Choose a reason for hiding this comment

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

Specify the exact version of the alpine image.

Always tag the version of an image explicitly to ensure reproducibility and avoid surprises from unintended upgrades. The current tag alpine3.19 does not specify the patch version.

- ARG BUILD_BASE_IMAGE=docker.io/golang:1.22.4-alpine3.19
+ ARG BUILD_BASE_IMAGE=docker.io/golang:1.22.4-alpine3.19.0
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ARG BUILD_BASE_IMAGE=docker.io/golang:1.22.4-alpine3.19
ARG BUILD_BASE_IMAGE=docker.io/golang:1.22.4-alpine3.19.0

Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

LGTM!

@rootulp rootulp merged commit 37c96de into celestiaorg:main Jun 21, 2024
32 checks passed
rootulp added a commit that referenced this pull request Jun 21, 2024
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.

None yet

3 participants