openstack-charmers / zosci-config

1 stars 17 forks source link

Revert pull request 305 add-index-html #308

Closed jadonn closed 7 months ago

jadonn commented 7 months ago

This commit reverses a change that added index.html at the end of the log_url for Zuul logs. As far as I can tell this is causing the URL to be wrong and cause 404 errors. I think removing the index.html should fix this. I'm not sure why this is happening in the first place, unfortunately.

ajkavanagh commented 7 months ago

This commit reverses a change that added index.html at the end of the log_url for Zuul logs. As far as I can tell this is causing the URL to be wrong and cause 404 errors. I think removing the index.html should fix this. I'm not sure why this is happening in the first place, unfortunately.

I'm curious as to why removing the index.html is necessary. Depending on the configuration of the web server, a '/' will either be rewritten to '/index.html' or would result in a directory listing at that point, unless disallowed. Would be good to know which it may be, or indeed something else.

jadonn commented 7 months ago

Thank you for the review and feedback!

I admit this is my best guess on what's going on or what could fix it. Here is an example URL with the problem:

https://openstack-ci-reports.ubuntu.com/artifacts/c11/periodic-weekly/github.com/openstack-charmers/charmed-openstack-tester/master/cot_distro-regression_jammy-yoga-to-caracal-upgrades/c11eb9f/index.html/

This URL goes to a 404 because the real URL does not have the trailing / after index.html.

In addition, index.html is being inserted into the Zuul Manifest URLs like in this example:

https://openstack-ci-reports.ubuntu.com/artifacts/c11/periodic-weekly/github.com/openstack-charmers/charmed-openstack-tester/master/cot_distro-regression_jammy-yoga-to-caracal-upgrades/c11eb9f/**index.html**/zuul-manifest.json

If you remove the index.html, you will get the Zuul Manifest data as expected.

Other than this one place, I couldn't find anywhere else this behavior is defined or configured in Zuul. If you have suggestions for other places I can look, I will absolutely research further.

jadonn commented 7 months ago

I realize it might be weird to do this on a closed PR, but for posterity's sake and for completeness, this change did fix the problem with index.html showing up in the wrong places in Zuul's artifact UIs. I did not see any 404s in Zuul's interface for the Zuul manifest, and the log URLs were valid URLs that navigated to the Swift storage when I clicked on them.

We don't have a prettier index page anymore, of course. I'm OK with that myself since the index page we get from Swift is good enough, and I don't have to manipulate the URLs anymore.