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

fix: for muliple pipelines report failure to load #1721

Merged

Conversation

mcwarman
Copy link
Member

@mcwarman mcwarman commented Oct 24, 2023

Fix #1720

  • Update LoadConfigurations to add error report
  • Add LoadCongifurations tests

Test

To test this pull request, you can run the following commands:

cd  pkg/core/engine/
go test

Additional Information

Was done slightly differently that suggested in #1720 as e.Reports was available appended rather than charging the return.

- Update LoadConfigurations to add error report
- Add LoadCongifurations tests
@mcwarman mcwarman force-pushed the bugfix/report-failure-to-load-pipelines branch from dd5fcea to 5959b29 Compare October 24, 2023 15:34
@mcwarman
Copy link
Member Author

./bin/updatecli diff
+++++++++++
+ PREPARE +
+++++++++++

Loading Pipeline "updatecli.d/pre-commit-megalinter.yaml"
WARNING: Updatecli binary version is unset. This means you are using a development version that ignores manifest version constraint.
Loading Pipeline "updatecli.d/updatecli.yaml"
ERROR: failed loading pipeline(s)
        * "updatecli.d/updatecli.yaml" - scm id "default1" doesn't exist
// ...
REPORTS:



✗ :

        Error: "updatecli.d/updatecli.yaml" - scm id "default1" doesn't exist

✔ pre-commit MegaLinter:
        Source:
                ✔ [latestRelease] Get latest pre-commit MegaLinter release
        Condition:
                ✔ [ensurePreCommitOrder] Ensure pre-commit repo order
        Target:
                ✔ [preCommitConfig] Update MegaLinter pre-commit  to v7.4.0

Run Summary
===========
Pipeline(s) run:
  * Changed:    0
  * Failed:     1
  * Skipped:    0
  * Succeeded:  1
  * Total:      2
ERROR: ✗ 1 over 2 pipeline failed
ERROR: command failed: 1 over 2 pipeline failed
echo $?
1

@olblak
Copy link
Member

olblak commented Oct 24, 2023

Thanks for the pull request
I just did some testing and it works great.

@olblak olblak added the bug Something isn't working label Oct 24, 2023
@olblak olblak merged commit 948c6f3 into updatecli:main Oct 24, 2023
6 checks passed
@mcwarman mcwarman deleted the bugfix/report-failure-to-load-pipelines branch October 25, 2023 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to load pipeline not reported when there are multiple configs
2 participants