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

Fix pagination for recent failures #2756

Merged

Conversation

Cerber-Ursi
Copy link
Contributor

Currently, on the "recent failures" page, pagination links are broken - they lead to something like https://docs.rs/releases/recent_failures/2 instead of https://docs.rs/releases/recent-failures/2. I've attempted to change the corresponding string representation - it seems to be not used otherwise.

Since this representation is used for routing (namely for pagination links), it must be consistent with the paths set in routing.
@Cerber-Ursi Cerber-Ursi requested a review from a team as a code owner March 4, 2025 09:43
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Mar 4, 2025
@GuillaumeGomez
Copy link
Member

Thanks!

@GuillaumeGomez
Copy link
Member

Just realized: can you add a test to ensure that:

  1. We generate the right link
  2. The linked page is actually the expected one

please?

@Cerber-Ursi
Copy link
Contributor Author

I was hoping to avoid installing the whole thing for UI testing, to be honest :) But this request is reasonable (after all, this change now is not checked automatically at all), so I'll look into it.

@Cerber-Ursi
Copy link
Contributor Author

Actually, thinking about it, I'm not totally sure how this should be approached. To test pagination, we need, well, pages, that is, we need a large enough amount of failed builds. Will it be normal to add some known-bad builds to run-gui-tests.sh?

And by the way, how it is ever expected to be launched locally? As-is, that is, as described in README, it fails saying that DOCSRS_PREFIX is missing when doing cargo run -- database migrate, and I guess this is expected, since this part of the script doesn't use .env-file, it explicitly moves it away.

@GuillaumeGomez
Copy link
Member

No need for a GUI test, a "normal" test is more than enough. You can generate failures and then query the page.

@Cerber-Ursi
Copy link
Contributor Author

Aha, thanks - this appears to be easier then I thought. Updated the source branch, hopefully this is OK.

Copy link
Member

@GuillaumeGomez GuillaumeGomez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, thanks a lot!

@Cerber-Ursi Cerber-Ursi force-pushed the recent-failures-pagination branch from 0e66b5f to 1f202ab Compare March 5, 2025 17:17
@Cerber-Ursi
Copy link
Contributor Author

Forgot about formatting, now updated.

@GuillaumeGomez
Copy link
Member

All good, thanks!

@GuillaumeGomez GuillaumeGomez merged commit 2b95e18 into rust-lang:master Mar 5, 2025
9 checks passed
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants