-
Notifications
You must be signed in to change notification settings - Fork 9
fix: remove deprecation #385
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
Conversation
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.
Pull Request Overview
This PR removes the deprecation warning from the project-id input parameter in the google/auth action. The deprecation message incorrectly stated that project-id was not relevant, but it is actually required by downstream authentication systems like the gcloud CLI.
Key changes:
- Removed the deprecation message from
project-idinput - Updated the input description to clarify when
project-idis needed - Enhanced documentation with a new usage example demonstrating gcloud CLI integration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| google/auth/action.yml | Removed deprecation message and updated project-id description to clarify its optional but potentially required nature |
| google/auth/README.md | Updated documentation table formatting, expanded usage examples to include gcloud CLI scenario demonstrating when project-id is needed |
Comments suppressed due to low confidence (1)
google/auth/README.md:1
- The job name 'job_id' has been changed to 'federation'. Ensure this change is intentional and consider updating any references to this job name in dependent workflows or documentation.
# <!--name-->google/auth<!--/name-->
| default: '8560181848' | ||
| project-id: | ||
| description: 'The GCP project ID' | ||
| description: 'The GCP project ID. The project-id is optional, but may be required by downstream authentication systems such as the gcloud CLI.' |
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.
For me it's a little bit weird to have two input parameters for the same purpose. Maybe we can infer one from the other.
What do you think?
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.
That's tricky:
It will require the workload identity to have a specific permission, so we can run some API to gather the project name for the given project number.
It's not ideal, but there is no way to do it smoothly, since this is a public repository I prefer we do not make a breaking change here.
We could provide something for a breaking change in the future, we track those requests in #126
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.
I updated the description with the context for clarity.
We faced some issues recently in one GH workflow using gcloud for something else and was actually failing. I'll pin gyou there
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.
Thanks for the information @v1v. I understand the problem.
Maybe creating the key-value map that @reakaleek was proposing could be a good approach. At least, this is static data so easy to maintain and we would be avoiding that the user adds contradictory input data.
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.
In my opinion, this constitutes a breaking change. If we decide to move forward, we'll need to plan for v2, which isn’t currently on our roadmap for the near future. Would you mind creating a GitHub issue to propose this change?
This change simply involves removing the deprecation and guiding consumers on how to properly use it.
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.
Would you mind creating a GitHub issue to propose this change?
Sure.
In my opinion, this constitutes a breaking change.
I think it could be a breaking change or not depending if we remove one of the input args; but maintaining both and giving preference (and documenting it of course) to one over another (similar as we were doing with the deprecation warning) could be a way to solve that in the v1 IMHO.
For instance:
- Preference to
project-idoverproject-number.- If you set
project-idandproject-numberas input args ---> we don't care about theproject-numberand get theproject-numberfrom theid-numbermap - If you only set
project-idas input arg ---> we get theproject-numberfrom theid-numbermap - If you only set the
project-numberas input arg ---> we get theproject-idfrom thenumber-idmap
- If you set
or vice versa. What do you think?
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.
LGTM
Closes #384
What
Remove deprecation and clarify when and how to use it.
Why
Consumers can run subsequent
gcloudcommands after using this Github Action, and those gcloud commands will use the default value, even if theproject-numberpoints to a different Google Project.That's problematic and hard to debug, therefore let's ensure we remove the deprecation.
Further details
See