Update-project-version fails when a commit hash is used

Aperta
#46 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
git, github-actions, python
Ambito
ci-cd, devops, tooling

Direzione di ricerca

Inizia con l’implementazione di update-project-action e il workflow chiamante in .github/workflows/publish.yml, quindi riproduci il fallimento usando l’esecuzione di Actions collegata e i relativi comandi Git. Traccia come un hash di commit viene risolto in una base di pull request o in un branch, incluso l’approccio suggerito git branch -a --contains <commit>. Il lavoro è completato quando è possibile creare una PR di aggiornamento della versione quando l’input fa riferimento a un hash di commit.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Bug Report

I ran update-project-version and it failed. We suspect it is because of using a commit hash and not a branch name.

Repro or Code Sample

I don't know why this failed for the couple of releases I did. I'm calling the update-project-action here.

Expected Behavior

Create a PR in the repo for bumping the project version.

Current Behavior

Failure. Here's some log info. See this run.

  [0d9ef0bb-fabf-4858-99fb-2e3fcf7e0035 5b906c0] [319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0] chore: Update project ni.measurements.metadata.v1.proto to v0.1.0.dev4
   Author: dixonjoel <38357562+dixonjoel@users.noreply.github.com>
   1 file changed, 1 insertion(+), 1 deletion(-)
  /usr/bin/git stash push --include-untracked
  No local changes to save
  /usr/bin/git rev-list --right-only --count 319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0...0d9ef0bb-fabf-4858-99fb-2e3fcf7e0035
  1
  /usr/bin/git -c protocol.version=2 fetch --no-tags --progress --no-recurse-submodules --force --depth=11 origin users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0:refs/remotes/origin/users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0
  fatal: couldn't find remote ref users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0
  Pull request branch 'users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0' does not exist yet.
  /usr/bin/git checkout --progress -B users/build/ni.measurements.metadata.v1.proto-update-project-version-319d5ab3ebc8637ee0a3bdd2c38de76c1b597fc0 0d9ef0bb-fabf-4858-99fb-2e3fcf7e0035 --

Possible Solution

@bkeryan suggests this:

I think it could use
git branch -a --contains
to find potential branches
it probably ought to try main first

Context

Your Environment

  • ni/python-actions version
  • Python version

AB#3455360

Lingua principale
Python
Stelle
2
Fork
0
Merge medio
2g 5h
PR unite (30g)
1

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ni/python-actions

Tutte le issue di ni/python-actions

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.