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

[CI] Run linting for only docs #23099

Merged
merged 1 commit into from
Dec 16, 2020
Merged

[CI] Run linting for only docs #23099

merged 1 commit into from
Dec 16, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented Dec 14, 2020

What does this PR do?

Run make check when there are only doc changes, otherwise, it keeps as usual.

Why is it important?

Otherwise the linting is not executed since it's delegated to the specific beat which only run when no doc changes.

Related issues

@v1v v1v added bug automation Team:Automation Label for the Observability productivity team labels Dec 14, 2020
@v1v v1v self-assigned this Dec 14, 2020
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Dec 14, 2020
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #23099 opened

  • Start Time: 2020-12-14T09:24:37.120+0000

  • Duration: 58 min 35 sec

Test stats 🧪

Test Results
Failed 0
Passed 17427
Skipped 1379
Total 18806

Steps errors 2

Expand to view the steps failures

Terraform Apply on x-pack/metricbeat/module/aws
  • Took 0 min 19 sec . View more details on here
Terraform Apply on x-pack/metricbeat/module/aws
  • Took 0 min 15 sec . View more details on here

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 17427
Skipped 1379
Total 18806

@v1v v1v marked this pull request as ready for review December 14, 2020 11:08
@v1v v1v requested a review from a team as a code owner December 14, 2020 11:08
@v1v v1v requested a review from jsoriano December 14, 2020 11:08
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Thanks for working on a fix for this!

Something I think we are also missing since #22103 is that some module docs files generated under filebeat/docs and metricbeat/docs depend on the docs of x-pack modules, and I think we are not triggering any OSS build after changes in x-pack.
Perhaps for that we should trigger a make check in oss if x-pack is modified, but I am ok with doing it as a different change.

Jenkinsfile Show resolved Hide resolved
@v1v
Copy link
Member Author

v1v commented Dec 15, 2020

@jsoriano

Perhaps for that we should trigger a make check in oss if x-pack is modified, but I am ok with doing it as a different change.

Yes, I'd prefer to create a specific issue for that particular scenario :)

cmd(label: "make check-go", script: "make check-go")
cmd(label: "Check for changes", script: "make check-no-changes")
whenTrue(env.ONLY_DOCS == 'true') {
cmd(label: "make check", script: "make check")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is possible to run the lint stage(Jenkinsfile.yml) of each beat? it is the same but in parallel so faster

Copy link
Member Author

@v1v v1v Dec 15, 2020

Choose a reason for hiding this comment

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

That's another approach to solve this issue:

  • Either to exclude the ONLY_DOCS when in the Builds&Tests dynamic stages. But it will also run the build/tests stages, and if flaky tests then it might cause failed builds for only docs changes.
  • Or this approach

That's the current implementation, but my aim with this PR was to avoid changing the current implementation but enabling the make check only for the DOCS changes.

In both cases, the output is the same, I guess

Copy link
Contributor

Choose a reason for hiding this comment

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

let's live with it, but takes 15 min :(

Copy link
Member Author

Choose a reason for hiding this comment

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

It's only for docs changes, if any kind of code changes, then it will work as used to be.

@v1v v1v merged commit 3575cfd into elastic:master Dec 16, 2020
@v1v v1v deleted the feature/fix-linting branch December 16, 2020 14:31
v1v added a commit to v1v/beats that referenced this pull request Dec 16, 2020
v1v added a commit to v1v/beats that referenced this pull request Dec 16, 2020
v1v added a commit that referenced this pull request Dec 17, 2020
v1v added a commit that referenced this pull request Dec 17, 2020
v1v added a commit to v1v/beats that referenced this pull request Dec 17, 2020
v1v added a commit that referenced this pull request Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation bug Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linting in jenkins doesn't detect some issues in modules docs
4 participants