Skip to content

[AUTOCUT] Distribution Build Failed for sql-3.9.0 #5775

Closed

Description

@opensearch-ci-bot

Build Failed Error: sql failed during the distribution build for version: 3.9.0.
Please see build log at https://build.ci.opensearch.org/job/distribution-build-opensearch/12212/display/redirect.
The failed build stage will be marked as unstable ⚠️ . Please see ./build.sh step for more details.
Checkout the wiki to reproduce the failure locally.

Activity

  1. ahkcs commented on Sep 15, 2026

    @ahkcs
    Collaborator
  2. ryan-gh-bot commented on Sep 15, 2026

    @ryan-gh-bot
    Contributor

    Working on /@triage (invoked by @ahkcs) — posting result when done.

  3. ryan-gh-bot commented on Sep 15, 2026

    @ryan-gh-bot
    Contributor

    [RCA] AUTOCUT is spurious — sql plugin was actually built and included in distribution build 12212

    The sql plugin zip is present in every platform artifact directory for build 12212 at commit ac0fb4c04, the built distribution manifest lists it, and no build-relevant files changed in sql since the previous successful build 12193. The AUTOCUT is a false positive triggered by the way updateBuildFailureIssues.groovy classifies a component: any per-platform stage that emits Error building sql in its log marks sql as failed regardless of whether a subsequent retry succeeded. Only the Windows Docker stage in the distribution-build Jenkinsfile is wrapped in retry(3), so a transient Windows failure would produce exactly this pattern — a "failed" record plus a "passed" record for the same component in the same build.

    Environment

    • Tenant: sql (opensearch-project/sql)
    • Refs checked:
      • upstream/main @ c75d3bbd6 (current tip, includes the commits merged after the failing build)
      • upstream/main @ ac0fb4c04 (commit built by distribution build 12212, per the build manifest)
      • upstream/main @ be527b55b (last known-good sql commit — closed #5761 via build 12193)
      • opensearch-project/opensearch-build @ 7e938b903 (main; where the retry-only-on-Windows stage lives)
      • opensearch-project/opensearch-build-libraries @ f76db2326 (main; where the AUTOCUT trigger lives)
    • External artifacts fetched from ci.opensearch.org, raw.githubusercontent.com, and api.github.com (all on the tenant's allowlist): distribution build & dist manifests for builds 12212 and 12193 (linux tar), the sql plugin zips for all seven platforms of build 12212, the plugin descriptor from opensearch-sql-3.9.0.0.zip, and the AUTOCUT groovy sources.
    • build.ci.opensearch.org/job/distribution-build-opensearch/12212/consoleText is not readable without Jenkins auth (403), so the raw pipeline log was not fetched; the analysis is inferred from the metric-emitter code plus the artifacts on ci.opensearch.org.

    Suspected location

    There is no fix required in this repo. The false positive originates in the shared library and pipeline that decide when to open a Distribution Build Failed issue:

    Analysis

    1. The AUTOCUT template quoted in this issue (***Build Failed Error***: **sql failed during the distribution build for version: 3.9.0.**) is produced by updateBuildFailureIssues.groovy. That library reads two lists — failedComponents and passedComponents — from the opensearch-distribution-build-results metrics index. The lists are populated by publishDistributionBuildResults.groovy, which extracts component names from log messages using (?<=\bError building\s).* (failed) and (?<=\bSuccessfully built\s).* (passed). These log messages come from run_build.py's try/except around builder.build(). A component can appear in both lists in the same distribution build if any stage retries and eventually succeeds.
    2. In this repo, the distribution-build Jenkinsfile wraps only the Windows stage with retry(3). If Windows's first attempt to build sql failed transiently (for example the Maven-Central rate-limit I hit locally, or any other flaky network-dependent step during --refresh-dependencies), the Python builder would print Error building sql, retry with: .... The Jenkins retry(3) then re-runs the whole stage; on a subsequent success the same stage prints Successfully built sql. Both lines are captured by buildMessage(search: ...) and indexed.
    3. updateBuildFailureIssues.groovy then sees failedComponents = [..., 'sql', ...] and unconditionally creates/edits the AUTOCUT (if (failedComponents.contains(component.name))). The close branch further requires the absence of sql from failedComponents, so the issue is not auto-closed on the follow-up successful build unless every platform's log for that build is clean.
    4. The artifact evidence rules out an actual sql build failure in 12212. Every platform (linux/x64/tar+rpm+deb, linux/arm64/tar+rpm+deb, windows/x64/zip) has an opensearch-sql-3.9.0.0.zip of ~68 MB with a valid plugin descriptor at commit ac0fb4c04, each builds/opensearch/manifest.yml lists sql, and the assembled dist/opensearch/manifest.yml for linux/x64/tar includes sql alongside the other 28 components. The Windows plugin zip was uploaded at 2026-09-15 19:44:51 GMT, i.e. before the AUTOCUT fired at 20:09:09Z.
    5. The sql commits merged between builds 12193 and 12212 (be129ec8c, 8d684199e, 43b1af336, f64d4689e, 0f05d59a3, ac0fb4c04) do not touch build.gradle, plugin/build.gradle, the plugin descriptor, or scripts/build.sh; they only touch integ-tests and planner/type code that runs post-build, so there is no candidate change in this repo that could have made ./gradlew assemble fail deterministically.

    Evidence

    • Build manifest listing sql for build 12212 (linux/x64/tar), at commit ac0fb4c0478d:
      - name: sql
        repository: https://github.com/opensearch-project/sql.git
        ref: main
        commit_id: ac0fb4c0478db2ebdfecc2102d525da3fc38851f
        ...
        plugins:
          - plugins/opensearch-sql-3.9.0.0.zip
        version: 3.9.0.0
      
      Fetched from ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.9.0/12212/linux/x64/tar/builds/opensearch/manifest.yml.
    • Assembled dist manifest lists sql with a location: pointing at the same zip URL (ci.opensearch.org/.../plugins/opensearch-sql-3.9.0.0.zip). Both 12212 and 12193 dist manifests have 29 components.
    • HEAD checks against .../12212/<platform>/builds/opensearch/plugins/opensearch-sql-3.9.0.0.zip return HTTP 200 with content-length: 67998063–67998426 and last-modified timestamps 19:19–19:54 GMT on 2026-09-15, for all seven platforms.
    • Descriptor inside the built zip:
      description=OpenSearch SQL
      version=3.9.0.0
      name=opensearch-sql
      classname=org.opensearch.sql.plugin.SQLPlugin
      java.version=21
      opensearch.version=3.9.0
      extended.plugins=opensearch-job-scheduler,analytics-engine;optional=true
      has.native.controller=false
      
      All fields satisfy BuildArtifactOpenSearchCheckPlugin.check (version and opensearch.version are in the target's compatible sets).
    • Regression check between last-passing and current builds:
      $ git log --oneline be527b55b..ac0fb4c04
      ac0fb4c04 test(integ-test): stabilize deterministic fixtures across shards (#5730)
      0f05d59a3 Fix code-coverage action (#5763)
      f64d4689e test(integ-test): stabilize stream-order commands across shards (#5729)
      43b1af336 Enable index pruning by default (#5759)
      8d684199e Type a nested field access as the field's type, not the whole row (#5764)
      be129ec8c Map Calcite ROW to STRUCT in convertSqlTypeNameToExprType (#5737)
      $ git log be527b55b..ac0fb4c04 -- build.gradle plugin/build.gradle plugin/src scripts/build.sh
      # empty — none of those commits touched the build/publish path
      
    • The regex used by the metric emitter and its consequence for retried stages:
      List<String> failedComponents = extractComponents(failureMessages, /(?<=\bError building\s).*/, 0)
      List<String> passedComponents = extractComponents(passMessages,   /(?<=\bSuccessfully built\s).*/, 0)
      ...
      if (failedComponents.contains(component.name)) { createGithubIssue(...) }
      if (passedComponents.contains(component.name) && !failedComponents.contains(component.name)) { closeGithubIssue(...) }
    • Live verification not performed for the plugin build itself: an attempt at ./gradlew :opensearch-sql-plugin:assemble -DskipTests=true -Dbuild.snapshot=true from this workdir was blocked by an HTTP 429 from Maven Central (Received status code 429 from server: Too Many Requests on org.opensearch.gradle:build-tools:3.9.0-SNAPSHOT), which is itself the shape of transient dependency-resolution failure that the Windows retry(3) block is designed to paper over. The rest of the analysis rests on the artifact/log-emitter evidence above.

    Confidence: Medium

    Two independent signals — the S3 artifacts for build 12212 (sql present in every platform's build manifest and in the dist manifest) and the code-level explanation of how the AUTOCUT emitter can double-count a retried stage — support the "false positive" hypothesis. Full escalation would require reading the Jenkins console for build 12212 to confirm which platform emitted Error building sql; that log is behind auth (403). Live reproduction was blocked by a Maven Central 429.

    Next steps

    • Close [AUTOCUT] Distribution Build Failed for sql-3.9.0 #5775 manually. The next distribution build in which sql produces no Error building sql on any stage will auto-close it via updateBuildFailureIssues.groovy, but that will only happen if none of the (Windows-retried) stages hits a transient failure again.
    • No code change is needed in opensearch-project/sql. Do not merge a "fix" here for this AUTOCUT.
    • Unverified suggestion (belongs upstream in opensearch-project/opensearch-build-libraries): teach updateBuildFailureIssues.groovy to treat passedComponents.contains(name) as authoritative on retried stages — either by exempting components from the create branch when they also appear in passedComponents, or by having publishDistributionBuildResults.groovy de-duplicate per (component, platform) and only record the final status of each retried stage. Filing this as an opensearch-build issue would prevent future spurious sql AUTOCUTs.
    • Unverified suggestion: if these false positives recur, the maintainer can request a /reproduce of the actual plugin install (bin/opensearch-plugin install file://.../opensearch-sql-3.9.0.0.zip on a fresh min distribution) — that step is what would actually surface any latent problem with the shipped zip, and it is independent of the metric-emitter path.

    Automated response from @ryan-gh-bot (maintainer-triggered agent). About this agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions