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 magician structs #9605

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Conversation

melinath
Copy link
Member

@melinath melinath commented Dec 8, 2023

Prep work for b/295224401. Made the following changes:

  • Refactored to meet recommendations in go/go-style/decisions#interfaces and go/go-style/decisions#repetition
    • Also centralized the cmd package's interface definitions to reduce repeated code
  • Standardized on GetPullRequest to replace GetPullRequestAuthor and GetPullRequestLabelIDs, since they both return pull request data - better to have a single method in case we need to use more than one part of the data at once.
    • This has the side effect of fixing override-breaking-change logic, which I believe was previously calling the wrong endpoint.

cc @ScottSuarez FYI

Release Note Template for Downstream PRs (will be copied)


@melinath melinath requested a review from trodge December 8, 2023 00:08
@@ -5,10 +5,10 @@ import (
"fmt"
"os"

"google.golang.org/api/cloudbuild/v1"
cloudbuildv1 "google.golang.org/api/cloudbuild/v1"
Copy link
Member Author

Choose a reason for hiding this comment

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

this is not strictly necessary but I think it might be useful to disambiguate since this is inside the cloudbuild package.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 1 file changed, 5 insertions(+))

@melinath melinath merged commit fd83cc8 into main Dec 8, 2023
14 checks passed
@melinath melinath deleted the b-295224401-refactor-github-struct branch December 8, 2023 19:46
trodge pushed a commit to trodge/magic-modules that referenced this pull request Dec 8, 2023
* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs
trodge added a commit to trodge/magic-modules that referenced this pull request Dec 9, 2023
Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml
trodge added a commit to trodge/magic-modules that referenced this pull request Dec 11, 2023
Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml
trodge added a commit to trodge/magic-modules that referenced this pull request Dec 12, 2023
Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml
trodge added a commit to trodge/magic-modules that referenced this pull request Dec 13, 2023
Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml
trodge added a commit to trodge/magic-modules that referenced this pull request Dec 14, 2023
Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml
trodge added a commit that referenced this pull request Dec 14, 2023
* Run cassettes on main

Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml

* Move Version into provider package and Repo into source package

* Remove second walk func

* Add ,

* Add source Runner interface

* Remove check cassettes changes

* Fix issues with diff processor build

* Fix test
trodge added a commit to trodge/magic-modules that referenced this pull request Dec 15, 2023
Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml
trodge added a commit that referenced this pull request Dec 21, 2023
* Run cassettes on main

Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml

* Move Version into provider package and Repo into source package

* Remove second walk func

* Add ,

* Delete unused variable

* Rename bucket

* Include numbers of failed, passed, and skipped tests

* Wait for vcr merge instead of tpgb push
kapreus pushed a commit to kapreus/magic-modules that referenced this pull request Jan 2, 2024
* Run cassettes on main

Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml

* Move Version into provider package and Repo into source package

* Remove second walk func

* Add ,

* Add source Runner interface

* Remove check cassettes changes

* Fix issues with diff processor build

* Fix test
kapreus pushed a commit to kapreus/magic-modules that referenced this pull request Jan 2, 2024
* Run cassettes on main

Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml

* Move Version into provider package and Repo into source package

* Remove second walk func

* Add ,

* Delete unused variable

* Rename bucket

* Include numbers of failed, passed, and skipped tests

* Wait for vcr merge instead of tpgb push
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
* Run cassettes on main

Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml

* Move Version into provider package and Repo into source package

* Remove second walk func

* Add ,

* Add source Runner interface

* Remove check cassettes changes

* Fix issues with diff processor build

* Fix test
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
* Run cassettes on main

Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml

* Move Version into provider package and Repo into source package

* Remove second walk func

* Add ,

* Delete unused variable

* Rename bucket

* Include numbers of failed, passed, and skipped tests

* Wait for vcr merge instead of tpgb push
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
* Run cassettes on main

Revert local testing changes

Test: make magician-check-vcr-cassettes the only step

Also collect passing and skipping tests

collectResult no longer returns an error

Remove extra return value

gitignore magician binary

Print logs

Actually set logPaths and cassettePaths

Rework management of environment variables

Remove extra ]

Also print all_tests.log

Echo home

Include HOME in env

Echo path

Use GOCACHE instead of HOME

add -vet=off

Run all tests, skip printing logs

Run 24 tests and upload logs

Add -r and remove logs

Also upload cassettes

Run tests for one resource in recording

Run tests for one resource in replaying

Also capture PATH

Run recording again

Clone hashicorp provider instead of mm

Run all tests

Run replaying

Move check cassettes to push-downstream

Remove echo PATH

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

Refactor magician structs (GoogleCloudPlatform#9605)

* Refactored github interfaces

Fixed bug in overriding breaking changes

* gofmt

* Removed GetPullRequestLabelIDs

Use magician for generate comment

Fix formatting of breaking changes

Keep diff string empty

Add missing newline

Add copyright notices

Add missing space

Revert changes from running generate-comment

Run cassettes on main

Print logs

Rework management of environment variables

change to GA in doc (GoogleCloudPlatform#9491)

Co-authored-by: Edward Sun <[email protected]>

git checkout main gcb-generate-diffs-new.yml

* Move Version into provider package and Repo into source package

* Remove second walk func

* Add ,

* Delete unused variable

* Rename bucket

* Include numbers of failed, passed, and skipped tests

* Wait for vcr merge instead of tpgb push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants