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

XWIKI-21809: ClassCastException in DefaultEventConverterManager on a cluster environment #2929

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

surli
Copy link
Member

@surli surli commented Feb 26, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-21809

Changes

Description

Some task output is Optional and we never want the Optional in the notification data: we do want what the Optional contains.
This PR provides a test to expose the bug and a naive fix.

Clarifications

I've not been able to provide a better fix as it would involve breaking APIs to not return Optional. On the long run I'm not sure it was really necessary to have Optional for the APIs here: it's basically only used to support backward compatibility with the legacy store AFAICS, so the Optional is never empty with the new store...

Executed Tests

mvn clean install -Pquality on xwiki-platform-eventstream

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • 15.10.x
    • 14.10.x (?)

…cluster environment

  * Some task output is Optional and we never want the Optional in the
    notification data: we do want what the Optional contains.
@surli surli requested a review from tmortagne February 26, 2024 10:02
@surli surli added backport stable-15.10.x Used for automatic backport to 15.10.x branch. backport stable-14.10.x labels Feb 26, 2024
…cluster environment

  * Prevent entirely notification to be sent if output is Optional and
    return is empty
@surli surli requested a review from tmortagne February 27, 2024 08:18
@surli surli merged commit e877bcc into master Feb 27, 2024
1 check passed
@surli surli deleted the XWIKI-21809 branch February 27, 2024 09:48
github-actions bot pushed a commit that referenced this pull request Feb 27, 2024
…cluster environment (#2929)

  * Some task output is Optional and we never want the Optional in the
    notification data: we do want what the Optional contains.
  * Prevent entirely notification to be sent if output is Optional and
    return is empty

(cherry picked from commit e877bcc)
github-actions bot pushed a commit that referenced this pull request Feb 27, 2024
…cluster environment (#2929)

  * Some task output is Optional and we never want the Optional in the
    notification data: we do want what the Optional contains.
  * Prevent entirely notification to be sent if output is Optional and
    return is empty

(cherry picked from commit e877bcc)
surli added a commit that referenced this pull request Feb 27, 2024
…cluster environment (#2929)

  * Some task output is Optional and we never want the Optional in the
    notification data: we do want what the Optional contains.
  * Prevent entirely notification to be sent if output is Optional and
    return is empty

(cherry picked from commit e877bcc)
surli added a commit that referenced this pull request Feb 27, 2024
…cluster environment (#2929)

  * Some task output is Optional and we never want the Optional in the
    notification data: we do want what the Optional contains.
  * Prevent entirely notification to be sent if output is Optional and
    return is empty

(cherry picked from commit e877bcc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable-14.10.x backport stable-15.10.x Used for automatic backport to 15.10.x branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants