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

Reloading repositories from gitea does not work #508

Closed
4 tasks done
plafue opened this issue Nov 14, 2021 · 0 comments · Fixed by #510
Closed
4 tasks done

Reloading repositories from gitea does not work #508

plafue opened this issue Nov 14, 2021 · 0 comments · Fixed by #510
Assignees
Labels
bug Something isn't working
Milestone

Comments

@plafue
Copy link

plafue commented Nov 14, 2021

Component

server

Describe the bug

Clicking "reload repositories" in the UI displays a success message ("Repository list reloaded") but the list remains empty. Checking the response from the server shows that it is always an empty array.

This can be reproduced with the docker compose below. Just register a user and add woodpecker as an authorized OAuth2 application (and adjust the compose file along the way).

System Info

`{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-ca8e215c"}`
version: "3"

networks:
  gitea:
    external: false

services:
  gitea:
    image: gitea/gitea:1.15.6
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    networks:
      - gitea
    volumes:
      - ./gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3000:3000"
      - "222:22"
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:latest
    ports:
      - 8000:8000
    volumes:
      - ./woodpecker:/var/lib/woodpecker/
    environment:
      - WOODPECKER_OPEN=true
      - WOODPECKER_HOST=http://localhost:8000
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_PRIVATE_MODE=true
      - WOODPECKER_GITEA_URL=http://${IP_FOR_LOCALHOST}:3000
      - WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT}
      - WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET}
      - WOODPECKER_AGENT_SECRET=1234567890123456789012345678901234567890

Additional context

Gitea logs show that /api/v1/user/repos?limit=50&page=1 is called by woodpecker sucessfully. Also subsequent calls to each repository (GET /api/v1/repos/{user/org}/{repository}) are logged by gitea as processed successfully with a 200.

Woodpeckers sqlite DB remains "empty" (contains only a record in the user table and the migrations run in the migrations table) after clicking "reload repositories".

Validations

@6543 6543 self-assigned this Nov 14, 2021
@6543 6543 added this to the 0.15.0 milestone Nov 14, 2021
@6543 6543 added bug Something isn't working and removed pending:bug labels Nov 14, 2021
6543 added a commit to 6543-forks/woodpecker that referenced this issue Nov 14, 2021
@6543 6543 closed this as completed in #510 Nov 14, 2021
6543 added a commit that referenced this issue Nov 14, 2021
…510)

* Fix #508
* Add testcase

Unrelated nits:
* Rm one index (unique will already create an index)
* Do not drop  on UpdateUser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants