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

Refector application collection endpoints to not return full Instance objects #2349

Merged
merged 2 commits into from
Jun 28, 2023

Conversation

knolleary
Copy link
Member

Description

A pair of end points that return lists of Applications and their instances was including the full instance object. This is was far more information than was needed.

This PR changes those endpoints to run an InstanceSummary view which is the minimum information needed for list views.

Affected endpoints:

  • /api/v1/application/:id/instances
  • /api/v1/teams/:teamId/applications

I have verified all of the users of these endpoints in the UI work with these summaries.

Work to document these changes will happen as part of the api doc work in #1556

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@Pezmc
Copy link
Contributor

Pezmc commented Jun 28, 2023

I was worried this would cause troubles in the UI with the cached objects not being full objects any more (with regards to startus, last deploy, etc...), but the work to add an explicit status endpoint seems to have prevented that from being a problem.

forge/db/views/Project.js Outdated Show resolved Hide resolved
forge/db/views/Project.js Outdated Show resolved Hide resolved
@knolleary knolleary merged commit a039842 into main Jun 28, 2023
4 checks passed
@knolleary knolleary deleted the refactor-team-app-list-api branch June 28, 2023 10:22
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