Skip to content

ML Data Manager role can't fetch job tasks via API #1182

Description

@mihow

Problem

When an ML worker (ami-data-companion) authenticates with a user that has the ML Data Manager role on a project, it gets a 403 Forbidden when trying to fetch job tasks:

GET /api/v2/jobs/{id}/tasks/?batch=16&processing_service_name=...
→ 403 Forbidden

The worker can successfully:

  • Authenticate and get a token (/auth/token/login/)
  • Register pipelines (ami worker register)
  • Poll for and claim jobs

But it cannot fetch tasks for the claimed job.

Context

Discovered while setting up a worker (cpu-1) to process jobs on the demo environment. The processingservice-01 user had ML Data Manager role on both demo projects. Making the user a superuser resolved the issue as a workaround.

Expected Behavior

A non-superuser role (ML Data Manager, or a dedicated processing service role) should have sufficient permissions to:

  • Poll for jobs
  • Claim jobs
  • Fetch job tasks
  • Post results

Workaround

Grant superuser status to the processing service user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PSv2Async & distributed ML backend (PSv2): job state, NATS dispatch, result handling. Umbrella #515.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions