Skip to content

feat: REST API to publish the changes to a container [FC-0083] - #36543

Merged
bradenmacdonald merged 4 commits into
openedx:masterfrom
open-craft:braden/publish-containers
Apr 18, 2025
Merged

feat: REST API to publish the changes to a container [FC-0083]#36543
bradenmacdonald merged 4 commits into
openedx:masterfrom
open-craft:braden/publish-containers

Conversation

@bradenmacdonald

Copy link
Copy Markdown
Contributor

Description

Implements openedx/frontend-app-authoring#1710 . Adds new REST + python APIs into content libraries that can be used to publish a single container and its children, without publishing the whole library. Publishing "all changes in the library" is already possible.

Needed for openedx/frontend-app-authoring#1827 and can be tested using that UI.

Testing instructions

See other PR.

Deadline

ASAP - needed for Teak

Private ref FAL-4069

@bradenmacdonald bradenmacdonald added the FC Relates to an Axim Funded Contribution project label Apr 17, 2025
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 17, 2025
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @bradenmacdonald!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

1 similar comment
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @bradenmacdonald!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@bradenmacdonald
bradenmacdonald force-pushed the braden/publish-containers branch from 8ea7b0a to e82bbc6 Compare April 17, 2025 21:12

@pomegranited pomegranited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 Found one minor bug, but this is working great otherwise. Thank you @bradenmacdonald !

  • I tested this using the test instructions on openedx/frontend-app-authoring#1827
  • I read through the code
  • I checked for accessibility issues by using my keyboard to navigate
  • Includes documentation -- code comments
  • User-facing strings are extracted for translation

# Publish the component and update anything that needs to be updated (e.g. search index):
authoring_api.publish_from_drafts(learning_package.id, draft_qset=drafts_to_publish, published_by=user.id)
LIBRARY_BLOCK_UPDATED.send_event(
library_block=LibraryBlockData(

@pomegranited pomegranited Apr 18, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we also raise LIBRARY_CONTAINER_UPDATED for affected containers here like we do here, then it'll handle this case:

  1. Edit a Component in a Unit:
    • Component + Unit show "unpublished changes" ✔️
  2. Publish the Component only.
    • Component no longer shows "unpublished changes" ✔️
    • Unit no longer shows "unpublished changes" ❌

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed with c0972ef.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice, thanks for identifying and fixing that!

@bradenmacdonald
bradenmacdonald merged commit 334c0fe into openedx:master Apr 18, 2025
@bradenmacdonald
bradenmacdonald deleted the braden/publish-containers branch April 18, 2025 05:05
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in Contributions Apr 18, 2025
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

tonybusa pushed a commit to tonybusa/edx-platform that referenced this pull request Apr 23, 2025
…enedx#36543)

* feat: REST API to publish the changes to a container

* fix: trigger LIBRARY_CONTAINER_UPDATED when component published
   for components in containers.

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
UsamaSadiq pushed a commit that referenced this pull request May 14, 2025
…6543)

* feat: REST API to publish the changes to a container

* fix: trigger LIBRARY_CONTAINER_UPDATED when component published
   for components in containers.

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
marlonkeating pushed a commit that referenced this pull request Jul 15, 2025
…6543)

* feat: REST API to publish the changes to a container

* fix: trigger LIBRARY_CONTAINER_UPDATED when component published
   for components in containers.

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants