GradleUp / GradleUp/nmcp

Consider 401 a retryable error for verifyStatus

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Kotlin
Stars
131
Forks
10
Avg merge
2h 5m
Merged PRs (30d)
6

Description

Expected and Results

verifyStatus should be able to wait till the publication completes.

I got a case when the publication was successfully uploaded, however verifyStatus failed with (HTTP status='401'): {"error":{"message":"Authentication Failed"}} after ~5 minutes.

Frankly speaking, it is extremely strange to see "authentication failed" after a successful publication with the same token.

Related environment and versions

See https://github.com/Netcracker/qubership-profiler-agent/actions/runs/15278059208/job/42969528070#step:10:3369

> Task :publishAggregationToCentralPortal
Nmcp: deployment bundle 'a010aa98-024a-4103-bbf0-ea2ed5ff70f9' uploaded to 'https://central.sonatype.com/'.
Nmcp: verifying deployment status...

Caused by: java.lang.IllegalStateException: Cannot verify deployment a010aa98-024a-4103-bbf0-ea2ed5ff70f9 status
  (HTTP status='401'): {"error":{"message":"Authentication Failed"}}
    at nmcp.internal.task.PublishReleaseKt.verifyStatus(publishRelease.kt:161)
    at nmcp.internal.task.PublishReleaseKt.publishRelease(publishRelease.kt:87)
    at nmcp.internal.task.PublishReleaseEntryPoint$Companion.run(PublishReleaseEntryPoint.kt:28)
    at nmcp.internal.task.PublishReleaseWorkAction.execute(PublishReleaseTask.kt:185)
    at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)

The way out might be to retry 401 for verifyStatus assuming the token is workable as the upload succeeded.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in publishRelease.kt at verifyStatus, around line 161, and trace its call from publishRelease. Confirm how status failures are currently handled and define completion as allowing a 401 during verification to be retried after a successful upload; no test file is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
release
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.