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

Eliminate Gradle task input warnings #47538

Merged

Conversation

mark-vieira
Copy link
Contributor

We have a number of tasks that either omit, or incorrectly apply Gradle input/output annotations on task properties. In addition to some of these instances resulting in potentially incorrect incremental build behavior, this causes a bunch of noise whenever we build :buildSrc. This PR addresses these reported warnings.

@mark-vieira mark-vieira requested review from alpar-t and rjernst October 3, 2019 22:17
@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label Oct 3, 2019
@elasticmachine
Copy link
Collaborator

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

@mark-vieira
Copy link
Contributor Author

@elasticmachine update branch

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

Thank you for taking this on! These warnings have been an eyesore for far too long. LGTM

@mark-vieira
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/docs

@@ -49,11 +50,16 @@ public Chmod getChmod() {
throw new UnsupportedOperationException();
}

@Input
@Internal
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming a non existing File can't be input ?

Copy link
Contributor Author

@mark-vieira mark-vieira Oct 4, 2019

Choose a reason for hiding this comment

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

The issue here was Gradle was complaining that we were using @Input for File when we should have been using @InputFile or @InputDirectory. Using @Input tracks the File path, not it's contents, which is actually the behavior we want, but Gradle is issuing a warning here because we aren't being explicit. That's why I've added the input for the directory path, which is all we care about.

Copy link
Contributor

@alpar-t alpar-t left a comment

Choose a reason for hiding this comment

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

LGTM Thanks allot for this !

@mark-vieira mark-vieira merged commit e86d40f into elastic:master Oct 4, 2019
@mark-vieira mark-vieira deleted the eliminate-task-input-warnings branch October 4, 2019 20:12
mark-vieira added a commit that referenced this pull request Oct 4, 2019
@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 Team:Delivery Meta label for Delivery team v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants