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

Skip gradle check for non code related changes #13085

Closed

Conversation

kotwanikunal
Copy link
Member

Description

image

  • There is no need to run a gradle check in this scenario since the code has not been modified in any way

Pros: Getting to merge in non code related changes without any hassles
Cons(?): Missing out on flakiness

I would love to hear some feedback from other maintainers.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
@kotwanikunal
Copy link
Member Author

Thoughts here - @dblock / @andrross / @reta / @peternied

run_gradle_check=false

for filename in ${ALL_CHANGED_FILES}; do
# Run gradle check if file ends in [java/gradle/json]
Copy link
Member

Choose a reason for hiding this comment

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

I like the spirit here but there are many files that can fail the build that don't meet these extensions:

Copy link
Member Author

Choose a reason for hiding this comment

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

We can do an inverse set where we skip gradle check if the changes are limited to certain file types

Copy link
Member

Choose a reason for hiding this comment

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

If going this route, I'd rather do a strictly positive list. If the commits only affects: [CHANGELOG*.md, README.md, ...] then skip

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 to @peternied 's suggestion, other examples are: version.properties, bwcVersions, ....

Copy link
Member Author

Choose a reason for hiding this comment

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

That sounds good. I was just bouncing the idea across.
I'll work on refining and testing this out.
Thanks folks.

Copy link
Member

Choose a reason for hiding this comment

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

I find paths-ignore as an easier option. We can keep on adding to the list and also manage file-types, directories, etc. This won't even initiate the workflow run for ignored paths. Example: #13477

Copy link
Member Author

Choose a reason for hiding this comment

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

That sounds good. I'll close out this PR and we can keep adding to paths-ignore

Copy link
Contributor

github-actions bot commented Apr 4, 2024

Compatibility status:

Checks if related components are compatible with change fae27de

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git]

@peternied peternied changed the title Add an option to skip gradle check for non code related changes Skip gradle check for non code related changes Apr 4, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

❌ Gradle check result for fae27de: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@dblock
Copy link
Member

dblock commented Apr 8, 2024

How about something similar to skip-changelog where a maintainer can make a call that a gradle check is not required?

@andrross
Copy link
Member

How about something similar to skip-changelog where a maintainer can make a call that a gradle check is not required?

I mean, we can already do this by just merging the PR without a completed or passing check. Seems a bit like a slippery slope if we normalize manually skipping the gradle check.

@kotwanikunal
Copy link
Member Author

How about something similar to skip-changelog where a maintainer can make a call that a gradle check is not required?

I mean, we can already do this by just merging the PR without a completed or passing check. Seems a bit like a slippery slope if we normalize manually skipping the gradle check.

+1 to this. I'd be wary of adding a super power, and instead rely on the framework to guide through it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants