Commit Graph

77 Commits

Author SHA1 Message Date
dependabot[bot] 3fcd5e784e
chore(deps): bump axios from 0.19.2 to 0.21.1 in /frontend/server (#4949)
Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-29 01:14:01 -08:00
DavidSpek 0df9473bba
feat: Set current namespace for in-cluster SDK in multi-user mode and add healthz endpoint to API backends (#4638)
* Set current namespace in local KFP context if running from notebook

* Create "~/.config/kfp/" instead of ".config/kfp/"

At first it was assumed the `get_user_namespace` command would be executed from the home directory.

* Create local context file if it doesn't exist during set_user_namespace

* Grab path from LOCAL_KFP_CONTEXT when creating folder

Instead of harcoding the os.mkdirs path to `~/.config/kfp` it now grabs it from the LOCAL_KFP_CONTEXT. Also, removed path creation in `get_user_namespace` as that is now handled in `set_user_namespace`. Also, it now checks if the path exists rather than the local_context_file to remove the situation where it tries to create ~/.config/kfp/ because the context.json doesn't exist when the path does.

* add multi-user setting to healthz api

* Add http prefix to health api url

* move healtz api call to own function and fix multi_user boolean

* Fix HEALTH_PATH declaration

* Move check to Client __init__ and change get_kfp_healthz to avoid breaking in case of old apiserver image

* Add multi_user to frontend healthz

* Expose multi_user in frontend and add integration test

* Fix integration test

* Fix host hardcoding and error handling

* Handle empty API response, check if API up to date

* Fix response return

* remove API check due to empty response

* retry API call if first response empty

* retry getting healthz api if no response

* change health_api to https

The healthz_api has been returning empty responses which might be caused by sending an http request to an https endpoint. Although requests handles redirects, this commit is to test if this solves the issue.

* Add some debug info to healthz exception

* add url to debug and lower retries to 1

* Use api_client to get healthz data

* Debug info for API response

* Follow API redirect history

* Fix indentation

* Add healthz proto

* Try getting healthz api with new python backend

* Add installation of kfp_server_api in tests

* Fix incorrect setup location

* Replace old .get with new http backend .multi_user

* Code clean up

* Small fixes and TimeOutError for retries healthz api

* Remove changes to go dependencies

* Send empty proto request and fix exception client

* Remove unused commit_sha and tag_name
2020-11-24 15:36:39 -08:00
Rafał Bigaj 678ae0fe08
feat(backend): new server API to read run log. Fixes #4468 (#4493)
* New server API: read run log

- The new server API endpoint (/apis/v1beta1/runs/{run_id}/nodes/{node_id}/log) to fetch run log
- `ARCHIVE_LOG_FILE_NAME` and `ARCHIVE_LOG_PATH_PREFIX` options allows to control archive log path
- UI Server fetches logs from server API or directly from k8s depending on `STREAM_LOGS_FROM_SERVER_API` option

* New server API: read run log

- ml-pipeline rbac update: allow for access to log

* Read run log: enhanced error handling

- log message on Pod access errors

* Read run log: enhanced log archive options

* Code format

* Test update after getPodLogs signature change

* Updated comments after review

* `follow` query parameter in GET /apis/v1beta1/runs/{run_id}/nodes/{node_id}/log

* Env variable friendly config names & comments

- Config options: ARCHIVE_CONFIG_LOG_FILE_NAME, ARCHIVE_CONFIG_LOG_PATH_PREFIX
- Copyright message update
- New endpoint as `v1alpha1`

* Licence updates

- fluent-bit licence inlined
- copyright message updates

* Master merge

- dependency conflicts
2020-11-11 00:37:50 -08:00
Yuan (Bob) Gong e3992faf83
feat(frontend): UX change to support downloading directory artifacts. Fixes #3667 (#4696)
* feat(frontend): change artifact link to download without extracting. Fixes #3667

* update artifact preview UX

* Fix tests

* add frontend unit tests

* fix

* move artifact integration tests to its own file

* fixed flaky aws-helper test

* refactor and add ui server integration tests

* Update UX according to feedback

* update snapshots

* Update minio-helper.ts

* update
2020-11-03 05:36:15 -08:00
dependabot[bot] ef5b633ff8
chore(deps): bump node-fetch from 2.6.0 to 2.6.1 in /frontend/server (#4485)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-11 17:42:58 -07:00
dependabot[bot] 83a7ae27b3
chore(deps): bump http-proxy from 1.18.0 to 1.18.1 in /frontend/server (#4470)
Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-06 18:27:41 -07:00
dependabot[bot] bec0592348
chore(deps): bump bl from 3.0.0 to 3.0.1 in /frontend/server (#4456)
Bumps [bl](https://github.com/rvagg/bl) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v3.0.0...v3.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-02 19:19:39 -07:00
haibingzhao 7f77e8bc7f
feat(frontend): support tensorboard viewer and other visualize Results using volume mount path. Part of #4208 (#4236)
* support local file storage type for local volume mount path, refer: https://github.com/kubeflow/pipelines/issues/4208

* add todo comment to support directory and filePath include wildcards '*', detail refer: https://github.com/kubeflow/pipelines/issues/4208

* revert old code indent

* run 'npm run format' to format code

* support tensorboard viewer and other visualize Results using volume mount path, modify 'file' schema to 'volume':

1. source schema: volume://volume-name/relative/path/from/volume/xxx.csv
2. for tensorboard(also support Series1:volume://volume-name/path_to_model_dir_1,Series2:volume://volume-name/path_to_model_dir_2):
* check volume-name was specified in podTemplateSpec( which was inject by VIEWER_TENSORBOARD_POD_TEMPLATE_SPEC_PATH env)
* check /relative/path/from/volume/xxx file path was prefix-mounted in podTemplateSpec
3. for others:
* check volume-name was specified at ml-pipeline-ui pod
* check /relative/path/from/volume/xxx.csv file path exist

* fix test and add more tests

* change error message not found to not exist.

* fix tensorboard create test

* combining volume mount path and key as artifacts path

* extra complex code to a function and add more test

* use ml-pipeline-ui container name to find server container instead of use containers[0]

* fix review suggestion: https://github.com/kubeflow/pipelines/pull/4236

* format code

* extract how to find file path on a pod volume to a common function, and optimize error message

* fix k8s-helper.test error

* add more documentation and fix mistake: volumeMountPath to filePathInVolume

* fix test error

* Update k8s-helper.test.ts

* format error message

Co-authored-by: Yuan (Bob) Gong <gongyuan94@gmail.com>
2020-08-06 01:06:55 -07:00
Yuan (Bob) Gong c7300c343c
fix: all big enough ui proxy requests fail with error proxying with partial data (#4266)
* fix: all big enough ui proxy requests fail with error proxying with partial data

* Fix naming
2020-07-23 21:16:22 -07:00
dependabot[bot] 98e828b218
chore(deps): bump lodash from 4.17.15 to 4.17.19 in /frontend/server (#4225)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-16 18:29:00 -07:00
Jonas De Beukelaer 040615c87f
Fix/log unavailable warning (#3848)
* [UI] only allow troubleshoot link on error banner

* [UI] improve use of banners in run view sidepanel

* [UI] add info type banner
2020-06-16 20:32:39 -07:00
Yuan (Bob) Gong 5435e8724f
[UI Server] Refactor for configurable auth header (#3753)
* [UI] Make auth header configurable

* Refactor authorizeFn to move side effects out

* Refactor tests to reduce duplication
2020-05-12 22:06:25 -07:00
Yuan (Bob) Gong e8356bc37a
Show version tag in UI (#3743)
* Show version tag in UI

* Add new arguments to test cloudbuild configuration

* backend cloudbuild should use commit_sha as argument

* Fix minor bug during dev
2020-05-12 11:02:21 -07:00
Yuan (Bob) Gong cb71eed5f9
[UI] authorize tensorboard actions (#3639)
* Authorization service proto

* implement auth service

* Add unit tests

* Generate auth api client

* Authorization checks for tensorboard apis

* UI Server authorization checks

* Clean up error parsing

* Revert changes

* Fix portable-fetch not found bug

* Fix unit test

* Include portable-fetch required by api client

* Fix portable-fetch module import error

* Fix portable-fetch again

* Add unit tests

* Address CR comments

* add unit test for header

* Update readme
2020-04-28 15:26:24 -07:00
Dmitry B a5b3e7e3f0
Fix source for mlpipeline-ui-metadata in WorkflowParser (#3379)
* WorkflowParser->loadNodeOutputPaths
source: s3.endpoint === 's3.amazonaws.com' ? StorageService.S3 : StorageService.MINIO

* Use isS3Endpoint (server/aws-helper.ts) to identify artifact source

* npm run format

* created src/lib/AwsHelper.ts (for frontend code), because frontend client and frontend server do not share code for now.
2020-04-28 09:42:06 -07:00
Yuan (Bob) Gong b7706c0134
[UI Server] Enable strict type checking and fix errors (#3593)
* wip

* Fix typing

* Fix build error

* Add type checking to tests

* Fix server typing

* Clean up

* Fix server typing
2020-04-23 09:25:11 -07:00
Yuan (Bob) Gong 09b506fc1a
[UI] Multi user permission separation for artifact api (#3522)
* [UI Server] Proxy /namespaces/:namespace/artifacts/get requests to namespace specific artifact services

* [UI] Show artifacts by namespace

* Fix minio artifact link tests

* Fix DetailsTable tests

* Fix OutputArtifactLoader.test

* Change artifact proxy to use query param instead

* Add integration tests for artifact proxy

* Fix unit tests

* Rename service name

* Add comment

* add more comments

* Fix import

* Refactored how to spy on internal methods from tests
2020-04-22 22:31:45 -07:00
Yuan (Bob) Gong 4302f1e2f1
[Frontend] Fix npm reported vulnerabilities (#3480)
* Fix server vulnerability

* Fix vulnerability in frontend

* Fix frontend vulnerabilities

* pin webpackv ersion
2020-04-08 21:09:43 -07:00
Yuan (Bob) Gong 47cde0b6b9
[UI] Tensorboard support for multi user (#3355)
* [UI Server] Add namespace argument for tensorboard endpoints

* Allow local node server to talk to minio in cluster

* Use tensorboard namespace in UI

* Add unit tests for tensorboard UI server

* Fix tests

* Fix tensorboard proxy url

* Fix tensorboard proxy failure

* Fix tests

* Remove unecessary encodeURIComponent

* Add old comment back
2020-03-26 19:50:22 -07:00
Rafael Barreto c33150f434
Fix tensorboard image parsing (#3356)
I introduced a bug when parsing the image for Tensorboard in
https://github.com/kubeflow/pipelines/pull/3235. This fixes it.
2020-03-24 23:35:02 -07:00
Yuan (Bob) Gong 0ef074239d
[UI Server] Blocks non public KFP report APIs (#3334)
* [UI Server] Blocks reportMetrics KFP api

* Also reject report workflow endpoint

* Also block report swf endpoint
2020-03-23 23:34:47 -07:00
Eterna2 a7606a12de
kfp UI node server support preview and handles gzip, tarball, and raw artifacts in a consistent manner. (#2992) 2020-03-23 22:30:47 -07:00
Yuan (Bob) Gong f882f361cc
[UI] Show step pod yaml and events in RunDetails page (#3304)
* [UI Server] Pod info handler

* [UI] Pod info tab in run details page

* Change pod info preview to use yaml editor

* Fix namespace

* Adds error handling for PodInfo

* Adjust to warning message

* [UI] Pod events in RunDetails page

* Adjust error message

* Refactor k8s helper to get rid of in cluster limit

* Tests for pod info handler

* Tests for pod event list handler

* Move pod yaml viewer related components to separate file.

* Unit tests for PodYaml component

* Fix react unit tests

* Fix error message

* Address CR comments

* Add permission to ui role
2020-03-20 02:42:38 -07:00
Yuan (Bob) Gong b0e933b029
[Frontend] Fix reported vulnerabilities (#3281) 2020-03-15 22:22:35 -07:00
Rafael Barreto 23fb4618ae
Parametrize the image used for the Tensorboard viewer (#3235)
* Parametrize the image used for the Tensorboard viewer

Right now, the image is hard-coded and it's not possible to override it.
This is a problem when running Kubeflow Pipelines in a cluster without
access to the internet or public repositories (e.g.
https://github.com/kubeflow/pipelines/issues/3232). This solves the
issue by parametrizing the image name through an environment
variable.

* Fix formatting issues

* Address review comments
2020-03-15 20:36:35 -07:00
Kubernetes Prow Robot 498b9832a6
[Frontend] GKE metadata endpoint should fail when fetched response is not ok (#3218)
* [Frontend] Add mock data for gke metadata

* Fix GKE metadata endpoint when request is not ok
2020-03-05 00:18:36 -08:00
Yuan (Bob) Gong fc13417362
[UI] Better logging in UI server (#3197) 2020-03-02 20:49:37 -08:00
Yuan (Bob) Gong 968e5836cf
[Frontend] Migrate to create-react-app (#3156)
* Updated create-react-app dependencies

* Fix some type errors

* Fix type errors

* Fix linting and typing

* Fix more things

* Fix typestyle mock

* Fix some unit tests

* Update snapshots

* Frontend server should use its own configuration

* Clean up server tsconfig.json and tslint.json

* Fix mock-backend

* Frontend image cloudbuild config
2020-02-24 17:05:35 -08:00
Yuan (Bob) Gong 3b072b2ff7
[UIServer] Add DISABLE_GKE_METADATA env flag to skip metadata retrieval. (#3118)
* Add DISABLE_GKE_METADATA env flag to skip metadata retrieval.

* node server build step fix and cleanup

* Update frontend dockerfile to use npm ci
2020-02-20 03:35:02 -08:00
Yuan (Bob) Gong 842b0cec7f
[Visualization] Clean up full.tpl to improve vis loading time (#3116)
* Remove @jupyter/html-manager from full.tpl

* Include visualization server cloudbuild yaml to facilitate local dev

* Stop fallback behavior of KFP UI to improve dev experience
2020-02-19 04:56:25 -08:00
Yuan (Bob) Gong 4709c6b42f
[UI] Getting started page for hosted pipelines (#2935)
* Implement getting started page.

* Add feature flag to only show getting started page on hosted pipelines

* Add tests

* Fix format

* Implement requested layout in getting started page

* Minor adjust layout

* Fix tests

* Fix snapshots

* Update page title
2020-01-31 12:35:20 -08:00
Yuan (Bob) Gong 3ed8e8904b [UI] Simplify start server script and fix local cluster name endpoint (#2836)
* Simplify start server script and fix local cluster name endpoint

* Simplify start-proxy-standalone.sh
2020-01-13 20:51:10 -08:00
Yuan (Bob) Gong 7e19d7fa6c [UI] fix artifact handler query parameter key (#2809)
* Fix node server typing problems

* Fix artifact handler query name
2020-01-07 19:53:40 -08:00
Yuan (Bob) Gong 70bce6d183 Fix node server typing problems (#2807) 2020-01-07 04:10:17 -08:00
Eterna2 2ec2fd23c5 [Frontend] unit tests for node server (#2745)
* Add unit tests for aws-helper and minio-helper.

* Break up server.ts into app.ts and handlers/*.ts so that unit test can be written more easily.

* update @types/node because of https://github.com/microsoft/TypeScript/issues/32333

* upgrade kubernete-client version to be compatible with new @types/node version

* fix bug: AWSInstanceProfileCredentials.profile() returns a promise not a string

* remove I prefix from interfaces. minor fixes on lint errors.

* fix format errors

* Added more unit tests, and minor fixes.

* Fix comment: GKS should be GKE

* use jest.resetAllMocks instead of reset each mock individually

* fix format for helper test
2020-01-05 20:43:40 -08:00
dldaisy 5c27fa82c8 Support choosing tensorboard version from UI (#2690)
* Support select tensorflow image for tensorboard

* modify test for tensorflow version select

* delete not available image entry

* Support tensorflow image selection to run tensorboard

* format code with prettier

* use HasPrefix instead of regexp

* delete

* modified tensorboard test

* delete tensorboard

* modify typo

* test tensorboard

* tensorboard test

* fuck

* fuck2

* modify test

* modify typo in tensorboard hint

* npm run format

* modify tensorboard snapshot

* compatible with previous kfp version. Allow vacant tensorflowImage field.

* add 2 tests for dialog

* modify default tensorflow image to 1.13.2

* merge get version and get tensorboard; let --bind_all support tensorboard3.x

* modify reconciler.go

* reconciler rollback

* modify corresponding test for --bind_all

* modify requested chances 12/23

* formControl sorted alphabetically

* select sorted alphabetically

* modify details from PR request 12/24

* moidfy format

* modify details 12/23

* modify snapshot

* retest

* retest
2019-12-24 03:39:29 -08:00
Yuan (Bob) Gong e86e40907b [UI] Pass namespace to APIs (#2676)
* Format other frontend code using prettier

* Regenerate frontend api clients

* Pass namespace to CreateRun api request

* Fetch logs from pod namespace

* Fix log handler cannot work with pod name only query bug

* Fix and refactor existing tests

* Unit test adding namespace to create run api call.

* Remove unneeded snapshot

* Fix lint errors

* Consistently use resource reference id for namespace
2019-12-17 09:07:59 -08:00
Yuan (Bob) Gong 4a8d262abb Migrate standalone deployment to workload identity on GCP (#2619)
* Script to set up workload identity for standalone deployment

* Migrate tests to run on standalone + workload identity

* Fix test script

* Switch to static GSAs for testing, because they have name length limit

* Add workload identity binding for argo

* Fix argo workload identity bindings

* Remove user-gcp-sa from tests

* Remove use_gcp_secret from xgboost sample

* Allow debugging tests locally

* Wait for policies to take effect

* Update deploy-pipeline-lite.sh

* Update deploy-pipeline-lite.sh

* [WIP] test gcloud auth list with test-runner sa

* Add namespace

* test again

* Use new image builder

* test again

* Remove debug code

* Remove usages of use_gcp_secret

* Fix unit test and tensorboard pod template

* Add debug code again to test

* Try waiting until workload identity bindings are ready

* Fix some other samples

* Fix parameterized tfx oss sample

* Add retry to image building

* Try fixing tfx oss sample

* Fix compiled tfx oss sample

* Update all google/cloud-sdk to latest

* Try fixing parameterized tfx oss sample again

* Also verify pipeline-runner ksa is working

* Fix parameterized_tfx_oss sample

* Update gcp-workload-identity-setup.sh

* Revert unneeded change

* Pin to new google/cloud-sdk

* Remove wrongly commited binaries
2019-12-16 22:05:58 -08:00
Yuan (Bob) Gong 06aaf14e14 npm audit fix (#2724) 2019-12-12 02:08:32 -08:00
Yuan (Bob) Gong 4500d244d7 Format other frontend code using prettier (#2717) 2019-12-11 05:04:06 -08:00
jingzhang36 a04ef2d444 Add pipeline version support to frontend (#2667)
* FE changes for version ui

* sort methods; remove console

* format

* remove obsolete snapshots

* cosmetic change: simplify href link construction

* fix the clone run behavior when version present

* format

* run-integration-test

* frontend-integration-test: try to simulate uploading file

* fix frontend-integration-test

* address comments

* address comments and add one more unit test
2019-12-06 01:44:50 -08:00
Yuan (Bob) Gong 675b1cde81 [UI] Get kubeflow namespace from kfp UI (#2655)
* Get kubeflow namespace from kfp UI

* Add a react context that makes namespace available anywhere.

* Move KFP_FLAGS check to index.tsx

* Update index.tsx
2019-11-27 22:15:04 -08:00
Yuan (Bob) Gong e7b3bdd65d
Fix UI in kubeflow deployment 2019-11-26 17:15:10 +08:00
Yuan (Bob) Gong bd6adfe986 Frontend server: add feature flag for kubeflow deployment (#2631)
* Frontend server: add feature flag for multi user

* Change to load index html on start up

* Adjust env variable to deployment

* Update server.ts
2019-11-25 19:35:10 -08:00
jingzhang36 f308abeece Add a new field "TensorflowImage" to KFP viewer CRD file template. (#2544)
* Without version bump

* fix the delete caller

* return after delete

* reconciler removes old viewer crd file that misses image specification

* add frontend comment

* remove accidental changes that are irrelevant

* Revise log message

* Add error handling

* add test

* tensorflow image check only applies to viewer tensorboard type and thus put it after the type check.

* Use of default image instead of validation
2019-11-18 10:39:41 -08:00
Eterna2 aa2d2f42b3 [pipeline-ui] Retrieve pod logs from argo archive (#2081)
* Retrieve pod logs from argo archive

* Added aws instance profile iam credential support for minio client. Read workflow status for argo archive location for pod logs.

* fix minor typo, and enforce typing for minio client options

* Update helm chart for pipelines ui role with permission to access secret and workflow crd

* remove unnecessary type cast

* Fix bug: s3client should be a callable, so that iam token is refreshed
2019-11-07 16:58:18 -08:00
Riley Bauer 8d196d4dec Adds Metadata Artifacts to UI (#2057)
* Working, though the request seems malformed

* Working with grpc-web. trying to push to cluster

* WIP

* With great hax come great success

* Begin moving some metadata UI pages to KFP

* Artifact list and details pages work! A lot of clean up is needed. Look for console.log and TODO

* Clean up

* Fixes filtering of artifact list

* More cleanup

* Revert ui deployment

* Updates tests

* Update envoy deployment
2019-09-06 13:19:19 -07:00
Kirin Patel 32ed27a98f Add endpoint to allow custom visualizations (#1931)
* Added support for custom visualizations to the VisualizationCreator component

* Add support for enabling/disabling custom visualizations

* Added mock-backend support for new api endpoint

* Changed allowCustomVisualization to be a prop
2019-08-26 14:22:37 -07:00
Eterna2 af456bcc61 [front-end-server] Allow viewer:tensorboard podTemplateSpec to be customizable (#1906)
* Allow front-end server to provide custom viewer podTemplateSpec via path/configmap

* Fix JSON.parse input to string
2019-08-22 11:08:33 -07:00
hongye-sun c5418fdb46 Fix github security alert. (#1798) 2019-08-11 14:25:10 -07:00