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

Add Rails 7.1 to the test matrix #64

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

orien
Copy link
Contributor

@orien orien commented Mar 19, 2024

Let's ensure compatibility with the latest version of Rails.

Comment on lines 108 to 113
test "can't be used to inject SQL using .where" do
assert_raises MySQLBinUUID::InvalidUUID do
expected_error = ActiveRecord.version.to_s < "7.1" ? MySQLBinUUID::InvalidUUID : ActiveRecord::StatementInvalid
assert_raises(expected_error) do
MyUuidModel.where(the_uuid: "' OR ''='").first
end
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In Rails 7.1, the MySQLBinUUID::InvalidUUID error raised by this library gets wrapped in an ActiveRecord::StatementInvalid.

@@ -8,11 +8,11 @@ concurrency:

jobs:
tests:
continue-on-error: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disable the continue-on-error setting. This caused the workflow to always pass, even if a job failed.

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error

strategy:
fail-fast: false
Copy link
Contributor Author

@orien orien Mar 19, 2024

Choose a reason for hiding this comment

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

Disable fail-fast. This prevents GitHub Actions from canceling remaining jobs if any job in the matrix fails.

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast

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