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

refactor(iam): update service account samples to use GAPIC library #9288

Merged
merged 7 commits into from
Apr 25, 2024

Conversation

ssvir
Copy link
Contributor

@ssvir ssvir commented Apr 16, 2024

Description

Fixes

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@ssvir ssvir requested a review from m-strzelczyk April 16, 2024 08:22
@ssvir ssvir self-assigned this Apr 16, 2024
@ssvir ssvir requested review from yoshi-approver and a team as code owners April 16, 2024 08:22
Copy link

google-cla bot commented Apr 16, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added api: iam Issues related to the Identity and Access Management API. samples Issues that are directly related to samples. labels Apr 16, 2024
@ssvir ssvir changed the title iam_create_service_account_java iam service account Java rewrote using a new library Apr 16, 2024
@rsamborski rsamborski assigned Sita04 and unassigned ssvir Apr 16, 2024
@rsamborski rsamborski requested a review from Sita04 April 16, 2024 13:06
@Sita04 Sita04 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 18, 2024
@kokoro-team kokoro-team removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Apr 18, 2024
Copy link
Contributor

@Sita04 Sita04 left a comment

Choose a reason for hiding this comment

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

Thanks for the snippets! PTAL at the comments and fix the lint issue.

@Sita04 Sita04 changed the title iam service account Java rewrote using a new library refactor(iam): update service account samples to use GAPIC library Apr 18, 2024
@ssvir ssvir requested a review from Sita04 April 22, 2024 13:06
@kweinmeister kweinmeister added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 22, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 22, 2024
@hegemonic
Copy link
Contributor

I have a big-picture concern about this PR: Is someone also rewriting the other IAM code samples in this repo to use the GAPIC libraries?

If so, that's great! This migration is long overdue.

If not, I don't think we should merge this PR. It would be extremely confusing if some pages in the IAM docs told you to use the Google API Client Library for Java, and other pages told you to use the Cloud Client Library for Java. We need to update all of the samples for each language, not just some of them.

@m-strzelczyk
Copy link
Contributor

Hey @hegemonic ! Thanks for your vigilance in this regard :) I'm happy to inform that it's a coordinated effort to move all Java and Python IAM samples that are still using the old libraries to the new ones. Please reach out to me if you're interested in more details.

@hegemonic
Copy link
Contributor

@m-strzelczyk Fantastic! Very glad to hear it 😀

Can you let me know when you're mostly done with the IAM samples, so that we can update the client libraries page as well?

@Sita04 Sita04 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 24, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 24, 2024
Copy link
Contributor

@Sita04 Sita04 left a comment

Choose a reason for hiding this comment

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

LGTM.

  1. A couple nits. Kindly address them before merging.
  2. Fix lint issue

@ssvir ssvir added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 25, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 25, 2024
@ssvir ssvir merged commit a3202ac into main Apr 25, 2024
11 checks passed
@ssvir ssvir deleted the iam_create_service_account_java branch April 25, 2024 12:48
rafaelMurata pushed a commit to rafaelMurata/java-docs-samples that referenced this pull request May 7, 2024
…oogleCloudPlatform#9288)

* api platform updated version form v1beta to v1

* DeleteServiceAccountKey, DeleteServiceAccountKey, RenameServiceAccount rewrote using a new library

* DeleteServiceAccountKey, DeleteServiceAccountKey, RenameServiceAccount rewrote using a new library

* fixed pr review comments

* fixed lint proposal

* fixed comments and lint proposal
rafaelMurata pushed a commit to rafaelMurata/java-docs-samples that referenced this pull request May 27, 2024
…oogleCloudPlatform#9288)

* api platform updated version form v1beta to v1

* DeleteServiceAccountKey, DeleteServiceAccountKey, RenameServiceAccount rewrote using a new library

* DeleteServiceAccountKey, DeleteServiceAccountKey, RenameServiceAccount rewrote using a new library

* fixed pr review comments

* fixed lint proposal

* fixed comments and lint proposal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: iam Issues related to the Identity and Access Management API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants