dadav / gorge

Puppet-Forge implementation in golang.
Apache License 2.0
10 stars 1 forks source link

Vanishing /v3/releases response #25

Open sboyd-m opened 1 month ago

sboyd-m commented 1 month ago

Initially, when querying this endpoint, gorge will proxy and return a valid response, with a pagination map and a results map. However, after querying again, the results map vanishes, and only the pagination map is returned in the json. The program doesn't seem to proxy the request anymore, since there is no mention of it in the logs, and so I assume it just has decided to return nothing for some reason. It seems to work for any module query on that endpoint, but just as an example /v3/releases?module=puppet-cron is enough to reproduce the issue.

johnwarburton commented 4 weeks ago

I just notices our puppet spec environment was using fixtures files not pointing to our local gorge

Pointing to gorge and we see similar errors querying /v3/releases

$ cat .fixtures.yml

---
defaults:
  forge_modules:
    flags: "--module_repository http://puppet-forge-proxy.intra"
fixtures:
  forge_modules:
    stdlib: "puppetlabs/stdlib"
    augeasproviders_core: "puppet-augeasproviders_core"
    sysctl: "puppet-augeasproviders_sysctl"

query it and looks like some of th einternal data structures are not being kept up to date

$ curl -ks 'http://10.64.135.208:8080/v3/releases?module=puppetlabs-stdlib' 2>&1 | jq . | less -r

{
  "pagination": {
    "limit": 20,
    "first": "/v3/releases?limit=20&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib&module=puppetlabs-stdlib
.
.
.
lease go to [http://tickets.puppetlabs.com/browse/MODULES](http://tickets.puppetlabs.com/browse/MODULES).\n\n## Contributors\n\nThe list of contributors can be found at: [https://github.com/puppetlabs/puppetlabs-stdlib/graphs/contributors](https://github.com/puppetlabs/puppetlabs-stdlib/graphs/contributors).\n",
      "license": "Apache-2.0"
    }
  ]
}