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

[3006.x] Ensure we raise an error when the name argument is invalid in pkgrepo.managed #65049

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

Ch3LL
Copy link
Contributor

@Ch3LL Ch3LL commented Aug 24, 2023

What does this PR do?

Ensures we raise an error when the name passed to pkgrepo.managed for aptpkg is invalid

What issues does this PR fix or reference?

Fixes: #64451

Previous Behavior

It would actually copy a line from /etc/apt/sources.list to the file you defined in your state.

New Behavior

An error is raised letting the user know they need to properly define their repo name.

@Ch3LL Ch3LL requested a review from a team as a code owner August 24, 2023 17:55
@Ch3LL Ch3LL requested review from dwoz and removed request for a team August 24, 2023 17:55
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Ensure we raise an error when the name argument is invalid in pkgrepo.managed [3006.x] Ensure we raise an error when the name argument is invalid in pkgrepo.managed Aug 24, 2023
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 18:12 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 18:12 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 18:12 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 18:12 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 18:28 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 18:30 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 19:23 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 19:23 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 19:23 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 19:23 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 19:25 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 19:25 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 20:23 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 20:23 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 20:23 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 20:23 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 20:38 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 20:46 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:27 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:27 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:27 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:27 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:27 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:27 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:50 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:50 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:50 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:50 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 24, 2023 21:50 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 15:16 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 15:16 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 15:16 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 15:16 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 15:33 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 15:35 — with GitHub Actions Inactive
with salt.utils.files.fopen(default_sources, "r") as fp:
pre_file_content = fp.read()

ret = _run()
Copy link
Collaborator

@s0undt3ch s0undt3ch Aug 25, 2023

Choose a reason for hiding this comment

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

If we only call _run() once why do we define this function and not call the actual functions instead?

@Ch3LL Ch3LL requested a review from s0undt3ch August 25, 2023 17:25
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 17:38 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 17:38 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 17:38 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 17:39 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 17:58 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 17:58 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 18:55 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 18:55 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 18:55 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 18:55 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 18:55 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 25, 2023 18:55 — with GitHub Actions Inactive
@Ch3LL Ch3LL merged commit daaa2d4 into saltstack:3006.x Aug 25, 2023
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