-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add support for flexible config (via env var) for the pipline service and UI, fix broken links (pointed to API vs UI service) #1293
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
11854f6
add support for flexible config (via env var) for the pipline service…
yaronha 31f3097
Merge branch 'master' of https://github.com/yaronha/pipelines into kf…
yaronha 7b80eae
support https prefix
yaronha e8f72ce
merge with master
yaronha 1e1acb9
change to LF
yaronha d12c95c
init _uihost
yaronha d986e4f
set _uihost from host param if specified no env var
yaronha 869db23
change config.host to host
yaronha c2e0eeb
merge with upstream master
yaronha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
host = host or os.environ.get(KF_PIPELINES_ENDPOINT_ENV, None)
Otherwise, the code will fail if no host and env var are provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hongye-sun i don't think
get
fails, will just returnNone
just try this:
print('' or os.environ.get('SOMEKEY'))
on your laptopThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right on the environ.get. You still need to change the config.host to host or you should change rest of the method body to check against config.host instead of host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hongye-sun you can see the line below, (
if host: config.host = host
), host will take precedence over the env var, i'm not clear why it doesnt address the case ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to go with test cases:
For example, (host=None, os.environ.get(KF_PIPELINES_ENDPOINT_ENV)='https://iap-endpoint/', client_id=''), in ln 70, iap token won't be fetched.
Another example, (host=None, os.environ.get(KF_PIPELINES_ENDPOINT_ENV)='https://iap-endpoint/', client_id=None), in ln 79, it will ignore config.host and override it with either incluster DNS or the default kubu config's endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hongye-sun ok, got u, switched to
host
, make more sense