backstage: ci/cd view: Build status is always completed and green even when it build fails
Expected Behavior
- Status indicator on the each build step is correct colour and status text
Current Behavior
- When the build fails each build step is listed as
Completed with a green status mark
Possible Solution
- Update the status text and colour to reflect a more realistic status
Steps to Reproduce
- Have a component with builds enabled like the CRA template
- Create a failing build
- Head to the CI/CD tab, and check out the failing build steps
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 29 (15 by maintainers)
Commits related to this issue
Of course!
So we are talking about the @backstage/plugin-github-actions package which is located in
plugins/github-actions. I think mainly there are 2 points of interest -plugins/github-actions/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx- there is no failed case atm, but that doesn’t give explanation about why they all are just green, cause the default case supposed to beStatusPending. The other one isplugins/github-actions/src/api/GithubActionsClient.ts- the implementation of the api for the plugin, where you can debug what’s the real status is and why it’s always shown as a green 😃Hi @erictnilsson
It’s amazing that you found the root cause of the issue this quick. Your comment is very comprehensive as well.
I’m even newer to all this (as evident by the amount of time I took to just recreate the bug). You’re definitely more qualified to fix this! I think it’s best you take it from here.
Good luck!
P.S. If you need help recreating the error, you know who to ask.
@rajatdiptabiswas perfect! apologies it’s been a ride to try get to this point but now we have something!
ok I think the annotations are not merged yet, so you might not get the github for free with CRA, can you try the SSR template and see if that works?
Ok it’s mainly the part that looks like this in the documentation:
Yeah you’ll net to get setup with a Personal Access token to be able to create the repositories in Github.
Take a look at these docs to get the scaffolder set up correctly. https://backstage.io/docs/features/software-templates/installation
So it looks to me that you’re trying to develop on backstage by using a copy of backstage that you made by using
npx @backstage/create-app? Is that correct?I think you were on the right track, but we’ve updated that template that you create by running that command a lot recently with different releases, if you wanting to develop on backstage we recommend you follow this guide https://backstage.io/docs/getting-started/running-backstage-locally to get yourself set up with a clone of the repo rather than something that can drift out of date when we do releaes.
It’s not a problem at all, let’s see if we can get you set up with a development environment that we can replicate the issue first.
If you follow the guide before, you should be able to do the same commands as before, but I think you’ll get past the
schemaissue that you ran in to.You’ll need to create a
Create React Apptemplate with docker installed, and it should successfully create the repo where you choose, and after it’s created is where the bug occurs.Can you try the above and let me know what you see after trying to create a CRA template