googleclouddataproc / dataproc-jupyter-plugin Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Please use explicit types and avoid using any
This pattern is common throughout the code. When there are multiple checks like this where there can ever be one, we should put this in a separate util function and use the result of the function for rendering.
Remove all instances of //@ts-ignore
or add a comment so that the reasoning is clear
Remove commented out code
Commonly used strings should not be hard coded.
This can be simplified to return selectedMode === toggleItem ? 'selected-header' : 'unselected-header'
If this check is here to handle a specific case, an error code is a bit too broad so we should use some determinator in responseResult
to check for this. Regardless, we also need a comment to describe exactly what case(s) we are setting the error view for.
There is this table creation pattern that can be generalized and used in all the details pages so that we don't have to re develop tables each time.
Does data.message
work in both the case where the JSON.parse
call succeeds and fails?
Use useState<T>
where T
is the type of the default value. Also, if the default value is shared between states, we should not duplicate work there.
Function doesn't seem to return undefined
. We can remove that return type. I see this in other util functions as well
The params should either both be strings or both be a Date type. If we are sticking with a string param type, we need to handle invalid dates
dataproc-jupyter-plugin/src/utils/utils.ts
Line 138 in 1700a9a
Buttons should use the button
html tag instead of div
for accessibility
If the list of batches is very large (the project I tested on had 10k+ batches), the observed behavior is the tab crashes due to an out of memory error or the batches list table reverts to a "no results" state after showing partial results.
I suspect the following things are happening:
Some users or service account may not have permissions to list networks or the project doesn't have any networks
As the code is trying to access [0] this throws the exception "Error listing Networks" as the networks array is empty
The exception is not specific - it could be raised by either the HTTP Request failing or the networks list being empty, could we please add a check before line https://github.com/GoogleCloudDataproc/dataproc-jupyter-plugin/blame/e06b9fdd41bc9819d7c23d9505ef079479789003/src/runtime/runtimeService.tsx#L481
such as:
setNetworklist(transformedNetworkList);
if (selectedRuntimeClone === undefined) {
if (transformedNetworkList.length > 0) {
setNetworkSelected(transformedNetworkList[0]);
} else {
DataprocLoggingService.log('No networks found. Account may lack access to list networks', LOG_LEVEL.ERROR);
toast.error(`No networks found. Account may lack access to list networks.`, toastifyCustomStyle);
}
}
Error from Gateway: [Bad Request] failure creating a backend resource: failure starting the kernel creation: failure starting the kernel creation: failure creating session: [400 Bad Request] generic::invalid_argument: com.google.cloud.hadoop.services.common.error.DataprocException: Cluster name 'projects/my-project-id/locations/my-location/clusters/my-phs-cluster-name' must conform to ^(?:/?/?dataproc\.googleapis\.com/)?projects/([^/]+)/regions/([^/]+)/clusters/([^/]+) pattern (INVALID_ARGUMENT)
. Ensure gateway url is valid and the Gateway instance is running.
The error message regex is validating for regions
, but the string passed is locations
# OS
Ubuntu 20.04 LTS x86_64
# Python version
Python 3.10.13
# Relevant Python dependencies
jupyterlab==4.0.6
dataproc_jupyter_plugin==0.1.9
# output of gcloud version
Google Cloud SDK 448.0.0
beta 2023.09.22
bq 2.0.98
bundled-python3-unix 3.9.16
core 2023.09.22
gsutil 5.25
default-123456...
).# OS
Ubuntu 20.04 LTS x86_64
# Python version
Python 3.10.13
# Relevant Python dependencies
jupyterlab==4.0.6
dataproc_jupyter_plugin==0.1.9
# output of gcloud version
Google Cloud SDK 448.0.0
beta 2023.09.22
bq 2.0.98
bundled-python3-unix 3.9.16
core 2023.09.22
gsutil 5.25
Here is the list of files that we need to do some fixes.
- ❌ Expected to find CONTRIBUTING, CONTRIBUTING.txt or CONTRIBUTING.md
- ❌ /babel.config.js: Missing a required license header (or its header was not recognized)
- ❌ /conftest.py: Missing a required license header (or its header was not recognized)
- ❌ /dataproc_plugin/init.py: Missing a required license header (or its header was not recognized)
- ❌ /dataproc_plugin/handlers.py: Missing a required license header (or its header was not recognized)
- ❌ /dataproc_plugin/tests/init.py: Missing a required license header (or its header was not recognized)
- ❌ /dataproc_plugin/tests/test_handlers.py: Missing a required license header (or its header was not recognized)
- ❌ /jest.config.js: Missing a required license header (or its header was not recognized)
- ❌ /setup.py: Missing a required license header (or its header was not recognized)
- ❌ /src/batches/batchDetails.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/batches/batches.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/batches/listBatches.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/cluster/cluster.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/cluster/clusterDetails.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/cluster/listCluster.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/handler/handler.ts: Missing a required license header (or its header was not recognized)
- ❌ /src/index.ts: Missing a required license header (or its header was not recognized)
- ❌ /src/jobs/jobDetails.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/jobs/jobs.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/jobs/labelProperties.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/jobs/submitJob.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/login/authLogin.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/login/configSelection.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/sessions/listSessions.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/sessions/sessionDetails.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/svg.d.ts: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/batchService.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/clusterServices.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/const.ts: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/deletePopup.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/globalFilter.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/jobServices.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/sessionService.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/statusDisplay.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/tableData.tsx: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/utils.ts: Missing a required license header (or its header was not recognized)
- ❌ /src/utils/viewLogs.tsx: Missing a required license header (or its header was not recognized)
- ❌ /style/index.js: Missing a required license header (or its header was not recognized)
- ❌ /ui-tests/jupyter_server_test_config.py: Missing a required license header (or its header was not recognized)
- ❌ /ui-tests/playwright.config.js: Missing a required license header (or its header was not recognized)
- ❌ /ui-tests/tests/dataproc_plugin.spec.ts: Missing a required license header (or its header was not recognized)
Dataproc Serverless Sessions require Private Google Access to be enabled on the subnetwork they use.
Accordingly, the UI provided by the plugin for creating a runtime template filters out any subnetworks that do not have this enabled, but it does not give the user any indication as to why they are being filtered, or even the fact that they are filtered out.
It would be much better from a usability standpoint if the user saw that the subnetwork was found but is not supported, and it would be even better from a discoverability perspective if there was some sort of message indicating why it was not supported.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.