Run update-ref-docs (dry-run) on presubmit of istio.io#2607
Run update-ref-docs (dry-run) on presubmit of istio.io#2607istio-testing merged 1 commit intoistio:masterfrom
Conversation
|
My concern with setting up the test here is that it will cause a failure in the istioio pipeline with integrating a PR. And more than likely the problem will be from a change make in another repo that the docs developer won't know much about. |
Should this test only run in |
|
@clarketm Let me try and articulate the failures and hopefully that can help with a decision. Failure #1. Someone makes a change in a document that is pulled from another repo (maybe one in the proxy repo). This document causes the linter to fail in the automated PR, and the PR won't merge until the problem is fixed.
Failure #2. There is a change in the script in terms of what files are pulled (maybe we remove the galley files for example).
Failure #3: Someone updates the script incorrectly so it fails. It passes the basic lint tests, but something is wrong with the running of the script. This would be the same as Failure #2 in terms of when things would get noticed and fixed. However, in this case, actually trying to run the script in a pre-submit job would have caught the error earlier. So, what does the dry-run actually do? If it just runs the If it actually pulls files and runs lint, then it hurts istio.io maintainers in the Failure #1 case as all merges will be held until the other team can fix their docs (or revert their breakage). It would prevent #2 from happening as the PRs aren't merged. I would advocate that the maintainers should have any changes to the script also require a local Please correct my incorrect thinking, or maybe their is another failure scenario I am missing. |
|
I'll add a Failure#4: Someone changes one of the reference files (let's pick spelling) and updates the .spelling file removing the incorrect spelling. In this case, without doing any reference checking and if someone doesn't note that a generated file is update, the PR will go in. As soon as the automator runs, it will find the changed file and attempt to override it with the old one (with the incorrect spelling). This PR will fail lint since the old incorrect spelling, which wasn't changed upstream, is now invalid. In this case, could the job may have identified that the file was updated and prevent the original PR from going in? |
|
I have not fully analyzed the various failure conditions you mentioned above, so I still owe you a more detailed response. But for clarity, below is a response to your above assumption.
In this particular case, the |
|
Thanks for explaining what is planned for an istio.io PR. That helps. Let's look at the actual failure parsing back through the PRs (correct me if I get this wrong).
So, the problem is someone made a change in the istio/istio rep, it broke an automated job on the istio.io repo and no one really got notified and had a need to fix it.
My thoughts based on this is the there is really no way to raise the issue that occurred without adding a test somewhere. It would be hard to add them in the other repos, so having the ref update docs in the istio.io repo might be the easiest way to find it. I don't think having it required is the best option since it will unnecessarily force a revert of a PR or a possible long downtime in merging PRs. If we find that the red X is not getting enough focus, then we can think about making it required. |
Yes, your analysis and perspective aligns with mine pertaining to
I would agree that in most cases it is difficult to add and distribute a particular test across several repos (from a maintenance standpoint), although with the robust job generation and tools we have I would say that it is definitely a possibility if we want to extend our coverage with this approach (i.e. adding test to the various repos that docs are sources from).
Okay, to ensure I understand you though process correctly, the plan is:
|
|
/retest |
|
I'm fine with this, but would have preferred to leave the test in istio/istio (although no one appears to care when it fails when pushing in PRs) and make it required. That is the initial point of failure for the last failure. If the initial PR was never allowed to go in, there would have been no failure. The author would have to know that they needed to update the doc ref update script before the initial PR was allowed to merge. |
|
Eric, I don't think that is how it behaves in my experience. I had a pr that broke the docs and my pr did not fail. The test pulls from master of istio/istio, so it doesn't fail until it's already merged |
|
Ah. Since the change isn't yet merged in master, the failure doesn't happen when run. We would have to change the test to run against the current commit. Maybe we can do that at a later time and then add to the repos that the ref updates. |
|
@clarketm: Updated the
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
update-ref-docs-dry-runon presubmit ofistio/istio.iowhich tests the generation of reference docs andset it as requiredkeep it as optional.Make the existingRemove theupdate-ref-docs-dry-runpresubmit onistio/istiorequired.update-ref-docs-dry-runpresubmit fromistio/istio/hold
istio/istio.io#7132