Skip to content
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

Support for Gitlab <12.4 broken #3598

Closed
3 tasks done
NPCDW opened this issue Apr 8, 2024 · 9 comments
Closed
3 tasks done

Support for Gitlab <12.4 broken #3598

NPCDW opened this issue Apr 8, 2024 · 9 comments
Labels
forge/gitlab gitlab forge related wontfix this will not be fixed/addressed, reason is in discussion
Milestone

Comments

@NPCDW
Copy link

NPCDW commented Apr 8, 2024

Component

server

Describe the bug

image
image
image
image

Do Woodpecker CI versions v2.4.0 and v2.4.1 drop support for lower versions of GitLab?

After clicking to add a repository, the page reports an error, but no error is logged in the logs.

This configuration operates perfectly in version v2.3.0. After upgrading to version v2.4.1, issues have emerged with functionalities related to adding repositories and other repository-related functions, whereas all other functionalities continue to operate normally.

After I reverted back to version v2.3.0, everything returned to normal again.

System Info

{
    "source": "https://github.com/woodpecker-ci/woodpecker",
    "version": "2.4.1"
}

GitLab Community Edition 11.0.3 aa62075
Docker version 24.0.6, build ed223bc
Docker Compose version v2.21.0

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:v2.4.1
    container_name: woodpecker-server
    ports:
      - 55555:8000
      - 55559:9000
    volumes:
      - ./data:/var/lib/woodpecker/
    environment:
      - TZ=Asia/Shanghai
      - WOODPECKER_HOST=http://10.10.10.2:55555
      - WOODPECKER_ADMIN=***,***
      - WOODPECKER_GITLAB=true
      - WOODPECKER_GITLAB_URL=
      - WOODPECKER_GITLAB_CLIENT=
      - WOODPECKER_GITLAB_SECRET=
      - WOODPECKER_AGENT_SECRET=
      - WOODPECKER_AUTHENTICATE_PUBLIC_REPOS=true
      - WOODPECKER_LOG_LEVEL=trace

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
@NPCDW NPCDW added the bug Something isn't working label Apr 8, 2024
@qwerty287
Copy link
Contributor

Do Woodpecker CI versions v2.4.0 and v2.4.1 drop support for lower versions of GitLab?

No.

Can you check the browser console and the response of the request made by the web interface?

@qwerty287 qwerty287 added forge/gitlab gitlab forge related feedback this needs feedback labels Apr 8, 2024
@NPCDW
Copy link
Author

NPCDW commented Apr 9, 2024

The console error messages are as follows, with the top two also present in the normal version, while the network request error is newly added.
image
The network request is as follows: After clicking the ‘Add Repository’ button, only this particular request is abnormal, while all other requests return normally.
image

@qwerty287
Copy link
Contributor

qwerty287 commented Apr 9, 2024

Are you sure your gitlab base URL is configured correctly?
There's a not found error and it in your first screenshot in the issue description above it looks like the profile avatar also fails to load.

EDIT: If it's working in 2.3.0 that can't really be the problem. Can you check the gitlab logs? Can you see the 404 request there?

@NPCDW
Copy link
Author

NPCDW commented Apr 9, 2024

I am absolutely certain that there is no issue with the base URL configuration of GitLab. The avatar failed to load because this particular user has not set an avatar in GitLab. Other users are able to load their avatars without any problem.

Moreover, I upgraded directly from v2.3.0, having modified only the version number in the docker-compose.yml file without altering any other configurations.

image
image

@qwerty287
Copy link
Contributor

Can you check the gitlab logs? Can you see the 404 request there?
Or can you try to find out the IDs of the projects that fail? In your screenshot above there is 4118

@NPCDW
Copy link
Author

NPCDW commented Apr 9, 2024

I roughly understand what’s going on now. This URL was introduced in issue #3308 , but this URL is only usable in GitLab 12.4.

image

image

@qwerty287 qwerty287 removed the feedback this needs feedback label Apr 9, 2024
@qwerty287
Copy link
Contributor

I see… cc @lukashass any ideas how to solve this?

@qwerty287 qwerty287 changed the title Gitlab Support Gitlab Support prior 12.4 Apr 9, 2024
@qwerty287 qwerty287 changed the title Gitlab Support prior 12.4 Support for Gitlab <12.4 broken Apr 9, 2024
@qwerty287 qwerty287 modified the milestones: 2.5.0, 2.6.0 Apr 9, 2024
@qwerty287
Copy link
Contributor

Looking at this again, we can probably just remove support for these old gitlab versions. 12.4 was released almost 5 years ago.

@anbraten anbraten added wontfix this will not be fixed/addressed, reason is in discussion and removed bug Something isn't working labels Jun 10, 2024
@NPCDW
Copy link
Author

NPCDW commented Jun 11, 2024

OK, just note in the document that <=2.3.0 supports 8+, >=2.4.0 supports 12.5+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forge/gitlab gitlab forge related wontfix this will not be fixed/addressed, reason is in discussion
Projects
None yet
Development

No branches or pull requests

3 participants