Skip to content

Fix upload/download/list attachment 401s and job update 404 - #773

Open
v-elegacheva wants to merge 1 commit into
microsoft:mainfrom
v-elegacheva:ekaterina/sdk-job-update-e2e
Open

v-elegacheva wants to merge 1 commit into
microsoft:mainfrom
v-elegacheva:ekaterina/sdk-job-update-e2e

Conversation

@v-elegacheva

Copy link
Copy Markdown
Contributor

Issue 1: Attachment methods use unsigned container_uri (401)

upload_attachment, download_attachment, and list_attachments in base_job.py preferred self._details.container_uri (the plain, unsigned URL returned by the job creation/submit API response) over calling self.workspace.get_container_uri(job_id=self.id) (which returns a fresh SAS-signed URL). As a result, any attachment operation on an already-submitted job failed with a 401 ClientAuthenticationError / NoAuthenticationInformation.

Fix: always call self.workspace.get_container_uri(job_id=self.id) for a fresh SAS-signed URI.

Issue 2: Job update PATCH request uses the wrong URL path (404)

build_services_jobs_update_request in _client/operations/_operations.py constructed the URL as .../workspaces/{workspaceName}/jobUpdateOptions/{jobId}, using the request model type name (JobUpdateOptions) as the path segment instead of the resource path used by every other job operation (jobs). As a result, every call to workspace.update_job() failed with a 404 Not Found.

Fix: use .../workspaces/{workspaceName}/jobs/{jobId} to match the other job operations.

Fixes ADO Bug 55206.

- upload_attachment, download_attachment, and list_attachments in base_job.py were reusing the unsigned container_uri returned by job creation instead of always fetching a fresh SAS-signed URI via workspace.get_container_uri(), causing 401 NoAuthenticationInformation errors.
- build_services_jobs_update_request in the generated _operations.py used the wrong URL path segment 'jobUpdateOptions' (the request model type name) instead of 'jobs', causing workspace.update_job() to fail with 404 Not Found.
@v-elegacheva
v-elegacheva requested a review from a team as a code owner September 18, 2026 00:00
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

1 participant