Skip to content

Bitbucket Trigger support for Manual, Pub/Sub and Webhook triggers#8544

Merged
hao-nan-li merged 1 commit into
GoogleCloudPlatform:mainfrom
mariomachado94:bitbucket-manual-trigger
Aug 11, 2023
Merged

Bitbucket Trigger support for Manual, Pub/Sub and Webhook triggers#8544
hao-nan-li merged 1 commit into
GoogleCloudPlatform:mainfrom
mariomachado94:bitbucket-manual-trigger

Conversation

@mariomachado94

Copy link
Copy Markdown
Contributor

Adds field bitbucket_server_config to Trigger.git_file_source and Trigger.source_to_build, supporting manual, pub/sub and webhook triggers.

Also fixes TestAccCloudBuildTrigger_basic_bitbucket test.

fixes hashicorp/terraform-provider-google#15079

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

cloudbuild: added `git_file_source.bitbucket_server_config` and `source_to_build.bitbucket_server_config` fields to `google_cloudbuild_trigger` resource

@modular-magician

Copy link
Copy Markdown
Collaborator

Hello! I am a robot. It looks like you are a community contributor. @hao-nan-li, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician

Copy link
Copy Markdown
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 ( 4 files changed, 137 insertions(+))
Terraform Beta: Diff ( 4 files changed, 137 insertions(+))
TF Conversion: Diff ( 3 files changed, 25 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 119 insertions(+))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2925
Passed tests 2616
Skipped tests: 302
Affected tests: 7

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudBuildTrigger_cloudbuildTriggerPubsubWithRepoExample|TestAccCloudBuildTrigger_cloudbuildTriggerWebhookConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerPubsubConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample|TestAccCloudBuildTrigger_cloudbuildTriggerManualExample|TestAccCloudBuildTrigger_basic_bitbucket|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccCloudBuildTrigger_cloudbuildTriggerPubsubWithRepoExample[Error message] [Debug log]
TestAccCloudBuildTrigger_cloudbuildTriggerWebhookConfigExample[Error message] [Debug log]
TestAccCloudBuildTrigger_cloudbuildTriggerPubsubConfigExample[Error message] [Debug log]
TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample[Error message] [Debug log]
TestAccCloudBuildTrigger_cloudbuildTriggerManualExample[Error message] [Debug log]
TestAccCloudBuildTrigger_basic_bitbucket[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@hao-nan-li hao-nan-li left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like this introduced couple new failing tests, could you take a look into it?

@mariomachado94

Copy link
Copy Markdown
Contributor Author

I expect the 2 Bitbucket tests to still fail:
TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample
TestAccCloudBuildTrigger_basic_bitbucket

Our api has the required feature for these tests behind an experiment. When we are close to launch I will allowlist the test projects and rerun the tests

@modular-magician

Copy link
Copy Markdown
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 ( 4 files changed, 133 insertions(+))
Terraform Beta: Diff ( 4 files changed, 133 insertions(+))
TF Conversion: Diff ( 3 files changed, 25 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 119 insertions(+))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2940
Passed tests 2636
Skipped tests: 302
Affected tests: 2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudBuildTrigger_basic_bitbucket|TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccCloudBuildTrigger_basic_bitbucket[Error message] [Debug log]
TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@hao-nan-li

Copy link
Copy Markdown
Contributor

I expect the 2 Bitbucket tests to still fail: TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample TestAccCloudBuildTrigger_basic_bitbucket

Our api has the required feature for these tests behind an experiment. When we are close to launch I will allowlist the test projects and rerun the tests

Thanks for the explanation. Do you plan to get your change merged and released anytime soon? Could we wait until these tests can get fixed before merging?

…gger.source_to_build, supporting manual, pub/sub and webhook triggers.

Also fixes TestAccCloudBuildTrigger_basic_bitbucket test.
@mariomachado94
mariomachado94 force-pushed the bitbucket-manual-trigger branch from c43b0dc to cb5411b Compare August 10, 2023 14:03
@modular-magician

Copy link
Copy Markdown
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 ( 4 files changed, 133 insertions(+))
Terraform Beta: Diff ( 4 files changed, 133 insertions(+))
TF Conversion: Diff ( 3 files changed, 25 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 119 insertions(+))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2940
Passed tests 2636
Skipped tests: 302
Affected tests: 2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudBuildTrigger_basic_bitbucket|TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccCloudBuildTrigger_basic_bitbucket[Debug log]
TestAccCloudBuildTrigger_cloudbuildTriggerManualBitbucketServerExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@hao-nan-li
hao-nan-li merged commit b065cd6 into GoogleCloudPlatform:main Aug 11, 2023
SamGerber pushed a commit to SamGerber/magic-modules that referenced this pull request Aug 14, 2023
…gger.source_to_build, supporting manual, pub/sub and webhook triggers. (GoogleCloudPlatform#8544)

Also fixes TestAccCloudBuildTrigger_basic_bitbucket test.

Co-authored-by: Mario Machado <mariomachado@google.com>
DanielRieske pushed a commit to DanielRieske/magic-modules that referenced this pull request Aug 15, 2023
…gger.source_to_build, supporting manual, pub/sub and webhook triggers. (GoogleCloudPlatform#8544)

Also fixes TestAccCloudBuildTrigger_basic_bitbucket test.

Co-authored-by: Mario Machado <mariomachado@google.com>
nevzheng pushed a commit to nevzheng/magic-modules that referenced this pull request Aug 16, 2023
…gger.source_to_build, supporting manual, pub/sub and webhook triggers. (GoogleCloudPlatform#8544)

Also fixes TestAccCloudBuildTrigger_basic_bitbucket test.

Co-authored-by: Mario Machado <mariomachado@google.com>
rainshen49 pushed a commit to rainshen49/magic-modules that referenced this pull request Aug 21, 2023
…gger.source_to_build, supporting manual, pub/sub and webhook triggers. (GoogleCloudPlatform#8544)

Also fixes TestAccCloudBuildTrigger_basic_bitbucket test.

Co-authored-by: Mario Machado <mariomachado@google.com>
joelkattapuram pushed a commit to joelkattapuram/magic-modules that referenced this pull request Sep 20, 2023
…gger.source_to_build, supporting manual, pub/sub and webhook triggers. (GoogleCloudPlatform#8544)

Also fixes TestAccCloudBuildTrigger_basic_bitbucket test.

Co-authored-by: Mario Machado <mariomachado@google.com>
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.

Failing test(s): TestAccCloudBuildTrigger_basic_bitbucket

3 participants