FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Functional tests currently failing on master · Issue #1148 · python-gitlab/python-gitlab · GitHub

Repository navigation

Functional tests currently failing on master #1148

Description

Description of the problem, including code/CLI snippet

Currently on master, the tests do not pass because it uses gitlab/gitlab-ce:latest.
Something happened between 13.1.4-ce.0 and 13.2.0-ce.0

Because of this, all requests are also failing travis ci tests.

Expected Behavior

Running ./tools/py_functional_tests.sh on master branch should not fail.

Actual Behavior

Running ./tools/py_functional_tests.sh on master branch fails.
But running GITLAB_TAG="13.1.4-ce.0" tools/py_functional_tests.sh works.

Traceback (most recent call last):
  File "./tools/python_test_v4.py", line 422, in <module>
    assert len(gl.projects.list(owned=True)) == 2
AssertionError
ERROR: 'python ./tools/python_test_v4.py' failed

Specifications

  • python-gitlab version: master branch (currently 1606310)
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): Whatever dockerhub is serving up ;-)... that's the problem.

Activity

  1. ericfrederich commented on Aug 7, 2020

    ContributorAuthor

    Perhaps this is caused by a bug in GitLab itself?

    If it is caused by a bug in GitLab perhaps we should consider pinning the GitLab version used for tests?
    Currently it seems it's ran against latest and nightly. Should latest be changed to a known good version? Or should we simply add a known version to the tests and now run it against 3 variants?

  2. ericfrederich commented on Aug 7, 2020

    ContributorAuthor

    Seems like a bug in GitLab.
    Documentation for listing project says owned will Limit by projects explicitly owned by the current user.
    Relavent lines in python_test_v4.py are:

    • group2 = gl.groups.create({"name": "group2", "path": "group2"})
    • add another owner otherwise we cannot delete ourselves
      • user2 = gl.users.create({"email": "user2@test.com", "username": "user2", "name": "user2", "password": "user2_pass"})
      • group2.members.create({"access_level": gitlab.const.OWNER_ACCESS, "user_id": user2.id})
    • group2.members.delete(gl.user.id)
    • gr2_project = gl.projects.create({"name": "gr2_project", "namespace_id": group2.id})

    On 13.1.4-ce.0 this project does not get returned under gl.projects.list(owned=True)
    Under 13.2.0-ce.0 it does.

    I logged into the GitLab after the test failed and saw in the UI that root was listed as an owner of gr1_project but not gr2_project. So, this seems like a bug in GitLab itself according to documentation as this project is not explicitly owned by the current user.

    I suggest:

    • leaving this open here to decide whether there should be a pinned "good" version to run tests against.-
    • creating an issue against GitLab
  3. nejch commented on Aug 30, 2020

    Member

    I agree, although tests are currently green, I think using latest is going to be painful with how often the GitLab API behavior has changed recently even between minor/patch releases. I opened a PR to pin versions.

    I think Max already opened an upstream issue for the specific bug.

  4. locked as resolved and limited conversation to collaborators on Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL