Skip to content

chore: refactor Alert-related components#31858

Merged
mistercrunch merged 13 commits intomasterfrom
alerts_refactor
Jan 24, 2025
Merged

chore: refactor Alert-related components#31858
mistercrunch merged 13 commits intomasterfrom
alerts_refactor

Conversation

@mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Jan 15, 2025

Chiseling at #31590 that has gotten big / unruly, in this PR is a refactor of Alert-related components, going vanilla AntD.

Also here. Deprecating colors.alerts since it's ambiguous/redundant with warning/error and does not exist in antd-v5

Screenshot 2025-01-14 at 11 42 05 PM Screenshot 2025-01-14 at 11 41 47 PM

@korbit-ai
Copy link

korbit-ai bot commented Jan 15, 2025

Korbit doesn't automatically review large (500+ lines changed) pull requests such as this one. If you want me to review anyway, use /korbit-review.

@dosubot dosubot bot added the alert-reports Namespace | Anything related to the Alert & Reports feature label Jan 15, 2025
@geido
Copy link
Member

geido commented Jan 15, 2025

From some functional testing:

  • A bit of an edge case but the error looks like it is not correctly padded in full page width
Screenshot 2025-01-15 at 17 26 57
  • Is a chart failure considered a warning?
Screenshot 2025-01-15 at 17 28 55
  • Same, for a chart in Explore. I am thinking these should probably be errors.
Screenshot 2025-01-15 at 17 30 49
  • The positioning of the icon on the left of the text looks off.

  • In general, the text color of these alerts seem to stick out a bit too much. I know we want be as vanilla as possible but I'd like to hear @kasiazjc opinion too.

title: ReactNode;
description?: string;
import { useState } from 'react';
import { Modal, Tooltip } from 'antd';
Copy link
Member

Choose a reason for hiding this comment

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

Why importing from antd directly? From one side this is the previous version of antd and on the other hand, I think we said to import components from our wrappers not from antd directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

ooops. We really need a lint rule to catch this...

Copy link
Member

Choose a reason for hiding this comment

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

There is one, but it's set to warn.... I'll see about flipping it to Error

Copy link
Member

Choose a reason for hiding this comment

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

Done! #31963

@justinpark justinpark self-requested a review January 15, 2025 18:25
@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Jan 16, 2025
@github-actions github-actions bot removed the doc Namespace | Anything related to documentation label Jan 16, 2025
@mistercrunch mistercrunch force-pushed the alerts_refactor branch 3 times, most recently from c5c85ea to b96705d Compare January 18, 2025 00:26
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Jan 19, 2025
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Jan 22, 2025
@mistercrunch
Copy link
Member Author

Looks like a lot of the flakiness is there on master too, also couldn't repro locally, starting to think we should disable the flaky tests.

Lots of red in the last set of commits, no clear trigger as to what triggered it.
Screenshot 2025-01-22 at 8 54 32 PM

projectId: 'ud5x2f',
retries: {
runMode: 2,
runMode: 3,
Copy link
Member

Choose a reason for hiding this comment

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

Heads up that with this and the automatic retry, there is a potential of running this test 9 times which could extend run time.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, I know, getting a bit desperate here, seems the more I disable the more seem to fail...

Copy link
Member Author

Choose a reason for hiding this comment

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

Wondering if we're best having a strick no-flakiness policy and less retries (?) Suck to wait 6 or 9 times the time to get a true negative....

Copy link
Member

Choose a reason for hiding this comment

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

i wonder if any of them are dependent on other tests we have disabled, but if it's taking more time to pass, i think just go with it for now.

with:
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
name: cypress-artifact-${{ github.run_id }}-${{ github.job }}
name: cypress-artifact-${{ github.run_id }}-${{ github.job }}-${{ matrix.browser }}-${{ matrix.parallel_id }}
Copy link
Member Author

Choose a reason for hiding this comment

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

This prevents collisions across the matrix

Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@sadpandajoe sadpandajoe left a comment

Choose a reason for hiding this comment

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

All the cypress changes LGTM

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

Thanks!

@mistercrunch mistercrunch merged commit 6eb87e0 into master Jan 24, 2025
48 checks passed
@mistercrunch mistercrunch deleted the alerts_refactor branch January 24, 2025 16:39
mistercrunch added a commit that referenced this pull request Jan 28, 2025
I got a bit confused and reckless on
#31858, when I disabled many
cypress tests, many of which are or may be flaky at times, but in this
instance were probably triggered by some real issues in that PR.

Renabling them all and will monitor PRs and master merges to re-disable
the ones flaking as needed
mistercrunch added a commit that referenced this pull request Jan 29, 2025
I got a bit confused and reckless on
#31858, when I disabled many
cypress tests, many of which are or may be flaky at times, but in this
instance were probably triggered by some real issues in that PR.

Renabling them all and will monitor PRs and master merges to re-disable
the ones flaking as needed
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 5.0.0 First shipped in 5.0.0 labels Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alert-reports Namespace | Anything related to the Alert & Reports feature 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels github_actions Pull requests that update GitHub Actions code packages plugins preset-io size/XXL 🚢 5.0.0 First shipped in 5.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants