-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix for issue 2232: Many lines of "Could not find any stages to run" on run #2272
Conversation
@Andy4495 this pull request has failed checks 🛠 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2272 +/- ##
===========================================
+ Coverage 61.56% 76.49% +14.92%
===========================================
Files 53 59 +6
Lines 9002 7504 -1498
===========================================
+ Hits 5542 5740 +198
+ Misses 3020 1241 -1779
- Partials 440 523 +83 ☔ View full report in Codecov by Sentry. |
@Andy4495 this pull request has failed checks 🛠 |
@Andy4495 this pull request has failed checks 🛠 |
@Andy4495 this pull request has failed checks 🛠 |
@Andy4495 this pull request has failed checks 🛠 |
After investigating the failed test cases in the codecov report, I realized that the following check in if len(stages) == 0 && err != nil {
return nil, err
} since This check was added as part of pull request #1619 (issue #1595), released in version 0.2.43. I therefore removed the check and updated the test case. |
So is it currently safe to ignore these warnings? Just want to make sure I am using |
Yes, the currently released code has the check in the wrong place, so the "Could not find any stages to run" warning is displayed even when there are jobs to run. |
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Since the recent release of act, it now fails when there are no workflow files to execute. In particular because of this PR: nektos/act#2272. With this fix, we now only run act when the workflow files were generated by actionsflow.
Fixes #2232: Many lines of "Could not find any stages to run" on run
Fixes #1993: Unexpected failure due to warning "Could not find any stages to run"
Issues #2232 and #1993 were introduced with pull request #1970.
The Problem
#1970 prints a lot of messages even when there isn’t a problem, since the check is called twice for each workflow file in the workflows directory:
In addition, it prints an error message at the end of the run, even if the job was run successfully:
This also has the side effect of causing act to return an error code (1), even if the run was successful:
The Fix
This pull request fixes these issues by making the following changes:
root.go
This solves both problems mentioned above:
With this fix, the output is as follows. Note the error code returned in both cases:
Normal run, including return code of 0:
Failed run because no valid jobs were found, including return code of 1: