Skip to content

[6.19.z] CCV auto-publish on child CV minor version publish - #20859

Merged
Satellite-QE merged 1 commit into
6.19.zfrom
cherry-pick-6.19.z-5ca9326122ab0f55c6927f1a35cfe9f9247f0f26
Feb 24, 2026
Merged

[6.19.z] CCV auto-publish on child CV minor version publish#20859
Satellite-QE merged 1 commit into
6.19.zfrom
cherry-pick-6.19.z-5ca9326122ab0f55c6927f1a35cfe9f9247f0f26

Conversation

@Satellite-QE

@Satellite-QE Satellite-QE commented Feb 24, 2026

Copy link
Copy Markdown
Collaborator

Cherrypick of PR: #20814

Problem Statement

When publishing a minor version of a content view, parent composite content views no longer respect the --propagate-all-composites flag.
https://issues.redhat.com/browse/SAT-34620

Solution

Newly added test case will verify the incremental update on the CV with the --propagate-all-composites flag

Related Issues

N/A

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/api/test_contentview.py -k 'test_ccv_no_double_update_on_incremental_with_propagate_all_composites'

Summary by Sourcery

Tests:

  • Add an API test that verifies composite content views do not double-publish on incremental child CV minor updates while still auto-publishing on major updates.

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

(cherry picked from commit 5ca9326)
@Satellite-QE Satellite-QE added 6.19.z Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Feb 24, 2026
@Satellite-QE

Copy link
Copy Markdown
Collaborator Author
trigger: test-robottelo
pytest: tests/foreman/api/test_contentview.py -k 'test_ccv_no_double_update_on_incremental_with_propagate_all_composites'

@Satellite-QE Satellite-QE added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Feb 24, 2026
@sourcery-ai

sourcery-ai Bot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds an API test ensuring composite content views with auto-publish and 'Always update to latest' components only update once on incremental child CV updates with --propagate-all-composites, and still auto-publish on subsequent major CV publication, verifying SAT-34620 behavior.

File-Level Changes

Change Details Files
Add regression test validating CCV behavior on incremental and major CV updates with propagate_all_composites and auto-publish enabled.
  • Create a repo with missing errata and sync it, then create and publish a base Content View version 1.0
  • Create an auto-published Composite Content View with the CV as a component set to always track the latest version, and publish CCV version 1.0
  • Perform an incremental update on the CV with propagate_all_composites=True and verify only CV 1.0/1.1 and CCV 1.0/1.1 exist (no CCV 2.0)
  • Publish a new major version 2.0 of the CV by adding an extra repository, wait for publish tasks to complete, and assert the CCV auto-publishes to version 2.0
tests/foreman/api/test_contentview.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot 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.

Hey - I've left some high level feedback:

  • Consider splitting this test into two focused tests (one for incremental update with --propagate-all-composites and one for auto-publish on major version) to improve clarity of the behavior under test and make failures easier to diagnose.
  • You repeatedly compute sets/lists of v.read().version; extracting this into a small helper (e.g. get_versions(cv_or_ccv)) would reduce duplication and make the assertions more readable.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider splitting this test into two focused tests (one for incremental update with `--propagate-all-composites` and one for auto-publish on major version) to improve clarity of the behavior under test and make failures easier to diagnose.
- You repeatedly compute sets/lists of `v.read().version`; extracting this into a small helper (e.g. `get_versions(cv_or_ccv)`) would reduce duplication and make the assertions more readable.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@vijaysawant

Copy link
Copy Markdown
Contributor
trigger: test-robottelo
pytest: tests/foreman/api/test_contentview.py -k 'test_ccv_no_double_update_on_incremental_with_propagate_all_composites'

@Satellite-QE

Copy link
Copy Markdown
Collaborator Author

PRT Result

Build Number: 14439
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_contentview.py -k test_ccv_no_double_update_on_incremental_with_propagate_all_composites --external-logging
Test Result : ========== 1 passed, 98 deselected, 10 warnings in 1378.24s (0:22:58) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Feb 24, 2026
@Satellite-QE
Satellite-QE merged commit 2a57c82 into 6.19.z Feb 24, 2026
18 of 20 checks passed
@Satellite-QE
Satellite-QE deleted the cherry-pick-6.19.z-5ca9326122ab0f55c6927f1a35cfe9f9247f0f26 branch February 24, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.19.z Auto_Cherry_Picked Automatically cherrypicked PR using GHA AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants