* 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
The default timeout value is of type timedelta which cannot be compared with a plain number later in the code.
Also replaced time_delta.seconds with time_delta.total_seconds() which gives out correct value.
In some cases, it may need extra header to handle the API calls.
Directly add `header_name` and `header_value` props in
`.config/kfp/context.json` and pass the name/value pair
to APIClient.
Here is one of the use cases:
if the service is protected by istio RBAC and need JWT header
for authentication, you can specify the JWT id-token in
the .config/kfp/context.json with these two new props.
The id-token would be carried in the specified header name.
Then the API call can be properly authentiecated and checked
if the user has the permission to access the service.
* Prepare SDK docs environment so its easier to understand how to build the docs locally so theyre consistent with ReadTheDocs.
* Clean up docstrings for kfp.Client
* Add in updates to the docs for compiler and components
* Update components area to add in code references and make formatting a little more consistent.
* Clean up containers, add in custom CSS to ensure we do not overflow on inline code blocks
* Clean up containers, add in custom CSS to ensure we do not overflow on inline code blocks
* Remove unused kfp.notebook package links
* Clean up a few more errant references
* Clean up the DSL docs some more
* Update SDK docs for KFP extensions to follow Sphinx guidelines
* Clean up formatting of docstrings after Ark-Kuns comments
* Update _client.py
* Allow for passing name instead of only pipeline_id
* fixed old rebase issue
* protobuf fix
* raise error and remove f-string
* moved file
* updated python proto packages versions
* Update sdk/python/kfp/_client.py
* restructured and added to build
* changes structure of import
* Updated the files
* further updates of client and filter.proto
* alternative
* clean up
* clean up
* remove helperfiles
* futher clean up
* clean up or eaither name or id
* update doc strings
* remove page_size
* Update sdk/python/kfp/_client.py
Co-authored-by: Jiaxiao Zheng <jxzheng@google.com>
* Update sdk/python/kfp/cli/pipeline.py
Co-authored-by: Jiaxiao Zheng <jxzheng@google.com>
* updated to classical string formattin
Co-authored-by: Jiaxiao Zheng <jxzheng@google.com>
* [SDK/CLI] Add version param to run_pipeline
* Set PIPELINE_VERSION relationship to CREATOR
Also adds a note about pipeline_id taking precedence over version_id
* Allow writing/reading user namespace to/from local context file
* update docstring
* Move LOCAL_KFP_CONTEXT into Client class
* Fix docstring
Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
* Make context_setting an instance variable and load from file during init.
* add namespace to some run APIs
* update only the create run api
* add resourcereference for namespace runs
* add variables in const
* add namespace to run_pipeline
* add types to toModel func
* minor fix
* bug fix
* strip the namespace resource reference when mapping to the db model
* add unit tests
* use gofmt
* replace belonging relationshipreference to owner
* put a todo for further investigation of using namespace or uuid
* apply gofmt
* revert minor change
* use owner relationship
* add docstring for namespace
* add namespace to all create run func
* added todos for wrapping the configrations for different auth methods; default namespaces
* Add support for user account auth with IAP
* add comments
* add the url in case open_new_tab does not work(AI Platform notebook).
* code refactor: move get_auth_token logic in auth.py
* store the credentials locally
* minior fix
* add support in kfp cli
* fix diagnose me bug
* add reference
* add todo for refresh token expiration
* address comments
* SDK - Client - Added API models to the generated API
The API objects should now be available in the generated client API: `kfp.Client().jobs.models.ApiJob`.
* Simplified the change
The new format is now
36a59b5371d6ab2-dot-us-west1.notebooks.googleusercontent.com
Remove the part that break the SDL to use a more generic matching string
/assign @numerology @hongye-sun
* SDK - Refactoring - Split the K8sHelper class
One part was only used by container builder and provided higher-level API over K8s Client.
Another was used by the compiler and did not use the kubernetes library.
* Updated the license year.