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

fix openssl version #1127

Merged
merged 5 commits into from
Aug 31, 2024
Merged

fix openssl version #1127

merged 5 commits into from
Aug 31, 2024

Conversation

shogo82148
Copy link
Owner

@shogo82148 shogo82148 commented Aug 31, 2024

Summary by CodeRabbit

  • New Features

    • Updated the build scripts to focus on MariaDB versioning, enhancing compatibility with MariaDB 10.8 and later.
    • Clarified output messages in build scripts to specify the versions of OpenSSL being processed.
  • Bug Fixes

    • Improved the accuracy of version checks in the build scripts for MariaDB and MySQL.

Copy link

coderabbitai bot commented Aug 31, 2024

Walkthrough

The changes involve updates to multiple scripts, enhancing version checks and clarifying output messages related to OpenSSL and MariaDB. The variable checked in .github/build-mariadb-linux.sh was changed from MYSQL_VERSION to MARIADB_VERSION. Regex patterns for version matching were refined in several scripts to ensure accurate identification of MariaDB versions 10.8 and later, while echo statements were updated to specify the OpenSSL versions being processed.

Changes

File Change Summary
.github/build-mariadb-linux.sh, Changed variable check from MYSQL_VERSION to MARIADB_VERSION for version handling.
.github/build-mariadb-darwin.sh, Updated regex pattern for version matching to improve accuracy for versions 10.8 and later.
.github/build-mariadb-windows.ps1 Refined regex pattern to match any version starting with 10 followed by 8 or higher, and 11.
.github/build-mysql-darwin-macos14.sh, Updated OpenSSL version from 3.2.1 to 3.3.1 and clarified echo statements for OpenSSL.
.github/build-mysql-darwin.sh, Enhanced echo statements to specify OpenSSL versions in output messages.
.github/build-mysql-linux.sh, Clarified echo statements to specify OpenSSL versions in output messages.
.github/build-mysql-windows.ps1 Updated echo statements for OpenSSL version clarity and changed MySQL version check comment.

Poem

In the garden where I hop and play,
A change has come to brighten the day.
From MySQL's grasp, we now take flight,
With MariaDB, our future is bright!
Hopping along, with joy we sing,
For every version, new hopes we bring! 🐇✨


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

@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 UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3534f91 and 3c04c2c.

Files selected for processing (1)
  • .github/build-mariadb-linux.sh (1 hunks)
Additional context used
Learnings (1)
.github/build-mariadb-linux.sh (1)
Learnt from: shogo82148
PR: shogo82148/actions-setup-mysql#1087
File: .github/build-mysql-windows.ps1:0-0
Timestamp: 2024-07-06T11:40:05.856Z
Learning: The regex pattern in `.github/build-mysql-windows.ps1` for MySQL version matching was corrected to remove an extra `^` character.
Additional comments not posted (1)
.github/build-mariadb-linux.sh (1)

Line range hint 1-35: Initial setup and environment configuration looks good.

The script correctly sets up the necessary environment variables and checks for system architecture, ensuring that the build process can proceed smoothly.

.github/build-mariadb-linux.sh Outdated Show resolved Hide resolved
@@ -32,7 +32,7 @@ cd "$RUNNER_TEMP"

ACTION_VERSION=$(jq -r '.version' < "$ROOT/../package.json")

if [[ "$MARIADB_VERSION" =~ (^10[.](8|9|[1-9][0-9])[.])|(^1[1-9][.]) ]]; then # MariaDB 10.8 or later
if [[ "$MARIADB_VERSION" =~ ^(10\.([89]|[1-9][0-9]+)\.)|1[1-9]\. ]]; then # MariaDB 10.8 or later
Copy link
Owner Author

Choose a reason for hiding this comment

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

@coderabbitai can you review this regexp is correct?

Copy link

Choose a reason for hiding this comment

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

@shogo82148 The regex pattern ^(10\.([89]|[1-9][0-9]+)\.)|1[1-9]\. is correct for matching MariaDB versions 10.8 and above, including versions in the 11.x series and beyond. It accurately captures the intended range of versions.


