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

test: [M3-8616] - Fix failures in DBaaS update tests #10975

Conversation

jdamore-linode
Copy link
Contributor

@jdamore-linode jdamore-linode commented Sep 19, 2024

Description 📝

Recent improvements made for DBaaS v2 began causing intermittent test failures in update-database.spec.ts. This PR makes a few changes to resolve these failures:

  • Mocks the dbaasV2 feature flag to be disabled
  • Mocks the account so that it is lacking the Managed Databases Beta capability
  • Updates the test's database mock to force the platform field to always reflect the legacy platform
    • ℹ️ This seems to be what actually fixed the test, and appears to take precedence over the DBaaS v2 feature flag and account capability
    • ⛔️ Going forward we might want to discourage using pickRandom or any similar utils that make our factories less deterministic since they're used throughout the codebase/tests

Target release date 🗓️

N/A

How to test 🧪

We can't rely solely on CI for this since this failure is only intermittent, but running the tests in update-database.spec.ts a few times in a row without observing any failures can help increase confidence that the tests are fixed.

repeat 3 yarn cy:run -s "cypress/e2e/core/databases/update-database.spec.ts"

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
    • Thinking a changeset might not be necessary here since these failures didn't make it to a release -- any thoughts?
  • 🧪 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

@jdamore-linode jdamore-linode added DBaaS Relates to Database as a Service Ready for Review labels Sep 19, 2024
@jdamore-linode jdamore-linode self-assigned this Sep 19, 2024
@jdamore-linode jdamore-linode requested a review from a team as a code owner September 19, 2024 19:32
@jdamore-linode jdamore-linode requested review from cliu-akamai and removed request for a team September 19, 2024 19:32
@mjac0bs mjac0bs self-requested a review September 19, 2024 19:34
Copy link

github-actions bot commented Sep 19, 2024

Coverage Report:
Base Coverage: 87.12%
Current Coverage: 87.12%

Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

Going forward we might want to discourage using pickRandom or any similar utils that make our factories less deterministic since they're used throughout the codebase/tests

@jdamore-linode - Should we call this out in our docs?

Thanks for the quick investigation and fixes - I did observe this passing 5/5 times locally.

@mjac0bs mjac0bs added the Approved Multiple approvals and ready to merge! label Sep 20, 2024
@jdamore-linode jdamore-linode requested a review from a team as a code owner September 20, 2024 17:10
@jdamore-linode jdamore-linode requested review from dwiley-akamai and abailly-akamai and removed request for a team September 20, 2024 17:10
@jdamore-linode
Copy link
Contributor Author

Should we call this out in our docs?

@mjac0bs Good idea! I just pushed a pretty quick note to that section, but there might be some opportunity to flesh out our factory guidelines a bit in the future

@jdamore-linode
Copy link
Contributor Author

Merging despite test failures:

  • DBaaS update tests are passing, which was the goal of this PR
  • Failures (including unit test failures) are confirmed not to be related to these changes

@jdamore-linode jdamore-linode merged commit f90ac7f into linode:develop Sep 20, 2024
17 of 20 checks passed
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! DBaaS Relates to Database as a Service Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants