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

Remove a lot of usages of legacy globals #6825

Merged
merged 95 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
ade0775
Remove all usages of legacy global logger
Nokel81 Dec 22, 2022
a9fa8fa
Remove usages of legacy global storageClassApi
Nokel81 Dec 22, 2022
6b769cf
Remove usages of legacy global serviceApi
Nokel81 Dec 22, 2022
fea0875
Remove usages of legacy global secretApi
Nokel81 Dec 22, 2022
5849e09
Remove usages of legacy global resourceQuotaApi
Nokel81 Dec 22, 2022
e763df7
Remove usages of legacy global persistentVolumeClaimApi
Nokel81 Dec 22, 2022
25222be
Remove usages of legacy global nodeApi
Nokel81 Dec 22, 2022
bb6075e
Remove usages of legacy global networkPolicyApi
Nokel81 Dec 22, 2022
36c54fb
Fix formatting
Nokel81 Dec 22, 2022
888077d
Remove usages of legacy global configMapApi
Nokel81 Dec 22, 2022
80686bf
Remove usages of legacy global jobApi
Nokel81 Dec 22, 2022
41839a2
Remove usages of legacy global cronJobApi
Nokel81 Dec 22, 2022
4fdc92a
Remove usages of legacy global podApi
Nokel81 Dec 22, 2022
b098df6
Remove usages of legacy global roleApi
Nokel81 Dec 22, 2022
415cada
Remove exports of NonInjected components
Nokel81 Dec 22, 2022
5b15e4b
Remove usages of legacy global catalogEntityRegistry
Nokel81 Dec 22, 2022
4d532a4
Add lint against using legacy global works
Nokel81 Dec 22, 2022
76ed9ca
Fix lint in KubeObject file
Nokel81 Dec 22, 2022
12276af
Remove usages of legacy global catalogCategoryRegistry
Nokel81 Dec 22, 2022
501ce15
Remove usages of legacy global navigation
Nokel81 Dec 22, 2022
88a3938
Remove usages of legacy global navigate
Nokel81 Dec 22, 2022
0125f31
Remove unneeded index file
Nokel81 Dec 22, 2022
eb279f3
Remove usages of legacy global customResourceDefinitionStore
Nokel81 Dec 22, 2022
9d70be6
Remove usages of legacy global eventStore
Nokel81 Dec 22, 2022
1b4850e
Remove usages of legacy global podSecurityPolicyStore
Nokel81 Dec 22, 2022
8397e76
Remove usages of legacy global storageClassStore
Nokel81 Dec 22, 2022
d122e68
Remove usages of legacy global persistentVolumeStore
Nokel81 Dec 22, 2022
4a60a91
Remove usages of legacy global clusterRoleBindingStore
Nokel81 Dec 22, 2022
27cfff9
Remove usages of legacy global clusterRoleStore
Nokel81 Dec 22, 2022
2a46ffc
Remove usages of legacy global roleBindingStore
Nokel81 Dec 22, 2022
98f61f1
Move files around
Nokel81 Dec 22, 2022
1d955cd
Remove usages of legacy global roleStore
Nokel81 Dec 22, 2022
c201d13
Remove usages of legacy global serviceAccountStore
Nokel81 Dec 22, 2022
d16b111
Remove usages of legacy global podStore
Nokel81 Dec 22, 2022
6efb446
Remove final uses of asLegacyGlobalForExtensionApi in application code
Nokel81 Dec 22, 2022
ad09d15
Fix lint rule and start fixing lint errors
Nokel81 Dec 22, 2022
a449356
Make listHelmReleases injectable
Nokel81 Dec 22, 2022
c69eb16
Make installHelmChart injectable
Nokel81 Dec 22, 2022
468ca34
Make deleteHelmRelease injectable
Nokel81 Dec 22, 2022
52c93f3
Make getHelmReleaseValues injectable
Nokel81 Dec 22, 2022
23a7e79
Make getHelmReleaseHistory injectable
Nokel81 Dec 22, 2022
4cca41b
Make rollbackHelmRelease injectable
Nokel81 Dec 22, 2022
46b141e
Remove unnecessary overrides from getDiForUnitTesting
Nokel81 Dec 22, 2022
a7d214f
Add global override for logger
Nokel81 Dec 22, 2022
5725da7
Add global override for history
Nokel81 Dec 22, 2022
41d90ca
Cleanup typing around getting injectables within jest
Nokel81 Dec 22, 2022
50325d9
Move some more overrides to global if needed
Nokel81 Dec 22, 2022
1ef6fb4
Add global override for forcusWindow
Nokel81 Dec 22, 2022
7d74a9a
Fix lint in KubeApi
Nokel81 Jan 3, 2023
f145cb2
Fix lint in catalog/index.ts
Nokel81 Jan 3, 2023
b7b1e97
Remove last usages of legacy global getDetailsUrl
Nokel81 Jan 3, 2023
b15c6a4
Remove last usages of legacy global showDetails
Nokel81 Jan 3, 2023
2aa9fc9
Add functions back to extension API
Nokel81 Jan 3, 2023
b86eb3d
Remove all uses of legacy global Notification functions
Nokel81 Jan 3, 2023
ea4b725
Remove no longer existing export
Nokel81 Jan 4, 2023
94d0e11
Remove unnecessary overrides
Nokel81 Jan 4, 2023
7d9f1e0
Fix injecting side effects by using more injectables
Nokel81 Jan 4, 2023
809611a
Fix cluster role binding dialog
Nokel81 Jan 4, 2023
40a1b2e
Fix cluster role dialog
Nokel81 Jan 4, 2023
6a85358
Fix create service account dialog
Nokel81 Jan 4, 2023
1ef5677
Fix history override
Nokel81 Jan 4, 2023
1be1b44
Make KubeApi consume its dependencies while not breaking the extensio…
Nokel81 Jan 4, 2023
1e9fb90
Fix tests
Nokel81 Jan 4, 2023
6bb757c
Update snapshots
Nokel81 Jan 4, 2023
da23e44
Fix CephFs tests
Nokel81 Jan 4, 2023
a28f60d
Fix user store tests by using override of config
Nokel81 Jan 4, 2023
916101b
Remove use of mockFs in hotbar store tests
Nokel81 Jan 4, 2023
b4f02a7
Add direct devDep of memfs
Nokel81 Jan 4, 2023
4618c2f
Remove use of mockFs in cluster store tests
Nokel81 Jan 4, 2023
7ba61a5
Remove use of mockFs in router tests
Nokel81 Jan 4, 2023
2e85e56
Remove use of mockFs in kube auth proxy tests
Nokel81 Jan 4, 2023
873d9bb
Remove use of mockFs in log resource selector tests
Nokel81 Jan 4, 2023
bbcdd89
Remove use of mockFs in hotbar remove command tests
Nokel81 Jan 4, 2023
447243d
Remove use of mockFs in the select component tests
Nokel81 Jan 4, 2023
3b0fd91
Remove mock-fs as a dependency
Nokel81 Jan 4, 2023
e7654ae
Remove no longer necessary mocks
Nokel81 Jan 4, 2023
6b09ac9
Fix namespace select filter tests
Nokel81 Jan 4, 2023
79d14b5
Remove use of mockFs in the extension loader tests
Nokel81 Jan 4, 2023
93d5f73
Fixing edit-namespace-from-new-tab test
Nokel81 Jan 4, 2023
120e8ba
Fix app paths tests by making the tests run in "production" mode
Nokel81 Jan 4, 2023
84a9569
Remove last vestiges of isTestEnv and the is* globals
Nokel81 Jan 4, 2023
f52e79f
Fix delete-cluster-dialog tests
Nokel81 Jan 4, 2023
0a8df39
Fix install-helm-chart-from-previously-opened-tab tests
Nokel81 Jan 5, 2023
a8ac9b0
Remove unnecessary override of non side effect injectable
Nokel81 Jan 5, 2023
6b71560
Fix disable-kube-object-detail-items-when-cluster-is-not-relevant tests
Nokel81 Jan 5, 2023
dcc65a9
Fix reactively-hide-kube-object-detail-item tests
Nokel81 Jan 5, 2023
4e3060e
Fix lint
Nokel81 Jan 5, 2023
8603d44
Update snapshots
Nokel81 Jan 5, 2023
36caecb
Fix sidebar-and-tab-navigation-for-core tests
Nokel81 Jan 5, 2023
5b505e3
Remove need to override lensLocalStoragePath in tests
Nokel81 Jan 5, 2023
3063afe
Replace more overrides with global ones
Nokel81 Jan 5, 2023
7d25e93
Fix tests
Nokel81 Jan 5, 2023
25482dc
Fix typings
Nokel81 Jan 9, 2023
5482041
Remove no longer needed technical test
Nokel81 Jan 9, 2023
4ee417b
Update snapshots
Nokel81 Jan 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,15 @@ module.exports = {
],
message: "No importing from the extension api definitions in application code",
},
{
"group": [
"**/extensions/as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api",
"**/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api-with-modifications",
"**/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api",
"**/extensions/as-legacy-globals-for-extension-api/as-legacy-global-singleton-object-for-extension-api",
],
message: "No importing the legacy global functions in non-ExtensionApi code",
},
Comment on lines +286 to +294
Copy link
Contributor

Choose a reason for hiding this comment

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

Love this.

],
}],
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@
"mobx-observable-history": "^2.0.3",
"mobx-react": "^7.6.0",
"mobx-utils": "^6.0.4",
"mock-fs": "^5.2.0",
"moment": "^2.29.4",
"moment-timezone": "^0.5.40",
"node-fetch": "^3.3.0",
Expand Down Expand Up @@ -408,6 +407,7 @@
"jest-environment-jsdom": "^28.1.3",
"jest-mock-extended": "^2.0.9",
"make-plural": "^6.2.2",
"memfs": "^3.4.12",
"memorystream": "^0.3.1",
"mini-css-extract-plugin": "^2.7.2",
"mock-http": "^1.1.0",
Expand Down
Loading