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: make sure aws-lc-sys wouldn't be built #4767

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

discord9
Copy link
Contributor

@discord9 discord9 commented Sep 25, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#4750

What's changed and what's your intention?

Make sure aws-lc-sys wouldn't accidentially be built.

After update rustls to 0.23, it switch it's crypto lib to aws-lc, however, it's wrapper crate aws-lc-sys have many building problems on different platform due to chore with gcc version and etc, and currently it will fail building on our CentOS image, and possibly on andorid, so add a check to avoid bring in aws-lc-sys depend before they solve most of the building problem. Have already test it locally by removing patches for rustls, hyper-rustls and tokio-ruslts and this check will detect aws-lc-sys dependency

Alternative

Switch back to rustls 0.22, however that might not be feasible, since some of our dependenices might have move to higher version of rustls without knowing this change of default on crypto library and it's building problems.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.

Summary by CodeRabbit

  • New Features
    • Enhanced GitHub Actions workflow to check for successful builds of the aws-lc-sys crate.
    • Added informative output regarding potential compilation issues with aws-lc-sys on older GCC versions, suggesting alternatives.

@discord9 discord9 requested a review from a team as a code owner September 25, 2024 06:35
Copy link
Contributor

coderabbitai bot commented Sep 25, 2024

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

A new step has been introduced in the GitHub Actions workflow located in .github/workflows/develop.yml. This step is designed to verify the build success of the aws-lc-sys crate by inspecting its dependency tree. If the crate is present, a message is outputted regarding potential compilation issues with older GCC versions, recommending the use of ring as an alternative. The command ensures that the workflow continues even if aws-lc-sys is found, as it exits with a status of 1 while using || true.

Changes

Files Change Summary
.github/workflows/develop.yml Added a new step to check the build status of the aws-lc-sys crate, including messages for compilation issues and suggestions for alternatives.

Poem

In the meadow, hops a rabbit bright,
With changes made to workflows, oh what a sight!
Checking crates, ensuring they play,
With aws-lc-sys, come what may.
If troubles arise, we'll find a way,
With ring in hand, we'll save the day! 🐇✨


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 docs-not-required This change does not impact docs. label Sep 25, 2024
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.28%. Comparing base (cd4bf23) to head (1287c32).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4767      +/-   ##
==========================================
- Coverage   84.55%   84.28%   -0.27%     
==========================================
  Files        1117     1117              
  Lines      202684   202684              
==========================================
- Hits       171370   170826     -544     
- Misses      31314    31858     +544     

@discord9
Copy link
Contributor Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Sep 25, 2024

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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 (1)
.github/workflows/develop.yml (1)

272-274: LGTM! Consider a minor improvement for clarity.

The new step effectively checks for the presence of aws-lc-sys in the dependency tree, which aligns with the PR objective of preventing its accidental building. This is a good addition to the workflow.

To improve clarity and address a potential issue flagged by the static analysis tool, consider restructuring the command slightly:

- run: cargo tree -i aws-lc-sys -e features | grep aws-lc-sys && echo "Found aws-lc-sys, due to it having problem compiling on older gcc and etc. for now, please replace it with ring for now until it improve it's building experience" && exit 1 || true
+ run: |
+   if cargo tree -i aws-lc-sys -e features | grep -q aws-lc-sys; then
+     echo "Found aws-lc-sys, which has compilation problems on older gcc versions. Please replace it with ring until its building experience improves."
+     exit 1
+   fi

This restructuring:

  1. Makes the logic more explicit.
  2. Avoids the potential ambiguity of A && B || C flagged by the static analysis tool.
  3. Removes the need for the || true at the end, as the script will naturally exit with 0 if aws-lc-sys is not found.
🧰 Tools
actionlint

274-274: shellcheck reported issue in this script: SC2015:info:1:228: Note that A && B || C is not if-then-else. C may run when A is true

(shellcheck)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between cd4bf23 and 82ac97c.

📒 Files selected for processing (1)
  • .github/workflows/develop.yml (1 hunks)
🧰 Additional context used
actionlint
.github/workflows/develop.yml

274-274: shellcheck reported issue in this script: SC2015:info:1:228: Note that A && B || C is not if-then-else. C may run when A is true

(shellcheck)

@sunng87 sunng87 added this pull request to the merge queue Sep 25, 2024
Merged via the queue into GreptimeTeam:main with commit 0274e75 Sep 25, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants