Skip to content

AO3-6978 Create and fill new table for import urls#5795

Open
luis-pabon-tf wants to merge 27 commits intootwcode:masterfrom
luis-pabon-tf:AO3-6978
Open

AO3-6978 Create and fill new table for import urls#5795
luis-pabon-tf wants to merge 27 commits intootwcode:masterfrom
luis-pabon-tf:AO3-6978

Conversation

@luis-pabon-tf
Copy link
Copy Markdown
Contributor

@luis-pabon-tf luis-pabon-tf commented May 8, 2026

Pull Request Checklist

Issue

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

Purpose

Step 1 of moving imported URLs to a new table to store all searchable variations.

References

This is a follow-up to PR 5659 as that had issues during the production backfill.
AO3-6979 follows up on this one
AO3-6591 Is the parent both tickets belong to

Credit

What name and pronouns should we use to credit you in the Archive of Our Own's Release Notes?
Luis Pabon (they/he)

luis-pabon-tf and others added 25 commits March 19, 2026 15:51
Used co-authors work as reference when making this migration

Co-Authored-By: Éric B. <896729+ceithir@users.noreply.github.com>
Co-Authored-By: Melissa Jiménez <96195033+gmjimenezc@users.noreply.github.com>
…mine

Co-Authored-By: Melissa Jiménez <96195033+gmjimenezc@users.noreply.github.com>
…d test case for importedUrl handling of longer urls
@github-actions github-actions Bot added Has Migrations Contains migrations and therefore needs special attention when deploying Awaiting Review labels May 8, 2026
@sarken sarken added the Priority: High - Broken on Test Merge immediately after approval label May 9, 2026
Copy link
Copy Markdown
Collaborator

@sarken sarken left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

work.imported_url = ImportedUrl.create(original: work.imported_from_url)
begin
work.imported_url = ImportedUrl.create(original: work.imported_from_url)
rescue StandardError => e
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you update spec/lib/tasks/work_import_urls.rake_spec.rb‎ with a test that shows the output for the error?

t.string :minimal_no_protocol_no_www, null: false
t.string :no_www, null: false
t.string :with_www, null: false
t.string :with_www, null: false, limit: 300
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you add a comment documentation why these are the chosen values for these limits?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Has Migrations Contains migrations and therefore needs special attention when deploying Priority: High - Broken on Test Merge immediately after approval Reviewed: Action Needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants