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

feat(mgmt): update metrics endpoints to serve new dashboard design #513

Closed

Conversation

joremysh
Copy link
Contributor

@joremysh joremysh commented Nov 6, 2024

Because

  • Pipeline and credit endpoints have different params and schemas.
  • Some of the information served by the existing endpoints will be handled by the pipeline run feature.

This commit

  • Removes unused endpoints and updates metrics contracts to serve the new dashboard.

Copy link

linear bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 6, 2024, 10:25 AM

@joremysh joremysh force-pushed the jeremy/ins-5379-rebase-credit-dashboard-endpoints branch from 7c2ba1e to a2a24c7 Compare November 6, 2024 07:41
Copy link
Collaborator

@jvallesm jvallesm left a comment

Choose a reason for hiding this comment

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

I added some suggestions to improve the comments. Thanks for taking into account the notes on #435. You could have pushed your changes to that branch to avoid duplication (I don't mind handing over a PR or having changes pushed on top of mine 😄). If you could please close that PR once you merge this one, it'll remove some noise from the repo 🧹

model/model/v1alpha/model.proto Outdated Show resolved Hide resolved
model/model/v1alpha/model.proto Show resolved Hide resolved
model/model/v1alpha/model.proto Outdated Show resolved Hide resolved
@joremysh joremysh force-pushed the jeremy/ins-5379-rebase-credit-dashboard-endpoints branch from e35f9ba to 6af38dd Compare November 6, 2024 10:22
@joremysh joremysh force-pushed the jeremy/ins-5379-rebase-credit-dashboard-endpoints branch from 9371dfc to 3076ab5 Compare November 6, 2024 10:25
@joremysh
Copy link
Contributor Author

joremysh commented Nov 7, 2024

We are planning to replace ListPipelineTriggerTableRecords with GetPipelineTriggerCount and modify response of ListPipelineTriggerChartRecords as frontend does not need to display trigger count for each pipeline now. After the change, frontend does not need to sum the numbers of pipeline triggers anymore. It will also help simplify the influxDB query in backend.
@EiffelFly Could you help update the dashboard? In which sprint could we merge the backend?

ListPipelineTriggerTableRecords URL: /v1beta/metrics/vdp/pipeline/tables

GetPipelineTriggerCount response will be like:

{
    "pipelineTriggerCounts":
    [
        {
            "triggerCount": 3,
            "status": "STATUS_COMPLETED"
        }
    ]
}

ListPipelineTriggerChartRecords response will be like:

{
    "pipelineTriggerChartRecords":
    [
        {
            "timeBuckets":
            [
                "2024-11-07T01:00:00Z",
                "2024-11-07T02:00:00Z",
                "2024-11-07T03:00:00Z",
                "2024-11-07T04:00:00Z",
                "2024-11-07T05:00:00Z",
                "2024-11-07T06:00:00Z",
                "2024-11-07T06:41:33.706786732Z"
            ],
            "triggerCounts":
            [
                0,
                0,
                0,
                0,
                0,
                0,
                3
            ],
            "requesterId": "requesterId-A"
        }
    ]
}

URL of ListPipelineTriggerChartRecords will be changed from /v1beta/metrics/vdp/pipeline/charts to /v1beta/pipeline-runs/query-charts following discussions in previous API design meeting.

@jvallesm
Copy link
Collaborator

These changes will be tackled in #435, where the changes will be made in a backwards-compatible way so the frontend can implement the changes according to the devs' availability. Another PR will clean up the deprecated endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants