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

feat: IATR non-failure run statuses #25286

Merged
merged 8 commits into from
Dec 29, 2022

Conversation

astone123
Copy link
Contributor

User facing changelog

n/a, merging to a feature branch

Additional details

For some run statuses on the Debug tab, we need to display specific information, sometimes in addition to displaying the failing tests for debugging. This PR adds UI for the following run states:

  • CANCELLED
  • PASSED
  • ERRORED
  • NOTESTS
  • TIMEDOUT
  • OVERLIMIT

Steps to test

Ideally, you should create a run on your local Cloud instance for each of the statuses listed above. I was only able to actually re-create a few of them end to end (I couldn't re-create TIMEDOUT or OVERLIMIT). I would suggest checking out the tests that I added here and viewing the Percy snapshots that were generated from those tests and comparing those to the Figma.

There's an issue with the tests for PASSED and OVERLIMIT where in the test they appear towards the top of the viewport instead of further down where they should be. However, if you actually view these states on the Debug tab, they show up correctly. There should be a flex-grow class on these that create the correct height for the elements but it's not working in the tests.

How has the user experience changed?

See Percy diff

PR Tasks

  • Have tests been added/updated?
  • [na] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?

@astone123 astone123 self-assigned this Dec 27, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 27, 2022

Thanks for taking the time to open a PR!

<template>
<div
class="flex flex-col w-full px-24px justify-center items-center align-middle"
:class="{'flex-grow': ['PASSED', 'OVERLIMIT'].includes(status)}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This class doesn't seem to do anything in the tests, but it does in the actual debug tab view 🤷🏻‍♂️

const props = defineProps<{
status: CloudRunStatus
canceledAt: string | null
canceledByFullName?: string | null
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If anyone has tips on how to deal with this, I'd be happy to refactor. I guess when something is nullable in GQL, it can be either TheType | undefined | null? This leads to weird stuff with TypeScript where it's not enough to just make the prop optional, you also have to specify that it could be null. It's ugly

Copy link
Contributor

Choose a reason for hiding this comment

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

I spiked into fixing this but it's going to be a chunk of work. There's a bunch of options we can configure: https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-operations

The ones we need to figure out and standardize:

  • maybeValue (default is T | null, maybe we want undefined?)
  • we should do immutableTypes: false. This will stop generating readonly which is a bit annoying, even if it's more technically correct

An alternative in the short term might be type Maybe<T> = T | undefined | null. 🤷‍♂️

@cypress
Copy link

cypress bot commented Dec 27, 2022



Test summary

26454 0 1180 0Flakiness 29


Run details

Project cypress
Status Passed
Commit 0bf96fe
Started Dec 29, 2022 4:12 AM
Ended Dec 29, 2022 4:32 AM
Duration 19:24 💡
OS Linux Debian -
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

create-from-component.cy.ts Flakiness
1 ... > runs generated spec
2 ... > runs generated spec
commands/net_stubbing.cy.ts Flakiness
1 network stubbing > intercepting request > can delay and throttle a StaticResponse
2 network stubbing > intercepting request > can delay and throttle a StaticResponse
3 ... > with `times` > only uses each handler N times
This comment includes only the first 5 flaky tests. See all 29 flaky tests in the Cypress Dashboard.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

Some comments/questions.

packages/app/src/debug/DebugCancelledAlert.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugCancelledAlert.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugContainer.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugPageDetails.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugPageDetails.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugPageDetails.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugPageDetails.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugPageDetails.vue Show resolved Hide resolved
packages/app/src/debug/DebugPageDetails.vue Outdated Show resolved Hide resolved
packages/graphql/test/stubCloudTypes.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@mike-plummer mike-plummer left a comment

Choose a reason for hiding this comment

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

Lots of little comments/questions. Looks good for the most part, just small cleanup items

packages/app/src/debug/DebugCancelledAlert.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugCancelledAlert.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugContainer.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugContainer.vue Show resolved Hide resolved
packages/app/src/debug/DebugContainer.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugTimedout.vue Outdated Show resolved Hide resolved
packages/app/src/debug/DebugTimedout.vue Outdated Show resolved Hide resolved
packages/app/src/runs/utils/day.js Show resolved Hide resolved
packages/frontend-shared/src/locales/en-US.json Outdated Show resolved Hide resolved
Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

Please see my comment on timezones, I think getting the correct is critical.

packages/app/src/debug/DebugCancelledAlert.vue Outdated Show resolved Hide resolved
Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

My comments have been addressed

Copy link
Contributor

@mike-plummer mike-plummer left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for addressing my comments 👍

@astone123 astone123 merged commit bad5093 into feature/IATR-M0 Dec 29, 2022
@astone123 astone123 deleted the 24848-non-failure-run-statuses branch December 29, 2022 17:47
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