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

[PULP-277] Adapt to 'CONTENT_ORIGIN can be null'. #3865

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ggainey
Copy link
Contributor

@ggainey ggainey commented Jan 22, 2025

fixes #3856.

@ggainey ggainey force-pushed the 3856_null_origin branch 5 times, most recently from c966438 to 989f86a Compare January 24, 2025 21:08
@ggainey
Copy link
Contributor Author

ggainey commented Jan 24, 2025

Once pulp/pulpcore#6175 merges I'll remove the temporary distribution_base_url fixture and undraft.

@pytest.mark.parallel
def test_config_repo_auto_distribute(
setup_empty_distribution, rpm_publication_api, rpm_distribution_api, monitor_task
):
"""Whether config.repo is properly served using auto-distribute."""
repo, pub, dist = setup_empty_distribution

body = {"repository": repo.pulp_href, "publication": None}
body = {"repository": repo.pulp_href, "publication": None, "generate_repo_config": True}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Explanation for adding this explicit setting:

When running in my local environment, partial-update via the client-bindings is forcing the setting of anything with a default. This was causing the test to fail - since it "assumes" that generate_repo_config stays true for the life of the test.

Dumping the incoming-data at this point in the test (when I am not setting generate_repo_config explicitly) looks like this:

[pulp]  |              'data': {'generate_repo_config': False,
[pulp]  |                       'hidden': False,
[pulp]  |                       'publication': None,
[pulp]  |                       'repository': '/pulp/api/v3/repositories/rpm/rpm/01949dd6-e044-716e-bd47-769b41657a93/'},

Changing the values via pulp-cli in my environment does not evidence this behavior - incoming data looks like this:

[pulp]  |              'data': {'base_path': 'dist3'},

"Feels like" an openapi-generator difference between what's in my dev-env and Reality. Impact on this PR is nil, but something to watch out for.

Removed tests/upgrade directory - these tests don't test anything
current, and have not actually been run in years.

fixes pulp#3856.
@ggainey ggainey marked this pull request as ready for review January 31, 2025 02:32
@ggainey ggainey requested review from dralley and pedro-psb January 31, 2025 02:32
Copy link
Member

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support null CONTENT_ORIGIN
2 participants