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

License description rectification #4917

Conversation

rtibbles
Copy link
Member

Summary

  • Fixes a long standing bug in the sync command where license_description field was not synced from imported nodes
  • Reinstates the previous syncing rectification code, but targets it specifically to license_description discrepancies and rectification.
  • Removes the date filter, as this problem will affect any node that has ever been imported.

References

Fixes #4916

Reviewer guidance

Not sure if removing the date filter is going to make the query completely nonperformant - but it's only an extra two years? Not sure.

I think the fix is straight forward and neatly regression tested, so careful eyes on how I have modified the rectification script would be appreciated.

@rtibbles rtibbles requested review from bjester and ozer550 February 21, 2025 20:11
Copy link
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

Seems good to me, just one question about channel publishing. I asked @ozer550 to take a look too


# we would republish the channel
for channel_id in channel_ids_to_republish:
publish_channel(user_id, channel_id)
Copy link
Member

Choose a reason for hiding this comment

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

I know this was in the existing migration, but I also know that we did this in lockstep with emails we sent out. I'm not really sure if we should keep it or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I would be fine with dropping this. @ozer550 does that make sense to you too?

Copy link
Member

@ozer550 ozer550 Feb 26, 2025

Choose a reason for hiding this comment

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

We still might want to republish it? as making changes to license field would result in changed=True, to_be_republished = not (base_channel.main_tree.get_family().filter(changed=True).exists()) this does the necessary check if there is some change that already exists and we would skip publishing for such cases.

@ozer550 ozer550 self-assigned this Feb 25, 2025
@marcellamaki marcellamaki merged commit cff8337 into learningequality:hotfixes Feb 26, 2025
13 checks passed
@rtibbles rtibbles deleted the license_description_rectification branch February 27, 2025 00:50
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