Page MenuHomePhabricator

[jobs-api] introduce OpenAPI to jobs framework
Closed, ResolvedPublic

Description

Details

TitleReferenceAuthorSource BranchDest Branch
jobs-api: bump to 0.0.269-20240315104203-49ed38c0repos/cloud/toolforge/toolforge-deploy!222project_1317_bot_df3177307bed93c3f34e421e26c86e38bump_jobs-apimain
jobs-api: bump to 0.0.266-20240307133255-36e022bcrepos/cloud/toolforge/toolforge-deploy!216project_1317_bot_df3177307bed93c3f34e421e26c86e38bump_jobs-apimain
jobs-api: add /openapi.json endpointrepos/cloud/toolforge/jobs-api!66aborreroarturo-3288-jobs-api-add-api-vmain
job: adjust max job name lengthrepos/cloud/toolforge/jobs-api!65aborreroarturo-4288-job-adjust-max-jobmain
jobs-api: add openapi schemarepos/cloud/toolforge/jobs-api!59aborreroarturo-9921-jobs-api-add-openamain
Customize query in GitLab

Event Timeline

aborrero triaged this task as Medium priority.
aborrero moved this task from Backlog to Next on the User-aborrero board.
aborrero changed the task status from Open to In Progress.Feb 20 2024, 2:30 PM
aborrero moved this task from Next Up to In Progress on the Toolforge (Toolforge iteration 05) board.

follow up:

  • make sure all jobs (regardless of type) accept the same length for the job name
  • review the /healthz endpoint
  • serve the openapi file via the corresponding API endpoint

project_1317_bot_df3177307bed93c3f34e421e26c86e38 opened https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/merge_requests/216

jobs-api: bump to 0.0.266-20240307133255-36e022bc

dcaro renamed this task from toolforge: introduce OpenAPI to jobs framework to [jobs-api] introduce OpenAPI to jobs framework.Mar 12 2024, 1:19 PM

project_1317_bot_df3177307bed93c3f34e421e26c86e38 opened https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/merge_requests/222

jobs-api: bump to 0.0.269-20240315104203-49ed38c0

The openapi JSON can now be fetched from the API:

toolsbeta.test@toolsbeta-sgebastion-05:~$ curl --insecure --silent --cert ~/.toolskube/client.crt --key ~/.toolskube/client.key https://k8s.svc.toolsbeta.eqiad1.wikimedia.cloud:30003/jobs/openapi.json | jq 
{
  "components": {
    "schemas": {
      "DefinedJob": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewJob"
          },
[..]

tools.arturo-test-tool@tools-sgebastion-11:~$ curl --silent --insecure --cert ~/.toolskube/client.crt --key ~/.toolskube/client.key https://k8s.svc.tools.eqiad1.wikimedia.cloud:30003/jobs/openapi.json | jq
{
  "components": {
    "schemas": {
      "DefinedJob": {
        "allOf": [

[...]
``