Skip to content

LG-9334: Clean up Funnel::DocAuth::RegisterStep#8272

Merged
solipet merged 5 commits intomainfrom
dprice-lg-9334-clean-up-register-step
Apr 28, 2023
Merged

LG-9334: Clean up Funnel::DocAuth::RegisterStep#8272
solipet merged 5 commits intomainfrom
dprice-lg-9334-clean-up-register-step

Conversation

@solipet
Copy link
Contributor

@solipet solipet commented Apr 25, 2023

Removes unused and ignored columns from the doc_auth_logs table:

  • send_link_view_at
  • send_link_view_count
  • email_sent_view_at
  • email_sent_view_count

@solipet solipet requested a review from a team April 25, 2023 17:04
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

It should be safe to remove the ignored column values in this PR... we messed that up last time, so if we want to be extra careful we could do that in a follow-up PR

Gemfile.lock Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to make sure we as a team are all on the same patch? I would back this change out for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know, but ruby-build doesn't seem to offer any patched versions of 3.2.2 unless I'm missing something. I restored it in d863930ae, but I'm going to see this every time...

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to delete link_sent? The data isn't used, but it's still being written to via the FSM LinkSentStep. I would wait on this until that step is pulled out of the Flow State Machine. I'm surprised that didn't break any tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha - restored in 4b58deaca

@jskinne3
Copy link
Contributor

It should be safe to remove the ignored column values in this PR... we messed that up last time, so if we want to be extra careful we could do that in a follow-up PR

Lint won't pass without removing the ignored columns

@solipet
Copy link
Contributor Author

solipet commented Apr 25, 2023

It should be safe to remove the ignored column values in this PR... we messed that up last time, so if we want to be extra careful we could do that in a follow-up PR

Lint won't pass without removing the ignored columns

Yeah, I'm happy to wait to drop the ignored columns for a follow on PR and have someone with higher permissions force the merge.

@zachmargolis
Copy link
Contributor

Yeah, I'm happy to wait to drop the ignored columns for a follow on PR and have someone with higher permissions force the merge.

I don't think that would be a good idea, because that means every PR merged after this one would also need a force merge. I think the right thing to do is to remove those columns.

Alternatively, we could disable Rails/UnusedIgnoredColumns in that model file

@solipet
Copy link
Contributor Author

solipet commented Apr 26, 2023

Yeah, I'm happy to wait to drop the ignored columns for a follow on PR and have someone with higher permissions force the merge.

I don't think that would be a good idea, because that means every PR merged after this one would also need a force merge. I think the right thing to do is to remove those columns.

Alternatively, we could disable Rails/UnusedIgnoredColumns in that model file.

Yes, that would be a bad idea to force merge! 🙃 I disabled the cop in 4e5a3ff8e and will prep a separate PR to remove them once this PR is in production.

db/schema.rb Outdated
Comment on lines 173 to 174
Copy link
Contributor

Choose a reason for hiding this comment

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

did this get re-added? it's not in the migration?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I see now, it got re-ordered? how did that happen, and where did its default/precision go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure but I rebuilt the database from main, then applied the new migration and it put it back as it had been so I'm guessing it was due to restoring it by rolling back the migration which didn't include the precision/default. Fixed in 16f53bbb9

Copy link
Contributor

@jskinne3 jskinne3 left a comment

Choose a reason for hiding this comment

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

Looks safe

solipet and others added 5 commits April 28, 2023 12:38
[skip changelog]

Removes unused columns from the doc_auth_logs table:
- send_link_view_at
- send_link_view_count
- email_sent_view_at
- email_sent_view_count

Co-authored-by: John Maxwell <john.maxwell@gsa.gov>
@solipet solipet force-pushed the dprice-lg-9334-clean-up-register-step branch from 16f53bb to 611a0f4 Compare April 28, 2023 16:43
@solipet solipet merged commit f24fb01 into main Apr 28, 2023
@solipet solipet deleted the dprice-lg-9334-clean-up-register-step branch April 28, 2023 17:02
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.

4 participants