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

[ImageExport] allow custom compute service account #1399

Merged
merged 12 commits into from
Dec 1, 2020

Conversation

dntczdx
Copy link
Contributor

@dntczdx dntczdx commented Oct 21, 2020

No description provided.

@google-oss-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@dntczdx dntczdx requested review from EricEdens and zoran15 and removed request for zmarano and adjackura October 21, 2020 20:21
@dntczdx dntczdx changed the title allow custom compute service account [ImageExport] allow custom compute service account Nov 23, 2020
@dntczdx dntczdx marked this pull request as ready for review November 23, 2020 22:15
cli_tools/gce_vm_image_export/exporter/exporter.go Outdated Show resolved Hide resolved
cli_tools/gce_vm_image_export/exporter/exporter_test.go Outdated Show resolved Hide resolved
cli_tools/gce_vm_image_export/main.go Outdated Show resolved Hide resolved
Comment on lines 227 to 228
flagSet.Var((*flags.TrimmedString)(&args.ComputeServiceAccount), "compute_service_account",
"Compute service account to override default.")
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
flagSet.Var((*flags.TrimmedString)(&args.ComputeServiceAccount), "compute_service_account",
"Compute service account to override default.")
flagSet.Var((*flags.TrimmedString)(&args.ComputeServiceAccount), "compute_service_account",
"Compute service account to be used by exporter Virtual Machine.")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let me remove it for now since I only work on export...

gce_image_import_export_tests.Dockerfile Outdated Show resolved Hide resolved
@dntczdx dntczdx requested a review from zoran15 November 23, 2020 23:50
cli_tools/gce_vm_image_export/main.go Outdated Show resolved Hide resolved
cli_tools_tests/e2e/variables.go Outdated Show resolved Hide resolved
Comment on lines 14 to 18

package e2e

const (
projectIDWithoutDefaultServiceAccountFlag = "project_id_without_default_service_account"
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on the directory of this file, I'm assuming you'll want to re-use the accounts in other test suites. To help clarify your intent, I'd suggest the following changes:

  1. Rename the file to accounts.go or projects.go
  2. Create well-named methods that return a struct (as described below). Eg: ProjectWithDefaultServiceAccount() project

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to reuse cross test suites, yes. Also, there are more variables to add for rich test scenarios. So I keep variables.go to contain all additional test variables parsing for test suites.

cli_tools_tests/e2e/variables.go Outdated Show resolved Hide resolved
@google-oss-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dntczdx, EricEdens, zoran15

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [EricEdens,dntczdx,zoran15]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dntczdx dntczdx merged commit 97bcda7 into GoogleCloudPlatform:master Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants