Skip to content

Removed suspicious call of getClass() on instance of Class, which erased type info#16002

Merged
dbwiddis merged 3 commits intoopensearch-project:mainfrom
dk2k:dk_rmv_get_class
Oct 18, 2024
Merged

Removed suspicious call of getClass() on instance of Class, which erased type info#16002
dbwiddis merged 3 commits intoopensearch-project:mainfrom
dk2k:dk_rmv_get_class

Conversation

@dk2k
Copy link
Copy Markdown
Contributor

@dk2k dk2k commented Sep 19, 2024

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

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
Member

dblock commented Sep 24, 2024

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

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
Member

@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!

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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?

@github-actions
Copy link
Copy Markdown
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?

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

dk2k commented Oct 2, 2024

I rebased

@github-actions
Copy link
Copy Markdown
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?

@github-actions
Copy link
Copy Markdown
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?

dk2k added 2 commits October 17, 2024 12:15
Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown
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?

@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for 4142a28: SUCCESS

@codecov
Copy link
Copy Markdown

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
@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>
akolarkunnu pushed a commit to akolarkunnu/OpenSearch that referenced this pull request Jan 21, 2025
…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