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

github.repo_present returns stacktrace, got multiple values for keyword argument profile #48039

Closed
twellspring opened this Issue Jun 8, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@twellspring
Contributor

twellspring commented Jun 8, 2018

Description of Issue/Question

github.repo_present state errors, returns
TypeError: add_team_repo() got multiple values for keyword argument 'profile'

This is an error in the code:
salt/states/github.py:717

                        result = __salt__['github.add_team_repo'](name, team_name,
                                                                  permission,
                                                                  profile=profile)

salt/modules/github.py:
def add_team_repo(repo_name, team_name, profile="github", permission=None):

The permission is being put into the positional argument profile.

In other locations the add_team_repo uses permission=permission

Setup

  github.repo_present:
    - name: github-api
    - description: Node service for handling Github webhooks
    - private: True
    - teams: {'xxx': 'push', 'xxx': 'push', 'xxx': 'push'}
    - auto_init: True```

pillar 
github:
    ----------
    org_name:
        riskalyze
    token:
        xxxxxxxxxxxxx

### Steps to Reproduce Issue
Happens every time.  Not sure how it ever worked

2018-06-08 20:34:14,945 [salt.state :292 ][ERROR ][30393] An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1870, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1818, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/github.py", line 717, in repo_present
profile=profile)
TypeError: add_team_repo() got multiple values for keyword argument 'profile'




### Versions Report
Salt Version:
           Salt: 2017.7.5

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.7.3
      docker-py: Not Installed
          gitdb: 0.6.4
      gitpython: 1.0.1
          ioflo: Not Installed
         Jinja2: 2.8
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.3
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.12 (default, Dec  4 2017, 14:50:18)
   python-gnupg: 0.3.8
         PyYAML: 3.11
          PyZMQ: 15.2.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: Ubuntu 16.04 xenial
         locale: UTF-8
        machine: x86_64
        release: 4.4.0-112-generic
         system: Linux
        version: Ubuntu 16.04 xenial
@twellspring

This comment has been minimized.

Contributor

twellspring commented Jun 8, 2018

Fix submitted: PR #48040

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment