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

[BUG] Builds failing due to compile-time errors introduced in RemoteClusterRepository.kt for Repository class #1436

Closed
aggarwalShivani opened this issue Sep 2, 2024 · 2 comments
Labels
bug Something isn't working untriaged

Comments

@aggarwalShivani
Copy link

What is the bug?
CCR gradle builds are failing with the below mentioned error since yesterday.

 ./gradlew assemble
Starting a Gradle Daemon (subsequent builds will be faster)
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.4
  OS Info               : Linux 5.15.153.1-microsoft-standard-WSL2 (amd64)
  JDK Version           : 11 (Ubuntu JDK)
  JAVA_HOME             : /usr/lib/jvm/java-11-openjdk-amd64
  Random Testing Seed   : 5C3DD7AD5EFF1789
  In FIPS 140 mode      : false
=======================================

> Task :compileKotlin FAILED
e: file:///path/CCR/opensearch-project-cross-cluster-replication/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt:83:1 Class 'RemoteClusterRepository' is not abstract and does not implement abstract member public abstract fun finalizeSnapshot(p0: ShardGenerations!, p1: Long, p2: Metadata!, p3: SnapshotInfo!, p4: Version!, p5: Function<ClusterState!, ClusterState!>!, p6: Priority!, p7: ActionListener<RepositoryData!>!): Unit defined in org.opensearch.repositories.Repository
e: file:///path/CCR/opensearch-project-cross-cluster-replication/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt:125:5 'finalizeSnapshot' overrides nothing

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

Details:
Branch: main, Platform: linux

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Clone the latest project [email protected]:opensearch-project/cross-cluster-replication.git
  2. Run gradle assemble
    ./gradlew assemble

Do you have any additional context?
This issue is seen since this PR #15124 is merged in Opensearch repo 5d ago. The finalizeSnapshot method of the class Repository.java has an additional new argument Priority which needs to be passed while invoking this function.
In CCR, the RemoteClusterRepository.kt class overrides the finalizeSnapshot method and this now needs to be updated to add Priority field too.

I locally made this one change and it resolved the gradle build issue.

@aggarwalShivani aggarwalShivani added bug Something isn't working untriaged labels Sep 2, 2024
@nisgoel-amazon
Copy link
Contributor

#1438
This will fix this issue

@ankitkala
Copy link
Member

The build is running fine now. Feel free to reopen if you encounter any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

3 participants