#10 Can we have publicly accessible nightlies.json?
Closed: Fixed 3 years ago by adamwill. Opened 3 years ago by frantisekz.

I'd like to consume data about the latest compose in testcloud and oraculum, would it be possible to make nightlies.json publicly accessible next to https://openqa.fedoraproject.org/nightlies.html ?

Thanks!


As a side remark, it might be a good idea to link the json from the html ("if you want to process this data automatically, there's a json file $here"), so that anyone looking for the same thing can find it easily.

As a side remark, it might be a good idea to link the json from the html ("if you want to process this data automatically, there's a json file $here"), so that anyone looking for the same thing can find it easily.

That's not really possible to do reliably, as the tool just generates the files. By design, serving them out can be done in any way the admin likes. So there's no reliable relationship between the public URL of one and the public URL of the other (if any).

If the json file would not be written out to /var/lib/fedora-nightlies but to the /var/www/ similarly to the http file (or copied to that location via cron for instance) would that not be enough for @frantisekz to be able to download it and utilize it?

That's not really possible to do reliably, as the tool just generates the files. By design, serving them out can be done in any way the admin likes. So there's no reliable relationship between the public URL of one and the public URL of the other (if any).

Well, there's the proper way - add a config file where you can set up the location (supporting relative paths as well) and fall back to a default value if the config option is not set.

Or there's the quick way - just hardcode it to ./nightlies.json, because we're the only users of this tool, and if we ever want to change it, we can do it instantly. In the very unlikely case where someone else wants to use it differently, we'll happily accept a PR from them.

I'm a fan of the second one :wink:

If the json file would not be written out to /var/lib/fedora-nightlies but to the /var/www/ similarly to the http file (or copied to that location via cron for instance) would that not be enough for @frantisekz to be able to download it and utilize it?

Yeah, just having access to the json form is more than enough for me :)

yeah, I was planning to look at the initial request, just not the link thing.

I'm trying to remember my initial plan about this sort of thing. I think I didn't really intend for the JSON to be a 'public interface', I didn't want to commit to the format not changing etc. But for quick and dirty purposes I guess we can tweak the deployment to make it available.

okay, sure.
That should stay up to date now. Yell if it doesn't. I changed the upstream default too, though that's not what we actually use in the infra deployment, we set it via config.

Metadata Update from @adamwill:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Log in to comment on this ticket.

Metadata