Skip to content

chore: update build job to include multiple major react versions #7125

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

Closed

Conversation

davidmenendez
Copy link
Contributor

@davidmenendez davidmenendez commented Mar 19, 2025

Closes #7044 & #7137

adds a new job for testing other major versions of React. since we are currently on v18 i didn't think it made sense to include 18 in the matrix, but if we wanted to be extra safe we could also include it [17, 18]

@davidmenendez davidmenendez requested a review from a team as a code owner March 19, 2025 17:46
@davidmenendez davidmenendez requested review from makafsal and anamikaanu96 and removed request for a team March 19, 2025 17:46
Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 1f181ab
🔍 Latest deploy log https://app.netlify.com/projects/carbon-for-ibm-products/deploys/68385dc678c12a00082737a8
😎 Deploy Preview https://deploy-preview-7125--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for ibm-products-web-components ready!

Name Link
🔨 Latest commit 1f181ab
🔍 Latest deploy log https://app.netlify.com/projects/ibm-products-web-components/deploys/68385dc67e8f830008a487fa
😎 Deploy Preview https://deploy-preview-7125--ibm-products-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.14%. Comparing base (80583cf) to head (1f181ab).
Report is 63 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7125      +/-   ##
==========================================
+ Coverage   84.48%   92.14%   +7.66%     
==========================================
  Files         425       26     -399     
  Lines       17247     4151   -13096     
  Branches     4575      263    -4312     
==========================================
- Hits        14571     3825   -10746     
+ Misses       2676      326    -2350     
Components Coverage Δ
ibm-products ∅ <ø> (∅)
ibm-products-web-components 92.14% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davidmenendez
Copy link
Contributor Author

update: the action appears to be working as intended, but unfortunately the tests are failing. i'm currently investigating getting the tests to pass in v17

@davidmenendez
Copy link
Contributor Author

code coverage dropped, but it's necessary at the moment until we can fix a lot of these flaky tests.

anamikaanu96
anamikaanu96 previously approved these changes May 20, 2025
Copy link
Contributor

@anamikaanu96 anamikaanu96 left a comment

Choose a reason for hiding this comment

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

Code looks good to me 🎉
Please open a separate ticket for code coverage.

Copy link
Member

@matthewgallo matthewgallo left a comment

Choose a reason for hiding this comment

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

There are a lot of .skips that have been added. Do we still need them?

@davidmenendez
Copy link
Contributor Author

@matthewgallo i'm going to add a followup issue to address this. but basically there's some issue with async functionality between the major test versions. rather then try to hunt down the problematic code on this PR i decided to just skip it for now.

title,
tooltipAlign,
...rest
} = props;
Copy link
Member

Choose a reason for hiding this comment

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

More of a question, I've seen this change across a handful of components, how come you've moved the prop destructuring to inside the component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i find this pattern to be useful because you can easily log all the props before separating them. it also declutters the function signature a bit.

- name: Add React version ${{ matrix.react }}
run: |
yarn add react@${{ matrix.react }} react-dom@${{ matrix.react }}
yarn workspace @carbon/ibm-cloud-cognitive-core add react@${{ matrix.react }} react-dom@${{ matrix.react }} -D
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
yarn workspace @carbon/ibm-cloud-cognitive-core add react@${{ matrix.react }} react-dom@${{ matrix.react }} -D
yarn workspace @carbon/ibm-products add react@${{ matrix.react }} react-dom@${{ matrix.react }} -D

Comment on lines +156 to +157
yarn workspace @carbon/ibm-cloud-cognitive-core add @carbon/react@^1.28.0 -D
yarn workspace @carbon/ibm-products add @carbon/react@^1.28.0 -P
Copy link
Member

Choose a reason for hiding this comment

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

Do you need both of these lines? Probably just the second, right? packages/core isn't really used for anything now.

Also, how come you're installing 1.28.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah good call now that core has been decoupled.

1.28 if i remember correctly i think this version didn't include a bug that was added in a subsequent 1.x version. this PR has been sitting around for a while so i wish i could remember the specifics of why up top, but i remember there was a specific reason

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm looks like core still needs to be included or something breaks. this might need to be looked at separately

@davidmenendez
Copy link
Contributor Author

its been 4 months since this PR was opened and now that we're on the cusp of react 19 support i don't think it makes sense to keep this going. i will open up a follow up issue to investigate CI testing for 18 + 19. based on what i've seen with the latest major version of jest it may prove to be just as tricky to implement, but we will see!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Infrastructure]: update GH workflow to test different major versions of react
4 participants