apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.56k stars 1.17k forks source link

Remove `fail-fast` matrix strategy from GitHub Actions #5421

Closed clayburn closed 1 year ago

clayburn commented 1 year ago

Description

Currently, every GitHub Actions workflow contains the fail-fast matrix strategy. However, none of these workflows are actually utilizing a matrix. Further, the on demand workflow has an improper indentation of this strategy block that causes a syntactical error.

This change remove the no-op strategy altogether to fix the broken on demand workflow and remove the IDE warnings regarding the missing matrix declaration.

Related issue and scope

My changes affect the following components

Types of changes

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Merging #5421 (e643007) into master (88156c3) will decrease coverage by 0.48%. The diff coverage is n/a.

:exclamation: Current head e643007 differs from pull request most recent head f657a87. Consider uploading reports for the commit f657a87 to get more accurate results

@@            Coverage Diff             @@
##           master    #5421      +/-   ##
==========================================
- Coverage   76.84%   76.37%   -0.48%     
==========================================
  Files         241      241              
  Lines       14630    14630              
  Branches      616      616              
==========================================
- Hits        11243    11173      -70     
- Misses       3387     3457      +70     

see 16 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

clayburn commented 1 year ago

From the linked documentation on fail-fast:

jobs..strategy.fail-fast applies to the entire matrix. If jobs..strategy.fail-fast is set to true, GitHub will cancel all in-progress and queued jobs in the matrix if any job in the matrix fails. This property defaults to true.

This strategy block is specifically used to create a matrix strategy in order to run a job multiple times with different parameters. For example, you may do something like this to run a job against multiple operating systems:

strategy:
  fail-fast: true
  matrix:
    os: [ubuntu-latest, windows-latest]

In this case, if say ubuntu-latest were to fail, then windows would be cancelled. But since you are not using a matrix strategy like this, the fail-fast would be a no-op.

I also get this warning in my IDE, although I do not know where to locate the schema it is using for this validation:

Screenshot 2023-06-21 at 8 09 55 AM

style95 commented 1 year ago

@clayburn Got it. Thank you for the explanation. I confirmed a build with the current master immediately stops on an error. https://github.com/apache/openwhisk/pull/5423