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: [M3-8923] - Fix Account Maintenance Account X-Filter #11277

Conversation

bnussman-akamai
Copy link
Member

@bnussman-akamai bnussman-akamai commented Nov 18, 2024

Description 📝

  • Fixes a faulty X-Filter causing features using the GET /v4/account/maintenance to not yield any results
  • I will add some tests in a follow up to this PR 🧪

Preview 📷

Note

Without this change, none of the following maintenance banners / tooltips would show 😢

Screenshot 2024-11-18 at 2 44 41 PM
Screenshot 2024-11-18 at 11 29 54 AM

How to test 🧪

  • Refer to my internal guide I posted in Slack on how to test 📖
    • If you don't have the time to fully test, you can just check this PR for spelling / syntax, the changes are relatively safe and minimal

As an Author, I have considered 🤔

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@bnussman-akamai bnussman-akamai self-assigned this Nov 18, 2024
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner November 18, 2024 22:35
@bnussman-akamai bnussman-akamai requested review from carrillo-erik and hkhalil-akamai and removed request for a team November 18, 2024 22:35
@@ -49,7 +50,7 @@ export const LinodesRoutes = () => {
export const LinodesLandingWrapper = React.memo(() => {
const { data: accountMaintenanceData } = useAllAccountMaintenanceQuery(
{},
{ status: { '+or': ['pending, started'] } }
Copy link
Member Author

Choose a reason for hiding this comment

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

The primary fix was change the change 'pending, started' to 'pending', 'started'

The API would return 0 results because 'pending, started' is not a valid status. (I guess the API doesn't error in case of an invalid status on this endpoint)

@@ -0,0 +1,3 @@
export const PENDING_MAINTENANCE_FILTER = Object.freeze({
status: { '+or': ['pending', 'started'] },
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 is the fixed filter. I just moved to to a shared constant because it is used in a handful of places.

Copy link

github-actions bot commented Nov 18, 2024

Coverage Report:
Base Coverage: 86.88%
Current Coverage: 86.88%

@bnussman-akamai bnussman-akamai added the Bug Fixes for regressions or bugs label Nov 19, 2024
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 453 passing tests on test run #2 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing453 Passing2 Skipped84m 7s

Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a comment

Choose a reason for hiding this comment

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

Thanks! I can't test this since I don't have devenv set up but the filter looks good!

@jaalah-akamai jaalah-akamai added the Approved Multiple approvals and ready to merge! label Nov 21, 2024
@bnussman-akamai bnussman-akamai merged commit d8812c4 into linode:develop Nov 21, 2024
23 checks passed
Copy link

cypress bot commented Nov 21, 2024

Cloud Manager E2E    Run #6861

Run Properties:  status check failed Failed #6861  •  git commit d8812c4eef: fix: [M3-8923] - Fix Account Maintenance Account X-Filter (#11277)
Project Cloud Manager E2E
Branch Review develop
Run status status check failed Failed #6861
Run duration 34m 37s
Commit git commit d8812c4eef: fix: [M3-8923] - Fix Account Maintenance Account X-Filter (#11277)
Committer Banks Nussman
View all properties for this run ↗︎

Test results
Tests that failed  Failures 2
Tests that were flaky  Flaky 5
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 452
View all changes introduced in this branch ↗︎

Tests for review

Failed  cypress/e2e/core/linodes/linode-storage.spec.ts • 2 failed tests

View Output Video

Test Artifacts
linode storage tab > delete disk Screenshots Video
linode storage tab > add a disk Screenshots Video
Flakiness  linodes/linode-storage.spec.ts • 1 flaky test

View Output Video

Test Artifacts
linode storage tab > resize disk Screenshots Video
Flakiness  linodes/linode-config.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Linode Config management > End-to-End > Clones a config Screenshots Video
Flakiness  linodes/clone-linode.spec.ts • 1 flaky test

View Output Video

Test Artifacts
clone linode > can clone a Linode from Linode details page Screenshots Video
Flakiness  domains/smoke-clone-domain.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Clone a Domain > clones a domain Screenshots Video
Flakiness  vpc/vpc-landing-page.spec.ts • 1 flaky test

View Output Video

Test Artifacts
VPC landing page > can update and delete VPCs from VPC landing page Screenshots Video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Bug Fixes for regressions or bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants