Skip to content

Conversation

bertdawg76
Copy link
Collaborator

What does this PR do?

this removes the appended _master from the created master id.

What issues does this PR fix or reference?

Fixes the salt-run mine.get call not returning any data

Previous Behavior

If salt-run mine.get was called, no data was ever returned

New Behavior

now salt-run mine.get does return the requested mine data

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

@bertdawg76 bertdawg76 requested a review from a team as a code owner August 14, 2025 20:44
@bertdawg76 bertdawg76 added the test:full Run the full test suite label Aug 14, 2025
@bertdawg76 bertdawg76 self-assigned this Aug 14, 2025
@bertdawg76 bertdawg76 marked this pull request as draft August 14, 2025 20:45
@@ -17,8 +19,14 @@ def get(tgt, fun, tgt_type="glob"):
salt-run mine.get '*' network.interfaces
"""
masterapi = salt.daemons.masterapi.RemoteFuncs(__opts__)

id = __opts__["id"]
pattern = re.escape("_master") + r"$"
Copy link
Contributor

Choose a reason for hiding this comment

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

id = id.rstrip("_master")

Copy link
Contributor

@lkubb lkubb Aug 15, 2025

Choose a reason for hiding this comment

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

That can strip more than expected:

>>> "foo-retsam_master".rstrip("_master")
'foo-'

Why not just unconditionally

load = {
  "id": __opts__["id"].removesuffix("_master")
#...

below?

@twangboy twangboy linked an issue Aug 19, 2025 that may be closed by this pull request
@twangboy twangboy added this to the Argon v3008.0 milestone Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:full Run the full test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] salt.runner.mine not returning any data
3 participants