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

Remove specialist topic code from email alert API #2136

Merged

Conversation

unoduetre
Copy link
Contributor

@unoduetre unoduetre commented Apr 12, 2024

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

What

When all specialist topic pages have been archived and redirected, we need to remove the specialist topic related code from Email alert API

Why

Remove tech debt.

Trello ticket

Dependencies

The following PR has been extracted from the current one and needs to be merged first.
The following PR fixes Pact tests.

@unoduetre unoduetre changed the title Remove specialist topic code from Email alert API Remove specialist topic code from email alert API Apr 12, 2024
@unoduetre unoduetre force-pushed the 2422-remove-specialist-topic-code-from-email-alert-api-l branch 2 times, most recently from ab10029 to d9a997e Compare April 15, 2024 08:25
@unoduetre unoduetre marked this pull request as ready for review April 15, 2024 08:31
@unoduetre unoduetre force-pushed the 2422-remove-specialist-topic-code-from-email-alert-api-l branch 2 times, most recently from 9ef7d94 to 9a1d3bf Compare May 7, 2024 11:23
Copy link
Contributor

@hannako hannako left a comment

Choose a reason for hiding this comment

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

Thanks Mat,

I've requested some changes, hopefully the comments makes sense?

I'd like to split this PR to make it easier for us to get the code reviewed, and make the intention of the work a bit easier to understand. I can see you extracted the pact tests into their own PR, but presumably that's not going to pass against a branch of gds-api-adapters without the SubsciberList factory being updated (which is still in this PR)?

Can I suggest we have one PR that removes topic as a valid tag for email alert api. This would contain your changes to

  • lib/email_alert_criteria.rb
  • lib/valid_tags.rb
  • spec/validators/tags_validator_spec.rb
  • spec/lib/email_alert_criteria_spec.rb

And then have a lower risk PR, which includes the remaining changes to the pact tests and factories and all specs, swapping out references to topics to taxons. That PR could go first, and would be about removing legacy references to specialist_topics. Ie not application code.

spec/factories.rb Outdated Show resolved Hide resolved
spec/queries/find_exact_query_spec.rb Outdated Show resolved Hide resolved
spec/queries/matched_for_notification_spec.rb Outdated Show resolved Hide resolved
@unoduetre
Copy link
Contributor Author

Thanks Mat,

I've requested some changes, hopefully the comments makes sense?

I'd like to split this PR to make it easier for us to get the code reviewed, and make the intention of the work a bit easier to understand. I can see you extracted the pact tests into their own PR, but presumably that's not going to pass against a branch of gds-api-adapters without the SubsciberList factory being updated (which is still in this PR)?

Can I suggest we have one PR that removes topic as a valid tag for email alert api. This would contain your changes to

* lib/email_alert_criteria.rb

* lib/valid_tags.rb

* spec/validators/tags_validator_spec.rb

* spec/lib/email_alert_criteria_spec.rb

And then have a lower risk PR, which includes the remaining changes to the pact tests and factories and all specs, swapping out references to topics to taxons. That PR could go first, and would be about removing legacy references to specialist_topics. Ie not application code.

I think we can safely move all the tests to a separate PR. Can I move them to this PR (I will change the name and the description of the PR accordingly), so we would have 1 PR dealing with tests and 1 PR applying the actual change?

@unoduetre unoduetre force-pushed the 2422-remove-specialist-topic-code-from-email-alert-api-l branch from ac84a66 to 556d4cc Compare May 8, 2024 09:50
Copy link
Contributor

@hannako hannako left a comment

Choose a reason for hiding this comment

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

This looks good now Mat - thank you for splitting the PR's!

Minor thing: Please could you add the changes to spec/validators/tags_validator_spec.rb and spec/lib/email_alert_criteria_spec.rb from #2147 to this PR

unoduetre added a commit to alphagov/gds-api-adapters that referenced this pull request May 21, 2024
* Update Pact specs to match the email-alert-api [PR](alphagov/email-alert-api#2136)
@unoduetre unoduetre force-pushed the 2422-remove-specialist-topic-code-from-email-alert-api-l branch from 556d4cc to b061fe9 Compare May 21, 2024 09:31
Copy link
Contributor

@hannako hannako left a comment

Choose a reason for hiding this comment

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

Amazing work Mat, thanks for all your efforts

Copy link
Contributor

@KludgeKML KludgeKML left a comment

Choose a reason for hiding this comment

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

LGTM

@unoduetre unoduetre merged commit 044927e into main May 21, 2024
9 checks passed
@unoduetre unoduetre deleted the 2422-remove-specialist-topic-code-from-email-alert-api-l branch May 21, 2024 12:45
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.

None yet

4 participants