Skip to content

Fix precommit check failures with missingJavadoc task #449

Closed
@setiah

Description

Describe the bug
The missingJavadoc task in javadoc branch currently works well when run on its own (i.e. ./gradlew missingJavadoc) but fails the precommit checks due to some wrangled gradle build logic. This can be reproduced by running ./gradlew precommit on javadoc branch. The validateNebulaPom task, which is part of precommit checks, fails because it looks for pom file in the wrong location (build/publications/nebula/pom-default.xml) when the actual pom file is generated in the path configured here (e.g. for benchmarks modulebuild/distributions/opensearch-benchmarks-7.10.3-SNAPSHOT.pom). On removing this line, the precommit logic seems to work fine. Somehow, applying missingJavadoc script plugin here is causing the PomValidation task to read pom from default location instead of overridden location.

To Reproduce
Steps to reproduce the behavior:

  1. Sync remote javadoc branch
  2. Run ./gradlew precommit. It should fail in PomValidation
  3. Comment this line.
  4. Run step 2 again. It should pass now.

Expected behavior
precommit task should work fine with missingJavadoc gradle task.

Host/Environment (please complete the following information):

  • OS: iOS
  • Version: 10.14.6

Logs

➜  search git:(javadoc) ./gradlew precommit

> Configure project :
========================= WARNING =========================
         Backwards compatibility tests are disabled!
See https://github.com/opensearch-project/OpenSearch/issues/105
===========================================================

> Configure project :qa:os
Cannot add task 'destructiveDistroTest.docker' as a task with that name already exists.
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 6.6.1
  OS Info               : Mac OS X 10.14.6 (x86_64)
  JDK Version           : 14 (OpenJDK)
  JAVA_HOME             : /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home
  Random Testing Seed   : C2BC3255C3EA0731
  In FIPS 140 mode      : false
=======================================

> Task :benchmarks:validateNebulaPom FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':benchmarks:validateNebulaPom' (type 'PomValidationTask').
> File '/Users/setiah/projects/odfe/search/benchmarks/build/publications/nebula/pom-default.xml' specified for property 'pomFile' does not exist.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions