-
Notifications
You must be signed in to change notification settings - Fork 681
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
Rename Secret.env_name to Secret.env_var #6176
Rename Secret.env_name to Secret.env_var #6176
Conversation
Code Review Agent Run #ea2a6dActionable Suggestions - 1
Review Details
|
Changelist by BitoThis pull request implements the following key changes.
|
/// then the value is the secret itself. If mount_requirement is FILE, then the value is the path to the secret file. | ||
/// +optional | ||
#[prost(string, tag="5")] | ||
pub env_name: ::prost::alloc::string::String, | ||
pub env_var: ::prost::alloc::string::String, |
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.
Consider if renaming env_name
to env_var
maintains backward compatibility. This change could potentially break existing code that relies on the field name env_name
. Similar issues were also found in:
- flyteidl/gen/pb-go/flyteidl/core/security.pb.go (line 152)
- flyteidl/gen/pb_python/flyteidl/core/security_pb2.pyi (line 23)
Code suggestion
Check the AI-generated fix before applying
pub env_var: ::prost::alloc::string::String, | |
#[deprecated] | |
pub env_name: ::prost::alloc::string::String, | |
pub env_var: ::prost::alloc::string::String, |
Code Review Run #ea2a6d
Is this a valid issue, or was it incorrectly flagged by the Agent?
- it was incorrectly flagged
Signed-off-by: Thomas J. Fan <[email protected]>
25a7d9c
to
30a91e4
Compare
Code Review Agent Run #1bcd2dActionable Suggestions - 2
Review Details
|
*/ | ||
envName = ""; | ||
envVar = ""; |
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.
The field name envVar
seems to be renamed from envName
, but this change might impact existing code that depends on this field name. Consider if this is an intentional breaking change. Similar issues were also found in:
- flyteidl/gen/pb_rust/flyteidl.core.rs (line 1057)
- flyteidl/gen/pb-go/flyteidl/core/security.pb.go (line 152)
- flyteidl/protos/flyteidl/core/security.proto (line 47)
- flyteidl/protos/flyteidl/core/security.proto (line 50)
Code suggestion
Check the AI-generated fix before applying
envVar = ""; | |
envName = ""; |
Code Review Run #1bcd2d
Is this a valid issue, or was it incorrectly flagged by the Agent?
- it was incorrectly flagged
@@ -20,13 +20,13 @@ class Secret(_message.Message): | |||
GROUP_VERSION_FIELD_NUMBER: _ClassVar[int] | |||
KEY_FIELD_NUMBER: _ClassVar[int] | |||
MOUNT_REQUIREMENT_FIELD_NUMBER: _ClassVar[int] | |||
ENV_NAME_FIELD_NUMBER: _ClassVar[int] | |||
ENV_VAR_FIELD_NUMBER: _ClassVar[int] |
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.
Consider if renaming ENV_NAME_FIELD_NUMBER
to ENV_VAR_FIELD_NUMBER
maintains backward compatibility. This change could potentially break existing code that references the old field name.
Code suggestion
Check the AI-generated fix before applying
ENV_VAR_FIELD_NUMBER: _ClassVar[int] | |
ENV_NAME_FIELD_NUMBER: _ClassVar[int] # Deprecated: Use ENV_VAR_FIELD_NUMBER | |
ENV_VAR_FIELD_NUMBER: _ClassVar[int] |
Code Review Run #1bcd2d
Is this a valid issue, or was it incorrectly flagged by the Agent?
- it was incorrectly flagged
Tracking issue
Follow up to #6160
Why are the changes needed?
env_var
is a better name thanenv_name
.What changes were proposed in this pull request?
This PR renames
env_name
toenv_var
.How was this patch tested?
I used flyteorg/flytekit#3048 for testing.
Summary by Bito
This PR implements a consistent renaming of the Secret message field from 'env_name' to 'env_var' across all generated protobuf code files. The change affects multiple language implementations including TypeScript, Go, JavaScript, Python, and Rust, updating field names, method signatures, and type definitions. The modification aims to improve clarity by better indicating that the field represents an environment variable.Unit tests added: False
Estimated effort to review (1-5, lower is better): 3