Move all doc-links to a collected space, Add command to verify all available doc links#39026
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
|
@phil-davis not quite sure how to handle the tests, run them for every server or just once ? |
|
https://github.com/owncloud/core/tree/docs-testing If you rebase, then you won't need to have all the diffs that are here. |
805fd80 to
a8d2091
Compare
|
@phil-davis ok rebased, 1 diff less :) |
|
💥 Acceptance tests pipeline apiFederationToShares1-latest-mariadb10.2-php7.4 failed. The build has been cancelled. |
|
@phil-davis We added a drone step In case of failure we want the pipeline to continue while posting a comment on Github. We already achieved that the error gets ignored via Another thing to mention: The pipeline runs based on daily master, right? Which means after #39048 has been merged, the doc pipeline always fails until the docs for 10.9 are available. |
Here's an idea - in web we always run the Keep ignoring failure of the tests, but write something in
|
|
@phil-davis IHMO it is crucial, on the one hand we want to make sure that all links to docs are correct, on the other hand we don't want to do hard depending checks. As @xoxys required some tests, he knows best what he wants to archive. If we suspect owncloud is a ecosystem, and docs is a part of it, I think Integration tests need to cover it, too... |
|
Note: https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/WebUIHelpAndTipsContext.php has test code that checks that the links displayed in the Help & Tips on the webUI are "valid" - that they have the expected URL. https://github.com/owncloud/core/blob/master/tests/acceptance/features/webUIAdminSettings/helpAndTips.feature has the test scenario. That code does not actually go out and check that the links respond on the "big bad internet" in real-time, because we had the same problem as we have here. The real docs site might be down, might not be reachable from the test machine, or the next version is in development (e.g. 10.9) and there are no docs for that yet. |
Yep, I'm afraid there is currently no nice way to handle this. So, correct me if I'm wrong, but the main goal here is to have a valid list of doc identifiers which are used in OC. And to keep all parties informed if that list changes somehow. This PR introduces such a list: https://github.com/owncloud/core/pull/39026/files#diff-4392b98f2438a8b2698467bda6228bed8a258ec62c83a6fa15e97c0ad1781089. Wouldn't it be sufficient to keep track of this list? Meaning, if some future PR changes something by adding, editing or removing anything, the doc team gets noticed. @xoxys @janackermann |
|
Well, this list might be still bad for automated testing. If we can not implement this in the test suite of oC core (and I agree on the downsides/blockers) I would like to have the possibility to run a simple bash loop like this: We need a way to run a simple test manually at any time (or a simple way to add it to QA), copying IDs from the code might not be the best way :) Do you know a way to get it out of the code automatically? Or instead of bash, can we have a |
Sure, we can implement a PHP script that gathers those url identifiers from the list and validates them via curl request. The script itself would be located somewhere in the core repo (make it callable via Makefile?). I suggest to pass the OC version via optional param, which defaults to the latest version. |
|
Sounds good to me, this way it can be tested easily any time. @jnweiger would it make sense for you to add it as a QA step to run such a test script and report broken links to sysadmin/docs team? |
Good idea. We have targets like |
|
I updated the PR and implemented |
I did some output to debug. It checks links like https://doc.owncloud.com/server/10.9/go.php?to=admin-email That link "works" in the sense that it returns 200 "OK" and "effectiveUrl" = "https://doc.owncloud.com/server/10.9/admin_manual/configuration/server/email_configuration.html" But https://doc.owncloud.com/server/10.9/admin_manual/configuration/server/email_configuration.html responds with "404 IMO the test needs to follow the Here is an example of a response object that PHP dumped for me: |
|
Good catch!
|
|
@phil-davis Could you please try again? Should work now |
works |
|
Do we need this command in docs, for example dev docs ? |
…tants.php to have a collected space for those
dcbb47a to
19f3327
Compare
yes, it would be good to mention it somewhere. docs issue owncloud/docs#3900 has been created. |
|
💥 Acceptance tests pipeline apiSharePublicLink2-mariadb10.2-php7.4 failed. The build has been cancelled. |
|
Good to merge ? |
Yes, please merge when CI is green. |
|
Kudos, SonarCloud Quality Gate passed! |








Description
All available doc links can now be tested and verified via
make test-doc-links. It is also possible tospecify the ownCloud version to look for in the docs via
make test-doc-links DOC_LINK_VERSION=10.7.It defaults to the ownCloud version of the current installation.
Related Issue
Types of changes
Checklist: