Page MenuHomePhabricator

[builds-api,jobs-api,envvars-api,api-gateway] Figure out and document how to do non-backwards compatible changes
Open, In Progress, HighPublic

Description

Currently we have a v1.yaml file on the openapi/ folder, with all the methods prepended with v1, but that would mean that to bump one method we have to bump all of them by creating a new v2.yaml file.

There has to be a better way to be able to handle single-method non-backwards compatible changes.

We might want to define a version rollout strategy too before opening the APIs to any users (ex. doing some kind of preview-stable-deprecated-removed cycle or similar).

This task is to:

Find a process to add backwards-incompatible changes to the API while having always a backwards-compatible state

Extra things to implement:

  • Expose stats on the endpoint usage (maybe also by user agent).

Document the process

Define a policy on how long each step of that process is going to be, and how we will be notifying the users about the incompatibilities

Where to announce the deprecations:

  • as an entry in the Changelog toolforge page
  • as a warning message in the endpoint response
  • as a note in the openapi spec docs

Timeline:

  • First notification of deprecation - day 0
  • Second notification - day 30
  • Deprecated - day 60

If needed, implement a grafana dashboard with the amount of calls to each method (so we know if there's users using each endpoint).

Details

TitleReferenceAuthorSource BranchDest Branch
d/changelog: bump to 0.0.15repos/cloud/toolforge/builds-cli!63raymond-ndibebump_versionmain
[envvars-api] add messages to all responsesrepos/cloud/toolforge/envvars-api!25raymond-ndibeadd_messages_to_all_responsemain
[builds-cli] remove unused coderepos/cloud/toolforge/builds-cli!59raymond-ndibeminor_refactormain
d/changelog: bump to 0.0.14repos/cloud/toolforge/builds-cli!58raymond-ndibebump_to_0.0.14main
builds_cli: Adapt to messages in responsesrepos/cloud/toolforge/builds-cli!57dcarouse_wrapped_responsesmain
Add messages to all responsesrepos/cloud/toolforge/builds-api!81dcarowrap_responsesmain
Customize query in GitLab

Event Timeline

dcaro triaged this task as High priority.Feb 8 2024, 10:29 AM
dcaro updated the task description. (Show Details)
dcaro renamed this task from [OpenAPI] FIgure out and document how to do non-backwards compatible changes to [builds-api,jobs-api,envvars-api,api-gateway] FIgure out and document how to do non-backwards compatible changes.Feb 26 2024, 11:42 AM
dcaro claimed this task.
dcaro updated the task description. (Show Details)
dcaro edited projects, added Toolforge (Toolforge iteration 06); removed Toolforge.
dcaro changed the task status from Open to In Progress.Mar 5 2024, 9:35 AM
dcaro moved this task from In Progress to In Review on the Toolforge (Toolforge iteration 06) board.
dcaro renamed this task from [builds-api,jobs-api,envvars-api,api-gateway] FIgure out and document how to do non-backwards compatible changes to [builds-api,jobs-api,envvars-api,api-gateway] Figure out and document how to do non-backwards compatible changes.Wed, Apr 10, 12:58 PM