-
-
Notifications
You must be signed in to change notification settings - Fork 468
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 CI - Update workflow, setup, specs, and more #998
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm still looking into why exactly this is happening, but solution has been consistent for me. To reproduce the issue for yourself: When CI runs for each version, it does so using the specific Gemfile for the version. Running `BUNDLE_GEMFILE=gemfiles/rails_7.1.gemfile RAILS_ENV=test bundle exec rake dummy:db:reset` and then `bundle exec appraisal rake' the Users table will not be found, because it is not created from this command. This issue only exists with the 7.1 gemfile that I've found. Splitting the command db:reset to its component parts of db:drop and db:setup on separate lines works - for all version. Using them on a single line does not work, though.
The way env_for works in rack 3.0.8 is different than previous versions. It downcases keys at the class level now. This update supports both versions. rack/rack@95d2f64
Use of "MiniTest" (vs modern Minitest) was removed in version 5.19.0. CI runs using version 5.20 of Minitest and was failing. This commit replaces the use of "MiniTest" with "Minitest". https://my.diffend.io/gems/minitest/5.18.1/5.19.0
Rails 6.0 no longer uses `config.activerecord.sqlite3.represent_boolean_as_integer` as it is always true now. rails/rails@f59b081 As well, `config.active_record.legacy_connection_handling` has been deprecated since Rails 7.0. rails/rails#45835
How rack's set_cookie_header methods might return Set-Cookie or set-cookie as a key depending on the version of rack
Apparently the value might be a string or an array depending on the version of ActionDispatch.
Merged
sej3506
changed the title
Fix CI - Update workflow, setup, and spec
Fix CI - Update workflow, setup, specs, and more
Dec 12, 2023
I'll be squashing and merging, using the PR description as the final commit message. |
MatheusRich
approved these changes
Dec 12, 2023
mike-burns
approved these changes
Dec 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context:
In #995, a PR to add support for Rails 7.1, CI was failing.
The thing causing this first failure was issue number 1
below. Each additional fix here was yet another thing
CI failed on.
Things in this commit:
.serialize_cookies
to handle old andnew versions of Rack's handling of headers
remember_token_cookies
handling of headers.
dummy:db:drop and dummy:set:up
This issue was discovered in #995.
I'm still looking into why exactly this is happening, but solution has
been consistent for me.
To reproduce the issue for yourself:
When CI runs for each version, it does so using
the specific Gemfile for the version.
Running
BUNDLE_GEMFILE=gemfiles/rails_7.1.gemfile RAILS_ENV=test bundle exec rake dummy:db:reset
and then
bundle exec appraisal rake
the Users table will not be found, because it is not created from this
command.
This issue only exists with the 7.1 gemfile that I've found.
Splitting the command dummy:db:reset to its component parts of dummy:db:drop and
dummy:db:setup on separate lines works - for all version. Using them on a
single line does not work, though.
Use of "MiniTest" (vs modern "Minitest") was removed in version 5.19.0.
CI runs using version 5.20 of Minitest and was failing.
https://my.diffend.io/gems/minitest/5.18.1/5.19.0
.serialize_cookies
to handle old andnew versions of Rack's handling of headers
The way
Rack::Utils.set_cookie_header!
works in rack 3.0.8is different than previous versions.
Rack downcases keys at the class level now. This update supports both
versions of the method.
rack/rack@95d2f64
Also updating spec/support/cookies.rb and
spec/support/request_with_remember_token.rb for this.
Rails 6.0 no longer uses
config.activerecord.sqlite3.represent_boolean_as_integer
as it is always true now.
rails/rails@f59b081
As well,
config.active_record.legacy_connection_handling
has beendeprecated since Rails 7.0 and throws errors if used.
rails/rails#45835
remember_token_cookies
handling of headers.
The value might be a string or an array.