-
Notifications
You must be signed in to change notification settings - Fork 276
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
Use placeholder templates for registration params #316
Conversation
flytekit/clis/helpers.py
Outdated
identifier.project = identifier.project or project | ||
identifier.domain = identifier.domain or domain | ||
identifier.version = identifier.version or version | ||
if not identifier.project or identifier.project == "{{ .project }}": |
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.
should these not be regexes?
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.
if you want example regex look at https://github.com/lyft/flytekit/blob/annotations/flytekit/annotated/base_sql_task.py#L15
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.
perhaps, but in the case of the project field the only templatized variable that can ever be used is {{ .project }}
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.
ya but what about whitespaces?
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.
also this should be changed right?
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.
derp, yes. had my test case backwards 🤦
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.
re: whitespace, the templating only ever comes from flytesdk right? presumably we can trust that to properly assign the constants, whitespace and all?
auth role and raw output data prefix? |
we use the config values at serialization time. |
no preference on |
I like the idea of |
they shouldnt be at serialization right? actually tbh, they are just Admin attributes so should probably do not even exist at serialization time? |
@kumare3 yep eventually the goal to make admin handle them flyteorg/flytectl#18 i'll update |
PTAL |
flytekit/clis/flyte_cli/main.py
Outdated
"--kubernetes-service-account", help="Custom kubernetes service account auth role to register launch plans with" | ||
"-s", | ||
"--kubernetes-service-account", | ||
help="Custom kubernetes service account auth role to register launch plans with", | ||
) | ||
_output_location_prefix_option = _click.option( | ||
"--output-location-prefix", help="Custom output location prefix for offloaded types (files/schemas)" |
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.
Can we add a short form for this too?
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.
ok. done
_PROJECT_PLACEHOLDER = "" | ||
_DOMAIN_PLACEHOLDER = "" | ||
_VERSION_PLACEHOLDER = "" | ||
_PROJECT_PLACEHOLDER = "{{ registration.project }}" |
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.
Can you summarize why there aren't placeholders for auth and output prefix?
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.
neither are required during serialization
besides auth is a oneof - what should i have a placeholder for: the k8s service account or assumable iam role?
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.
done
friendly ping |
ping @wild-endeavor @kumare3 |
lgtm, I will wait for @wild-endeavor to +1 |
approved offline |
No description provided.