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

Migrate to create-plugin and Update package version for grafana-sankey-plugin and grafana-chord-plugin #536

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

yuntanghsu
Copy link
Contributor

@yuntanghsu yuntanghsu commented Oct 10, 2023

In this PR we do:

  1. Migration from toolkit to create-plugin for grafana-sankey-plugin and grafana-chord-plugin.
  2. Update node version as create-plugin doesn't support node-version < 18.
  3. Update @grafana/ui and @grafana/data for grafana-sankey-plugin and grafana-chord-plugin.
  4. Update the unit test for grafana-sankey-plugin and grafana-chord-plugin.

Reviewer can focus on files [ package.json/jest.config.js/ChordPanel.test.tsx/ChordPanel.tsx/SankeyPanel.tsx]

Note:

  1. Couple of dependencies are updated by create-plugin automatically.
  2. .config file is generated by create-plugin automatically.
  3. Do not update the version of "react" and "react-dom" to the version higher than 16, as we are using enzyme-adapter-react-16. Using version higher than 16 will break the unit test and show error Cannot read property 'child' of undefined
  4. The reason we add transformIgnorePatterns in jest.config.js is because we are not using grafana/toolkit to run the test and Jest failed to parse a file. This happens e.g. when our code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

Granafa pictures:
Screenshot 2023-10-13 at 1 24 30 PM
Screenshot 2023-10-13 at 1 24 43 PM
Screenshot 2023-10-13 at 1 25 57 PM
Screenshot 2023-10-13 at 1 26 16 PM
Screenshot 2023-10-13 at 1 26 27 PM
Screenshot 2023-10-13 at 1 26 37 PM
Screenshot 2023-10-13 at 1 33 10 PM
Screenshot 2023-10-13 at 1 33 26 PM

@yuntanghsu yuntanghsu marked this pull request as draft October 10, 2023 23:42
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #536 (a06836a) into main (25de070) will increase coverage by 0.09%.
The diff coverage is 64.70%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #536      +/-   ##
==========================================
+ Coverage   70.51%   70.60%   +0.09%     
==========================================
  Files          40       45       +5     
  Lines        5253     5511     +258     
  Branches        0       41      +41     
==========================================
+ Hits         3704     3891     +187     
- Misses       1372     1436      +64     
- Partials      177      184       +7     
Flag Coverage Δ *Carryforward flag
kind-e2e-tests 62.34% <ø> (ø)
kind-multi-cluster-e2e-tests 43.17% <ø> (ø)
python-coverage 55.75% <ø> (ø) Carriedforward from 25de070
unit-tests 70.15% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
...plugins/grafana-chord-plugin/.config/jest-setup.js 100.00% <100.00%> (ø)
...hord-plugin/.config/jest/mocks/react-inlinesvg.tsx 83.33% <83.33%> (ø)
...lugins/grafana-sankey-plugin/.config/jest-setup.js 75.00% <75.00%> (ø)
...om-plugins/grafana-chord-plugin/src/ChordPanel.tsx 70.27% <50.00%> (ø)
...-plugins/grafana-sankey-plugin/src/SankeyPanel.tsx 76.27% <50.00%> (ø)

@yuntanghsu yuntanghsu force-pushed the migration branch 5 times, most recently from 409d129 to 01f0d57 Compare October 12, 2023 23:47
@yuntanghsu yuntanghsu changed the title migrate from toolkit to create-plugin Migrate to create-plugin and Update package version for grafana-sankey-plugin and grafana-chord-plugin Oct 13, 2023
@yuntanghsu yuntanghsu marked this pull request as ready for review October 13, 2023 20:38
@yuntanghsu
Copy link
Contributor Author

/theia-test-e2e

@yuntanghsu yuntanghsu force-pushed the migration branch 2 times, most recently from 7ba260e to d440ff9 Compare October 17, 2023 19:15
Copy link
Contributor

@Dhruv-J Dhruv-J left a comment

Choose a reason for hiding this comment

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

overall LGTM, just some nits

build/charts/theia/README.md Outdated Show resolved Hide resolved
build/charts/theia/values.yaml Outdated Show resolved Hide resolved
…y-plugin and grafana-chord-plugin

we do:
1. Migration from toolkit to create-plugin for grafana-sankey-plugin and grafana-chord-plugin.
2. Update node version as create-plugin doesn't support node-version < 18.
3. Update @grafana/ui and @grafana/data for grafana-sankey-plugin and grafana-chord-plugin.
4. Update the unit test for grafana-sankey-plugin and grafana-chord-plugin.

Note:
1. Couple of dependencies are updated by create-plugin automatically.
2. .config file is generated by create-plugin automatically.
3. Do not update the version of "react" and "react-dom" to the version higher than 16, as we are using enzyme-adapter-react-16. Using version higher than 16 will break the unit test and show error Cannot read property 'child' of undefined
4. The reason we add transformIgnorePatterns in jest.config.js is because we are not using grafana/toolkit to run the test and Jest failed to parse a file. This happens e.g. when our code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

Signed-off-by: Yun-Tang Hsu <hsuy@vmware.com>
Copy link
Contributor

@heanlan heanlan left a comment

Choose a reason for hiding this comment

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

LGTM

@elton-furtado
Copy link
Contributor

/theia-test-e2e

@yuntanghsu yuntanghsu merged commit 6217af7 into antrea-io:main Oct 26, 2023
50 checks passed
@yuntanghsu yuntanghsu deleted the migration branch October 26, 2023 03:58
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.

4 participants