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

HOTFIX: fix incompatible types: Optional<TimestampAndOffset> cannot be converted to Option<TimestampAndOffset> #18284

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

FrankYang0529
Copy link
Member

@FrankYang0529 FrankYang0529 commented Dec 20, 2024

The error was introduced by 220c578.

Run ./gradlew build -x test or ./gradlew checkstyleMain checkstyleTest spotlessCheck on trunk and will get following error:

> Configure project :
Starting build with version 4.1.0-SNAPSHOT (commit id e8863c9e) using Gradle 8.10.2, Java 21 and Scala 2.13.15
Build properties: ignoreFailures=false, maxParallelForks=12, maxScalacThreads=8, maxTestRetries=0

> Task :share-coordinator:processMessages
MessageGenerator: processed 4 Kafka message JSON files(s).

> Task :raft:processMessages
MessageGenerator: processed 1 Kafka message JSON files(s).

> Task :storage:processMessages
MessageGenerator: processed 5 Kafka message JSON files(s).

> Task :transaction-coordinator:processMessages
MessageGenerator: processed 2 Kafka message JSON files(s).

> Task :metadata:processMessages
MessageGenerator: processed 25 Kafka message JSON files(s).

> Task :group-coordinator:processMessages
MessageGenerator: processed 48 Kafka message JSON files(s).

> Task :clients:processMessages
MessageGenerator: processed 190 Kafka message JSON files(s).

> Task :clients:processTestMessages
MessageGenerator: processed 4 Kafka message JSON files(s).

> Task :clients:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :core:compileScala
[Error] /Users/poanyang/Project/apache/kafka/core/src/main/java/kafka/server/share/ShareFetchUtils.java:171:  error: incompatible types: Optional<TimestampAndOffset> cannot be converted to Option<TimestampAndOffset>
javac exited with exit code 1

> Task :core:compileScala FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:compileScala'.
> javac returned non-zero exit code

* Try:
> Run with --info option to get more log output.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 19s
328 actionable tasks: 39 executed, 289 up-to-date

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

…e converted to Option<TimestampAndOffset>

Signed-off-by: PoAn Yang <[email protected]>
@github-actions github-actions bot added core Kafka Broker KIP-932 Queues for Kafka small Small PRs labels Dec 20, 2024
@m1a2st
Copy link
Contributor

m1a2st commented Dec 20, 2024

Hello @mumrah, It seen our CI are missing some check, Should we open a Jira to add a step for ./gradlew checkstyleMain checkstyleTest spotlessCheck.

Copy link
Contributor

@clolov clolov 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 the quick turnaround! The moment the build passes I will merge it

@mumrah
Copy link
Member

mumrah commented Dec 20, 2024

@m1a2st / @clolov / @FrankYang0529 It looks like #18100 was not up to date with trunk before it was merged.

On trunk, 220c578 builds just fine. On 18100, the last commit 435c336 (after merging trunk) also builds fine, however this commit was from a week ago. Even though there was a breaking change on trunk, it was not noticed by Git because it conflicted in a more subtle way than just the diff.

Since we build the contents of the PR, and not the contents of trunk + PR, errors like this can occur. To avoid it, just be sure to get a green build with a recent trunk before merging. This is a problem we are hoping to solve with the merge queue once it becomes available.

@mumrah
Copy link
Member

mumrah commented Dec 20, 2024

@m1a2st we can see here that the trunk CI job is failing as expected

https://github.com/apache/kafka/actions/runs/12430932187

@m1a2st
Copy link
Contributor

m1a2st commented Dec 20, 2024

Thank @mumrah for your explanation!

@clolov
Copy link
Contributor

clolov commented Dec 20, 2024

The latest build succeeded, so proceeding to merge

@clolov clolov merged commit 748ad6a into apache:trunk Dec 20, 2024
9 checks passed
@FrankYang0529 FrankYang0529 deleted the hotfix-sharefetchutils branch December 20, 2024 14:57
ijuma added a commit to ijuma/kafka that referenced this pull request Dec 20, 2024
…e-old-protocol-versions

* apache-github/trunk:
  KAFKA-18312: Added entityType: topicName to SubscribedTopicNames in ShareGroupHeartbeatRequest.json (apache#18285)
  HOTFIX: fix incompatible types: Optional<TimestampAndOffset> cannot be converted to Option<TimestampAndOffset> (apache#18284)
  MINOR Fix some test-catalog issues (apache#18272)
  KAFKA-18180: Move OffsetResultHolder to storage module (apache#18100)
  KAFKA-18301; Make coordinator records first class citizen (apache#18261)
  KAFKA-18262 Remove DefaultPartitioner and UniformStickyPartitioner (apache#18204)
  KAFKA-18296 Remove deprecated KafkaBasedLog constructor (apache#18257)
  KAFKA-12829: Remove old Processor and ProcessorSupplier interfaces (apache#18238)
  KAFKA-18292 Remove deprecated methods of UpdateFeaturesOptions (apache#18245)
  KAFKA-12829: Remove deprecated Topology#addProcessor of old Processor API (apache#18154)
  KAFKA-18035, KAFKA-18306, KAFKA-18092: Address TransactionsTest flaky tests (apache#18264)
  MINOR: change the default linger time in the new coordinator (apache#18274)
  KAFKA-18305: validate controller.listener.names is not in inter.broker.listener.name for kcontrollers (apache#18222)
  KAFKA-18207: Serde for handling transaction records (apache#18136)
  KAFKA-13722: Refactor Kafka Streams store interfaces (apache#18243)
  KAFKA-17131: Refactor TimeDefinitions (apache#18241)
  MINOR: Fix MessageFormatters (apache#18266)
  Mark flaky tests for Dec 18, 2024 (apache#18263)
tedyu pushed a commit to tedyu/kafka that referenced this pull request Jan 6, 2025
…e converted to Option<TimestampAndOffset> (apache#18284)

Signed-off-by: PoAn Yang <[email protected]>

Reviewers: Christo Lolov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Kafka Broker KIP-932 Queues for Kafka small Small PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants