Skip to content
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

Merged
merged 5 commits into from
Jan 11, 2021

Conversation

katrogan
Copy link
Contributor

@katrogan katrogan commented Jan 6, 2021

No description provided.

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 }}":
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@katrogan katrogan Jan 6, 2021

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 }}

Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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 🤦

Copy link
Contributor Author

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?

@wild-endeavor
Copy link
Contributor

auth role and raw output data prefix?

@wild-endeavor
Copy link
Contributor

Also should it just be .project? Or should we bucket them under registration.project or something? @katrogan @kumare3

@katrogan
Copy link
Contributor Author

katrogan commented Jan 6, 2021

auth role and raw output data prefix?

we use the config values at serialization time.

@katrogan
Copy link
Contributor Author

katrogan commented Jan 6, 2021

no preference on {{ .project }} vs {{ registration.project }}

@kumare3
Copy link
Contributor

kumare3 commented Jan 7, 2021

I like the idea of registration.project thus registration is a protected namespace

@kumare3
Copy link
Contributor

kumare3 commented Jan 7, 2021

auth role and raw output data prefix?

we use the config values at serialization time.

they shouldnt be at serialization right? actually tbh, they are just Admin attributes so should probably do not even exist at serialization time?

@katrogan
Copy link
Contributor Author

katrogan commented Jan 7, 2021

@kumare3 yep eventually the goal to make admin handle them flyteorg/flytectl#18

i'll update

@katrogan
Copy link
Contributor Author

katrogan commented Jan 7, 2021

PTAL

"--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)"
Copy link
Contributor

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?

Copy link
Contributor Author

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 }}"
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@katrogan
Copy link
Contributor Author

katrogan commented Jan 8, 2021

friendly ping

@katrogan
Copy link
Contributor Author

ping @wild-endeavor @kumare3

@kumare3
Copy link
Contributor

kumare3 commented Jan 11, 2021

lgtm, I will wait for @wild-endeavor to +1

@katrogan
Copy link
Contributor Author

approved offline

@katrogan katrogan merged commit 2c5abf2 into annotations Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants