With "needs: jobX", jobX is running at the end #77

Closed
opened 2023-03-24 21:27:58 +00:00 by ghnp5 · 3 comments

Hey!

I have something like this:

jobs:
  prepare:
    runs-on: ubuntu-latest
    steps:
      - name: Prepare and Upgrade Image
        ...

  generate_ssl:
    runs-on: ubuntu-latest
    needs: prepare
    strategy:
      matrix:
        stage:
          - web1.com
          - web2.com
          - web3.com
    steps:
      - name: Generate SSL
        ...

However, it appears that prepare is always running last, instead of first:

image

I monitored the jobs running, and prepare definitely ran last.

Without needs: prepare, the same happened too.
I also tried putting "prepare" at the bottom rather than above "generate_ssl" (in case Gitea Actions somehow were just reversing the order of the jobs), and the exact same happens, with the same order as above.

Is this a bug, or am I doing something wrong here?

Thank you very much!

Hey! I have something like this: ```yaml jobs: prepare: runs-on: ubuntu-latest steps: - name: Prepare and Upgrade Image ... generate_ssl: runs-on: ubuntu-latest needs: prepare strategy: matrix: stage: - web1.com - web2.com - web3.com steps: - name: Generate SSL ... ``` However, it appears that `prepare` is always running **last**, instead of **first**: ![image](/attachments/390e14b4-e9e3-4dd8-805a-613e5db6357e) I monitored the jobs running, and `prepare` definitely ran last. Without `needs: prepare`, the same happened too. I also tried putting "prepare" at the bottom rather than above "generate_ssl" (in case Gitea Actions somehow were just reversing the order of the jobs), and the exact same happens, with the same order as above. Is this a bug, or am I doing something wrong here? Thank you very much!
9.2 KiB
Author

Alright... looks like the jobs are simply being sorted alphabetically, and definitely, the needs isn't working.

image

image

Alright... looks like the jobs are simply being sorted alphabetically, and definitely, the `needs` isn't working. ![image](/attachments/3213feff-b9d9-4ac4-9c37-7a5a47a4ed60) ![image](/attachments/79b58903-64c4-40c2-8d0f-03666b1dfd13)
lunny added the
kind
bug
label 2023-03-25 03:12:54 +00:00
Owner

It shouldn't be. I'll try to fix it later.

It shouldn't be. I'll try to fix it later.
Owner
Fixed by https://github.com/go-gitea/gitea/pull/23789
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act_runner#77
No description provided.