Skip to content

Add optional use_staging_tree parameter to publish_channel function#4980

Merged
rtibbles merged 3 commits intolearningequality:unstablefrom
taoerman:unstable
Apr 3, 2025
Merged

Add optional use_staging_tree parameter to publish_channel function#4980
rtibbles merged 3 commits intolearningequality:unstablefrom
taoerman:unstable

Conversation

@taoerman
Copy link
Copy Markdown
Member

Summary

Modify publish_channel function to take an optional use_staging_tree parameter as input. If set to true, the function will use staging tree as the base for publishing, and export a -next.sqlite3 database without overwriting or updating existing published database.

Tested locally that a -next.sqlite3 is created by running tests without mocking the storage.
Tested current publishing is not impacted by this change.

References

Issue: #4977
Broader task: #4471

Reviewer guidance

Run unit tests with setUpClass and tearDownClass commented out. The -next.sqlite3 file will be written to minio storage.
Be sure to test the existing publishing behavior is not affected.

@rtibbles rtibbles self-assigned this Mar 31, 2025
Copy link
Copy Markdown
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

A couple of very minor comments, nothing blocking. This is excellent, and the tests give a lot of confidence here too.

Comment thread contentcuration/contentcuration/utils/publish.py Outdated
Comment thread contentcuration/contentcuration/utils/publish.py Outdated
Copy link
Copy Markdown
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Assuming all checks pass, this should be good to go! Thank you @taoerman!

@rtibbles
Copy link
Copy Markdown
Member

rtibbles commented Apr 3, 2025

Thanks @taoerman, great work!

@rtibbles rtibbles merged commit b57cfd2 into learningequality:unstable Apr 3, 2025
13 checks passed
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.

2 participants