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

Bug: ignore empty repos #61

Open
2 tasks done
jpmcb opened this issue Nov 21, 2023 · 1 comment
Open
2 tasks done

Bug: ignore empty repos #61

jpmcb opened this issue Nov 21, 2023 · 1 comment
Assignees
Labels
🐛 bug Something isn't working

Comments

@jpmcb
Copy link
Member

jpmcb commented Nov 21, 2023

Describe the bug

The pizza service should ignore repos that have empty git repos. For example, for repos like: https://github.com/tamagui/sponsors (which indeed is empty from a public perspective)

This repo throws the following:

{"level":"error","ts":1700591125.6592977,"caller":"server/server.go:103","msg":"Error validating repo URL https://github.com/tamagui/sponsors: could not list remote repository: remote repository is empty","stacktrace":"github.com/open-sauced/pizza/oven/pkg/server.PizzaOvenServer.handleRequest\n\t/app/pkg/server/server.go:103\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2136\nnet/http.(*ServeMux).ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2514\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2938\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:2009"}

This gets surfaced in the API as a 400 error

/Users/jpmcb/workspace/opensauced/api.opensauced.pizza/node_modules/axios/lib/core/settle.js:19
    reject(new AxiosError(
           ^
AxiosError: Request failed with status code 400
    at settle (/Users/jpmcb/workspace/opensauced/api.opensauced.pizza/node_modules/axios/lib/core/settle.js:19:12)
    at IncomingMessage.handleStreamEnd (/Users/jpmcb/workspace/opensauced/api.opensauced.pizza/node_modules/axios/lib/adapters/http.js:572:11)
    at IncomingMessage.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Steps to reproduce

  1. Run api / app / pizza service locally
  2. Attempt to add tamagui/sponsors as a repo in an insights page
  3. Notice insights page fail to load

Browsers

No response

Additional context (Is this in dev or production?)

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@jpmcb jpmcb added the 🐛 bug Something isn't working label Nov 21, 2023
@jpmcb jpmcb self-assigned this Nov 21, 2023
@jpmcb
Copy link
Member Author

jpmcb commented Nov 21, 2023

The devil's advocate argument here is that technically an empty GitHub repo (with zero files and no .git folder) is indeed not a valid git repo and this behavior is correct from the pizza-oven perspective.

We'll want to think about how to handle this without blocking the open-sauced API

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

No branches or pull requests

1 participant