Skip to content

Conversation

@v1v
Copy link
Member

@v1v v1v commented Oct 22, 2025

Closes #384

What

Remove deprecation and clarify when and how to use it.

Why

Consumers can run subsequent gcloud commands after using this Github Action, and those gcloud commands will use the default value, even if the project-number points to a different Google Project.

That's problematic and hard to debug, therefore let's ensure we remove the deprecation.

Further details

See

image

@v1v v1v requested a review from reakaleek October 22, 2025 08:29
@v1v v1v self-assigned this Oct 22, 2025
@v1v v1v requested a review from a team as a code owner October 22, 2025 08:29
@v1v v1v added the changelog:fix When you fix a bug label Oct 22, 2025
@v1v v1v requested review from Copilot and removed request for a team October 22, 2025 08:29
Copy link
Contributor

Copilot AI left a 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-id input
  • Updated the input description to clarify when project-id is 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.'
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Member Author

@v1v v1v Oct 22, 2025

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.

Copy link
Contributor

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n Oct 22, 2025

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-id over project-number .
    • If you set project-id and project-number as input args ---> we don't care about the project-number and get the project-number from the id-number map
    • If you only set project-id as input arg ---> we get the project-number from the id-number map
    • If you only set the project-number as input arg ---> we get the project-id from the number-id map

or vice versa. What do you think?

Copy link
Contributor

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n left a comment

Choose a reason for hiding this comment

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

LGTM

@v1v v1v added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit 54e84e6 Oct 22, 2025
5 checks passed
@v1v v1v deleted the feature/remove-deprecation branch October 22, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:fix When you fix a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisit the deprecation for the google/auth

4 participants