Skip to content

prelim teamcity config changes#14764

Merged
roaks3 merged 8 commits into
GoogleCloudPlatform:mainfrom
luckyswaminathan:lakshman-difftest-buildsteps
Aug 18, 2025
Merged

prelim teamcity config changes#14764
roaks3 merged 8 commits into
GoogleCloudPlatform:mainfrom
luckyswaminathan:lakshman-difftest-buildsteps

Conversation

@luckyswaminathan

@luckyswaminathan luckyswaminathan commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

…e how to test

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


@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.

google provider: Diff ( 2 files changed, 57 insertions(+), 4 deletions(-))

@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.

google provider: Diff ( 2 files changed, 57 insertions(+), 4 deletions(-))

@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.

google provider: Diff ( 2 files changed, 59 insertions(+), 4 deletions(-))

@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.

google provider: Diff ( 2 files changed, 60 insertions(+), 5 deletions(-))

})

step(ScriptBuildStep {
name = "Run via jen20/teamcity-go-test"

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.

Could you change the name to reflect the new behavior? We aren't using jen20/* as far as I know

@luckyswaminathan luckyswaminathan marked this pull request as ready for review August 11, 2025 20:23
@roaks3 roaks3 requested a review from BBBmau August 11, 2025 20:24
@github-actions github-actions Bot requested a review from roaks3 August 11, 2025 20:24
@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.

google provider: Diff ( 2 files changed, 60 insertions(+), 5 deletions(-))

fun BuildSteps.runDiffTests() {
if (UseTeamCityGoTest) {
step(ScriptBuildStep {
name = "Run Tests"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

currently running this on our teamcity test project here

it seems like we shouuld hvae the build test step be unique for Diff Tests. it could just be as simple as having it be named Run Diff Tests instead of leaving it as Run Tests

fi

echo "Compiling teamcity-diff-test..."
cd scripts/teamcitytestscripts

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.

https://hashicorp.teamcity.com/buildConfiguration/Development_TerraformProviderGoogleDiffTestProject_GOOGLE_BETA_DIFF_TEST_NIGHTLYTESTS_GOOGLEBETA_PACKAGE_ACCESSAPPROVAL/438227?buildTab=log&focusLine=0&logView=flowAware&linesState=1254

19:17:28   Starting: /opt/teamcity-agent/temp/agentTmp/custom_script10331266477049267803
19:17:28   in directory: /opt/teamcity-agent/work/c1b141985ceeadbf/google-beta/services/accessapproval
19:17:28   Compiling teamcity-diff-test...
19:17:28   /opt/teamcity-agent/temp/agentTmp/custom_script10331266477049267803: line 8: cd: scripts/teamcitytestscripts: No such file or directory
19:17:29   /opt/teamcity-agent/temp/agentTmp/custom_script10331266477049267803: line 12: ./test-binary: No such file or directory
19:17:29   Found 0 tests that match the given test prefix TestAcc
19:17:29   Skipping test execution; no tests to run
19:17:29   Process exited with code 0

It looks like the script starts from c1b141985ceeadbf/google-beta/services/accessapproval aka PACKAGE_PATH, so you probably need something like ../../../scripts/teamcitytestscripts (you also need to get back to PACKAGE_PATH after, so probably easier to use pushd/popd)

@github-actions github-actions Bot requested review from BBBmau and roaks3 August 13, 2025 17:50
@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.

google provider: Diff ( 2 files changed, 60 insertions(+), 5 deletions(-))

@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.

google provider: Diff ( 2 files changed, 61 insertions(+), 5 deletions(-))

@roaks3 roaks3 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.

LGTM, seems ready for another check

@BBBmau BBBmau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just merged your changes into the test project and ran a test, getting the following error:

  Starting: /opt/teamcity-agent/temp/agentTmp/custom_script3800832839859704229
11:23:24   in directory: /opt/teamcity-agent/work/c1b141985ceeadbf/google-beta/services/accessapproval
11:23:24   Compiling teamcity-diff-test...
11:23:25   Found 4 tests that match the given test prefix TestAcc
11:23:25   /opt/teamcity-agent/temp/agentTmp/custom_script3800832839859704229: line 21: ./teamcity-diff-test: No such file or directory
11:23:25   Starting tests
11:23:25   Process exited with code 127
11:23:26   Process exited with code 127 (Step: Run via scripts/teamcitytestscripts/teamcity-diff-test (Command Line))
11:23:26   Step Run via scripts/teamcitytestscripts/teamcity-diff-test (Command Line) failed
11:23:26   Error message: Step Run via scripts/teamcitytestscripts/teamcity-diff-test (Command Line) failed

https://hashicorp.teamcity.com/buildConfiguration/Development_TerraformProviderGoogleDiffTestProject_GOOGLE_BETA_DIFF_TEST_NIGHTLYTESTS_GOOGLEBETA_PACKAGE_ACCESSAPPROVAL/440744?showLog=440744_1181_1170&logView=flowAware

@luckyswaminathan

Copy link
Copy Markdown
Contributor Author

11:23:25  Found 4 tests that match the given test prefix TestAcc
11:23:25  /opt/teamcity-agent/temp/agentTmp/custom_script3800832839859704229: line 21: ./teamcity-diff-test: No such file or directory

how does the hashicorp agent interact with the provider? I am compiling this in the base directory of terraform-google-beta, but this file path differs from the ones above it

@github-actions github-actions Bot requested review from BBBmau and roaks3 August 15, 2025 18:34
@BBBmau

BBBmau commented Aug 15, 2025

Copy link
Copy Markdown
Collaborator

11:23:25  Found 4 tests that match the given test prefix TestAcc
11:23:25  /opt/teamcity-agent/temp/agentTmp/custom_script3800832839859704229: line 21: ./teamcity-diff-test: No such file or directory

how does the hashicorp agent interact with the provider? I am compiling this in the base directory of terraform-google-beta, but this file path differs from the ones above it

i added pwd to see what directory is used when the script is ran and it's based on the service that's ran in:

Starting: /opt/teamcity-agent/temp/agentTmp/custom_script17572468272048319001
12:26:29   in directory: /opt/teamcity-agent/work/c1b141985ceeadbf/google-beta/services/accessapproval
12:26:29   Compiling teamcity-diff-test...
12:26:29   Found 4 tests that match the given test prefix TestAcc
12:26:29   /opt/teamcity-agent/work/c1b141985ceeadbf/google-beta/services/accessapproval <-- comes from pwd
12:26:29   Starting tests

so this is why there's a no directory found error, it's attempting to access the directory within the service folder that its ran in @luckyswaminathan

TC Build where i tried this out: https://hashicorp.teamcity.com/buildConfiguration/Development_TerraformProviderGoogleDiffTestProject_GOOGLE_BETA_DIFF_TEST_NIGHTLYTESTS_GOOGLEBETA_PACKAGE_ACCESSAPPROVAL/440748?showLog=440748_1256_1251&logView=flowAware

@BBBmau

BBBmau commented Aug 15, 2025

Copy link
Copy Markdown
Collaborator

if it helps here's the repo where i have the test project setup

hashicorp/terraform-provider-google@main...BBBmau:terraform-provider-google:teamcity/add-diffTest-project

@luckyswaminathan

Copy link
Copy Markdown
Contributor Author

just changed the path of the teamcity binary (I think this logically should work?) assuming it fails after it echoes starting 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.

google provider: Diff ( 2 files changed, 61 insertions(+), 5 deletions(-))

@BBBmau

BBBmau commented Aug 15, 2025

Copy link
Copy Markdown
Collaborator

just changed the path of the teamcity binary (I think this logically should work?) assuming it fails after it echoes starting tests

that fixed it!

https://hashicorp.teamcity.com/buildConfiguration/Development_TerraformProviderGoogleDiffTestProject_GOOGLE_BETA_DIFF_TEST_NIGHTLYTESTS_GOOGLEBETA_PACKAGE_ACCESSAPPROVAL/440752?showLog=440752_0_693&logView=flowAware

i noticed though that we're missing some things in this PR that I added in the test project, were you intending to add this here or in a separate PR? Referencing the test project repo for context

@luckyswaminathan

Copy link
Copy Markdown
Contributor Author

test project

yeah I was intending to add the scheduling, etc later, thanks for doing it for the test one! will port over once I verify this works

@luckyswaminathan

Copy link
Copy Markdown
Contributor Author

test project

yeah I was intending to add the scheduling, etc later, thanks for doing it for the test one! will port over once I verify this works

PASS
------- Stderr: -------
2025/08/15 21:59:53 [DEBUG] Warning - environment variable GOOGLE_BILLING_ACCOUNT is not set - skipping test TestAccApigeeAddonsConfig_apigeeAddonsTestExample
also fyi - all tests are skipping due to a missing env var for certain services

@BBBmau

BBBmau commented Aug 15, 2025

Copy link
Copy Markdown
Collaborator

test project

yeah I was intending to add the scheduling, etc later, thanks for doing it for the test one! will port over once I verify this works

PASS ------- Stderr: ------- 2025/08/15 21:59:53 [DEBUG] Warning - environment variable GOOGLE_BILLING_ACCOUNT is not set - skipping test TestAccApigeeAddonsConfig_apigeeAddonsTestExample also fyi - all tests are skipping due to a missing env var for certain services

ah this is left out since we're focusing on just testing the project + release test step setup

@BBBmau BBBmau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! I'll let you review it once more before merging @roaks3

@roaks3 roaks3 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.

LGTM, merging it now

@roaks3 roaks3 added this pull request to the merge queue Aug 18, 2025
Merged via the queue into GoogleCloudPlatform:main with commit 39c2ebc Aug 18, 2025
24 checks passed
aditikumarii-google pushed a commit to aditikumarii-google/magic-modules that referenced this pull request Aug 22, 2025
NandiniAgrawal15 pushed a commit to NandiniAgrawal15/magic-modules that referenced this pull request Sep 4, 2025
jkrish-c pushed a commit to jkrish-c/magic-modules that referenced this pull request Oct 14, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 15, 2025
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.

4 participants