-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
WIP: Test Upcoming Iceberg and Nessie version bump #20308
Conversation
39f614a
to
bc1337a
Compare
I've raised a PR to your branch to address the REST Catalog test failures after the upgrade: ajantha-bhat#1 |
@@ -186,14 +186,6 @@ public void testDropTableWithMissingManifestListFile() | |||
.hasMessageContaining("Table location should not exist"); | |||
} | |||
|
|||
@Test | |||
@Override | |||
public void testDropTableWithMissingDataFile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing expectedly after the upgrade because we made the change to remove Puffin files as part of https://github.com/apache/iceberg/pull/9305/files . We used to expect this test to fail in this override because Puffin files would linger after the "DROP" and we have an assertion that validates that all files are removed so the test would fail. Now, this override is no longer needed, we expect the base testDropTableWithMissingDataFile to pass. So we can just remove the test override and rely on the base.
|
||
public final class RestCatalogTestUtils | ||
{ | ||
private RestCatalogTestUtils() {} | ||
|
||
static class TestingJdbcCatalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed since the upgraded 1.5 RestSessionCatalog will check if a view exists when performing a replace. This effectively means the underlying catalog being used must implement ViewCatalog otherwise the loadView call will fail since the response cannot be parsed.
To fix this, I'm implementing a TestingJdbcCatalog which implements ViewCatalog. We'll need this anyways in the REST View Catalog implementation PR. #19818
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it mean JdbcCatalog no longer can be used to back the REST catalog? or does it mean that JdbcCatalog no longer supports views?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JDBC Catalog didn't support views originally, which is why this change was required. However, we are aiming for JDBC View Catalog support in the 1.5 release in which case the changes between line 50-100 can go away, and this PR will be simpler. Here's the PR
a8c87c1
to
dbff5b0
Compare
pom.xml
Outdated
<repositories> | ||
<repository> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
<id>apache.snapshots</id> | ||
<name>Apache Development Snapshot Repository</name> | ||
<url>https://repository.apache.org/content/repositories/snapshots/</url> | ||
</repository> | ||
</repositories> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove this once 1.5 is actually released (just commenting so we don't forget :) ).
@@ -126,7 +128,11 @@ protected void commitToExistingTable(TableMetadata base, TableMetadata metadata) | |||
{ | |||
verify(version.orElseThrow() >= 0, "commitToExistingTable called on a new table"); | |||
try { | |||
nessieClient.commitTable(base, metadata, writeNewMetadata(metadata, version.getAsInt() + 1), table, toKey(new SchemaTableName(database, this.tableName))); | |||
if (table == null) { | |||
table = nessieClient.table(toIdentifier(new SchemaTableName(database, tableName))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be a newer version of the table than one we loaded base
from?
in fact, why table
can be null for commitToExistingTable
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in fact, why table can be null for commitToExistingTable
Good question. I found that it was null before this PR also. So, maybe some integration not done properly (from the beginning). I will take a look and handle it separately. I don't want to bloat this PR scope.
Plus I don't know why it is null for only replace table case. I need some time to understand the integration and to fix it.
|
||
public final class RestCatalogTestUtils | ||
{ | ||
private RestCatalogTestUtils() {} | ||
|
||
static class TestingJdbcCatalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it mean JdbcCatalog no longer can be used to back the REST catalog? or does it mean that JdbcCatalog no longer supports views?
plugin/trino-iceberg/pom.xml
Outdated
@@ -344,14 +364,14 @@ | |||
<dependency> | |||
<groupId>org.apache.httpcomponents.client5</groupId> | |||
<artifactId>httpclient5</artifactId> | |||
<version>5.2.1</version> | |||
<version>5.3</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<version>5.3</version> | |
<version>5.3.1</version> |
196f8d9
to
ee6e020
Compare
@ajantha-bhat it looks like We can simply remove that test override and use the original test in the base class, see my explanation for TestIcebergTrinoRestCatalogConnectorSmokTest here. |
@@ -309,14 +309,6 @@ public void testDropTableWithMissingManifestListFile() | |||
.hasMessageContaining("Table location should not exist"); | |||
} | |||
|
|||
@Test | |||
@Override | |||
public void testDropTableWithMissingDataFile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can only be removed once IcebergRestCatalogBackendContainer
uses iceberg-rest
with the fix from apache/iceberg#9305
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to remove this later when the iceberg-rest
image has been released to use Iceberg 1.5.0. Then we can update the images used in IcebergRestCatalogBackendContainer
/ EnvSinglenodeSparkIcebergRest
Not sure why it cannot find
|
- Testing with Iceberg 1.5.0 RC0 and Nessie 0.77.1 - Remove deprecated usage - InputFile.length is being called since apache/iceberg#9592 - Handle JDBC catalog test failures
I was also able to build locally with these changes, is it possible that when CI was run there was some sort of artifact caching at play and it didn't get the latest artifact or something? Could we try re-triggering CI? |
The changes moved to #20795 due to some caching issue with the RC repo(s) |
Description
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: