Skip to content

Commit

Permalink
Merge pull request #126 from NASA-IMPACT/fix/discovery-endpoint-fix
Browse files Browse the repository at this point in the history
Discovery endpoint include type, workflows tagging
  • Loading branch information
smohiudd authored Mar 21, 2024
2 parents 90c7307 + 9ae98a8 commit e667be4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: tag

on:
push:
branches:
- dev

jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
6 changes: 3 additions & 3 deletions workflows_api/runtime/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async def publish_dataset(
workflow_runs = []
for discovery in dataset.discovery_items:
discovery.collection = dataset.collection
response = await start_discovery_workflow_execution(discovery.dict())
response = await start_discovery_workflow_execution(discovery)
workflow_runs.append(response.id)
if workflow_runs:
return_dict["message"] += f" {len(workflow_runs)} workflows initiated." # type: ignore
Expand All @@ -103,12 +103,12 @@ async def publish_dataset(
dependencies=[Depends(auth.get_username)],
)
async def start_discovery_workflow_execution(
input=Body(..., discriminator="discovery"),
input: Union[schemas.S3Input, schemas.CmrInput]=Body(..., discriminator="discovery"),
) -> schemas.WorkflowExecutionResponse:
"""
Triggers the ingestion workflow
"""
return airflow_helpers.trigger_discover(input)
return airflow_helpers.trigger_discover(input.dict())


@workflows_app.get(
Expand Down

0 comments on commit e667be4

Please sign in to comment.