mengw15 commented on code in PR #9636:
URL: https://github.com/apache/texera/pull/9636#discussion_r4661965347
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/workflow/WorkflowResource.scala:
##########
@@ -679,7 +680,7 @@ class WorkflowResource extends LazyLogging {
val (document, _) = DocumentFactory.openDocument(uri)
document.clear()
} catch {
- case e: IllegalArgumentException if e.getMessage.contains("No
storage is found") =>
+ case e: DocumentNotFoundException =>
logger.warn(s"Storage for URI $uri not found, ignoring:
${e.getMessage}")
case NonFatal(e) =>
logger.error(s"Failed to clear document for URI $uri", e)
Review Comment:
Done in a67428fef689def3db1f5228193587713935281c: the three places now share
`clearDocument`, which passes over a missing document and logs any other
failure as a warning.
##########
common/workflow-core/src/test/scala/org/apache/texera/amber/core/storage/result/iceberg/IcebergDocumentSpec.scala:
##########
@@ -427,6 +427,45 @@ class IcebergDocumentSpec extends AnyFlatSpec with
Matchers with BeforeAndAfterA
doc.asInstanceOf[IcebergDocument[Tuple]].tableNamespace shouldBe
tableNamespace
doc.asInstanceOf[IcebergDocument[Tuple]].tableName shouldBe name
}
+
+ /**
+ * Writes `rows` rows, and returns a document that reads them through a
catalog which lets
+ * `succeeding` `loadTable` calls through before it fails.
+ */
+ private def documentOnFailingCatalog(rows: Int, succeeding: Int):
IcebergDocument[Tuple] = {
+ val tableName = freshTableName()
+ write(newDocument(tableName), (0 until rows).map(tuple))
+ val warehouse = "iceberg-doc-spec-failing"
+ IcebergCatalogInstance.replaceInstance(
+ new FailingCatalog(IcebergCatalogInstance.getInstance(), succeeding),
+ Some(warehouse)
+ )
+ new IcebergDocument[Tuple](
+ tableNamespace,
+ tableName,
+ icebergSchema,
+ serde,
+ deserde,
+ Some(warehouse)
+ )
+ }
Review Comment:
Right, that was it. Fixed in 25bf804c3cd9396f095f1cec32220adf9d1108b3: the
document now overrides its own `catalog`, so the test replaces nothing shared
and has nothing to put back. WorkflowCore passes on both the postgres and rest
catalogs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]