Skip to content

test: DNR for iceberg test#26909

Closed
hantangwangd wants to merge 1 commit intoprestodb:masterfrom
hantangwangd:for_iceberg_test
Closed

test: DNR for iceberg test#26909
hantangwangd wants to merge 1 commit intoprestodb:masterfrom
hantangwangd:for_iceberg_test

Conversation

@hantangwangd
Copy link
Member

Description

Just for test.

Motivation and Context

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).

Release Notes

== NO RELEASE NOTE ==

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 6, 2026

Reviewer's Guide

Updates Iceberg REST catalog test infrastructure and dependencies to support OAuth2 token exchange while bumping Iceberg/Parquet/Avro versions and adjusting Parquet writer APIs, plus minor dependency wiring changes for Iceberg and native execution modules.

Flow diagram for dependency version alignment across modules

flowchart TB
    ROOT_VERSIONS[Root pom.xml
    dep.iceberg.version=1.10.0
    dep.parquet.version=1.16.0
    dep.avro.version=1.12.0]

    ICEBERG_POM[presto-iceberg/pom.xml
    uses root properties
    adds parquet-hadoop
    adds aws-sdk kms runtime]

    NATIVE_POM[presto-native-execution/pom.xml
    uses root parquet version
    removes explicit parquet exclusions]

    ROOT_VERSIONS --> |propagate properties| ICEBERG_POM
    ROOT_VERSIONS --> |propagate properties| NATIVE_POM

    ICEBERG_POM --> |aligns Iceberg and Parquet/Avro versions
    for REST catalog tests and writers| ICEBERG_TESTS[Iceberg REST catalog tests]

    NATIVE_POM --> |aligns Parquet versions
    with Iceberg connector| NATIVE_ENGINE[Native execution engine]
Loading

File-Level Changes

Change Details Files
Enhance Iceberg REST catalog servlet to support OAuth2 token-exchange flows and expose captured token subjects for tests.
  • Add OAuth2 token-exchange constants and a synchronized list to capture token-exchange subjects for verification
  • Extend authorization handling to capture JWT subjects from specially-prefixed token-exchange tokens before running authorization checks
  • Introduce special handling of Route.TOKENS requests to perform token-exchange: read grant_type and subject_token from request body, and return a prefixed token via OAuthTokenResponse
  • Expose static helper methods to get and clear captured token-exchange subjects for use in tests
presto-iceberg/src/test/java/org/apache/iceberg/rest/IcebergRestCatalogServlet.java
Extend Iceberg REST distributed tests to cover OAuth2 token exchange and identity preservation.
  • Configure the Iceberg REST connector in the test query runner to use OAuth2 auth with a dummy client credential so the token-exchange flow is exercised
  • Add a new TestNG test that runs a simple query, gathers captured token-exchange subjects from the servlet, and asserts they are non-empty and equal to the expected user subject
presto-iceberg/src/test/java/com/facebook/presto/iceberg/rest/TestIcebergDistributedRest.java
Update Iceberg, Parquet, and Avro dependency versions and wire in new module dependencies needed by the updated stack.
  • Bump Iceberg dependency version for the presto-iceberg module from 1.8.1 to 1.10.0
  • Add parquet-hadoop dependency (with Hadoop and audience-annotations exclusions) to presto-iceberg to support new Parquet behavior
  • Add AWS SDK KMS runtime dependency to presto-iceberg, likely required by newer Iceberg features
  • Increase shared Parquet version from 1.13.1 to 1.16.0 and Avro from 1.11.4 to 1.12.0 in the root pom
presto-iceberg/pom.xml
pom.xml
Clean up native execution dependency exclusions to align with updated Parquet dependencies.
  • Remove repeated exclusions for parquet-column, parquet-common, and parquet-format-structures from presto-native-execution’s Presto dependencies since Parquet versioning is now controlled centrally
presto-native-execution/pom.xml
Adapt Iceberg distributed test base to the new Parquet GenericParquetWriter API.
  • Switch delete writers for position and equality deletes to use GenericParquetWriter::create instead of the deprecated ::buildWriter factory method when constructing Parquet delete writers
presto-iceberg/src/test/java/com/facebook/presto/iceberg/IcebergDistributedTestBase.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@hantangwangd hantangwangd deleted the for_iceberg_test branch January 25, 2026 12:14
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