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

Introduce registration version column instead of uses_v2_registrations #10132

Merged
merged 11 commits into from
Oct 28, 2024

Conversation

FinnIckler
Copy link
Member

To allow us to switch over to 'v3' in stages

@FinnIckler
Copy link
Member Author

I'll do the form changes tomorrow afternoon

Copy link
Member

@gregorbg gregorbg left a comment

Choose a reason for hiding this comment

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

Am I crazy, or did we have some other places in the code where we explicitly pass uses_v2_registration: true?!
EDIT: Just saw your comment about the form changes, sorry. GitHub Mobile only shows the PR comments after you submitted your review...

Please do a global string search for the name of the old boolean column to confirm. I reckon some tests and factories might also need to be adjusted.

app/models/competition.rb Outdated Show resolved Hide resolved
app/models/competition.rb Outdated Show resolved Hide resolved
app/models/competition.rb Outdated Show resolved Hide resolved
@FinnIckler
Copy link
Member Author

I added the changes to the Form and CTRL-F for uses_v2_registrations only finds the migrations

@FinnIckler
Copy link
Member Author

I implemented it my way to give us an easier way to switch between systems, but I get that we can always just use the rails console if needed (as it might be confusing for users)

@FinnIckler
Copy link
Member Author

Again, I can't approve myself, but I'm fine with this implementation

@gregorbg
Copy link
Member

I implemented it my way to give us an easier way to switch between systems, but I get that we can always just use the rails console if needed (as it might be confusing for users)

Making it easy to switch systems is my intention as well. But I think our interpretation of "easy" is not the same here 😅 WCAT doesn't need to know that there is a further distinction between V2 and V3. They only need one checkbox where "off = old" and "on = new". We can simply change the value of the NEW_REG_SYSTEM_DEFAULT constant in the backend, thereby controlling what this checkbox internally does.

@gregorbg
Copy link
Member

Furthermore, I have tried to drill down the distinction between V2 and V3 in the backend even further. This is important for places where we need to decide whether a route hits the microservice or not.

Other places, for example methods that decide whether to render React or the old frontend, don' need to care whether it's V2 or V3, they only care that it's "not V1". At the end of the day, I think this facilitates migration.

Copy link
Member Author

@FinnIckler FinnIckler left a comment

Choose a reason for hiding this comment

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

Method changes look good to me.
Technically it's always possible to switch from v1 to v3 and back again, but I don't think we need to overcomplicate the competition form like that

@gregorbg
Copy link
Member

Method changes look good to me.

Thanks!

Technically it's always possible to switch from v1 to v3 and back again, but I don't think we need to overcomplicate the competition form like that

Both V2 and V3 are detected as "new system" in terms of the WCAT frontend, so it would be a simple matter of removing the checkbox to go from V3 to V1. The only thing that's "unintuitive" is that ticking the checkbox again would enable V2 as-is. But TBH when we are manually marking competitions as V3 we will probably hand-pick a few where we are sure that WCAT won't un-tick then re-tick them without telling us. And once we're rolling out V3 as default this will become a non-issue.

Copy link
Member

@gregorbg gregorbg left a comment

Choose a reason for hiding this comment

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

Approving on behalf of Finn and myself.

@dunkOnIT dunkOnIT merged commit e752244 into thewca:main Oct 28, 2024
2 checks passed
@FinnIckler FinnIckler deleted the v3/column branch November 25, 2024 15:23
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.

3 participants