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

Use task avoidance with forbidden apis #55034

Merged
merged 4 commits into from
Apr 15, 2020
Merged

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Apr 9, 2020

Currently forbidden apis accounts for 800+ tasks in the build. These
tasks are aggressively created by the plugin. In forbidden apis 3.0, we
will get task avoidance
(policeman-tools/forbidden-apis#162), but we
need to ourselves use the same task avoidance mechanisms to not trigger
these task creations. This commit does that for our foribdden apis
usages, in preparation for upgrading to 3.0 when it is released.

Currently forbidden apis accounts for 800+ tasks in the build. These
tasks are aggressively created by the plugin. In forbidden apis 3.0, we
will get task avoidance
(policeman-tools/forbidden-apis#162), but we
need to ourselves use the same task avoidance mechanisms to not trigger
these task creations. This commit does that for our foribdden apis
usages, in preparation for upgrading to 3.0 when it is released.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

@rjernst rjernst requested a review from mark-vieira April 9, 2020 22:21
Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

Minor comments. 👍

build.gradle Outdated
project.tasks.named(taskname).configure { onlyIf { false } }
}
}
project.ext.disableTasks = disableMethod
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the intermediary variable here? This can be simplified to ext.disableTasks = { String... taskNames ->...

@@ -27,8 +27,7 @@ dependencies {

loggerUsageCheck.enabled = false

forbiddenApisMain.enabled = true // disabled by parent project
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to keep this?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I looked at the parent but did not see it being disabled there. Also, using onlyIf now, there would be no way to disable (using onlyIf) in the parent but then re-enable in the child project.

@rjernst
Copy link
Member Author

rjernst commented Apr 15, 2020

@elasticmachine run elasticsearch-ci/default-distro

@rjernst rjernst merged commit 842ce32 into elastic:master Apr 15, 2020
@rjernst rjernst deleted the taskavoidance1 branch April 15, 2020 20:23
rjernst added a commit that referenced this pull request Apr 15, 2020
Currently forbidden apis accounts for 800+ tasks in the build. These
tasks are aggressively created by the plugin. In forbidden apis 3.0, we
will get task avoidance
(policeman-tools/forbidden-apis#162), but we
need to ourselves use the same task avoidance mechanisms to not trigger
these task creations. This commit does that for our foribdden apis
usages, in preparation for upgrading to 3.0 when it is released.
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >enhancement Team:Delivery Meta label for Delivery team v7.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants