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 suspicious call of getClass() on instance of Class, which erased type info #16002

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

dk2k
Copy link
Contributor

@dk2k dk2k commented Sep 19, 2024

Added unit test.
Previous PR was prematurely closed #15367 without letting me react upon the comment.

Copy link
Contributor

❌ Gradle check result for 10a87e2: 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 Sep 24, 2024

getName looks much better, thanks for doing this and for fixing the comment typo.

Copy link
Contributor

❌ Gradle check result for 10a87e2: 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

@sandeshkr419 sandeshkr419 left a comment

Choose a reason for hiding this comment

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

Thanks for adding test-case as well for these changes. LGTM!

Copy link
Contributor

❌ Gradle check result for 10a87e2: 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 Sep 26, 2024

Odd failure

* What went wrong:
Execution failed for task ':libs:opensearch-core:licenseHeaders'.
> License header problems were found! Full details: /var/jenkins/workspace/gradle-check/search/libs/core/build/reports/licenseHeaders/rat.log

Rebase?

Copy link
Contributor

❌ Gradle check result for f7b722f: null

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

❌ Gradle check result for f7b722f: 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 Sep 30, 2024

I am not sure what's going on, but the license header check doesn't happen elsewhere, so something is off in this PR. Rebase it instead of merging from main and force push an update?

@dk2k
Copy link
Contributor Author

dk2k commented Oct 2, 2024

I rebased

Copy link
Contributor

github-actions bot commented Oct 2, 2024

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

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

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
Copy link
Contributor

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

Signed-off-by: Daniel Widdis <widdis@gmail.com>
@dbwiddis
Copy link
Member

Odd failure

* What went wrong:
Execution failed for task ':libs:opensearch-core:licenseHeaders'.
> License header problems were found! Full details: /var/jenkins/workspace/gradle-check/search/libs/core/build/reports/licenseHeaders/rat.log

Rebase?

Checked out the PR, rebased and still failing precommit.

Ran locally to generate that log. The new test class had no license headers.

Copy link
Contributor

❌ Gradle check result for 4142a28: 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

✅ Gradle check result for 4142a28: SUCCESS

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.06%. Comparing base (dc8a435) to head (4142a28).
Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16002      +/-   ##
============================================
+ Coverage     71.96%   72.06%   +0.10%     
- Complexity    64791    64849      +58     
============================================
  Files          5307     5307              
  Lines        302714   302725      +11     
  Branches      43733    43734       +1     
============================================
+ Hits         217836   218172     +336     
+ Misses        67013    66689     -324     
+ Partials      17865    17864       -1     

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

@dbwiddis dbwiddis merged commit 4456d55 into opensearch-project:main Oct 18, 2024
38 checks passed
@dbwiddis dbwiddis added the backport 2.x Backport to 2.x branch label Oct 18, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 18, 2024
…sed type info (#16002)

* Removed suspicious getClass() call on Class

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>

* Changed the exception's message. Added unit test.

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>

* Run spotless, add license header

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Co-authored-by: Daniel Widdis <widdis@gmail.com>
(cherry picked from commit 4456d55)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dbwiddis added a commit that referenced this pull request Oct 18, 2024
…sed type info (#16002) (#16371)

* Removed suspicious getClass() call on Class



* Changed the exception's message. Added unit test.



* Run spotless, add license header



---------




(cherry picked from commit 4456d55)

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Daniel Widdis <widdis@gmail.com>
dk2k added a commit to dk2k/OpenSearch that referenced this pull request Oct 21, 2024
…sed type info (opensearch-project#16002)

* Removed suspicious getClass() call on Class

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>

* Changed the exception's message. Added unit test.

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>

* Run spotless, add license header

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Co-authored-by: Daniel Widdis <widdis@gmail.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.

5 participants