Skip to content

Conversation

@sima-zhu
Copy link
Contributor

@sima-zhu sima-zhu commented Oct 15, 2020

@ahsonkhan
Copy link
Contributor

What's motivating this change? Was this causing problems somehow?

@ahsonkhan ahsonkhan added the Central-EngSys This issue is owned by the Engineering System team. label Oct 15, 2020
@ahsonkhan ahsonkhan added this to the [2020] November milestone Oct 15, 2020
@sima-zhu
Copy link
Contributor Author

What's motivating this change? Was this causing problems somehow?

Most of the lang repo are lack of the ability to scan the root readme (markdown outside of sdk scope). So every time people add wrong link under root repo, only the nightly build aggregate-report can catch it. We want to minimize the two steps fix to one step.
Also, there is no need to scan the links if the PRs do not touch the markdown files.

@ahsonkhan
Copy link
Contributor

So every time people add wrong link under root repo, only the nightly build aggregate-report can catch it.

Why is that?

We want to minimize the two steps fix to one step.

How does it minimize the number of steps? Do we still have the nightly build that verifies all the links? If not, don't we lose some coverage?

If the repo somehow is in a state that it contains invalid links, are we still going to be able to catch that somehow, regardless of this change?

@weshaggard
Copy link
Member

@sima-zhu it doesn't look like the cpp repo has an aggregate-reports pipeline like other language repos so @ahsonkhan is correct that for cpp this will leave a gap because we will never check the links unless something is touching that MD file in a PR. So for languages where we don't have a nightly pipeline runs and checks all MD files, we should either add one or keep checking all MD files.

@sima-zhu
Copy link
Contributor Author

@weshaggard @ahsonkhan I am trying to check over if cpp have the ability to scan the root readme. However, it seems we cannot scan root readme for cpp as well. I think the best approach to address this is we add a nightly pipeline to check all links like other lang's aggregate-report.

@ahsonkhan
Copy link
Contributor

ahsonkhan commented Oct 15, 2020

Thanks @weshaggard, that makes sense. I would still like to understand the benefit/concern of this change for other languages that might already have a nightly aggregate report.

However, it seems we cannot scan root readme for cpp as well.

What's the underlying reason for this limitation (both in C++ and other languages)?

I think the best approach to address this is we add a nightly pipeline to check all links like other lang's aggregate-report.

OK.

@sima-zhu
Copy link
Contributor Author

sima-zhu commented Oct 15, 2020

@ahsonkhan This is one of the readme we currently miss to scan against in PR. https://github.com/Azure/azure-sdk-for-cpp/blob/master/README.md
Other langs have the same issue.

@sima-zhu
Copy link
Contributor Author

ci.yml provides us which sdk directory (storage, core etc) to scan against. The link verification scripts scan the markdown files under sdk directory parameter. However, we do not have any ci.yml cover the path outside of sdk scope. That's why we have the miss.

@ahsonkhan
Copy link
Contributor

ahsonkhan commented Oct 15, 2020

Gotcha. Can we change the ci.yml script (or add a new one at the root) to include the root directory too or is there a reason we want to exclude them?

For instance, can we add something like *, here:

- cmake-modules/
- eng/
- CMakeLists.txt
- sdk/core

@weshaggard
Copy link
Member

Unfortunately devops doesn't really have support wildcards (https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#wildcards) for paths so if we added the root of the repo as a trigger I think it would trigger for every change in the repo, not just the files in the root. So I'm not sure we want to do that and we don't do it in any of the other languages today either.

We could however have one or all the pipelines in the cpp repo check all MD files in the repo that change but it would require that they get triggered by other changes or manually triggered to check them which is what this change is about.

I think perhaps the best option is to keep this change add to add another nightly aggregate-reports pipeline, like all other languages, that runs and will always check all MD files for broken links.

@ahsonkhan
Copy link
Contributor

ahsonkhan commented Oct 16, 2020

Unfortunately devops doesn't really have support wildcards (https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#wildcards) for paths so if we added the root of the repo as a trigger I think it would trigger for every change in the repo, not just the files in the root.

That is certainly a strange limitation. Looks like / would work, but like you said, that would include everything.

I think perhaps the best option is to keep this change add to add another nightly aggregate-reports pipeline, like all other languages, that runs and will always check all MD files for broken links.

👍

@sima-zhu
Copy link
Contributor Author

The aggregate-report pipeline has to setup for all necessary checking against entire repo. It should take more things into consideration besides of link verification. We currently plan to scan the entire repo in yml file, which is able to cover all md files for the very first step. If it takes too much time for scanning, we will switch to another plan. Will close the PR and open another one for covering root readme

@sima-zhu sima-zhu closed this Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants