Skip to content

Commit

Permalink
Remove validation for ETL jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Mar 27, 2024
1 parent 4e50c36 commit 932ecf4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/api/src/backend/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def build_etl_pipeline_env(body):
"type": "string",
"value": json.dumps(body.remote_inbox.dict())
},
"DEFAULT_ETL_JOBS": {
"type": "string",
"value": json.dumps(body.jobs)
}
}


18 changes: 9 additions & 9 deletions src/api/src/backend/views/http/tapis_etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class RODataProfile(TapisIOSystemProfile, DataProfile):
path: str = "/ETL/REMOTE-OUTBOX/DATA"

class ROManifestsProfile(TapisIOSystemProfile, ManifestsProfile):
path: str = "/ETL/REMOTE-OUTBOX/MANFIFESTS"
path: str = "/ETL/REMOTE-OUTBOX/MANIFESTS"
generation_policy: EnumManifestGenerationPolicy = EnumManifestGenerationPolicy.AutoOnePerFile
priority: EnumManifestPriority = EnumManifestPriority.Oldest

Expand All @@ -32,7 +32,7 @@ class LIDataProfile(TapisIOSystemProfile, DataProfile):
path: str = "/ETL/LOCAL-INBOX/DATA"

class LIManifestsProfile(TapisIOSystemProfile, ManifestsProfile):
path: str = "/ETL/LOCAL-INBOX/MANFIFESTS"
path: str = "/ETL/LOCAL-INBOX/MANIFESTS"
generation_policy: EnumManifestGenerationPolicy = None
priority: EnumManifestPriority = EnumManifestPriority.Oldest

Expand Down Expand Up @@ -94,15 +94,15 @@ class TapisETLPipeline(Pipeline):
before: ActionFilter = None
remote_outbox: RemoteOutbox
local_inbox: LocalInbox
jobs: List[ExetendedTapisJob]
jobs: List[ExetendedTapisJob] = []
local_outbox: LocalOutbox
remote_inbox: RemoteInbox
after: ActionFilter = None

@validator("jobs")
def one_or_more_jobs(cls, value):
# Check that the pipeline contains at least 1 tapis job definition
if len(value) < 1:
raise ValueError("A Tapis ETL pipeline must contain at least 1 Tapis Job definition")
# @validator("jobs")
# def one_or_more_jobs(cls, value):
# # Check that the pipeline contains at least 1 tapis job definition
# if len(value) < 1:
# raise ValueError("A Tapis ETL pipeline must contain at least 1 Tapis Job definition")

return value
# return value

0 comments on commit 932ecf4

Please sign in to comment.