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
GithubActions Logging Implementation #2172
Conversation
Mistake in using outdated repo. . . revising now. |
Regarding repo - you can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Some comments below:
owner: string; | ||
repo: string; | ||
runId: number; | ||
}): Promise<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you avoid any
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call out. I plugged in Promise<EndpointInterface>
and have good results. Will place in the update.
ExpansionPanelSummary, | ||
} from '@material-ui/core'; | ||
|
||
import React, {Suspense} from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like prettier wasn't ran here
if (!entityCompoundName.name) { | ||
// TODO(shmidt-i): remove when is fully integrated | ||
// into the entity view | ||
entityCompoundName = { | ||
kind: 'Component', | ||
name: 'backstage', | ||
namespace: 'default', | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soon will be gone, but nothing to do now ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaand since #2076 was merged, this is subject to be redone similar to
https://github.com/spotify/backstage/blob/8888b0c801002dd4112615955c2a2799f32015a9/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx#L157
Ping me on discord if you have any questions, will be happy to help you out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the new look!👌 I will look over the changes from what I see it's basically just removing the entityCompoundName
in favor of the imported Entity but I'll reach out if I run into any questions
}} | ||
> | ||
<Typography variant="button"> | ||
{jobLogs.value === null ? "No Logs to Display" : "Job Log"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some loading state here would be great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this one I just tested while a build was in progress and see the issue with this currently. I will update to check for in progress or not and display accordingly.
Just a small conflict left! (oh I also saw the comment about simplified hook for getting the project name) Let us know if we can help out. |
Fixes #2238 |
It seems like it happens from time to time, was able to find this issue cypress-io/cypress#6789 |
Good find - that's a crappy bug cypress bug... Will you retrigger the workflows? |
yarn.lock
Outdated
cypress@*: | ||
version "5.0.0" | ||
resolved "https://registry.npmjs.org/cypress/-/cypress-5.0.0.tgz#6957e299b790af8b1cd7bea68261b8935646f72e" | ||
integrity sha512-jhPd0PMO1dPSBNpx6pHVLkmnnaTfMy3wCoacHAKJ9LJG06y16zqUNSFri64N4BjuGe8y6mNMt8TdgKnmy9muCg== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may have something to do with this addition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah likely, can you make it resolve to the same version as the other one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The yarn.lock
changes should be removed from this PR, except for the lazylog addition
I tried, still failing. Let's see tomorrow, maybe time heals. Or will investigate more why this 5.0 version appeared 🤷♂️ |
Mm, the ticket you linked describes it (or one that it in turn links to perhaps?). I wonder if the dedupe command actually removes it too and makes it point to 4.x like the other one |
All updates made and conflicts resolved. |
Very good, thanks! 🎉 |
Hey, I just made a Pull Request!
Pull request for #1858
downloadJobLogsForWorkflowRun
WorkflowRunDetails
will pass in aJob
object toWorkflowRunLogs
element. We then useWorkflowRunLogs
to find the associated log for the passed in job. Once we have the run we will create a newAccordion
element to house aLazyLog
component and aModal
component. The user can either choose to expand the Accordion to view the logs within the context of the parent object, or click the Open Logs icon to the right to open the Modal. In both cases theAccordionSummary
andModal
will house aDisplayLog
object.In the event the run is still in progress or queued we will disable the associated
Accordion
object.CircularProgress was added to the Accordion element.
Syntax highlighting is used to identify if the line in LazyLog message contains error, failed or failure and changes the font color to red for easier identification of errors. Errors will also cause the boxShadow to turn red and displays a red icon.
✔️ Checklist
yarn test