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

Removed redundant ubuntu precommit check #8207

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Jun 21, 2023

Description

This PR removes the redundant ubuntu precommit action as precommit runs in ubuntu gradle check again.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testIndexDeletionDuringSnapshotCreationInQueue
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchTaskCancellationWithHighCpu

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #8207 (0209d1a) into main (317dd03) will increase coverage by 0.13%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #8207      +/-   ##
============================================
+ Coverage     70.85%   70.98%   +0.13%     
- Complexity    56719    56802      +83     
============================================
  Files          4733     4733              
  Lines        268336   268336              
  Branches      39322    39322              
============================================
+ Hits         190139   190490     +351     
+ Misses        62146    61805     -341     
+ Partials      16051    16041      -10     

see 464 files with indirect coverage changes

@andrross
Copy link
Member

What exactly is the goal here? Currently we kick off precommit and check in parallel. This wastes computing resources in the case the precommit fails, but gives feedback to the submitter faster. With this model we'll have to wait for spotless and precommit to finish before starting check, which means a longer wait to know if the check will pass, right?

@owaiskazi19
Copy link
Member Author

owaiskazi19 commented Jun 22, 2023

What exactly is the goal here? Currently we kick off precommit and check in parallel. This wastes computing resources in the case the precommit fails, but gives feedback to the submitter faster. With this model we'll have to wait for spotless and precommit to finish before starting check, which means a longer wait to know if the check will pass, right?

The goal was to minimize running gradle check on jenkins if the build is failing in spotless check or precommit itself. But as you said and I also realized that this approach will increase the time for any PR as this flow is sequential. I am fine closing this up.

@andrross
Copy link
Member

One other thing, I've noticed that windows precommit can be a bit flaky and I would hate to have failures there gate the regular gradle check, which I think is the case with this proposed change. Unless we really need to reduce load on the CI infrastructure I think I'm not in favor of this change.

One observation though, assuming that precommit is a strict subset of check, then maybe we could skip running precommit on ubuntu since the full check is run on ubuntu? Then we wouldn't actually be duplicating any steps since we'd do precommit on Mac and Windows and then the full check on Ubuntu.

@owaiskazi19
Copy link
Member Author

One other thing, I've noticed that windows precommit can be a bit flaky

+1 to this.

maybe we could skip running precommit on ubuntu since the full check is run on ubuntu?

but still check will run after precommit of Windows & Mac which will again be sequential and take more time than the current setup.

@andrross
Copy link
Member

but still check will run after precommit of Windows & Mac which will again be sequential and take more time than the current setup.

@owaiskazi19 The behavior today is that the following workflows are kicked off concurrently:

  • precommt (ubuntu)
  • precommit (windows)
  • precommit (mac)
  • check (ubuntu)

Is that right? Assuming so, I'm suggesting we change it to:

  • precommit (windows)
  • precommit (mac)
  • check (ubuntu)

because the ubuntu precommit is redundant.

@owaiskazi19
Copy link
Member Author

Sure, I can do that @andrross! This PR targeted about adding a dependency on check unless precommit runs fully. It's fair to assume we don't want that design because of the long sequential time for check on every PR.

@owaiskazi19 owaiskazi19 force-pushed the run-precommit-before branch from 1023eb9 to 1909997 Compare June 27, 2023 17:31
@owaiskazi19 owaiskazi19 changed the title Run precommit before gradle check Removed redundant ubuntu precommit check Jun 27, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@owaiskazi19 owaiskazi19 force-pushed the run-precommit-before branch from 1909997 to 9294d95 Compare June 27, 2023 19:10
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testNodeDropWithOngoingReplication

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
@owaiskazi19 owaiskazi19 marked this pull request as ready for review June 27, 2023 20:13
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testNodeDropWithOngoingReplication
      1 org.opensearch.indices.replication.SegmentReplicationRelocationIT.testPrimaryRelocation

@owaiskazi19 owaiskazi19 requested a review from andrross June 27, 2023 22:52
@owaiskazi19 owaiskazi19 added the backport 2.x Backport to 2.x branch label Jun 27, 2023
@owaiskazi19 owaiskazi19 merged commit 4c02dd1 into opensearch-project:main Jun 27, 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-8207-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4c02dd185c3033c6fabf0c52b8b39a019d324ca4
# Push it to GitHub
git push --set-upstream origin backport/backport-8207-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-8207-to-2.x.

@owaiskazi19
Copy link
Member Author

We are running precommit on only ubuntu on 2.x.

baba-devv pushed a commit to baba-devv/OpenSearch that referenced this pull request Jul 29, 2023
* Run precommit before gradle check

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Removed redundant precommit for ubuntu

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Addressed PR comment

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
* Run precommit before gradle check

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Removed redundant precommit for ubuntu

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

* Addressed PR comment

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
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