Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better pipeline outputs #518

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Better pipeline outputs #518

merged 1 commit into from
Aug 14, 2023

Conversation

qgerome
Copy link
Member

@qgerome qgerome commented Aug 7, 2023

In pipelines, users can call current_run.add_file_output & current_run.add_database_output. We transform those two types of output to their correct representation of BucketObject & DatabaseTable.

Example of return when querying a pipeline run

{
  "data": {
    "workspace": {
      "bucket": {
        "objects": {
          "hasNextPage": false,
          "hasPreviousPage": false,
          "items": [
            {
              "name": ".hidden_files",
              "key": ".hidden_files/"
            },
            {
              "name": "all",
              "key": "all/"
            },
            {
              "name": "README.MD",
              "key": "README.MD"
            },
            {
              "name": "covid_data.csv",
              "key": "covid_data.csv"
            },
            {
              "name": "demo.ipynb",
              "key": "demo.ipynb"
            }
          ]
        }
      }
    },
    "pipelineRun": {
      "id": "91efe9c7-277d-45e2-9d7a-3b9dbadf49fc",
      "outputs": [
        {
          "__typename": "GenericOutput",
          "name": "dhis2_extract.csv",
          "uri": "httsp://google.com"
        },
        {
          "__typename": "BucketObject",
          "key": "all/ChatGPT.log",
          "objectName": "ChatGPT.log",
          "path": "hexa-test-quentin-s-workspace-823946/all/ChatGPT.log",
          "size": 5319,
          "type": "FILE"
        }
      ]
    }
  }
}

Copy link
Contributor

@pvanliefland pvanliefland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but 2 remarks:

  • Shouldn't we do the same for table outputs?
  • The frontend needs a PR as well

@qgerome
Copy link
Member Author

qgerome commented Aug 8, 2023

LGTM, but 2 remarks:

  • Shouldn't we do the same for table outputs?
  • The frontend needs a PR as well

What do you mean by "table outputs" ?
Frontend is coming.

Copy link
Contributor

@pvanliefland pvanliefland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@qgerome qgerome merged commit 9f7bc27 into main Aug 14, 2023
2 checks passed
@qgerome qgerome deleted the better-pipeline-outputs branch August 14, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants