Skip to content

Comments

Add addition attributes in RunSpec#217

Merged
wild-endeavor merged 16 commits intoflyteorg:mainfrom
popojk:add_addition_fields_in_runspec
Oct 28, 2025
Merged

Add addition attributes in RunSpec#217
wild-endeavor merged 16 commits intoflyteorg:mainfrom
popojk:add_addition_fields_in_runspec

Conversation

@popojk
Copy link
Contributor

@popojk popojk commented Sep 25, 2025

Changes

  1. Update src/flyte/_run.py to pass service_account and raw_output_prefix into RunSpec while creating a new run
  2. Update protos

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@popojk popojk changed the title Add addition fields in runspec Add addition attributes in runspec Sep 25, 2025
@popojk
Copy link
Contributor Author

popojk commented Sep 25, 2025

@wild-endeavor @pvditt @squiishyy This is a PR to add addition attributes in RunSpec in SDK. Please review, thanks!

@popojk popojk changed the title Add addition attributes in runspec Add addition attributes in RunSpec Sep 25, 2025
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
raw_data_storage = run_definition_pb2.RawDataStorage(raw_data_prefix=self._raw_data_path)
security_context = security_pb2.SecurityContext(
run_as=security_pb2.Identity(
k8s_service_account=self._service_account
Copy link
Member

Choose a reason for hiding this comment

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

Curious, do we also want to set other things in the SecurityContext in SDK?

popojk added 3 commits October 7, 2025 10:40
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
"click.option": click.Option(
["--service-account"],
type=str,
help="Kubernetes service account. If not provided, default will be used",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
help="Kubernetes service account. If not provided, default will be used",
help="Kubernetes service account. If not provided, the configured default will be used",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed!

"click.option": click.Option(
["--raw-data-path"],
type=str,
help="Override the output path to store the raw data. Example: s3://bucket/",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
help="Override the output path to store the raw data. Example: s3://bucket/",
help="Override the output prefix used to store offloaded data types. e.g. s3://bucket/",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed!

env_kv = run_pb2.Envs(values=kv_pairs)
annotations = run_pb2.Annotations(values=self._annotations)
labels = run_pb2.Labels(values=self._labels)
raw_data_storage = run_pb2.RawDataStorage(raw_data_prefix=self._raw_data_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we shouldn't send these at all if the values aren't defined. there's no point sending an empty object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed! Thank you

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@wild-endeavor wild-endeavor merged commit b5a29a9 into flyteorg:main Oct 28, 2025
10 of 14 checks passed
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