Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

DEVPROD-1101: Update previous commits selector #2120

Merged
merged 7 commits into from
Nov 3, 2023

Conversation

sophstad
Copy link
Contributor

@sophstad sophstad commented Oct 27, 2023

DEVPROD-1101 - This is what I worked on over skunkworks because it's always irked me 😁

Description

  • Replace select pattern with dropdown menu to be more in line with LeafyGreen design guidelines.
  • Replace reducer with a memoized function that returns the relevant URLs. A state is not really necessary for this use case.

Screenshots

image

Testing

  • Update tests to pass with new UI

@sophstad sophstad changed the title EVG-19070: Update previous commits selector DEVPROD-1101: Update previous commits selector Oct 27, 2023
@cypress
Copy link

cypress bot commented Oct 27, 2023

1 failed test on run #13634 ↗︎

1 600 7 0 Flakiness 0

Details:

Codegen
Project: Spruce Commit: d61260de6a
Status: Failed Duration: 19:14 💡
Started: Nov 3, 2023 3:59 PM Ended: Nov 3, 2023 4:18 PM
Failed  cypress/integration/task/test_table.ts • 1 failed test

View Output Video

Test Artifacts
Tests Table > Test Status Selector > Clicking on 'All' checkbox adds all statuses to URL Output Screenshots Video

Review all test suite changes for PR #2120 ↗︎

@sophstad sophstad requested a review from a team October 30, 2023 16:53
@sophstad sophstad marked this pull request as ready for review October 30, 2023 16:53
Copy link
Contributor

@minnakt minnakt left a comment

Choose a reason for hiding this comment

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

nice job! 🥰

No previous versions available.
</Tooltip>
) : (
<Menu trigger={<Button size={Size.Small}>Previous commits</Button>}>
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like it might be helpful to have a dropdown caret on the button, otherwise I probably wouldn't assume it has menu options (esp because it's adjacent to buttons that do not have menu options)

Screenshot 2023-11-01 at 12 57 46 PM

: `There is no version that satisfies this criteria.`}
</Tooltip>
)}
{versionMetadata?.isPatch ? "Base" : "Previous"} commit
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that it's not obvious that these options send you to a different page, which I think could be fixed by just tweaking the menu options to start with "Go to..." or "View..."

Screenshot 2023-11-01 at 1 04 00 PM

Comment on lines 48 to 49
// We don't error for this query because it is the default query that is run when the page loads.
// If it errors it probably means there is no base version, which is fine.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can delete this comment since there's a skip on this now :0 (doesn't run by default)

Copy link
Contributor

Choose a reason for hiding this comment

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

yayyyy bye 👋


return {
[CommitType.Base]: getTaskRoute(parentTask.id),
[CommitType.LastPassing]: getTaskRoute(
Copy link
Contributor

Choose a reason for hiding this comment

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

This link would always default to the parent task even if it does not pass

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry if I'm misunderstanding, doesn't this test case assert that the last passing task works correctly?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for looping back I missed that!

Copy link
Contributor

@khelif96 khelif96 left a comment

Choose a reason for hiding this comment

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

LGTM mod one comment


return {
[CommitType.Base]: getTaskRoute(parentTask.id),
[CommitType.LastPassing]: getTaskRoute(
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for looping back I missed that!

.buildVariants ?? [];
if (buildVariants.length > 1) {
reportError(
new Error("Multiple build variants matched previous commit search.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there more info here that we can add to the sentry search? Or will sentry give us the necessary data be default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sentry will include a breadcrumb with the GraphQL query sent before this error. I think that's enough information to start investigating this.

@sophstad sophstad merged commit 2127091 into evergreen-ci:main Nov 3, 2023
2 checks passed
@sophstad sophstad deleted the EVG-19070 branch November 3, 2023 19:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants