Skip to content

Prepare MockHelixAdmin for Helix disabled-type removal - #3306

Draft
sjainit wants to merge 1 commit into
linkedin:masterfrom
sjainit:sarjain/helix-disabled-type-migration
Draft

sjainit wants to merge 1 commit into
linkedin:masterfrom
sjainit:sarjain/helix-disabled-type-migration

Conversation

@sjainit

@sjainit sjainit commented Oct 13, 2026

Copy link
Copy Markdown

Summary

Prepare the test MockHelixAdmin for the API removal in linkedin/helix#258:

  • Remove the no-op enableInstance(..., InstanceDisabledType, reason) override because the parameter enum and interface method are removed together.
  • Drop @Override from the existing setInstanceZoneId and getBatchDisabledInstances stubs, whose interface methods are also absent from the candidate. Their existing exception behavior is unchanged.

Draft / dependency gate: this source migration must land together with a dependency upgrade to a published Helix release containing linkedin/helix#258. The current helixVersion = "1.4.1:jdk8" is unchanged and still requires the abstract typed overload, so this draft is not compatible with the current dependency pin. Do not merge it as a standalone source cleanup. No released replacement version has been selected, and the local snapshot used below is not a published release.

Durability risk: test-only mock changes; no production write path, blob metadata, wire/storage schema, retry, callback or resource-lifecycle behavior changes. Existing stubs retain their behavior. The eventual Helix dependency upgrade requires its own runtime compatibility review and validation before this draft is made ready.

Testing Done

  • Local code review completed
  • Candidate validation on October 13, 2026 used JDK 11 and Maven-installed 1.6.41-SNAPSHOT artifacts built from the actual Remove deprecated instance HELIX_DISABLED_TYPE; preserve legacy REST enablement helix#258 implementation (108a176c1bbcef6229e2fe7cd17fe1b9e075601f; the later 12f168335 follow-up adds only ownership tests).
  • The local-only candidate.init.gradle overrides org.apache.helix core/common/ZK/metadata-store/metrics modules to that snapshot. It is outside this PR; this validates the candidate API, not the unchanged checked-in dependency.
./gradlew --no-daemon --console=plain -PdisableShipkit -I ../candidate.init.gradle \
  :ambry-clustermap:test \
  --tests com.github.ambry.clustermap.InstanceConfigToDataNodeConfigAdapterTest \
  --tests com.github.ambry.clustermap.PropertyStoreCleanUpTaskTest

Result: BUILD SUCCESSFUL; 5 tests passed, 0 failed, 0 skipped, including compilation of the migrated mock. The unchanged final source and override were rechecked successfully. No new test behavior or assertions were introduced. The full suite and validation against a future published release were not run.

Reproduction requires installing the candidate artifacts first, then using this external Gradle init override:

allprojects {
    configurations.configureEach {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'org.apache.helix' &&
                    details.requested.name in ['helix-core', 'helix-common', 'zookeeper-api',
                                               'metadata-store-directory-common', 'metrics-common']) {
                details.useVersion('1.6.41-SNAPSHOT')
                details.because('Local validation of linkedin/helix#258; not a published release')
            }
        }
    }
}

🤖 Generated with GitHub Copilot CLI

Remove the typed mock overload for linkedin/helix#258 and drop two
invalid override annotations for already-retired Helix methods.

Keep this source migration in draft until the dependency is upgraded
to a published Helix release containing the removal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant