Skip to content

Conversation

@pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Jan 12, 2026

Description

Opportunity

Suggestion by Saif that we rewrite reside of JavaScript files in TypeScript.

TL;DR only about 15 candidates

Problem

Distinguish which JavaScript files need rewrite in TypeScript:

  • Do not need because in (or used only by) deprecated route.
  • Do need because in (or used by) TypeScript route.
  • Needs research to decide.
  • Deferred, especially pending decision about Configuration Management

Analysis

In ui/apps/platform folder:

find src --type f --name "*.js"
find src --type f --naem "*.jsx"
extname count
.js 236
.jsx 293
529

Solution

Use typescript-eslint playground to see that Program is type of root node.

https://typescript-eslint.io/play/#ts=5.9.3&showAST=es&fileType=.tsx

Read that return value of path.extname includes period.

https://nodejs.org/docs/latest/api/path.html#pathextnamepath

  1. Add triage-JavaScript-TypeScript lint rule/tool to document file or folders:

    • // deprecated
    • // rewrite
    • // research
    • // deferred
  2. Delete obsolete src/mockData/baselineStatuses.js file.

  3. Delete files which content can move into only one file that uses it.

  4. Move files used in only one container folder.

  5. Fix one error for moved file from no-logical-or-preceding-array-or-object rule.

User-facing documentation

  • CHANGELOG.md not needed
  • documentation PR is not needed

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added lint rule
  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  1. npm run tsc in ui/apps/platform folder.
  2. npm run lint:fast-dev in ui/apps/platform folder.

@pedrottimark pedrottimark requested a review from a team as a code owner January 12, 2026 17:34
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 16a5fe3.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.10.x-746-g16a5fe3880.

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.93%. Comparing base (cf70d16) to head (16a5fe3).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #18443      +/-   ##
==========================================
+ Coverage   48.90%   48.93%   +0.02%     
==========================================
  Files        2631     2631              
  Lines      197964   197964              
==========================================
+ Hits        96823    96866      +43     
+ Misses      93758    93710      -48     
- Partials     7383     7388       +5     
Flag Coverage Δ
go-unit-tests 48.93% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@openshift-ci
Copy link

openshift-ci bot commented Jan 12, 2026

@pedrottimark: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/gke-ui-e2e-tests 16a5fe3 link true /test gke-ui-e2e-tests
ci/prow/ocp-4-20-ui-e2e-tests 16a5fe3 link false /test ocp-4-20-ui-e2e-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@pedrottimark
Copy link
Contributor Author

ui-e2e-tests failure has been fixed in #18422

Workload CVE overview page tests Layer type filter tests should apply Layer type filter correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants