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(3247): virtual job icon is not used when the graph redraw #1275

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

y-oksaku
Copy link
Contributor

@y-oksaku y-oksaku commented Dec 3, 2024

Context

Virtual job icon is not used after the workflow graph is redrew. (e.g. Uses stops the build)

Objective

Use virtual job icon correctly when the workflow graph is redrew.

References

Issue: screwdriver-cd/screwdriver#3247

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@@ -28,7 +28,7 @@ const STATUS_MAP = {
* @return {String} Unicode character that maps to an icon in screwdriver icon font
*/
export function icon(status, isVirtual) {
if (isVirtual && (!status || ['SUCCESS', 'WARNING', 'CREATED'])) {
Copy link
Contributor Author

@y-oksaku y-oksaku Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right hand side of this statement is always true.

I think that this might means ['SUCCESS', 'WARNING', 'CREATED'].includes(status).
But if use this statement then the icon will be able to change QUEUED to VIRTUAL.

In this case, we need to recalculate the icon size and its position when redrawing. This would be difficult.

This change explicitly allowed the virtual icon to have queued status (i.e. allow blue virtual icon).

@VonnyJap VonnyJap requested a review from sagar1312 December 3, 2024 07:15
@tkyi tkyi merged commit 15f49be into screwdriver-cd:master Dec 4, 2024
2 checks passed
@y-oksaku y-oksaku deleted the fix-virtual-icon branch December 4, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants