Commit Graph

95 Commits

Author SHA1 Message Date
IronPan 36338774f1
update the API doc description (#1410)
* add single json file

* update doc

* update doc
2019-05-31 13:31:33 -07:00
IronPan 14c66f0174
add single json file (#1408) 2019-05-30 18:02:29 -07:00
IronPan 75cfab3d2a
Delete kfp_api.html 2019-05-30 17:58:51 -07:00
IronPan 89954f831e
Delete kfp_api_single_file.swagger.json 2019-05-30 17:58:02 -07:00
IronPan 06e4dc6604
Add doc for API (#1406)
* initial update

* initial update

* update

* add doc

* update
2019-05-30 17:48:50 -07:00
Ajay Gopinathan 5f1b41171f Fix API package names and regenerate checked-in proto files. (#1404)
* Fix API package names and regenerate checked-in proto files. Also bump version of GRPC gateway used.

* Fix BUILD.bazel file for api as well.

* Update Bazel version
2019-05-30 11:26:28 -07:00
IronPan 7bf95b1327 expose configuration for setting the max number of tensorboard (#1393)
* clean up

* argo

* expose configuration for max number of viewers

* add sample how to configure

* Revert "argo"

This reverts commit 3ff0d07679.

* update namespaced-install.yaml
2019-05-28 13:18:58 -07:00
IronPan 22be84b13c expose namespace config for scheduled workflow (#1309)
this config allow specifying what namespace the persistent agent listen to
2019-05-10 14:08:12 -07:00
IronPan 27bdbda71a expose namespace config for persistent agent (#1308)
this config allow specifying what namespace the persistent agent listen to
2019-05-10 13:20:16 -07:00
Alexey Volkov b2d9a98f1c Backend - Marking auto-added artifacts as optional (#1289)
* Backend - Marking auto-added artifacts as optional

* Updated Argo version in the WORKSPACE file

* Updated WORKSPACE using gazelle

* Added the package that gazelle has missed

* Fixed syntax error

* Updated Argo package to v2.3.0-rc3

* Reworded the comment
2019-05-09 14:31:59 -07:00
Wei Yan 2b5eb35140 Allow to specify informers namespace in persistence agent (#901)
* Allow to specify informers namespace in persistence agent

* Update variable to namespace to keep consistent with other components
2019-05-06 12:37:38 -07:00
Alexey Volkov 467adb5a3b SDK - Separated the generated api client package (#1214)
* SDK - Separated the generated api client package

* Splitting the package build scripts

* Pinning the API client package version

* Moved import kfp_server_api to the top of the file

* Added the Mac OS X prerequisite install instructions

* Moved the build_kfp_server_api_python_package.sh script to the backend dir

* Updated the dependency version span
2019-04-29 15:49:37 -07:00
Riley Bauer d88ba380bc Clear default exp table on delete and create default exp on run create if none exists (#1199)
* Clear default exp table on delete and create default exp on run create
if no default exists

With this change, if the delete experiment API is called on the default
experiment, then the ID will also be removed from the default_experiments
table.

Additionally, if the default experiment doesn't exist and a new run is
created without an experiment, a new default experiment will be created,
and the run will be placed within this experiment.

* Adds integration test for creating a run without an experiment

* Fixes failure to close database connection and adds tests for recreating and deleting default experiment

* Rename function

* Revert some row.Close() calls
2019-04-29 12:13:35 -07:00
Alexey Volkov b795a9a899 Swagger - Specifying content types on the route level (#1225) 2019-04-25 14:00:32 -07:00
WeiYan 982d94a205 Allow more flexible way to config the api server addr in persistence agent (#867)
* Allow more flexible way to config the api server addr

* Remove namespace config from persistent-agent
2019-04-24 15:50:44 -07:00
Ajay Gopinathan fbb9824ea1 Ensure API server does not crash if ml-metadata serialized format does (#1192)
not match expected format.

Previously we assume the fields 'artifact_type' and 'artifact' always
exist. This change ensures we guard against the case when one or both of
these required fields aren't present.
2019-04-19 11:01:53 -07:00
Riley Bauer fbae0f855e Creates a default experiment at API server set up time (#1089)
* WIP - Create default experiment upon API server initialization

* Default experiment initialization caused crashes if API server pod was restarted without clearing DB

* Adding new table to store default experiment ID

* Add default experiment type model definition

* Minor fixes, everything seems to work now

* Clean up. Renamed to default_experiment_store

* Adds tests for the default_experiment_store

* Add integration test for verifying initial cluster state. Currently only covers existence of default experiment

* Don't run initialization tests except as integration tests

* Fixes comments

* PR comments and cleanup

* Extract code in resource_manager to helper func
2019-04-15 15:55:04 -07:00
Ajay Gopinathan 3e7a89e044 Add filter to next page token so it applies to subsequently requested pages (#1153)
* Add filter to next page token so it applies to subsequently requested pages.

* Fix a bug where filter wasn't being serialized properly
2019-04-12 15:50:03 -07:00
IronPan 05609ce11e fix test (#1151) 2019-04-12 10:10:46 -07:00
Alexey Volkov 584d31facd Updated descriptions of pre-installed samples (#1126)
Removed the "Basic - Immediate Value" sample since it does not really serve any purpose - other samples also feature hard-coded arguments.
2019-04-11 16:46:44 -07:00
IronPan 7737a1ac04 Set run model default timestamp to 0 (#1140)
Without setting to 0, the finished at field could be null if the argo workflow is already evicted from the cluster. 
This result in errors parsing the table. 

Alternatively we can use sql.NullInt64 type to parse the sql but that's less elegant.
2019-04-11 14:02:49 -07:00
IronPan 086d4763d9 Surface workflow finished time in list run API (#1122)
* add finished time for list runs

* add finished time for list runs

* fix tests

* add finished time for list runs

* Update run.proto

* address comments

* make query more robust

* fix e2e test

* fix e2e test
2019-04-10 23:02:10 -07:00
IronPan ca3d100c09 optimize UX for loading pipeline pages (#1085)
* update query

* fix test

* return run details for list run

* return run details

* Revert "return run details"

This reverts commit 085ead3530.

* Revert "return run details for list run"

This reverts commit f6b8139e19.
2019-04-05 14:56:28 -07:00
Riley Bauer 94925ff2bd Add run termination controls to ui (#1039)
* Update swagger definitions

* WIP - Adds ability to terminate runs to frontend

* Update snapshots

* Adds tests. Also changes warning message color to orange rather than red

* Remove refresh button from run details page

* Elaborate terminate confirmation message

* Minor fixes

* Remove references to refresh button from integration tests
2019-04-01 10:18:35 -07:00
Alexey Volkov fa8299d439
Fixed a bug in tarball handling (#1068)
* Fixed a bug in tarball handling

* Fixed the tests failing due to error message changes.
2019-03-29 19:24:03 -07:00
Alexey Volkov 2c2445df83 Enable pipeline packages with multiple files (#939)
* Enable pipeline packages with multiple files

* Added tests

* Initialize the variables to nil

* Trying to read the archive file entry immediately

* Fixed the pipeline packages used by the `TestPipelineAPI` test.
Also added a failing test case. Will disable it in next commit.

* Disabling the test for the UploadFile bug I've discovered

* Fixed the pipeline name.

* Removed the disabled extra test.

* Addressed the feedback.

* Removed the "header == nil" check (feedback).

* Fixed typo

* Addressed the PR feedback
Added space before comment.
Checking for the error again.
2019-03-28 15:09:58 -07:00
Ajay Gopinathan 1a9f80ba1d Add more tests for metadata store. (#1030)
These tests check for correct recording of metadata (specifically those
produced by TFX components).

Also, ensure that we check for non-nil values of output parameter values
before attempting to parse the value for metadata.
2019-03-25 15:18:17 -07:00
Alexey Volkov f98ec68488 Added the ability to terminate a run (#528)
* Added the terminate run command to backend and CLI.
No generated files for now.

* Added the generated files.

* Moved the code to run_store.go
Now the call chain is run_client->run_server->resource_manager->run_store

* Using the backoff package for retries.

* Trying to update run status in the DB to "Terminating" before patching the workflow.

* Stopped using the Argo errors module.

* Fixed the compilation errors due to recent backend changes.

* RILEY - WIP - Implementation of workflow_fake.go and first test

Added successful test in resource_manager_test.go and completed, barring nits and conventions, the implementation of Patch() and isTerimated() within workflow_fake.go

Additional tests and lots of clean-up are still necessary

* Adds a few more tests to resource_manager_test and cleans up a bit

* Further clean up. Stopped using squirrel for UPDATE query. Added run_store_tests

* Adds terminate run integration test

* Undo changes to go.sum

* Fixes path to long-running.yaml in integration test

* Allow runs with no Conditions to be terminated
2019-03-21 18:00:18 -07:00
Ajay Gopinathan 02de9c55e8 Add fake metadata store and fix tests. (#958)
* Add fake metadata store and fix tests.

Also, add instructions on how to build/run the backend with Bazel.

Note that the fake metadata store works, but I need to add proper tests
that exercise it. That'll be done in a separate PR.

One thing I'm missing here is how to make Bazel run well in Travis. I
will send a follow up PR for doing this.

* move select for update to the db interface
2019-03-21 00:57:35 -07:00
Alexey Volkov 55a35b7f98 Detecting file format using signature instead of file extension (#919)
* Detecting file format using signature instead of file extension

* Added tests for extension-independent pipeline loading

* Added another malformed zip test
2019-03-07 17:35:32 -08:00
Ajay Gopinathan ba64bd3866 Record TFX output artifacts in Metadata store (#884)
* WIP: ML Metadata in KFP

* Move metadata tracking to its own package.

* Clean up

* Address review comments, update travis.yml

* Add dependencies for building in Dockerfile

* Log errors but continue to update run when metadata storing fails.

* Update workspace to get latest ml-metadata version.

* Update errors
2019-03-06 09:16:51 -08:00
IronPan f8c1dde3a8 move integration test to sub dir (#888)
* move integration test to sub dir

* revert
2019-03-01 15:32:56 -08:00
WeiYan de9a98222b apiserver glog uses -alsologtostderr (#859) 2019-03-01 13:09:45 -08:00
IronPan 1bde25552c support .zip pipeline package (#874)
* support zip

* update integration test

* debug

* comments

* fix

* Update .cloudbuild.yaml

* Update .release.cloudbuild.yaml

* Update .travis.yml
2019-02-28 18:50:36 -08:00
IronPan 4906ef442d add missing bazel build (#883) 2019-02-28 18:10:46 -08:00
Adhita Selvaraj bd2c1610f8 add readme for using Pipelines CLI (#858) 2019-02-28 13:53:38 -08:00
WeiYan 558d5b2fdb Allow users to specify namespace for Kubernetes informers (#851)
* Allow users to specify namespace for Kubernetes informers

* Change variable informerNamespace to namespace
2019-02-28 12:42:25 -08:00
hongye-sun 749d0aab9f Update swagger codegen version (#839) 2019-02-21 12:21:38 -08:00
Adhita Selvaraj 304f57497b adds local volume ex for using Viewer CRD, edited README for TB usage (#822) 2019-02-14 23:02:58 -08:00
Ajay Gopinathan 405bef0b3b Fix Dockerfile for viewer CRD image. (#760)
Let it build properly with Go modules, and also copy the source from
/vendor into the image for licensing requirements.
2019-01-31 16:39:09 -08:00
Yasser Elsayed ec4d7e8bd3 Return resource count from ListXXX calls (#595)
* add count to protos and libs

* close db rows before second query

* count -> total_size

* int32 -> int

* move scan count row to util

* add comments

* add logs when transactions fail

* dedup from and where clauses

* simplify job count query

* job count queries

* run count queries

* add job_store total size test

* added tests for list util

* pr comments

* list_utils -> list

* fix clients and fake clients to support TotalSize

* added TotalSize checks in api integration tests
2019-01-31 11:15:54 -08:00
Ajay Gopinathan 158a71ada5 Add Dockerfile for building Viewer CRD controller. (#740)
* Add Dockerfile for building Viewer CRD controller.

Also build it as part of the CloudBuild process.

* Revert change to add build to bootstrapper script
2019-01-29 15:02:46 -08:00
Ajay Gopinathan 578e8231d0 Update all Pipelines CRD versions to v1beta1. (#681) 2019-01-17 19:35:51 -08:00
IronPan c2834c383c improve the list run query (#687)
* optimize list run query

* update list job
2019-01-15 15:48:19 -08:00
Yasser Elsayed df635af409 Support filtering on storage state (#629)
* filter on storage state

* fix case

* Update run.go

* storageState -> storage_state

* ignore generated ts client libs

* remove url import to make tslint happy
2019-01-11 11:01:01 -08:00
Ajay Gopinathan 9d69e8a113 Sanity check filtering/sorting options in list requests. (#625)
If sort by or filtering criteria is specified in conjunction with a next
page token, ensure they match up, otherwise return an error.

Also, change the errors to be InvalidInputErrors instead of standard Go
string errors to be consistent with the rest of apiserver.
2019-01-09 11:05:01 -08:00
Ajay Gopinathan 5a9e3ff14b Add IS_SUBSTRING operator for use in API resource filtering. (#645)
* Add IS_SUBSTRING operator for use in API resource filtering.

This should allow substring matches on fields like names and labels and
so on.

Also bump the version of Mastermind/squirrel so we get the new 'like'
operator for use when building the SQL query.

Additionally, I also had to fix the generate_api.sh script which had a
bug (it modified the wrong file permissions before), and add a dummy
service to generate Swagger definitions for the Filter itself (this was
a hack in the previous Makefile that I lost when we moved to Bazel).

* Add comments for DummyFilterService

* Add more comments

* change errors returned

* fix import
2019-01-08 18:16:12 -08:00
Ajay Gopinathan 8da2c9dbe9 Fix shadowing errors in Viewer reconciler (#648) 2019-01-08 15:41:01 -08:00
Ajay Gopinathan 67a7373933 Run `go vet` as part of the Travis CI. (#626)
* Run `go vet` as part of the Travis CI.

Also fix existing issues found by Go vet.

* Explicitly check for shadowing

* Fix shadowing problems throughout codebase

* Actually run all checks including shadow
2019-01-07 18:21:44 -08:00
Ajay Gopinathan 5bde521148 Update WORKSPACE and BUILD files incoporating the recent viewer CRD (#639)
change.

That change was submitted in parallel with the PR that moved everything
to Bazel and so wasn't included.

Along the way, fix conflicts in imports that was using
controller-runtime library. We can import it either through
github.com/kubernetes-sigs or sigs.k8s.io/controller-runtime, but
shouldn't be using both imports, which was causing conflicts at build
time.
2019-01-07 13:56:32 -08:00