Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[actions] if actions use Re-run all jobs to start workflows,it will ignore "jobs.<job_id>.needs" #25925

Closed
zoy0 opened this issue Jul 17, 2023 · 2 comments
Labels
topic/gitea-actions related to the actions of Gitea type/bug

Comments

@zoy0
Copy link

zoy0 commented Jul 17, 2023

Description

I use re-run all jobs to rerun a workflow, but instead of sequential, alljobs are executed concurrently.This leads to needs. .outputs cannot be used.

name: outputs
on: push

jobs:
  job1:
    runs-on: ubuntu-latest
    steps:
      - name: step1
        run: |
          echo "first job1 and first step"          

  job2:
    runs-on: ubuntu-latest
    outputs:
      output1: ${{ steps.step1.outputs.output1 }}
      output2: ${{ steps.step2.outputs.output2 }}
    steps:
      - name: step1
        id: step1
        run: |
          date -Is > output1
          cat output1
          echo "output1=$(cat output1)" >> $GITHUB_OUTPUT                    
      - name: step2
        id: step2
        run: |
          cat /proc/sys/kernel/random/uuid > output2
          cat output2
          echo "output2=$(cat output2)" >> $GITHUB_OUTPUT           

  job3:
    needs: [job1,job2]
    runs-on: ubuntu-latest
    steps:
      - run: echo ${{ needs.job2.outputs.output1 }}
      - run: echo ${{ needs.job2.outputs.output2 }}
      - run: echo ${{ needs.job2.result }}

normal operation
image

re-run all jobs:
image

Gitea Version

1.20

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Linux

How are you running Gitea?

docker images: gitea/gitea:1.20 and gitea/act_runner:0.2.3

Database

SQLite

@zoy0 zoy0 added the type/bug label Jul 17, 2023
@sillyguodong sillyguodong added the topic/gitea-actions related to the actions of Gitea label Jul 18, 2023
@wolfogre
Copy link
Member

wolfogre commented Jul 20, 2023

Earlier, it was not supported to rerun all jobs, you could only rerun the jobs one by one.

After #24350, Gitea provided a batch operation to rerun all jobs, unfortunately, it was just a batch operation which means it still rerun the jobs one by one. Reconstructing dependencies of jobs may not be easy, before it has been resolved, you could do it manually.

image

@Zettat123
Copy link
Contributor

Closed by #29955

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

No branches or pull requests

4 participants