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

AO3-6893 Patch departure the right way to prevent lock issues #5069

Merged
merged 2 commits into from
Feb 16, 2025

Conversation

brianjaustin
Copy link
Member

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-6893

Purpose

I did this the wrong way in in #5068 , and testing did not hit the right parts to trigger the original bug. This pulls from the linked issue directly to fix things. (Good news, I think this means the upstream fix will be pretty simple... hopefully)

@brianjaustin brianjaustin added the Priority: High - Broken on Test Merge immediately after approval label Feb 16, 2025
@brianjaustin
Copy link
Member Author

Testing output from staging

ao3app@test-app16:~/app/current$ rails db:migrate:down VERSION=20250129101817
Including for_alter statements
== 20250129101817 RemoveNotNullOnActiveStorageBlobsChecksum: reverting ========
-- change_column_null(:active_storage_blobs, :checksum, false, nil)
   -> 0.2643s
== 20250129101817 RemoveNotNullOnActiveStorageBlobsChecksum: reverted (0.2687s) 

ao3app@test-app16:~/app/current$ rails db:migrate:up VERSION=20250129101817
Including for_alter statements
== 20250129101817 RemoveNotNullOnActiveStorageBlobsChecksum: migrating ========
-- table_exists?(:active_storage_blobs)
   -> 0.0018s
-- change_column_null(:active_storage_blobs, :checksum, true, nil)
   -> 0.2555s
== 20250129101817 RemoveNotNullOnActiveStorageBlobsChecksum: migrated (0.2574s) 

It refers to a migration; this is not one, and we need to subclass ActiveRecord::Base
this way to ensure OriginalAdapterConnection subclasses the right thing.
end
end

class OriginalAdapterConnection < ConnectionBase; end
Copy link
Member

Choose a reason for hiding this comment

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

Is this still needed?

Copy link
Member

Choose a reason for hiding this comment

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

Never mind, I see your commit message now. This is to fully reverse the patch at https://github.com/departurerb/departure/blob/982966c8e57a1cb0c3a1c0083cc3d3d0b74da51d/lib/departure/connection_base.rb.

@redsummernight redsummernight merged commit fa7bdc4 into otwcode:master Feb 16, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants