salt icon indicating copy to clipboard operation
salt copied to clipboard

[3006.x] fire event at job start

Open Legrems opened this issue 2 years ago • 3 comments

What does this PR do?

We ran into some issues with a large amount of minions in our salt cluster. We wanted an ack from minions that they were starting job. The salt/job/<jid>/new wasn't enough, since it doesn't imply that the job will/have ever be started.

This PR make salt-minion fire an even when a minion start a job.

This code was meant to be deployed in our production, so the patch were made to be as faulty resistent as possible (hence the decorators for *args and **kwargs, in a non-existent file)

What issues does this PR fix or reference?

Unsure if any similar issue was created for this particular wanted behaviour

New Behavior

The salt-minion now fire an event under custom/job/<jid>/started/<minion_id> when starting a job.

Merge requirements satisfied?

  • [x] Docs
  • [X] Changelog => No issue for this?
  • [ ] Tests written/updated
    • No tests written, but i'm open to writting them if this is a wanted feature for salt

Commits signed with GPG?

Yes

Legrems avatar Oct 16 '23 10:10 Legrems

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

welcome[bot] avatar Oct 16 '23 10:10 welcome[bot]

Personally, I'd prefer calling it explicitly instead of using a decorator... I know its a lot of duplicate code.

Alternatively, create a utility function and call that out in the function bodies(instead of using the decorator).

s0undt3ch avatar Oct 16 '23 17:10 s0undt3ch

This is a new feature and the PR should be against master, not 3006.x

@Legrems Are you able to port this to the master branch please?

dwoz avatar Jun 21 '24 03:06 dwoz