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(api): include async job status in all relevant endpoints #539

Merged
merged 2 commits into from
Sep 29, 2021

Conversation

kgajowy
Copy link
Contributor

@kgajowy kgajowy commented Sep 27, 2021

We should be carefully when serializing stuff.

  1. "meta" is already included when pagination is defined
  2. neither "meta" nor "pagination" is defined within swagger / classes, thus using plainToClass removes it
  3. I haven't refactored "mixing" them, nor the OpenApi docs.

We should consider redesign of creating OpenApi definitions, meta inclusion/mixing, responsibilities and serialization itself.

PROJECTS

Async jobs

  • Project create / upload - MAY create an actions
  • projects/:id/protected-areas/shapefile
  • projects/:id/grid

Non-async jobs

  • projects/:id/features/shapefile (API-side)
  • projects/:id/planning-area/shapefile („inline” proxy go Geoprocessing)

SCENARIOS

Async jobs 


  • Create / update scenario (CalculatePlanningUnitsProtectionLevel)
  • scenarios/:id/marxan
  • scenarios/:id/planning-units
  • scenarios/:id/cost-surface/shapefile
  • scenarios/:id/features/specification/v2

Non-async jobs

  • scenarios/:id/planning-unit-shapefile („inline” proxy to Geoprocessing)
  • scenarios/:id/features/specification - deprecated ?

@vercel
Copy link

vercel bot commented Sep 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

marxan – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan/478PkuYnHDcymEypRkLQ7BBjo77U
✅ Preview: https://marxan-git-feat-marxan-758-async-job-statuses-vizzuality1.vercel.app

marxan-storybook – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/BnrkRut9zdgshtd6PP8PsEArzqfu
✅ Preview: https://marxan-storybook-git-feat-marxan-758-async-j-fd0a83-vizzuality1.vercel.app

@hotzevzl
Copy link
Member

We should be carefully when serializing stuff.

1. "meta" is already included when pagination is defined

2. neither "meta" nor "pagination" is defined within swagger / classes, thus using `plainToClass` removes it

3. I haven't refactored "mixing" them, nor the OpenApi docs.

We should consider redesign of creating OpenApi definitions, meta inclusion/mixing, responsibilities and serialization itself.

yep, I have created a task to track this (https://vizzuality.atlassian.net/browse/MARXAN-792) - I'd hold on for the moment, unless the mixing of meta becomes an actual issue that affects ability to send reliable data in responses.

@hotzevzl
Copy link
Member

@kgajowy I would maybe add a technical debt comment in the code itself, as a caveat to our future selves touching pagination or other meta - you can decide if it's worth it.

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.

3 participants