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

Add Gradle's 'assemble' check to catch the distribution generation issues #8924

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

reta
Copy link
Collaborator

@reta reta commented Jul 27, 2023

Description

Add Gradle's 'assemble' check to catch the distribution generation issues

Related Issues

Related to #8903

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@reta reta force-pushed the add.gradle.assebmble branch from 04122f1 to bb841c2 Compare July 27, 2023 15:03
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta reta force-pushed the add.gradle.assebmble branch from bb841c2 to 4eabd76 Compare July 27, 2023 15:06
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta reta force-pushed the add.gradle.assebmble branch from 4eabd76 to 06b8622 Compare July 27, 2023 15:44
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta reta force-pushed the add.gradle.assebmble branch 3 times, most recently from 50a783e to 24ecb13 Compare July 27, 2023 16:50
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta reta force-pushed the add.gradle.assebmble branch from 24ecb13 to 89a71a0 Compare July 27, 2023 17:03
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationIT.testDropPrimaryDuringReplication

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #8924 (a911bfa) into main (bb78930) will increase coverage by 0.01%.
Report is 3 commits behind head on main.
The diff coverage is 100.00%.

❗ Current head a911bfa differs from pull request most recent head 7dd8259. Consider uploading reports for the commit 7dd8259 to get more accurate results

@@             Coverage Diff              @@
##               main    #8924      +/-   ##
============================================
+ Coverage     71.06%   71.07%   +0.01%     
+ Complexity    57314    57280      -34     
============================================
  Files          4766     4765       -1     
  Lines        270453   270385      -68     
  Branches      39555    39546       -9     
============================================
- Hits         192197   192185      -12     
+ Misses        62045    61979      -66     
- Partials      16211    16221      +10     
Files Changed Coverage Δ
...opensearch/gradle/docker/DockerSupportService.java 15.57% <100.00%> (+1.40%) ⬆️

... and 477 files with indirect coverage changes

@andrross
Copy link
Member

@andrross @dblock @nknize would love to hear your thoughts on the matter. It turned out we don't really run any checks on distributions (and sadly, had a regression sneaked in #8903).

I would like to suggest to add one more assemble check to make sure the distributions are properly built across the set of available operating systems (Linux / MacOS / Windows). That would have helped us to catch the regression early on (the checks are failing exactly because of this problem).

Thank you folks.

@reta I like the intent here for sure! In the name of frugality, are we duplicating the compilation that is being done for these platforms in precommit or check? If so, is that worth worrying about? In theory it seems like we could piggyback assemble on the check action for ubuntu and the precommit action for macos and windows.

@reta
Copy link
Collaborator Author

reta commented Jul 28, 2023

@reta I like the intent here for sure! In the name of frugality, are we duplicating the compilation that is being done for these platforms in precommit or check?

Thanks a lot @andrross , yes, we do duplicate compilation and javadoc (at least)

In theory it seems like we could piggyback assemble on the check action for ubuntu and the precommit action for macos and windows.

The problem with check is that it runs off the Jenkins, whereas macos & windows precommits are Github actions, the later could be combined with assemble. What we could try is:

  • bring back precommit for Linux
  • but exclude it from Gradle check (Jenkins), still compilation would be repeated sadly

What do you think?

@reta reta force-pushed the add.gradle.assebmble branch from 765d86d to b6ab37c Compare July 28, 2023 15:59
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta reta force-pushed the add.gradle.assebmble branch from b6ab37c to c8ed39e Compare July 28, 2023 16:49
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=search.aggregation/20_terms/string profiler via global ordinals}
      1 org.opensearch.action.admin.cluster.node.tasks.ResourceAwareTasksTests.testBasicTaskResourceTracking

@reta reta force-pushed the add.gradle.assebmble branch from c8ed39e to f6643cf Compare July 28, 2023 18:15
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testSearchAggregationWithNetworkDisruption_FailOpenEnabled
      1 org.opensearch.remotestore.RemoteStoreIT.testRemoteTranslogRestoreWithNoDataPostRefresh

@andrross
Copy link
Member

andrross commented Aug 3, 2023

The problem with check is that it runs off the Jenkins, whereas macos & windows precommits are Github actions, the later could be combined with assemble. What we could try is:

bring back precommit for Linux
but exclude it from Gradle check (Jenkins), still compilation would be repeated sadly

@reta In some brief testing on my Ubuntu machine, doing precommit along with assemble doesn't really add much time versus just doing assemble. I think I'm inclined to do the following:

  • bring back precommit for Ubuntu
  • change precommit to run ./gradlew precommit assemble (and probably rename the action to "precommit and assemble" or something like that)
  • keep the Ubuntu check as it is (probably not worth it to exclude precommit)

@reta reta force-pushed the add.gradle.assebmble branch from f6643cf to 9d86c88 Compare August 3, 2023 19:47
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

Gradle Check (Jenkins) Run Completed with:

@reta reta force-pushed the add.gradle.assebmble branch from 9d86c88 to a911bfa Compare August 3, 2023 20:41
.github/workflows/precommit.yml Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

Gradle Check (Jenkins) Run Completed with:

…sues

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@reta reta force-pushed the add.gradle.assebmble branch from a911bfa to 7dd8259 Compare August 7, 2023 12:17
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:


> Task :checkCompatibility
Checking compatibility for: https://github.com/opensearch-project/reporting.git with ref: main
Incompatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git]
Compatible components: [https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git]

BUILD SUCCESSFUL in 22m 35s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Gradle Check (Jenkins) Run Completed with:

@reta reta merged commit 63367a7 into opensearch-project:main Aug 7, 2023
@reta reta added the backport 2.x Backport to 2.x branch label Aug 7, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-8924-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 63367a72a48ec7aa7a7c48a27d3adbeef17f6059
# Push it to GitHub
git push --set-upstream origin backport/backport-8924-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-8924-to-2.x.

reta added a commit to reta/OpenSearch that referenced this pull request Aug 7, 2023
…sues (opensearch-project#8924)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit 63367a7)
andrross pushed a commit that referenced this pull request Aug 8, 2023
…sues (#8924) (#9154)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit 63367a7)
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…sues (opensearch-project#8924)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
…sues (opensearch-project#8924)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…sues (opensearch-project#8924)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants