Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0d80726
feat: `datasets` prefix
aicam Mar 31, 2026
1dfc917
fix(file-service): correct dataset owner email, harden file tree, add…
tanishqgandhi1908 Jun 26, 2026
1431887
test+fix: extend datasets prefix to python UDF path + add frontend pa…
tanishqgandhi1908 Jul 1, 2026
1d9cbd1
refactor: remove unused frontend path parser; reword prefix docs
tanishqgandhi1908 Jul 2, 2026
e4df21c
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Jul 17, 2026
a31c897
test(frontend): use datasets-prefixed path in cover-image spec
tanishqgandhi1908 Jul 17, 2026
6c76f6b
feat(storage): require the datasets prefix on dataset logical paths
tanishqgandhi1908 Jul 21, 2026
1ef2634
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Jul 21, 2026
956d5d3
fix(test): align dataset-selection-modal spec to prefixed path; ruff-…
tanishqgandhi1908 Jul 21, 2026
f320d43
fix(file-service): prefix dataset cover-image paths with datasets/
tanishqgandhi1908 Jul 21, 2026
66a5aed
consolidate the datasets literal
tanishqgandhi1908 Jul 22, 2026
8eccc88
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Jul 22, 2026
e11e008
fixing test cases
tanishqgandhi1908 Jul 22, 2026
de806ba
feat(storage): add model metadata tables
tanishqgandhi1908 Jul 22, 2026
581ef1f
Merge branch 'feat/dataset-logical-path-prefix' into feat/model-file-…
tanishqgandhi1908 Jul 22, 2026
db4579a
addressing the PR comments
tanishqgandhi1908 Jul 23, 2026
f3a3ad1
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Jul 23, 2026
ed0914b
Merge branch 'feat/dataset-logical-path-prefix' into feat/model-file-…
tanishqgandhi1908 Jul 23, 2026
144ee2f
feat(storage): add model file storage and path resolution
tanishqgandhi1908 Jul 24, 2026
953d6fb
Merge remote-tracking branch 'upstream/main' into feat/model-file-sto…
tanishqgandhi1908 Jul 24, 2026
aebfdb9
feat(storage): add model file storage and path resolution
tanishqgandhi1908 Jul 24, 2026
e3347c1
feat(file-service): add model management API (metadata + access control)
tanishqgandhi1908 Jul 24, 2026
9093487
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Jul 31, 2026
cf75c14
addressing and fixing PR comments
tanishqgandhi1908 Jul 31, 2026
a814f87
Merge remote-tracking branch 'origin/feat/dataset-logical-path-prefix…
tanishqgandhi1908 Jul 31, 2026
353b814
refactor(storage): generalize FileResolver to dispatch by resource type
tanishqgandhi1908 Jul 31, 2026
20d2ac5
refactor(storage): generalize FileResolver to dispatch by resource type
tanishqgandhi1908 Jul 31, 2026
3b4b3b1
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Aug 3, 2026
4cab606
Merge remote-tracking branch 'origin/feat/dataset-logical-path-prefix…
tanishqgandhi1908 Aug 3, 2026
777b143
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Aug 8, 2026
f39ef3c
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Aug 12, 2026
182cc62
Merge remote-tracking branch 'origin/feat/dataset-logical-path-prefix…
tanishqgandhi1908 Aug 12, 2026
569d24b
Merge remote-tracking branch 'upstream/main' into feat/dataset-logica…
tanishqgandhi1908 Aug 12, 2026
ce59b5b
fixing copilot suggestion
tanishqgandhi1908 Aug 12, 2026
522e97b
changes in sql script based on copilot suggestions
tanishqgandhi1908 Aug 12, 2026
bb78470
style: apply scalafmt to FileListerSourceOpExec
tanishqgandhi1908 Aug 12, 2026
1a3cd14
Merge remote-tracking branch 'origin/feat/dataset-logical-path-prefix…
tanishqgandhi1908 Aug 12, 2026
550a5bd
Merge remote-tracking branch 'upstream/main' into feat/model-file-sto…
tanishqgandhi1908 Aug 13, 2026
56b7a59
Merge branch 'feat/model-file-storage' into feat/model-management-api
tanishqgandhi1908 Aug 13, 2026
f19ef65
Merge remote-tracking branch 'upstream/main' into feat/model-manageme…
tanishqgandhi1908 Aug 13, 2026
3354a09
addressing the review comments on presign-url
tanishqgandhi1908 Aug 13, 2026
79e0588
refactoring the common code used by models and datasets
tanishqgandhi1908 Aug 13, 2026
fe0dd6b
Merge branch 'feat/model-file-storage' into feat/model-management-api
tanishqgandhi1908 Aug 13, 2026
93eb784
refactoring the common code used by models and datasets
tanishqgandhi1908 Aug 13, 2026
a63e420
style(pyamber): black-format dataset_file_document after presign env …
tanishqgandhi1908 Aug 13, 2026
b4f5b2a
renaming the .env file with presigned url
tanishqgandhi1908 Aug 14, 2026
db3c133
Merge remote-tracking branch 'origin/feat/model-file-storage' into fe…
tanishqgandhi1908 Aug 14, 2026
c78be4c
Merge remote-tracking branch 'upstream/main' into feat/model-manageme…
tanishqgandhi1908 Aug 14, 2026
6ac0cbc
addressing PR review comments
tanishqgandhi1908 Aug 17, 2026
6ed828b
addressing PR review comments
tanishqgandhi1908 Aug 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ object DocumentFactory {
*/
def openReadonlyDocument(fileUri: URI): ReadonlyVirtualDocument[_] = {
fileUri.getScheme match {
case DATASET_FILE_URI_SCHEME => new DatasetFileDocument(fileUri)
case MODEL_FILE_URI_SCHEME => new ModelFileDocument(fileUri)
case DATASET_FILE_URI_SCHEME => new LakeFSFileDocument(fileUri, ResourceType.Datasets)
case MODEL_FILE_URI_SCHEME => new LakeFSFileDocument(fileUri, ResourceType.Models)
case "file" => new ReadonlyLocalFileDocument(fileUri)
case unsupportedScheme =>
throw new UnsupportedOperationException(
Expand Down Expand Up @@ -184,8 +184,8 @@ object DocumentFactory {
*/
def openDocument(uri: URI): (VirtualDocument[_], Option[Schema]) = {
uri.getScheme match {
case DATASET_FILE_URI_SCHEME => (new DatasetFileDocument(uri), None)
case MODEL_FILE_URI_SCHEME => (new ModelFileDocument(uri), None)
case DATASET_FILE_URI_SCHEME => (new LakeFSFileDocument(uri, ResourceType.Datasets), None)
case MODEL_FILE_URI_SCHEME => (new LakeFSFileDocument(uri, ResourceType.Models), None)
case VFS_FILE_URI_SCHEME =>
val IcebergLocation(warehouse, namespace, storageKey) = resolveIcebergLocation(uri)

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package org.apache.texera.amber.core.storage.model

import com.typesafe.scalalogging.LazyLogging
import org.apache.texera.common.config.EnvironmentalVariable
import org.apache.texera.amber.core.storage.ResourceType
import org.apache.texera.amber.core.storage.model.LakeFSFileDocument.userJwtToken
import org.apache.texera.amber.core.storage.util.LakeFSStorageClient

Expand All @@ -36,21 +37,51 @@ object LakeFSFileDocument {
// In the local development or other architectures, this token can be empty.
lazy val userJwtToken: String =
sys.env.getOrElse(EnvironmentalVariable.ENV_USER_JWT_TOKEN, "").trim

private lazy val datasetPresignEndpoint: String =
sys.env
.getOrElse(
EnvironmentalVariable.ENV_FILE_SERVICE_GET_DATASET_PRESIGNED_URL_ENDPOINT,
"http://localhost:9092/api/dataset/presign-download"
)
.trim

private lazy val modelPresignEndpoint: String =
sys.env
.getOrElse(
EnvironmentalVariable.ENV_FILE_SERVICE_GET_MODEL_PRESIGNED_URL_ENDPOINT,
"http://localhost:9092/api/model/presign-download"
)
.trim

/**
* The file-service presign-download endpoint serving this resource type. Each resource type
* owns an endpoint because they enforce different access control (a dataset grant does not
* grant a model).
*/
def presignEndpointOf(resourceType: ResourceType.Value): String =
resourceType match {
case ResourceType.Datasets => datasetPresignEndpoint
case ResourceType.Models => modelPresignEndpoint
Comment thread
tanishqgandhi1908 marked this conversation as resolved.
}
}

/**
* A read-only document over a single file stored in a LakeFS repository, addressed by the URI
* {scheme}:///{repositoryName}/{versionHash}/{fileRelativePath}. This is the shared behavior
* for every versioned-file resource (datasets, models, …): the file bytes are fetched via a
* presigned URL, falling back to a direct LakeFS fetch.
* {scheme}:///{repositoryName}/{versionHash}/{fileRelativePath}.
*
* Every versioned-file resource (datasets, models, …) reads its files the same way — fetch the
* bytes through a presigned URL, falling back to a direct LakeFS fetch
*
* @param uri the resolved {scheme}:///{repositoryName}/{versionHash}/{file} URI
* @param presignEndpoint the file-service presign-download endpoint for this resource kind
* @param uri the resolved {scheme}:///{repositoryName}/{versionHash}/{file} URI
* @param resourceType which resource this file belongs to, selecting the presign endpoint
*/
private[storage] abstract class LakeFSFileDocument(uri: URI, presignEndpoint: String)
private[storage] class LakeFSFileDocument(uri: URI, val resourceType: ResourceType.Value)
extends VirtualDocument[Nothing]
with OnVersionedFileResource
with LazyLogging {

private val presignEndpoint: String = LakeFSFileDocument.presignEndpointOf(resourceType)
// Utility function to parse and decode URI segments into individual components
private def parseUri(uri: URI): (String, String, Path) = {
val segments = Paths.get(uri.getPath).iterator().asScala.map(_.toString).toArray
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
package org.apache.texera.amber.core.storage

import org.apache.texera.amber.core.storage.model.{
DatasetFileDocument,
ModelFileDocument,
LakeFSFileDocument,
OnVersionedFileResource,
ReadonlyLocalFileDocument,
VirtualDocument
Expand Down Expand Up @@ -134,17 +133,19 @@ class DocumentFactorySpec extends AnyFlatSpec with Matchers with BeforeAndAfterA

private val versionHash = "97fd4c2a755b69b7c66d322eab40b7e5c2ad5d10"

"openReadonlyDocument" should "return a DatasetFileDocument for the dataset scheme" in {
"openReadonlyDocument" should "return a dataset-typed LakeFSFileDocument for the dataset scheme" in {
val datasetUri = new URI(s"dataset:///repo/$versionHash/file.txt")
val doc = DocumentFactory.openReadonlyDocument(datasetUri)
doc shouldBe a[DatasetFileDocument]
doc shouldBe a[LakeFSFileDocument]
doc.asInstanceOf[LakeFSFileDocument].resourceType shouldBe ResourceType.Datasets
doc.getURI shouldBe datasetUri
}

it should "return a ModelFileDocument for the model scheme and parse its URI components" in {
it should "return a model-typed LakeFSFileDocument for the model scheme and parse its URI components" in {
val modelUri = new URI(s"model:///model-1/$versionHash/weights/model.pt")
val doc = DocumentFactory.openReadonlyDocument(modelUri)
doc shouldBe a[ModelFileDocument]
doc shouldBe a[LakeFSFileDocument]
doc.asInstanceOf[LakeFSFileDocument].resourceType shouldBe ResourceType.Models
doc.getURI shouldBe modelUri

val resource = doc.asInstanceOf[OnVersionedFileResource]
Expand Down Expand Up @@ -176,17 +177,19 @@ class DocumentFactorySpec extends AnyFlatSpec with Matchers with BeforeAndAfterA
// openDocument / createDocument / documentExists -- unsupported schemes
// ---------------------------------------------------------------------------

"openDocument" should "return a DatasetFileDocument and no schema for the dataset scheme" in {
"openDocument" should "return a dataset-typed LakeFSFileDocument and no schema for the dataset scheme" in {
val datasetUri = new URI(s"dataset:///repo/$versionHash/file.txt")
val (doc, schemaOpt) = DocumentFactory.openDocument(datasetUri)
doc shouldBe a[DatasetFileDocument]
doc shouldBe a[LakeFSFileDocument]
doc.asInstanceOf[LakeFSFileDocument].resourceType shouldBe ResourceType.Datasets
schemaOpt shouldBe None
}

it should "return a ModelFileDocument and no schema for the model scheme" in {
it should "return a model-typed LakeFSFileDocument and no schema for the model scheme" in {
val modelUri = new URI(s"model:///model-1/$versionHash/weights/model.pt")
val (doc, schemaOpt) = DocumentFactory.openDocument(modelUri)
doc shouldBe a[ModelFileDocument]
doc shouldBe a[LakeFSFileDocument]
doc.asInstanceOf[LakeFSFileDocument].resourceType shouldBe ResourceType.Models
schemaOpt shouldBe None
}

Expand Down
Loading
Loading