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

Make use of a better python module for gitlab_project #40767

Open
wants to merge 4 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@dj-wasabi
Contributor

dj-wasabi commented May 27, 2018

SUMMARY

Using a python module that is not deprecated anymore.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

gitlab_project

ANSIBLE VERSION
ansible 2.5.2
  config file = None
  configured module search path = [u'/Users/wdijkerman/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/wdijkerman/git/ansible/environment/.virtualenv/environment/lib/python2.7/site-packages/ansible
  executable location = /Users/wdijkerman/git/ansible/environment/.virtualenv/environment/bin/ansible
  python version = 2.7.10 (default, Oct  6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
ADDITIONAL INFORMATION

@ansibot

This comment has been minimized.

Contributor

ansibot commented May 27, 2018

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:252:16: undefined-variable Undefined variable 'module'

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test docs-build [explain] failed with the error:

Command "/usr/bin/python test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Traceback (most recent call last):
  File "test/sanity/code-smell/docs-build.py", line 101, in <module>
    main()
  File "test/sanity/code-smell/docs-build.py", line 17, in main
    raise subprocess.CalledProcessError(sphinx.returncode, cmd, output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['make', 'singlehtmldocs']' returned non-zero exit status 2.

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:173:51: W291 trailing whitespace

The test ansible-test sanity --test validate-modules [explain] failed with 11 errors:

lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "builds_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "container_registry_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "issues_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "merge_requests_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "only_allow_merge_if_build_succeeds" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "public" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "public_builds" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "snippets_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "validate_certs" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "wiki_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:107:21: E302 DOCUMENTATION is not valid YAML

The test ansible-test sanity --test yamllint [explain] failed with 5 errors:

lib/ansible/modules/source_control/gitlab_project.py:107:21: error DOCUMENTATION: syntax error: expected <block end>, but found '<block mapping start>'
lib/ansible/modules/source_control/gitlab_project.py:108:9: key-duplicates DOCUMENTATION: duplication of key "description" in mapping
lib/ansible/modules/source_control/gitlab_project.py:111:9: key-duplicates DOCUMENTATION: duplication of key "choices" in mapping
lib/ansible/modules/source_control/gitlab_project.py:112:9: key-duplicates DOCUMENTATION: duplication of key "default" in mapping
lib/ansible/modules/source_control/gitlab_project.py:113:9: key-duplicates DOCUMENTATION: duplication of key "version_added" in mapping

click here for bot help

@ansibot

This comment has been minimized.

Contributor

ansibot commented May 27, 2018

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:252:16: undefined-variable Undefined variable 'module'

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test docs-build [explain] failed with the error:

Command "/usr/bin/python test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Traceback (most recent call last):
  File "test/sanity/code-smell/docs-build.py", line 101, in <module>
    main()
  File "test/sanity/code-smell/docs-build.py", line 17, in main
    raise subprocess.CalledProcessError(sphinx.returncode, cmd, output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['make', 'singlehtmldocs']' returned non-zero exit status 2.

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/source_control/gitlab_project.py:173:51: W291 trailing whitespace

The test ansible-test sanity --test validate-modules [explain] failed with 11 errors:

lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "builds_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "container_registry_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "issues_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "merge_requests_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "only_allow_merge_if_build_succeeds" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "public" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "public_builds" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "snippets_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "validate_certs" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:0:0: E325 argument_spec for "wiki_enabled" defines type="bool" but documentation does not
lib/ansible/modules/source_control/gitlab_project.py:107:21: E302 DOCUMENTATION is not valid YAML

The test ansible-test sanity --test yamllint [explain] failed with 5 errors:

lib/ansible/modules/source_control/gitlab_project.py:107:21: error DOCUMENTATION: syntax error: expected <block end>, but found '<block mapping start>'
lib/ansible/modules/source_control/gitlab_project.py:108:9: key-duplicates DOCUMENTATION: duplication of key "description" in mapping
lib/ansible/modules/source_control/gitlab_project.py:111:9: key-duplicates DOCUMENTATION: duplication of key "choices" in mapping
lib/ansible/modules/source_control/gitlab_project.py:112:9: key-duplicates DOCUMENTATION: duplication of key "default" in mapping
lib/ansible/modules/source_control/gitlab_project.py:113:9: key-duplicates DOCUMENTATION: duplication of key "version_added" in mapping

click here for bot help

@ansibot

This comment has been minimized.

Contributor

ansibot commented May 27, 2018

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

test/sanity/validate-modules/ignore.txt:1127:1: A102 Remove since "lib/ansible/modules/source_control/gitlab_project.py" passes "E326" test

click here for bot help

@dj-wasabi

This comment has been minimized.

Contributor

dj-wasabi commented May 27, 2018

Tests is failing, even on "devel" so don't know how to proceed with this.

@Akasurde

This comment has been minimized.

Member

Akasurde commented May 28, 2018

ERROR: Found 1 validate-modules issue(s) which need to be resolved:
ERROR: test/sanity/validate-modules/ignore.txt:1127:1: A102 Remove since "lib/ansible/modules/source_control/gitlab_project.py" passes "E326" test (75%)

This is shippable reported error. You need to remove gitlab_project from test/sanity/validate-modules/ignore.txt at line 1127 as it passed E326 test.

@ansibot ansibot removed the needs_triage label May 28, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented May 28, 2018

@dj-wasabi

This comment has been minimized.

Contributor

dj-wasabi commented May 28, 2018

Hi @Akasurde

I removed the line in the file you mentioned, but the test is still failing?

@Akasurde

This comment has been minimized.

@dj-wasabi

This comment has been minimized.

Contributor

dj-wasabi commented May 28, 2018

Hi @Akasurde I know. But like I said before, the test is also failing on devel so how am I get this to work?

@ansibot ansibot added the stale_ci label Jun 5, 2018

@mattclay

This comment has been minimized.

Member

mattclay commented Jun 12, 2018

@dj-wasabi The gitlab_project unit tests are currently passing in devel. You can run them locally from your branch with:

ansible-test units test/units/modules/source_control/test_gitlab_project.py --docker -v

The changes in this PR are causing unit test failures:

https://app.shippable.com/github/ansible/ansible/runs/67593/3/tests

If you're unable to reproduce the test results locally, perhaps you're using a different version of python-gitlab than is in our docker container used for CI?

@ansibot

This comment has been minimized.

Contributor

ansibot commented Sep 16, 2018

- If a build creation for this project should be available or not.
type: bool
default: false
version_added: "2.7"

This comment has been minimized.

@gundalow

gundalow Sep 17, 2018

Contributor

"2.8"

- Will only work if "builds_enabled" is set to True.
type: bool
default: false
version_added: "2.7"

This comment has been minimized.

@gundalow

gundalow Sep 17, 2018

Contributor

"2.8"

type: bool
default: 'yes'
default: false
version_added: "2.7"

This comment has been minimized.

@gundalow

gundalow Sep 17, 2018

Contributor

"2.8"

- Will only work if "builds_enabled" is set to True.
type: bool
default: false
version_added: "2.7"

This comment has been minimized.

@gundalow

gundalow Sep 17, 2018

Contributor

"2.8"

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