elastic / elastic/apm-agent-java

[release] unexpected return code for "Deploy to Maven Central" step

Ouverte
#3,333 2 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
agent-java Team:Automation
Langage dominant
Java
Étoiles
593
Forks
337
Merge moyen
1 j 13 h
PR mergées (30 j)
25

Description

On buildkite, we get the following error message: `Error: The command exited with status 1`, however the artifacts are properly published by the release process in the `Deploy to Maven Central (Buildkite)` step.

There was at least two occurences of this in the recent releases:
- https://github.com/elastic/apm-agent-java/actions/runs/6312935059/job/17140161815
- https://github.com/elastic/apm-agent-java/actions/runs/5830491003/job/15812079572

In the buildkite logs, we can see the following error:
```
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy (injected-nexus-deploy) on project apm-opentracing: Remote staging failed: A message body reader for Java class com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO, and Java type class com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO, and MIME media type text/html was not found
```

We are already using the latest version of this plugin `1.6.13`, which is about a year old as I am writing this.
https://search.maven.org/artifact/org.sonatype.plugins/nexus-staging-maven-plugin

When this error happens, we can have two possible results (both cases already happened)
- the release artifact will still be published despite the error, the release workflow will successfully execute.
- the release artifact won't be published, the release workflow will fail as the artifact is not published and timeout is reached.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par l’étape de release « Deploy to Maven Central (Buildkite) » et les exécutions de workflow associées, puis comparez l’erreur Buildkite avec le fait que les artefacts aient été publiés ou non. Examinez comment nexus-staging-maven-plugin signale cette réponse et vérifiez les deux résultats : une publication réussie doit produire un workflow réussi, tandis qu’un artefact non publié doit échouer sans produire un statut incohérent.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
ci-cd, release
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.