Copilot commented on code in PR #8713:
URL: https://github.com/apache/texera/pull/8713#discussion_r4114821146


##########
common/config/src/test/scala/org/apache/texera/common/config/StorageConfigSpec.scala:
##########
@@ -50,12 +51,23 @@ class StorageConfigSpec extends AnyFlatSpec with Matchers {
     StorageConfig.ENV_CLEANUP_INTERVAL_MINUTES shouldBe 
"STORAGE_CLEANUP_INTERVAL_MINUTES"
   }
 
-  "StorageConfig warehouse settings" should "default the feature to disabled 
so merging changes nothing" in {
-    // storage.warehouse.enabled is the kill switch for the whole per-user 
warehouse
-    // feature (#6870); this guards the safe default from silently flipping to 
true.
-    // Only assert when the env override is unset (e.g. in CI), since it would 
win otherwise.
+  "StorageConfig warehouse settings" should "be on by default, and only with 
the REST catalog" in {
+    // storage.warehouse.enabled is the switch for the whole per-user warehouse
+    // feature (#6870), on since #8712. Warehouses are Lakekeeper entities, so 
the
+    // switch is conjoined with the catalog type: any other catalog keeps the
+    // feature off however the switch reads, which is what stops a deployment
+    // without Lakekeeper from being handed a feature it cannot serve.
+    // Only assert when the env override is unset, since it would win 
otherwise.
+    // The resource default is asserted directly, not through 
warehouseEnabled: CI's
+    // amber job pins the catalog to postgres, which would make the conjunction
+    // false either way and let a revert of the switch pass unnoticed.
+    ConfigFactory
+      .parseResources("storage.conf")
+      .resolve()
+      .getBoolean("storage.warehouse.enabled") shouldBe true

Review Comment:
   `parseResources(...).resolve()` still applies the optional 
`${?STORAGE_WAREHOUSE_ENABLED}` substitution, so a supported deployment/test 
override of `false` makes this assertion fail. Move this raw-config assertion 
under the existing “override is unset” guard; CI still exercises it because 
that variable is unset there.



-- 
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]

Reply via email to