actions/runner

Step Order value for Post Steps can be incorrect if a job contains composite actions

thboop opened this issue · 6 comments

Describe the bug
We provide an Order field on steps that dictate what order the steps ran in , this helps the UI populate the step order. For jobs with a composite action and a number of post job steps, occasionally that order field can collide on post steps. This is not intentional, but is typically handled by server side code to figure out what order the steps should be in.

To Reproduce
Create an action in local_action/action.yml

name: test
description: test
runs:
  using: composite
  steps:
    - name: ok
      shell: bash
      run: |
        echo "OK"

Create a workflow

name: CI
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  workflow_dispatch:

jobs:
  build:
    runs-on: [ self-hosted ]
    steps:
      - uses: actions/checkout@v2
      - uses: ./local_action
      - uses: actions/setup-node@v2

Both of the post steps with end with order: 10, this is because our composite action handler is actually iterating the order on steps despite it not being a step with a timeline record that is sent back to the server. We should probably use a dummy childTimelineRecord order for Embedded steps to fix this.

Expected behavior
A clear and concise description of what you expected to happen.

Runner Version and Platform

2.287.1
All OS

Hi @thboop,

Thanks for filing this issue! I am reproducing it now and I will get back to you as soon as possible!

Hi @nikola-jokic
May I ask you if there is an update on this?

Hey @Jaynor,

We have a PR fixing this problem which is currently in review.

@nikola-jokic Thank you so much for the update!

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions , bad bot! say away! This remains still quite the blocker for: