Skip to content

Commit 1366774

Browse files
authored
Merge pull request #158807 from rafiss/backport24.3-158776
release-24.3: roachtest/activerecord: bump rails version to 8.1
2 parents 641359e + 68d238c commit 1366774

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

pkg/cmd/roachtest/tests/activerecord.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ var railsReleaseTagRegex = regexp.MustCompile(`^v(?P<major>\d+)\.(?P<minor>\d+)\
2727

2828
// WARNING: DO NOT MODIFY the name of the below constant/variable without approval from the docs team.
2929
// This is used by docs automation to produce a list of supported versions for ORM's.
30-
var supportedRailsVersion = "7.2.1"
31-
var activerecordAdapterVersion = "v7.2.0"
30+
var supportedRailsVersion = "8.1.0"
31+
var activerecordAdapterVersion = "v8.1.0"
3232

3333
// This test runs activerecord's full test suite against a single cockroach node.
3434

@@ -172,7 +172,18 @@ func registerActiveRecord(r registry.Registry) {
172172

173173
t.Status("running activerecord test suite")
174174

175+
// Enable autocommit before DDL by default within the test suite.
175176
result, err := c.RunWithDetailsSingleNode(ctx, t.L(), option.WithNodes(node),
177+
`cd /mnt/data1/activerecord-cockroachdb-adapter/ && `+
178+
`sudo sed -i 's/autocommit_before_ddl: false/autocommit_before_ddl: true/g' test/config.yml`,
179+
)
180+
// Fatal for a roachprod or transient error. A roachprod error is when result.Err==nil.
181+
// Proceed for any other (command) errors
182+
if err != nil && (result.Err == nil || rperrors.IsTransient(err)) {
183+
t.Fatal(err)
184+
}
185+
186+
result, err = c.RunWithDetailsSingleNode(ctx, t.L(), option.WithNodes(node),
176187
fmt.Sprintf(
177188
`cd /mnt/data1/activerecord-cockroachdb-adapter/ && `+
178189
`sudo RAILS_VERSION=%s RUBYOPT="-W0" TESTOPTS="-v" bundle exec rake test`, supportedRailsVersion),

pkg/cmd/roachtest/tests/activerecord_blocklist.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ var activeRecordIgnoreList = blocklist{
5656
`ActiveRecord::Encryption::UniquenessValidationsTest#test_uniqueness_validations_work_when_using_old_encryption_schemes`: "flaky",
5757
`AssociationCallbacksTest#test_has_many_callbacks_for_destroy_on_parent`: "flaky",
5858
`BasicsTest#test_default_values_are_deeply_dupped`: "flaky",
59+
`CascadedEagerLoadingTest#test_eager_association_loading_with_cascaded_three_levels_by_ping_pong`: "flaky",
60+
`CockroachDBReferentialIntegrityTest#test_should_reraise_invalid_foreign_key_exception_and_show_warning`: "affected by autocommit_before_ddl",
61+
`CockroachDB::AdapterForeignKeyTest#test_foreign_key_violations_are_translated_to_specific_exception_with_validate_false`: "flaky",
62+
`CockroachDB::AdapterForeignKeyTest#test_foreign_key_violations_on_delete_are_translated_to_specific_exception`: "flaky",
63+
`CockroachDB::AdapterForeignKeyTest#test_foreign_key_violations_on_insert_are_translated_to_specific_exception`: "flaky",
5964
`CockroachDB::FixturesTest#test_create_fixtures`: "flaky",
6065
`CockroachDB::FixturesTest#test_create_symbol_fixtures`: "flaky",
6166
`FixtureWithSetModelClassPrevailsOverNamingConventionTest#test_model_class_in_fixture_file_is_respected`: "flaky",

0 commit comments

Comments
 (0)