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 2.17.0 in main branch #15053

Merged
merged 2 commits into from
Aug 2, 2024
Merged

Conversation

bowenlan-amzn
Copy link
Member

@bowenlan-amzn bowenlan-amzn commented Jul 31, 2024

Description

Add 2.17.0 in main branch

Related Issues

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

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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: bowenlan-amzn <bowenlan23@gmail.com>
@prudhvigodithi
Copy link
Contributor

LGTM thanks @bowenlan-amzn.

Copy link
Contributor

❌ Gradle check result for 8d41db9: 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?

Copy link
Contributor

github-actions bot commented Aug 1, 2024

❌ Gradle check result for 8d41db9: 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?

Copy link
Contributor

github-actions bot commented Aug 1, 2024

❌ Gradle check result for 8d41db9: 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?

Copy link
Contributor

github-actions bot commented Aug 1, 2024

❌ Gradle check result for 8d41db9: 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?

@bowenlan-amzn
Copy link
Member Author

bowenlan-amzn commented Aug 1, 2024

Gradle is hitting this logic when checkout 2.x branch to build bwc distribution.

Jenkins gradle check uses bwc.checkout.align which will checkout the commit on 2.x branch that is before the last commit in this PR. And the time unfortunately is before my 2.x commit for 2.17 version, so it's using an old commit to build 2.x.

/**
* We use a time based approach to make the bwc versions built deterministic and compatible with the current hash.
* Most of the time we want to test against latest, but when running delayed exhaustive tests or wanting
* reproducible builds we want this to be deterministic by using a hash that was the latest when the current
* commit was made.
* <p>
* This approach doesn't work with merge commits as these can introduce commits in the chronological order
* after the fact e.x. a merge done today can add commits dated with yesterday so the result will no longer be
* deterministic.
* <p>
* We don't use merge commits, but for additional safety we check that no such commits exist in the time period
* we are interested in.
* <p>
* Timestamps are at seconds resolution. rev-parse --before and --after are inclusive w.r.t the second
* passed as input. This means the results might not be deterministic in the current second, but this
* should not matter in practice.
*/
private String maybeAlignedRefSpec(Logger logger, String defaultRefSpec) {
if (providerFactory.systemProperty("bwc.checkout.align").isPresent() == false) {
return defaultRefSpec;
}
String timeOfCurrent = execInCheckoutDir(execSpec -> {
execSpec.commandLine(asList("git", "show", "--no-patch", "--no-notes", "--pretty='%cD'"));
execSpec.workingDir(project.getRootDir());
});
logger.lifecycle("Commit date of current: {}", timeOfCurrent);
String mergeCommits = execInCheckoutDir(
spec -> spec.commandLine(asList("git", "rev-list", defaultRefSpec, "--after", timeOfCurrent, "--merges"))
);
if (mergeCommits.isEmpty() == false) {
throw new IllegalStateException("Found the following merge commits which prevent determining bwc commits: " + mergeCommits);
}
return execInCheckoutDir(
spec -> spec.commandLine(asList("git", "rev-list", defaultRefSpec, "-n", "1", "--before", timeOfCurrent, "--date-order"))
);
}

@reta
Copy link
Collaborator

reta commented Aug 1, 2024

@bowenlan-amzn yes, it seems like the wrong commit is picked:

Commit date of current: 'Wed, 31 Jul 2024 16:01:25 -0700'
Performing checkout of opensearch-project/2.x...
Checkout hash for :distribution:bwc:minor is cc86e275030eb61da451cc9e5af3885b4e7d99c8
```

Copy link
Contributor

github-actions bot commented Aug 1, 2024

❌ Gradle check result for a824df2: 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?

@bowenlan-amzn
Copy link
Member Author

❌ Gradle check result for a824df2: 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?

This is a new flaky test added in #14795
@sumitasr please check

Copy link
Contributor

github-actions bot commented Aug 1, 2024

❌ Gradle check result for a824df2:

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?

@bowenlan-amzn
Copy link
Member Author

@github-actions commented on Aug 1, 2024, 4:56 PM PDT:

❌ Gradle check result for a824df2:

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?

#8131

Copy link
Contributor

github-actions bot commented Aug 2, 2024

❌ Gradle check result for a824df2: 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?

@bowenlan-amzn
Copy link
Member Author

@github-actions commented on Aug 1, 2024, 5:38 PM PDT:

❌ Gradle check result for a824df2: 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?

we are even seeing 2 flaky tests now

Copy link
Contributor

github-actions bot commented Aug 2, 2024

❌ Gradle check result for a824df2: 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?

Copy link
Contributor

github-actions bot commented Aug 2, 2024

✅ Gradle check result for a824df2: SUCCESS

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.83%. Comparing base (67a2e4c) to head (a824df2).

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #15053      +/-   ##
============================================
- Coverage     71.93%   71.83%   -0.10%     
+ Complexity    62900    62805      -95     
============================================
  Files          5169     5169              
  Lines        294645   294646       +1     
  Branches      42610    42610              
============================================
- Hits         211957   211670     -287     
- Misses        65296    65594     +298     
+ Partials      17392    17382      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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