saltstack / saltstack/salt

Duplicate code

Open
#67,981 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Hello,

I mentioned duplicate code in the meeting. Is this duplicate code?

def minion_pub(self, clear_load):
https://github.com/saltstack/salt/blob/f906ca5052ed90245538617c14d7f2dbc4b72127/salt/master.py#L1981

def minion_publish(self, clear_load):
https://github.com/saltstack/salt/blob/f906ca5052ed90245538617c14d7f2dbc4b72127/salt/master.py#L2016

Regards,
Alexia

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading salt/master.py around lines 1981 and 2016, where minion_pub and minion_publish are defined. Compare their behavior and callers to determine whether they duplicate one another; done means documenting the relationship and identifying a well-scoped refactor, if one is warranted.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, devops
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.