Skip to content

Conversation

@Ch3LL
Copy link
Contributor

@Ch3LL Ch3LL commented Dec 17, 2025

What issues does this PR fix or reference?

Fixes: #68548

Previous Behavior

The interval_map would get re-set to 0 whenever we called beacons_refresh. If beacons_refresh is continually getting called for example when running a state run then the beacons would never get sent.

New Behavior

interval_map is preserved if set and the beacon still gets sent when running a state run (or any other situation that refreshes beacon)

salt/minion.py Outdated
Comment on lines 2610 to 2611
self.beacons = salt.beacons.Beacon(self.opts, self.functions)
self.beacons.interval_map = old_interval_map
Copy link
Contributor

@bdrx312 bdrx312 Dec 17, 2025

Choose a reason for hiding this comment

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

I recommend updating the Beacon init to accept an interval map and pass it in instead of setting the variable afterwards. i.e. something like

    def __init__(self, opts, functions, interval_map=None):
        import salt.loader

        self.opts = opts
        self.functions = functions
        self.beacons = salt.loader.beacons(opts, functions)
        self.interval_map = interval_map or {}

@Ch3LL
Copy link
Contributor Author

Ch3LL commented Dec 19, 2025

I think i just need to re-run the tests here, not sure how to do that @twangboy ?

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