-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: improve linting speed #22103
ci: improve linting speed #22103
Changes from 7 commits
be932d7
362b2e5
59d0018
c682f3b
284add9
36d600a
4faca89
b28b754
0b9e387
8e33fce
81aebd2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,11 @@ when: | |
tags: true ## for all the tags | ||
platform: "linux && ubuntu-18" ## default label for all the stages | ||
stages: | ||
Lint: | ||
make: | | ||
make -C auditbeat check; | ||
make -C auditbeat update; | ||
make check-no-changes; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIUC, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the |
||
arm: | ||
mage: "mage build unitTest" | ||
platforms: ## override default label in this specific stage. | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -2,6 +2,7 @@ when: | |||||||||
branches: true ## for all the branches | ||||||||||
changeset: ## when PR contains any of those entries in the changeset | ||||||||||
- "^deploy/kubernetes/.*" | ||||||||||
- "^libbeat/docs/version.asciidoc" | ||||||||||
comments: ## when PR comment contains any of those entries | ||||||||||
- "/test deploy/kubernetes" | ||||||||||
labels: ## when PR labels matches any of those entries | ||||||||||
|
@@ -11,5 +12,7 @@ when: | |||||||||
tags: true ## for all the tags | ||||||||||
platform: "linux && ubuntu-18" ## default label for all the stages | ||||||||||
stages: | ||||||||||
lint: | ||||||||||
make: "make -C deploy/kubernetes all" | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This check should be executed when (Long-term we should probably stop commiting these files and move them to docs build) And I guess we need to check for changes so it detects anything.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kuisathaverat I see you have added the trigger on changes in the version file, thanks! But the other point in this comment about adding a check is still pending to be addressed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep, we need to run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please add it? |
||||||||||
k8sTest: | ||||||||||
k8sTest: "v1.18.2,v1.17.2,v1.16.4,v1.15.7,v1.14.10" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
when: | ||
branches: true ## for all the branches | ||
changeset: ## when PR contains any of those entries in the changeset | ||
- "^dev-tools/.*" | ||
kuisathaverat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- "^libbeat/.*" | ||
- "^Makefile" | ||
comments: ## when PR comment contains any of those entries | ||
- "/test dev-tools" | ||
labels: ## when PR labels matches any of those entries | ||
- "dev-tools" | ||
parameters: ## when parameter was selected in the UI. | ||
- "dev-tools" | ||
tags: true ## for all the tags | ||
platform: "linux && ubuntu-18" ## default label for all the stages | ||
stages: | ||
lint: | ||
make: "make -C dev-tools check" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,11 @@ when: | |
tags: true ## for all the tags | ||
platform: "linux && ubuntu-18" ## default label for all the stages | ||
stages: | ||
Lint: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit. This stage is upercased in some files, and lowercased in others. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep I saw it on the GitHub checks |
||
make: | | ||
make -C filebeat check; | ||
make -C filebeat update; | ||
make check-no-changes; | ||
arm: | ||
mage: "mage build unitTest" | ||
platforms: ## override default label in this specific stage. | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will we decide what goes in this linting and what goes in the project-specific linting? For example this linting is not checking the license headers now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the checks that are in a foreach in the main Makefile, so I think that every check that it is implemented on the beats should run only on beans. Indeed we should try to add check only to the beans to allow parallelize the task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried
make -j <n>
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the VMs are not really powerful machines that do not have too many cores and are not dedicated hardware, so this could decrease a little the time(maybe 5-10min or less) of the task but far away from this approach that uses a VM for each stage (40min).