Skip to content

Allow different source sets from forbiddenApis#54731

Merged
jakelandis merged 6 commits intoelastic:masterfrom
jakelandis:forbidden_task_assumption
Apr 8, 2020
Merged

Allow different source sets from forbiddenApis#54731
jakelandis merged 6 commits intoelastic:masterfrom
jakelandis:forbidden_task_assumption

Conversation

@jakelandis
Copy link
Copy Markdown
Contributor

ForbiddenApis task via the precommit task currently makes an assumption
that only the test and main source sets are present for any given project.
This commit removes that assumption and allows for any project source set's
compileClasspath class path to be added to the forbiddenApis classpath
configuration.

ForbiddenApis task via the precommit task currently makes an assumption
that only the test and main source sets are present for any given project.
This commit removes that assumption and allows for any roject source set's
compileClasspath class path to be added to the forbiddenApis classpath
configuration.
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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.

Left a few comments, otherwise LGTM.

@jakelandis
Copy link
Copy Markdown
Contributor Author

thanks @mark-vieira addressed comments via 5d1cc03

@jakelandis
Copy link
Copy Markdown
Contributor Author

@elasticmachine run elasticsearch-ci/2

@jakelandis
Copy link
Copy Markdown
Contributor Author

@elasticmachine run elasticsearch-ci/2
@elasticmachine run elasticsearch-ci/default-distro

@jakelandis
Copy link
Copy Markdown
Contributor Author

@elasticmachine update branch

@jakelandis
Copy link
Copy Markdown
Contributor Author

@rjernst - do the last round of changes look good ?

Copy link
Copy Markdown
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

One more suggested tweak, otherwise LGTM

@jakelandis
Copy link
Copy Markdown
Contributor Author

@elasticmachine update branch

@jakelandis
Copy link
Copy Markdown
Contributor Author

@elasticmachine run elasticsearch-ci/2

@jakelandis jakelandis merged commit 13d1683 into elastic:master Apr 8, 2020
@jakelandis jakelandis deleted the forbidden_task_assumption branch April 8, 2020 20:21
jakelandis added a commit to jakelandis/elasticsearch that referenced this pull request Apr 8, 2020
ForbiddenApis task via the precommit task currently makes an assumption
that only the test and main source sets are present for any given project.
This commit removes that assumption and allows for any project source set's
compileClasspath class path to be added to the forbiddenApis classpath
configuration.
jakelandis added a commit to jakelandis/elasticsearch that referenced this pull request Apr 8, 2020
ForbiddenApis task via the precommit task currently makes an assumption
that only the test and main source sets are present for any given project.
This commit removes that assumption and allows for any project source set's
compileClasspath class path to be added to the forbiddenApis classpath
configuration.
@jakelandis
Copy link
Copy Markdown
Contributor Author

I accidentally deleted a file with this merge. I added it back on 1ff5b85 (fortunately I caught the mistake doing the backport, so it was only missing from master for a few minutes).

jakelandis added a commit to jakelandis/elasticsearch that referenced this pull request Apr 8, 2020
ForbiddenApis task via the precommit task currently makes an assumption
that only the test and main source sets are present for any given project.
This commit removes that assumption and allows for any project source set's
compileClasspath class path to be added to the forbiddenApis classpath
configuration.
@jakelandis
Copy link
Copy Markdown
Contributor Author

only back-porting as far as 7.x since this builds on #54309 which is only that far back.

@mark-vieira
Copy link
Copy Markdown
Contributor

only back-porting as far as 7.x since this builds on #54309 which is only that far back.

That PR isn't a strict requirement here. I'm pretty sure we can backport this. Folks are actively working in 7.7 and will be for a while and we want to keep build changes as similar as possible as this causes a domino effect of not being able to backport stuff.

@jakelandis
Copy link
Copy Markdown
Contributor Author

If I understand correctly, we should explicitly set the classpath for the plugin via the backport even though the old code didn't ?

I agree with the desire to backport, just want to ensure that is the correct action here since the original PR changes code that is absent in 7.7. and prior.

@mark-vieira
Copy link
Copy Markdown
Contributor

If I understand correctly, we should explicitly set the classpath for the plugin via the backport even though the old code didn't ?

No. What Ryan had to do in that PR was change forbidden APIs to use the runtime classpath because of some weirdness in the way it works and the fact that we leak Guava types in our API, but technically don't actually require it until runtime.

If we can, we should prefer the smaller classpath footprint, which in this case means going with the forbiddenapi plugin's default of using the compile classpath.

@jakelandis
Copy link
Copy Markdown
Contributor Author

chatted offline this change only makes sense if applied ontop of #54309, so will not back port.

jakelandis added a commit that referenced this pull request Apr 8, 2020
ForbiddenApis task via the precommit task currently makes an assumption
that only the test and main source sets are present for any given project.
This commit removes that assumption and allows for any project source set's
compileClasspath class path to be added to the forbiddenApis classpath
configuration.
@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 >refactoring 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