Learnings used
Learnt from: shogo82148
PR: shogo82148/actions-setup-mysql#1087
File: .github/build-mysql-windows.ps1:0-0
Timestamp: 2024-07-06T11:40:05.856Z
Learning: The regex pattern in `.github/build-mysql-windows.ps1` for MySQL version matching was corrected to remove an extra `^` character.

Copy link
Owner Author

Choose a reason for hiding this comment

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

thanks

Copy link

Choose a reason for hiding this comment

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

@shogo82148 You're welcome! 😊


Learnings used
Learnt from: shogo82148
PR: shogo82148/actions-setup-mysql#1087
File: .github/build-mysql-windows.ps1:0-0
Timestamp: 2024-07-06T11:40:05.856Z
Learning: The regex pattern in `.github/build-mysql-windows.ps1` for MySQL version matching was corrected to remove an extra `^` character.

Copy link

@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 UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3c04c2c and a8772c6.

Files selected for processing (3)
  • .github/build-mariadb-darwin.sh (1 hunks)
  • .github/build-mariadb-linux.sh (1 hunks)
  • .github/build-mariadb-windows.ps1 (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/build-mariadb-linux.sh
Additional context used
Learnings (2)
.github/build-mariadb-darwin.sh (1)
Learnt from: shogo82148
PR: shogo82148/actions-setup-mysql#1087
File: .github/build-mysql-windows.ps1:0-0
Timestamp: 2024-07-06T11:40:05.856Z
Learning: The regex pattern in `.github/build-mysql-windows.ps1` for MySQL version matching was corrected to remove an extra `^` character.
.github/build-mariadb-windows.ps1 (1)
Learnt from: shogo82148
PR: shogo82148/actions-setup-mysql#1087
File: .github/build-mysql-windows.ps1:0-0
Timestamp: 2024-07-06T11:40:05.856Z
Learning: The regex pattern in `.github/build-mysql-windows.ps1` for MySQL version matching was corrected to remove an extra `^` character.
Additional comments not posted (2)
.github/build-mariadb-darwin.sh (1)

35-35: Refine Regex Pattern for MariaDB Version Check

The updated regex pattern ^(10\.([89]|[1-9][0-9]+)\.)|1[1-9]\. is designed to match MariaDB versions 10.8 and later, including all versions starting from 11. This change ensures that the script correctly identifies the versions that require building with OpenSSL v3. The modification enhances the accuracy and clarity of the version check, aligning with the PR's objective to fix OpenSSL version issues.

.github/build-mariadb-windows.ps1 (1)

42-42: Refine Regex Pattern for MariaDB Version Check

The updated regex pattern ^(10\.([89]|[1-9][0-9]+)\.)|1[1-9]\. is designed to match MariaDB versions 10.8 and later, including all versions starting from 11. This change ensures that the script correctly identifies the versions that require building with OpenSSL v3. The modification enhances the accuracy and clarity of the version check, aligning with the PR's objective to fix OpenSSL version issues.

Copy link

@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 UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a8772c6 and 883f836.

Files selected for processing (7)
  • .github/build-mariadb-darwin.sh (2 hunks)
  • .github/build-mariadb-linux.sh (2 hunks)
  • .github/build-mariadb-windows.ps1 (2 hunks)
  • .github/build-mysql-darwin-macos14.sh (3 hunks)
  • .github/build-mysql-darwin.sh (2 hunks)
  • .github/build-mysql-linux.sh (2 hunks)
  • .github/build-mysql-windows.ps1 (5 hunks)
Files skipped from review due to trivial changes (4)
  • .github/build-mysql-darwin-macos14.sh
  • .github/build-mysql-darwin.sh
  • .github/build-mysql-linux.sh
  • .github/build-mysql-windows.ps1
Files skipped from review as they are similar to previous changes (1)
  • .github/build-mariadb-linux.sh
Additional context used
Learnings (2)
.github/build-mariadb-darwin.sh (1)
Learnt from: shogo82148
PR: shogo82148/actions-setup-mysql#1087
File: .github/build-mysql-windows.ps1:0-0
Timestamp: 2024-07-06T11:40:05.856Z
Learning: The regex pattern in `.github/build-mysql-windows.ps1` for MySQL version matching was corrected to remove an extra `^` character.
.github/build-mariadb-windows.ps1 (1)
Learnt from: shogo82148
PR: shogo82148/actions-setup-mysql#1087
File: .github/build-mysql-windows.ps1:0-0
Timestamp: 2024-07-06T11:40:05.856Z
Learning: The regex pattern in `.github/build-mysql-windows.ps1` for MySQL version matching was corrected to remove an extra `^` character.
Additional comments not posted (5)
.github/build-mariadb-darwin.sh (3)

35-38: Refined Regex Pattern for MariaDB Version Check

The updated regex pattern ^(10\.([89]|[1-9][0-9]+)\.)|1[1-9]\. is now more streamlined and correctly matches MariaDB versions 10.8 and later. This change ensures that the script only attempts to build OpenSSL v3 for the appropriate MariaDB versions, which is crucial for maintaining compatibility and security.


46-54: Enhanced Clarity in OpenSSL Build Steps

The echo statements added to the script segments for downloading, extracting, and building OpenSSL provide better visibility into the process. This is particularly useful for debugging and understanding the build process in automated environments. The use of set -eux within subshells is a good practice for ensuring that each step is executed with error checking and command echoing, which enhances the robustness of the script.


67-83: Handling of OpenSSL Version 1.1.1

The script handles the condition where an older version of OpenSSL needs to be built (v1.1.1) for MariaDB versions earlier than 10.8. The steps for downloading, extracting, and building this version are similar to those for OpenSSL v3, ensuring consistency in handling different versions. This is crucial for maintaining backward compatibility.

.github/build-mariadb-windows.ps1 (2)

42-45: Refined Regex Pattern for MariaDB Version Check

The updated regex pattern ^(10\.([89]|[1-9][0-9]+)\.)|1[1-9]\. is now more streamlined and correctly matches MariaDB versions 10.8 and later. This change ensures that the script only attempts to build OpenSSL v3 for the appropriate MariaDB versions, which is crucial for maintaining compatibility and security.


70-70: Handling of OpenSSL Version 1.1.1

The script handles the condition where an older version of OpenSSL needs to be built (v1.1.1) for MariaDB versions earlier than 10.8. The steps for downloading, extracting, and building this version are similar to those for OpenSSL v3, ensuring consistency in handling different versions. This is crucial for maintaining backward compatibility.

Copy link

@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 UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 883f836 and 4c4fc6c.

Files selected for processing (3)
  • .github/build-mariadb-darwin.sh (2 hunks)
  • .github/build-mariadb-linux.sh (2 hunks)
  • .github/build-mariadb-windows.ps1 (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/build-mariadb-linux.sh
Additional context used
Learnings (1)
.github/build-mariadb-windows.ps1 (1)
Learnt from: shogo82148
PR: shogo82148/actions-setup-mysql#1087
File: .github/build-mysql-windows.ps1:0-0
Timestamp: 2024-07-06T11:40:05.856Z
Learning: The regex pattern in `.github/build-mysql-windows.ps1` for MySQL version matching was corrected to remove an extra `^` character.
Additional comments not posted (4)
.github/build-mariadb-darwin.sh (2)

35-35: Approved: Updated regex pattern for MariaDB version check.

The updated regex pattern is streamlined and correctly matches MariaDB versions 10.8 and later, as intended.


38-38: Approved: Enhanced clarity with updated echo statements.

The addition of echo statements improves the script's readability and maintainability by clearly indicating the steps involved in downloading, extracting, and building OpenSSL versions based on the MariaDB version.

Also applies to: 46-46, 54-54, 67-67, 75-75, 83-83

.github/build-mariadb-windows.ps1 (2)

42-42: Approved: Updated regex pattern for MariaDB version check.

The updated regex pattern is more accurate and correctly matches MariaDB versions 10.8 and later, including a broader range for the major version. This ensures that valid MariaDB versions are correctly identified for custom SSL/TLS library builds.


45-45: Approved: Enhanced clarity with updated echo statements.

The addition of echo statements improves the script's readability and maintainability by clearly indicating the steps involved in fetching and building OpenSSL versions based on the MariaDB version.

Also applies to: 70-70

@shogo82148 shogo82148 merged commit 3356373 into main Aug 31, 2024
106 of 310 checks passed
@shogo82148 shogo82148 deleted the fix-openssl-version branch August 31, 2024 04:08
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.

1 participant