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

chore: [M3-8524] - Attempt to get dependencies in a more healthy state #11005

Conversation

bnussman-akamai
Copy link
Member

@bnussman-akamai bnussman-akamai commented Sep 25, 2024

Description 📝

Side Effects

  • I had to fix some issues that TypeScript caught
    • This happened because our yarn.lock was re-generated, causing our our TypeScript version to upgrade to the latest minor version. The latest version of TypeScript got smarter and caught a few things!
  • Had to do something hacky in our Vite configs. I think it is due to Yarn v1's hoisting behavior because the same issue does not happen with pnpm. Shouldn't be a big deal / blocker at all, we'll just want to clean it up later
  • ts-node (used by our cypress pipeline) stopped working so I just replaced ts-node with a better alternative called tsx
  • A UI bug with the Autocomplete was introduced and fixed

How to test 🧪

Prerequisites

  • Checkout this PR
  • Run yarn for good measure
    • Verify yarn.lock does not change when you do this

Things to check

  • Verify everything works like normal locally (Vite dev server, Storybook, etc...) 💻
  • Verify Github Actions pass ✅
  • Verify Baker jobs pass ✅
  • Look at the resolutions that are removed 👀
    • Run yarn why [package name here] and verify the version reported by yarn is not vulnerable (verify the version is equal to or newer than what the resolution was) 📦
  • Look at the dependabot alerts and verify this PR installs versions that will resolve the alerts
    • Use yarn why [package name here] and verify our repo uses version that is patched and not vulnerable (the depenedabot page will tell you what versions are acceptable)

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

@bnussman-akamai bnussman-akamai added the Dependencies Pull requests that update a dependency file label Sep 25, 2024
@bnussman-akamai bnussman-akamai self-assigned this Sep 25, 2024
@bnussman-akamai bnussman-akamai requested review from a team as code owners September 25, 2024 17:49
@bnussman-akamai bnussman-akamai requested review from cliu-akamai, dwiley-akamai and abailly-akamai and removed request for a team September 25, 2024 17:49
@@ -112,7 +112,7 @@ export const UnifiedMigrationPanel = (props: Props) => {
}
status="help"
tooltipPosition="right"
width={[theme.breakpoints.up('sm')] ? 450 : 300}
Copy link
Member Author

Choose a reason for hiding this comment

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

We had a handful of things like this. We would get a type error saying [theme.breakpoints.up('sm')] is always truthy so I just updated the code to just use 450

Copy link

github-actions bot commented Sep 25, 2024

Coverage Report:
Base Coverage: 86.98%
Current Coverage: 86.98%

@@ -208,7 +208,7 @@
"simple-git": "^3.19.0",
"storybook": "^8.3.0",
"storybook-dark-mode": "^4.0.1",
"ts-node": "^10.9.2",
"tsx": "^4.19.1",
Copy link
Member Author

@bnussman-akamai bnussman-akamai Sep 25, 2024

Choose a reason for hiding this comment

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

ts-node was causing our cypress helper scripts issues. I found tsx. It fixes the issue and appears to be a better / more lightweight alternative to ts-node

Copy link
Contributor

@jdamore-linode jdamore-linode Sep 26, 2024

Choose a reason for hiding this comment

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

I know we've also talked about using Bun for these scripts too -- iirc it's only a couple of the scripts in the scripts dir that we use for the Jenkins pipeline that even rely on ts-node, but lately I've been opting to keep that type of stuff in internal repos. I'd be up to move these out of Cloud altogether if it means we can drop the ts-node/tsx dependency

Copy link
Member Author

@bnussman-akamai bnussman-akamai Sep 26, 2024

Choose a reason for hiding this comment

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

I like the idea of moving scripts like this in internal repos. In the mean time (and because we don't have Bun readily available in CI) I'm totally cool with keeping tsx around. It seems very minimal and useful for us even for things like scripts/package-versions/index.js (if we were to make it .ts)

Eventually, I'd love Bun to be our go-to tool for running this stuff, but we should probably get that setup in CI and formalized before we commit to that

@@ -336,7 +336,6 @@ export const lightTheme: ThemeOptions = {
svg: {
color: Color.Neutrals[40],
},
top: 'unset',
Copy link
Member Author

@bnussman-akamai bnussman-akamai Sep 25, 2024

Choose a reason for hiding this comment

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

For whatever reason, this PR's changes introduced this UI bug.

Screenshot 2024-09-25 at 6 18 11 PM

Removing this line from the theme fixes it.

@bnussman-akamai bnussman-akamai changed the title chore: Attempt to get dependencies in a more healthy state chore: [M3-8524] - Attempt to get dependencies in a more healthy state Sep 25, 2024
Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

This is a thing of beauty - thx for tackling this important update

things do appear to be at parity and it's great to be able to trust our tests.

one thing i did notice is new console warnings (PrimaryNav simingly)
Screenshot 2024-09-26 at 12 44 58

I did not notice any others so far but i'll keep looking

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

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

CM, dev server, and all checks look good ✅

I'm seeing this when I attempt to run Storybook:

Screenshot

Screenshot 2024-09-26 at 6 05 16 PM

"serve": "^14.0.1",
"simple-git": "^3.19.0",
"storybook": "^8.3.0",
"storybook-dark-mode": "^4.0.1",
"ts-node": "^10.9.2",
"storybook-dark-mode": "4.0.1",
Copy link
Member Author

Choose a reason for hiding this comment

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

I pinned this to 4.0.1 because of hipstersmoothie/storybook-dark-mode#282

This will fix the issue @dwiley-akamai caught with Storybook. We'll just need to keep an eye out for storybook-dark-mode to provide a fix before we upgrade storybook-dark-mode next

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

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

Storybook looks good now as well 🚀

@bnussman-akamai bnussman-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Sep 27, 2024
@bnussman-akamai bnussman-akamai merged commit f006ce8 into linode:develop Sep 27, 2024
20 checks passed
Copy link

cypress bot commented Sep 27, 2024

Cloud Manager E2E    Run #6585

Run Properties:  status check passed Passed #6585  •  git commit f006ce89d4: chore: [M3-8524] - Attempt to get dependencies in a more healthy state (#11005)
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #6585
Run duration 24m 35s
Commit git commit f006ce89d4: chore: [M3-8524] - Attempt to get dependencies in a more healthy state (#11005)
Committer Banks Nussman
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
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 408
View all changes introduced in this branch ↗︎

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! Dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants