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

[3.19] Wrong advisory count investigation #3718

Closed

Conversation

pedro-psb
Copy link
Member

@pedro-psb pedro-psb commented Aug 22, 2024

This PR is for sharing some observations on the problem of wrong number of advisories count on branch 3.19:

Error

        # Test content visibility
        # TODO: modules
        with user_creator:
            _assert_listed_content()
    
        with user_viewer:
>           _assert_listed_content()

usr/local/lib/python3.8/site-packages/pulp_rpm/tests/functional/api/test_rbac_crud.py:517: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def _assert_listed_content():
        packages_count = rpm_package_api.list(repository_version=repo.latest_version_href).count
        assert RPM_FIXTURE_SUMMARY["rpm.package"] == packages_count
    
        advisories_count = rpm_advisory_api.list(repository_version=repo.latest_version_href).count
>       assert RPM_FIXTURE_SUMMARY["rpm.advisory"] == advisories_count
E       assert 4 == 20

usr/local/lib/python3.8/site-packages/pulp_rpm/tests/functional/api/test_rbac_crud.py:494: AssertionError

Observations

  • Basic failure setup:
    • run only test_rbac_content_scoping + one of other test that sync from the same fixture (apparently). E.g test_rbac_dsitribution.
    • run them in parallel with any number of workers.
  • Locally, something like: oci-env test -p pulp_rpm functional -n 8 -vk test_rbac_crud
  • Only happens under user_viewer context
  • Reverting the last obvious advisory-related commits didnt make any difference. They are:
    8d6dc66b Fix a flaw that allowing duplicate advisories in repo version  # 11 June 2024
    3158fd0b Addressed an edge-case around advisory-collection name collisions.  # 25 Jan 2024
  • Looks related to the problem presented here: Return distinct content units from the queryset scope filtering pulpcore#3642

@pedro-psb pedro-psb force-pushed the 3.19/wrong-advisory-count-error branch from d1ce469 to 29876c7 Compare August 22, 2024 23:31
@pedro-psb pedro-psb marked this pull request as draft September 12, 2024 19:39
@pedro-psb
Copy link
Member Author

Backporting pulp/pulpcore#3642 to 3.21 and 3.22 should hopefully fix this.

@pedro-psb pedro-psb closed this Sep 12, 2024
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.

1 participant