Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
78799ae
Fix toggling default compute class in Autopilot (#16204)
norbertcyran Feb 3, 2026
c99c316
tgc-revival: skip TestAccSpannerInstance_basicWithAutoscalingUsingNod…
zli82016 Feb 3, 2026
f6082e0
Remove FullUrl (#16283)
slevenick Feb 3, 2026
3051713
add kg config to discovery search engine (#16262)
kefang2 Feb 3, 2026
afa81b1
fix(bigqueryanalyticshub): pass token source to BigQuery client in mu…
okvidhi Feb 3, 2026
cc3e7cd
`dataproc`: add `encryption_config` block to docs (#16105)
BBBmau Feb 3, 2026
c387cf0
feat: support for nested write-only arguments + write-only arguments …
ramonvermeulen Feb 3, 2026
cea61b2
feat(firestore): Index delete protection on Firestore index (#16233)
pcostell Feb 3, 2026
eb8a77b
Add new RDMA_FALCON_POLICY and ULL_POLICY firewall policy types (#16256)
mihhalj Feb 3, 2026
f4b5072
Deprecate redundant name from backupdr restore workload & update exam…
Megha-Bose Feb 3, 2026
184a7b8
Added removing drift detection to the list of breaking field-level ch…
melinath Feb 3, 2026
80612a3
Promote network security mirroring broker to GA. (#16286)
duvni Feb 4, 2026
f0681df
build: Upgrade google.golang.org/api to v0.264.0 (#16289)
Yevet Feb 4, 2026
ad34f51
tgc-revival: Modify Terraform Workflow for Google Beta Provider (#16273)
zli82016 Feb 4, 2026
36e733d
Change datasource and plugin_framework to experimental feature flags …
c2thorn Feb 4, 2026
5d2abfc
Tgc container cluster (#16243)
trodge Feb 4, 2026
a0d527a
add missing doc update for database_roles and iam_email (#16300)
schen59 Feb 4, 2026
a7dff51
Promote `network_pass_through_lb_traffic_policy` field in `google_com…
xingyazhao Feb 5, 2026
264453f
test data ingestion: make GetBuilds generic and support untagged queu…
shuyama1 Feb 5, 2026
4352529
Add support for dynamic nic to GCE instance/template (#16303)
rileykarson Feb 5, 2026
b2e08f7
Add support for `firestoreDataAccessMode`, `mongodbCompatibleDataAces…
NickChittle Feb 5, 2026
7737a41
Add support for readiness probe for services (#16120)
paridhishah18 Feb 5, 2026
d63dc51
Meta yaml docs & test improvements (#16309)
melinath Feb 5, 2026
0067b6d
Add poll_interval as a configurable field (#16310)
rileykarson Feb 5, 2026
e578c35
tgc-revival: Added ListSupportedTerraformResources function (#16278)
zli82016 Feb 5, 2026
4c5e28e
build: Upgrade google.golang.org/api to v0.265.0 (#16311)
Yevet Feb 5, 2026
c55a1e0
tgc-revival: Build Parent to child map for parent resolver (#16252)
hao-nan-li Feb 5, 2026
5e5c388
Add DeveloperConnectSource to Vertex ReasoningEngine (#16316)
rileykarson Feb 5, 2026
779ca2c
Remove exactly_one_of for restriction for ssl_certificates and certi…
pawelJas Feb 5, 2026
7340889
Promote RestoreWorkload resource to GA (#16312)
Megha-Bose Feb 5, 2026
eb51acb
Update passphrase with the correct format; (#16294)
zhihaos Feb 5, 2026
7d04f3d
Promote allow_subnet_cidr_routes_overlap to GA (#16264)
drebes Feb 6, 2026
7095a51
Identify and label Terraform team-owned test tickets (#16317)
shuyama1 Feb 6, 2026
f861fa9
alloydb: added `initial_user.password_wo` to `google_alloydb_cluster`…
ramonvermeulen Feb 6, 2026
22f5125
Adding Terraform support for ExadVmCluster Resource (#15742)
siddhisingh-13 Feb 6, 2026
6105983
Updated the biglake iceberg catalog usage doc. (#16301)
nika-qubit Feb 6, 2026
816dd07
Add slice controller terraform support (#16208)
Yevet Feb 6, 2026
1fd21f1
Revert "alloydb: added `initial_user.password_wo` to `google_alloydb_…
rileykarson Feb 6, 2026
377a737
Add CES MCP Toolsets terraform configs (#16228)
habh-11 Feb 6, 2026
f7ed09a
Update ghe private connection app installation id to fix test (#16323)
Saaarah Feb 7, 2026
914d7dc
Fixed a couple field mappings (#16330)
melinath Feb 7, 2026
0e35ce7
Add sweeper and URL substitutions to YAML (#16295)
jgforsberg Feb 7, 2026
49c3eee
Support resource_manager_tags for Interconnect Attachment (#16263)
NandiniAgrawal15 Feb 9, 2026
84e49dd
Add example using `file` for Firebase AI Logic Prompt Template (#16344)
tanzimfh Feb 9, 2026
9cdf611
Extended apigee API enablement wait (#16342)
melinath Feb 9, 2026
4c88664
Fixed importstateverify issues (#16334)
melinath Feb 9, 2026
04b2bb9
tgc-revival: container node pool (#16321)
zli82016 Feb 9, 2026
86ea81e
Add validation that types are known in MMv1 (#16331)
rileykarson Feb 9, 2026
9a4d89e
fix(bigqueryanalyticshub): rewrite updateMask for replica_locations i…
okvidhi Feb 9, 2026
f746dc6
tgc-revival: modify cai asset name format for container resources (#1…
zli82016 Feb 9, 2026
6dce086
Update docs for Firebase AI Logic Prompt Template (#16345)
tanzimfh Feb 10, 2026
1ce4531
Don't add write only fields for tgc (#16332)
zli82016 Feb 10, 2026
58cb773
feat(spanner): support user_project_override in spanner iam resources…
timothyklee Feb 10, 2026
8cd9936
Add plural data source for retrieving content from multiple objects f…
bestefreund Feb 10, 2026
ae54b02
Fixed a few access context manager tests (#16313)
melinath Feb 10, 2026
8ff8e9b
Cleaned up some gke hub tests (#16333)
melinath Feb 10, 2026
f5a96c0
Add instance_flexibility_policy to master & worker nodes (#16038)
sravani-bobbala Feb 10, 2026
76d397b
tgc-revival: remove tgc_include_handwritten_tests from mmv1 (#16343)
zli82016 Feb 10, 2026
ac27a0c
Add Vertex AI Reasoning Engine developer_connect_source test (#16327)
rileykarson Feb 10, 2026
c02b5c0
Additional support for additional subnet draining (#15936)
linpu01 Feb 10, 2026
4177d38
Change machine type to a3-edgegpu-8g (#16352)
ellenjzh Feb 10, 2026
dfb4166
Add Cloud Identity Policy resource (v1beta1) to terraform google-beta…
gomu18 Feb 11, 2026
3a90eb9
add enable field to packetmirroring resource (#16036)
Dawid212 Feb 11, 2026
7587925
Fix permadiff with the collation field in google_bigquery_table.schem…
wj-chen Feb 11, 2026
a5ccd06
feat: support new field server_certificate_rotation_mode for SQL inst…
wuchris-g Feb 11, 2026
440efa0
add sleep to TestAccBinaryAuthorizationPolicy_update (#16216)
c2thorn Feb 11, 2026
0a161c8
Remove restriction on CMEK for incremental backup schedules (#16359)
panerorenn9541 Feb 11, 2026
6dc3fc6
dataform: Add support for Folder resource with examples (#16351)
sdsilva1 Feb 11, 2026
5eee4c4
Update networkservices multicast domain (#16195)
TimDu Feb 11, 2026
2bd6f14
Enable write-only support for private_key from google_compute_(region…
muresan Feb 11, 2026
eacb125
Add support for projects field in Developer Connect Insights Insights…
ishamiGIT Feb 11, 2026
9240e1a
Revert "Revert "alloydb: added `initial_user.password_wo` to `google_…
melinath Feb 12, 2026
4a69edf
Biglake namespace resource (#16280)
rambleraptor Feb 12, 2026
09c56f5
Fix failing CES agent tests (#16354)
jbanghw Feb 12, 2026
9e12576
simplify assignment comment and raise visibility of call to action (#…
ScottSuarez Feb 12, 2026
8261bfa
[do not merge] Promote functions gen 2 direct VPC to GA. (#16364)
janell-chen Feb 12, 2026
6dfe901
List Datsources on terraform (#16372)
niharika-98 Feb 12, 2026
ab528fc
Adding `replica_action` with pause and resume functionality to `goog…
NA2047 Feb 12, 2026
e47d554
Update Cluster resource to add nfs datastore mount and unmount operat…
skarnawat Feb 12, 2026
26f060d
shorten bootstrapped project name for model armor tests (#16381)
shuyama1 Feb 13, 2026
d333cb7
Mark TestAccAlloydbInstance_ObservabilityConfig_Update beta-only (#16…
shuyama1 Feb 13, 2026
0d1d014
Fix TestAccComposerEnvironmentComposer2_private (#16386)
shuyama1 Feb 13, 2026
4ee5174
Add node_pool field to GKE cluster cai2hcl and tfplan2cai converters …
zli82016 Feb 13, 2026
dff1f93
Support Tags at Creation for VPN (#16371)
NandiniAgrawal15 Feb 13, 2026
96b15b7
Add new targets to AuthzPolicy, AuthzExtension (#16390)
rileykarson Feb 13, 2026
da36a2c
Revert "[do not merge] Promote functions gen 2 direct VPC to GA. (#1…
rileykarson Feb 13, 2026
0210b59
datasource support for google_access_context_manager_supported_servic…
ScottSuarez Feb 13, 2026
969f039
Adding support for new RolloutPlan resource and a test into a beta pr…
18811376770 Feb 13, 2026
4b710ab
Link to docs for missing service label (#16380)
ScottSuarez Feb 13, 2026
c6aeb9e
Collect Validate errors for a resource and display them at once (#16207)
rileykarson Feb 13, 2026
36e9056
fix: IAM Policy 409 concurrent changes error - take 2 (#15995)
tamir-deep Feb 13, 2026
5534d73
promote KMS secret asymmetric data source to GA (#16357)
KonradSchieban Feb 13, 2026
56ae742
Add Terraform support for Vector Search 2.0 Collection (#16335)
kkanska Feb 13, 2026
c2acc21
publicca: fixup mac_key (#16361)
champtar Feb 13, 2026
c822797
Revert "feat: support new field server_certificate_rotation_mode for …
shuyama1 Feb 14, 2026
e5db79b
Promote Packet Broker Security Profile to GA. (#16403)
duvni Feb 17, 2026
9c11592
tgc-revival: Add function to handle parent-child traversal order (#16…
hao-nan-li Feb 17, 2026
3ef1f85
Add Agent Gateway resource (#16391)
rileykarson Feb 17, 2026
e628d76
dataform: Add support for TeamFolder resource with examples (#16370)
sdsilva1 Feb 17, 2026
6f9f24d
Reapply "[do not merge] Promote functions gen 2 direct VPC to GA. (#…
rileykarson Feb 17, 2026
e616811
revert loader default interface change (#16406)
ScottSuarez Feb 17, 2026
2559343
Fixed waits for example-based apigee tests (#16405)
melinath Feb 17, 2026
ca0aadc
Add Terraform support for regional backend buckets (#16308)
SCSAndre Feb 17, 2026
294c439
Add vmwareengine_announcements datasource (#16374)
xpr0ger Feb 17, 2026
68b5d76
Add newlines to debug logs in data_source_backup_dr_management_server…
shuyama1 Feb 17, 2026
9d64b2a
fix(bigqueryanalyticshub): Update subscription read logic to use top-…
okvidhi Feb 17, 2026
cf76c2e
Refactor Github Action per b/485167538 (#16416)
slevenick Feb 18, 2026
ef4a266
Add logging field to beyondcorp_security_gateway (#16350)
teyuchang Feb 18, 2026
ec55feb
feat: Implement Cloud Run IAP GA features: move iap enable flag to GA…
google-pratyush Feb 18, 2026
982e50f
Bump github.com/go-git/go-git/v5 from 5.11.0 to 5.16.5 in /tools/go-c…
dependabot[bot] Feb 18, 2026
06ba1fd
fix validation of empty types and properly validate nested fields (#1…
ScottSuarez Feb 18, 2026
9c00d86
storage: fix pagination in force_destroy for google_storage_bucket (#…
kautikdk Feb 18, 2026
ad58ca7
fix TestAccComputeRegionTargetHttpsProxy_update (#16410)
shuyama1 Feb 19, 2026
70e1ba4
feat: added oauth settings (#16446)
google-pratyush Feb 19, 2026
3883e22
Added disableAnalytics property to Discovery Engine Search Engine (#1…
ldmacdonald Feb 19, 2026
42a1ce4
cloudtasks: fixed perma-diff on `http_target.uri_override.query_overr…
cysp Feb 19, 2026
e014451
Format mmv1 files without yaml comments (#16465)
ScottSuarez Feb 19, 2026
1964f25
Add vmwareengine_upgrades datasource (#16338)
xpr0ger Feb 19, 2026
1ac23c6
Fix import resource name for container tests (#16475)
zli82016 Feb 19, 2026
01ae7ea
Added wait_for_completion to google_dataproc_job (#16393)
shuyama1 Feb 19, 2026
87ed1da
Add targets.cloud_storage_target.filter.collection.include_tags field…
patrickmoy Feb 19, 2026
380c767
Fix failing test: TestAccCESAgent_cesAgentBasicExample (#16479)
jbanghw Feb 19, 2026
a236770
Add resource for Cluster Director (hypercomputecluster.googleapis.com…
annuay-google Feb 20, 2026
0efcec1
Compute: fix reservation_affinity for A3/A4 machine types (#16360)
gabriellecdjscott Feb 20, 2026
846e762
tgc-revival: for client side fields, avoid getting value from state d…
zli82016 Feb 20, 2026
163a9a6
Make `size` updatable for `google_compute_instance` under `initialize…
karolgorc Feb 20, 2026
4c6956c
Changed intelligence config name field from url_param_only to ignore_…
melinath Feb 20, 2026
1095505
Fixed datastream connection profile client_id field mapping (#16415)
melinath Feb 20, 2026
5245ab6
Bump OrganizationSecurityPolicyRule to GA (#16340)
matheusaleixo-cit Feb 20, 2026
db5a6dd
Add auto_upgrade_enabled setting to google_sql_database_instance. (#1…
ankushkhanna1998 Feb 20, 2026
6335edf
Add sweeper and URL substitutions to MulticastDomain.yaml (#16487)
jgforsberg Feb 22, 2026
01168ba
Feat: add new field data_api_access into google_sql_database_instance…
JianweiQ Feb 23, 2026
8268624
`PSC`: update `serviceClass` documentation description (#16501)
BBBmau Feb 23, 2026
faaa2ba
Retry SN creation failures caused by missing IAM (#16489)
melinath Feb 23, 2026
2de1af4
Remove Non-SCM Account Connector Tests (#16498)
ihnarayanan Feb 23, 2026
5ffa063
tgc-revival: fix TestAccNetworkSecuritySecurityProfile_networkSecurit…
zli82016 Feb 24, 2026
5793946
Set up modular apprentice review to be handled by Sam and Scott (#16499)
ScottSuarez Feb 24, 2026
9a0dfcc
Adding AZURE_AD_GROUPS_DISPLAY_NAME enum value (#16145)
mmalhotra-google Feb 24, 2026
e24eb2e
Add src_network_context and dest_network_context fields to firewall p…
mihhalj Feb 24, 2026
f7de501
tgc-revival: allow the fields with empty string to show up in HCL (#1…
zli82016 Feb 24, 2026
cbc1ed4
Fix duplicate CAI asset name path segments for node pools (#16442)
zli82016 Feb 24, 2026
c3d9408
tgc-revival: container node pool bugs (#16463)
zli82016 Feb 24, 2026
52f1ee2
Update Test Generation: Apply recent example generator changes to sam…
shuyama1 Feb 24, 2026
8ae14b9
Add http_config to Developer Connect Connection (#15843)
ihnarayanan Feb 25, 2026
b1791c3
Promote Vector Search 2.0 Collection to GA (#16482)
kkanska Feb 25, 2026
287241b
Add endpoint_url to ServiceAttachment consumerAcceptLists (#16493)
aishwaryavora Feb 25, 2026
8857554
Added test fix (#16491)
Sachin-Rungta Feb 25, 2026
1d0cfe1
Add AutokeyConfig-specific post-create sleep [PROD TEST FIX go/terraf…
iamkonohamaru Feb 25, 2026
de815b8
Make changes for to support `database_version` to support `POSTGRES…
superarvind007 Feb 25, 2026
a3d7f53
Added backupDR flag (#16269)
agamkrbit Feb 25, 2026
5302d12
Added Large Volume Support (#16473)
raazanand Feb 25, 2026
01e683d
Update Test Generation: fix datasource test (#16530)
shuyama1 Feb 25, 2026
0003d4b
Ego support 2 (#16270)
ravisiddhu Feb 25, 2026
f2d4af4
upgrade dcl 1.84.0 (#16528)
zli82016 Feb 25, 2026
433f21c
promote gke sandbox to ga (#15740)
awprice Feb 25, 2026
ed7ae65
Bump github.com/cloudflare/circl from 1.6.1 to 1.6.3 in /tools/go-cha…
dependabot[bot] Feb 25, 2026
6ec73f3
feat: add erase_windows_vss_signature to disk and region disk (#16433)
mj790 Feb 26, 2026
41635e7
Deprecation Message for `google_dataplex_data_asset` and create new `…
shashambhavi Feb 26, 2026
e7d9f70
Revert "Promote Vector Search 2.0 Collection to GA" (#16546)
hao-nan-li Feb 26, 2026
c84cfdf
Create a terraform resource for the Fleet WorkloadIdentity Feature fo…
anthonyrtong Feb 26, 2026
4ee2ae6
remove erb link in dependencies guide (#16544)
NickElliot Feb 26, 2026
5a02076
Update add-resource.md to add missing repo (#16394)
dubey-vivek Feb 26, 2026
22cffc6
fix(storage): resolve concurrency bug in google_storage_notification …
kautikdk Feb 26, 2026
8cf5606
Fix Iceberg Namespace IAM example config (#16552)
shuyama1 Feb 26, 2026
6f4c13b
Update Test Generation: formatting + var override fixes (#16554)
shuyama1 Feb 26, 2026
0c69ce7
Updated ports description to support multiple ports for SWP (#16526)
matheusaleixo-cit Feb 26, 2026
02a89a4
Bump SecurityProfile profile type URL_FILTERING to GA (#16477)
matheusaleixo-cit Feb 26, 2026
faeac9a
Documentation for list ds datasource (#16551)
niharika-98 Feb 26, 2026
54d5e28
update google.golang.org/api to v0.267.0 (#16549)
NickElliot Feb 26, 2026
0df58d4
removed usages of primary_resource_name (#16558)
melinath Feb 27, 2026
253e17a
Add actions.publish_to_scc, actions.publish_to_chronicle, actions.exp…
patrickmoy Feb 27, 2026
102e6b2
Add skip_unpatchable_vms field to google_os_config_patch_deployment.p…
ellentari Feb 27, 2026
ec36eaa
Add protected_namespace_count field to GKEBackup BackupPlan (#16496)
apoorvam25 Feb 27, 2026
99af98e
Expanded datasource docs to include best practices for reusing code (…
melinath Feb 27, 2026
df11fa4
Add ExclusiveStringValuesOnCreate CustomizeDiff (#16553)
rileykarson Feb 27, 2026
37ea565
Add and use acctest.SkipTestUntil (#16559)
rileykarson Feb 27, 2026
cef4e16
Add SkipFunc to sample based generator (#16567)
shuyama1 Feb 27, 2026
bb1e568
feat(discoveryengine): add action, BAP, and destination config suppor…
phillipweston Feb 27, 2026
05b1e73
Update numerous deprecation messages (#16570)
rileykarson Feb 27, 2026
5b83690
Fixed typo in override-labels action (#16566)
melinath Feb 27, 2026
cf16612
Add control_plane_disk_encryption_key_versions field to user_managed_…
pkwiecinskii Feb 27, 2026
9d7e7ff
Tavasyag/google oracle db resource (#16504)
tavasyag Feb 27, 2026
5f11e2c
tgc-revival: refactor container flatten functions to use interface{} …
zli82016 Feb 27, 2026
0ee7ae2
Add Observability Organization Settings Resource (#16543)
leowonderful Mar 2, 2026
f16b8e5
`compute`: convert `service_attachment_test.go` file to `.go.tmpl` (#…
BBBmau Mar 2, 2026
afaedc0
Add dataplexConfig field to AlloyDB Cluster resource. (#16509)
AbhishekPardhi Mar 2, 2026
c2a9384
Add bazel generation of alloydb resources (#16569)
SirGitsalot Mar 2, 2026
52ff061
`gkehub`: Fix `TestAccGKEHubFeatureMembership_gkehubFeaturePolicyCont…
BBBmau Mar 2, 2026
d1c3699
Add primary_location field to biglake iceberg catalog (#16557)
rambleraptor Mar 2, 2026
0990df4
tgc-revival: remove computed fields during cai2hcl for container node…
zli82016 Mar 2, 2026
dcc101c
tgc-revival: ignore fields with Default during cai2hcl for container …
zli82016 Mar 2, 2026
6c867e9
tgc-revival: add colab resources (#16363)
zli82016 Mar 2, 2026
4304a90
Tgc revival: add netapp resources (#16584)
zli82016 Mar 2, 2026
e6dec22
feat: Add support for preemption_notice_duration in compute instance …
NemilShah007 Mar 2, 2026
0fff3a5
Update enrolled_teams.yml (#16582)
shuyama1 Mar 3, 2026
201fed5
Add mode field to Storage Pool (#16563)
riteshghorse Mar 3, 2026
a3360d8
Fixed edge case where async.include_project + exclude_delete caused c…
melinath Mar 3, 2026
86725fe
Add textConfig field to Pub/Sub Subscription Cloud Storage config (#1…
dibaskar-google Mar 3, 2026
f369d64
Read-after-write consistency issue on google_tags_tag_key_iam_member …
jnahelou Mar 3, 2026
3140a1f
Add Config resource to Dataform (#16500)
navigatore Mar 3, 2026
68cbdb8
Add scripts folder to the build clear exception (#16600)
ScottSuarez Mar 3, 2026
953dea7
Remove runfiles usage from the Bazel build (#16595)
SirGitsalot Mar 3, 2026
b056696
Add Observability Project Settings Resource (#16532)
leowonderful Mar 3, 2026
ccb380e
`biguery`: Fix `Table does not have Schema` failures in Tests (#16517)
BBBmau Mar 4, 2026
1952662
Update Test Generation: fix RandString + vars overrides (#16587)
shuyama1 Mar 4, 2026
c6022ed
add deletion_policy_exclude to firestore index
NickElliot Mar 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
160 changes: 157 additions & 3 deletions .ci/magician/cmd/collect_nightly_test_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import (
"magician/provider"
"magician/teamcity"
utils "magician/utility"
"net/url"
"os"
"regexp"
"strconv"
"strings"
"time"
Expand All @@ -45,6 +47,7 @@ type TestInfo struct {
Resource string `json:"resource"`
CommitSha string `json:"commit_sha"`
ErrorMessage string `json:"error_message"`
ErrorType string `json:"error_type"`
LogLink string `json:"log_link"`
ProviderVersion string `json:"provider_version"`
QueuedDate time.Time `json:"queued_date"`
Expand Down Expand Up @@ -138,8 +141,13 @@ func execCollectNightlyTestStatus(now time.Time, tc TeamcityClient, gcs Cloudsto

func createTestReport(pVersion provider.Version, tc TeamcityClient, gcs CloudstorageClient, formattedStartCut, formattedFinishCut, date string) error {

baseLocator := fmt.Sprintf("count:500,project:%s,branch:refs/heads/nightly-test,queuedDate:(date:%s,condition:before),queuedDate:(date:%s,condition:after)", pVersion.TeamCityNightlyProjectName(), formattedFinishCut, formattedStartCut)
fields := "build(id,buildTypeId,buildConfName,webUrl,number,queuedDate,startDate,finishDate)"
params := url.Values{}

// Check Queued Builds
queuedBuilds, err := tc.GetBuilds("queued", pVersion.TeamCityNightlyProjectName(), formattedFinishCut, formattedStartCut)
params.Set("locator", fmt.Sprintf("%s,state:queued", baseLocator))
queuedBuilds, err := tc.GetBuilds(params)
if err != nil {
return fmt.Errorf("failed to get queued builds: %w", err)
}
Expand All @@ -149,7 +157,9 @@ func createTestReport(pVersion provider.Version, tc TeamcityClient, gcs Cloudsto
}

// Check Running Builds
runningBuilds, err := tc.GetBuilds("running", pVersion.TeamCityNightlyProjectName(), formattedFinishCut, formattedStartCut)
params.Set("locator", fmt.Sprintf("%s,state:running,tag:cron-trigger", baseLocator))
params.Set("fields", fields)
runningBuilds, err := tc.GetBuilds(params)
if err != nil {
return fmt.Errorf("failed to get running builds: %w", err)
}
Expand All @@ -159,7 +169,9 @@ func createTestReport(pVersion provider.Version, tc TeamcityClient, gcs Cloudsto
}

// Get all service test builds
builds, err := tc.GetBuilds("finished", pVersion.TeamCityNightlyProjectName(), formattedFinishCut, formattedStartCut)
params.Set("locator", fmt.Sprintf("%s,state:finished,tag:cron-trigger", baseLocator))
params.Set("fields", fields)
builds, err := tc.GetBuilds(params)
if err != nil {
return fmt.Errorf("failed to get finished builds: %w", err)
}
Expand Down Expand Up @@ -188,12 +200,14 @@ func createTestReport(pVersion provider.Version, tc TeamcityClient, gcs Cloudsto

for _, testResult := range serviceTestResults.TestResults {
var errorMessage string
var errorType string
// Get test debug log gcs link
logLink := fmt.Sprintf("https://storage.cloud.google.com/teamcity-logs/nightly/%s/%s/%s/debug-%s-%s-%s-%s.txt", pVersion.TeamCityNightlyProjectName(), date, build.Number, pVersion.ProviderName(), build.Number, strconv.Itoa(build.Id), testResult.Name)
// Get concise error message for failed and skipped tests
// Skipped tests have a status of "UNKNOWN" on TC
if testResult.Status == "FAILURE" || testResult.Status == "UNKNOWN" {
errorMessage = convertErrorMessage(testResult.ErrorMessage)
errorType = categorizeError(errorMessage)
}

queuedTime, err := time.Parse(tcTimeFormat, build.QueuedDate)
Expand All @@ -216,6 +230,7 @@ func createTestReport(pVersion provider.Version, tc TeamcityClient, gcs Cloudsto
Resource: convertTestNameToResource(testResult.Name),
CommitSha: build.Number,
ErrorMessage: errorMessage,
ErrorType: errorType,
LogLink: logLink,
ProviderVersion: strings.ToUpper(pVersion.String()),
Duration: testResult.Duration,
Expand Down Expand Up @@ -277,6 +292,145 @@ func convertErrorMessage(rawErrorMessage string) string {
return strings.TrimSpace(rawErrorMessage[startIndex:endIndex])
}

var (
reSubnetNotReady = regexp.MustCompile(`The resource '[^']+/subnetworks/[^']+' is not ready`)
reApiEnv = regexp.MustCompile(`has not been used in project (ci-test-project-188019|1067888929963|ci-test-project-nightly-ga|594424405950|ci-test-project-nightly-beta|653407317329|tf-vcr-private|808590572184) before or it is disabled`)
reAttrSet = regexp.MustCompile(`Attribute '[^']+' expected to be set`)
reQuotaLimit = regexp.MustCompile(`Quota limit '[^']+' has been exceeded`)
reGoogleApi4xx = regexp.MustCompile(`googleapi: Error 4\d\d`)
reGoogleApi5xx = regexp.MustCompile(`googleapi: Error 5\d\d`)
reGoogleApiGeneric = regexp.MustCompile(`googleapi: Error`)
)

func categorizeError(errMsg string) string {
if strings.Contains(errMsg, "Error code 13") {
return "Error code 13"
}
if strings.Contains(errMsg, "Precondition check failed") {
return "Precondition check failed"
}

// Diff Category
if strings.Contains(errMsg, "After applying this test step, the plan was not empty") ||
strings.Contains(errMsg, "After applying this test step and performing a `terraform refresh`") ||
strings.Contains(errMsg, "Expected a non-empty plan, but got an empty plan") ||
strings.Contains(errMsg, "error: Check failed") {
return "Diff"
}

if strings.Contains(errMsg, "timeout while waiting for state") {
return "Operation timeout"
}

// Regex: Subnetwork not ready
if reSubnetNotReady.MatchString(errMsg) {
return "Subnetwork not ready"
}

// ImportStateVerify Category
if strings.Contains(errMsg, "ImportStateVerify attributes not equivalent") ||
strings.Contains(errMsg, "Cannot import non-existent remote object") ||
strings.Contains(errMsg, "Error: Unexpected Import Identifier") {
return "ImportStateVerify"
}

// Deprecated (Case-insensitive check)
if strings.Contains(strings.ToLower(errMsg), "deprecated") {
return "Deprecated"
}

if strings.Contains(errMsg, "Provider produced inconsistent result after apply") &&
strings.Contains(errMsg, "Root object was present, but now absent") {
return "Root object was present, but now absent"
}

if strings.Contains(errMsg, "Provider produced inconsistent final plan") {
return "Provider produced inconsistent final plan"
}

// API Enablement
if reApiEnv.MatchString(errMsg) {
return "API enablement (Test environment)"
}
if strings.Contains(errMsg, "has not been used in project") && strings.Contains(errMsg, "before or it is disabled") {
return "API enablement (Created project)"
}

if strings.Contains(errMsg, "does not have required permissions") {
return "Permissions"
}
if strings.Contains(errMsg, "bootstrap_iam_test_utils.go") {
return "Bootstrapping"
}

// Bad Config Category
if strings.Contains(errMsg, "Inconsistent dependency lock file") ||
strings.Contains(errMsg, "Invalid resource type") ||
strings.Contains(errMsg, "Blocks of type") && strings.Contains(errMsg, "are not expected here") ||
strings.Contains(errMsg, "Conflicting configuration arguments") ||
reAttrSet.MatchString(errMsg) {
return "Bad config"
}

// Quota Category
if strings.Contains(errMsg, "Quota exhausted") ||
strings.Contains(errMsg, "Quota exceeded") ||
strings.Contains(errMsg, "You do not have quota") ||
reQuotaLimit.MatchString(errMsg) {
return "Quota"
}

if strings.Contains(errMsg, "does not have enough resources available") {
return "Resource availability"
}

// API Create/Read/Update/Delete
if strings.Contains(errMsg, "Error: Error waiting to create") ||
strings.Contains(errMsg, "Error: Error waiting for Create") ||
strings.Contains(errMsg, "Error: Error waiting for creating") ||
strings.Contains(errMsg, "Error: Error creating") ||
strings.Contains(errMsg, "was created in the error state") ||
strings.Contains(errMsg, "Error: Error changing instance status after creation:") {
return "API Create"
}

if strings.Contains(errMsg, "Error: Error reading") {
return "API Read"
}

if strings.Contains(errMsg, "Error setting IAM policy") ||
strings.Contains(errMsg, "Error applying IAM policy") {
return "API IAM"
}

if strings.Contains(errMsg, "Error: Error waiting for Updating") ||
strings.Contains(errMsg, "Error: Error updating") {
return "API Update"
}

if strings.Contains(errMsg, "Error: Error waiting for Deleting") ||
strings.Contains(errMsg, "Error running post-test destroy") {
return "API Delete"
}

// Google API Errors (Order matters: check specific codes before generic)
if reGoogleApi4xx.MatchString(errMsg) {
return "API (4xx)"
}
if reGoogleApi5xx.MatchString(errMsg) {
return "API (5xx)"
}
if reGoogleApiGeneric.MatchString(errMsg) ||
strings.Contains(errMsg, "Error: Error when reading or editing") ||
strings.Contains(errMsg, "Error: Error waiting") ||
strings.Contains(errMsg, "unable to queue the operation") ||
strings.Contains(errMsg, "Error waiting for Switching runtime") {
return "API (Other)"
}

return "Other"
}

func init() {
rootCmd.AddCommand(collectNightlyTestStatusCmd)
}
67 changes: 53 additions & 14 deletions .ci/magician/cmd/create_test_failure_ticket.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,19 @@ type testFailure struct {
AffectedResource string
DebugLogLinks map[provider.Version]string
ErrorMessageLinks map[provider.Version]string
ErrorTypes map[provider.Version]string
FailureRates map[provider.Version]string
FailureRateLabels map[provider.Version]testFailureRateLabel
}

var (
// teamOwnedErrorTypes defines errors owned by terraform team
teamOwnedErrorTypes = map[string]bool{
"Quota": true,
"API enablement (Test environment)": true,
}
)

// createTestFailureTicketCmd represents the createTestFailureTicket command
var createTestFailureTicketCmd = &cobra.Command{
Use: "create-test-failure-ticket",
Expand Down Expand Up @@ -172,7 +181,7 @@ func execCreateTestFailureTicket(now time.Time, gh *github.Client, gcs Cloudstor

// Create tickets
for _, testFailure := range testFailuresToday {
if shouldCreateTicket(*testFailure, existTestNames, closedTestNames) {
if shouldCreateTicket(testFailure, existTestNames, closedTestNames) {
err := createTicket(ctx, gh, testFailure)
if err != nil {
return fmt.Errorf("error creating test failure ticket: %w", err)
Expand Down Expand Up @@ -202,6 +211,7 @@ func lastNDaysTestFailureMap(pVersion provider.Version, n int, now time.Time, gc
TestName: testName,
AffectedResource: testInfo.Resource,
ErrorMessageLinks: map[provider.Version]string{provider.GA: "", provider.Beta: ""},
ErrorTypes: map[provider.Version]string{provider.GA: "", provider.Beta: ""},
DebugLogLinks: map[provider.Version]string{provider.GA: "", provider.Beta: ""},
FailureRates: map[provider.Version]string{provider.GA: "N/A", provider.Beta: "N/A"},
FailureRateLabels: map[provider.Version]testFailureRateLabel{provider.GA: testFailure0, provider.Beta: testFailure0},
Expand All @@ -215,6 +225,7 @@ func lastNDaysTestFailureMap(pVersion provider.Version, n int, now time.Time, gc
return err
}
testFailuresToday[testName].ErrorMessageLinks[pVersion] = errorMessageLink
testFailuresToday[testName].ErrorTypes[pVersion] = testInfo.ErrorType
testFailuresToday[testName].DebugLogLinks[pVersion] = testInfo.LogLink
}
}
Expand Down Expand Up @@ -280,7 +291,7 @@ func getTestInfoList(pVersion provider.Version, date time.Time, gcs Cloudstorage
return testInfoList, nil
}

func shouldCreateTicket(testfailure testFailure, existTestNames []string, todayClosedTestNames []string) bool {
func shouldCreateTicket(testfailure *testFailure, existTestNames []string, todayClosedTestNames []string) bool {
if testfailure.FailureRateLabels[provider.GA] == testFailureNone && testfailure.FailureRateLabels[provider.Beta] == testFailureNone {
return false
}
Expand All @@ -295,6 +306,11 @@ func shouldCreateTicket(testfailure testFailure, existTestNames []string, todayC
}
}

// Immediately create team-owned test ticket
if IsTerraformTeamOwned(testfailure) {
return true
}

if testfailure.FailureRateLabels[provider.GA] >= testFailure50 || testfailure.FailureRateLabels[provider.Beta] >= testFailure50 {
return true
}
Expand Down Expand Up @@ -336,6 +352,11 @@ func convertTestNameToResource(testName string) string {
return resourceName
}

func IsTerraformTeamOwned(testFailure *testFailure) bool {
return teamOwnedErrorTypes[testFailure.ErrorTypes[provider.GA]] ||
teamOwnedErrorTypes[testFailure.ErrorTypes[provider.Beta]]
}

func failingTestNamesFromActiveIssues(ctx context.Context, gh *github.Client) ([]string, error) {

opts := &github.IssueListByRepoOptions{
Expand Down Expand Up @@ -395,13 +416,7 @@ func ListIssuesWithOpts(ctx context.Context, gh *github.Client, opts *github.Iss
return allIssues, nil
}

func createTicket(ctx context.Context, gh *github.Client, testFailure *testFailure) error {
issueTitle := fmt.Sprintf("Failing test(s): %s", testFailure.TestName)
issueBody, err := formatIssueBody(*testFailure)
if err != nil {
return fmt.Errorf("error formatting issue body: %w", err)
}

func computeTicketLabels(testFailure *testFailure) ([]string, error) {
failureRatelabel := testFailure.FailureRateLabels[provider.GA].String()

if testFailure.FailureRateLabels[provider.Beta] > testFailure.FailureRateLabels[provider.GA] {
Expand All @@ -414,14 +429,38 @@ func createTicket(ctx context.Context, gh *github.Client, testFailure *testFailu
failureRatelabel,
}

// Apply service labels to forward test failure ticket automatically
regexpLabels, err := labeler.BuildRegexLabels(labeler.EnrolledTeamsYaml)
var labels []string
if IsTerraformTeamOwned(testFailure) {
// Apply terraform team label for team owned ticket
labels = []string{"service/terraform"}
} else {
// Apply service labels to forward test failure ticket automatically
regexpLabels, err := labeler.BuildRegexLabels(labeler.EnrolledTeamsYaml)
if err != nil {
return nil, fmt.Errorf("error building regex labels: %w", err)
}
labels = labeler.ComputeLabels([]string{testFailure.AffectedResource}, regexpLabels)

// Apply terraform team label if no service labels applied
if len(labels) == 0 {
labels = append(labels, "service/terraform")
}
}
ticketLabels = append(ticketLabels, labels...)
return ticketLabels, nil
}

func createTicket(ctx context.Context, gh *github.Client, testFailure *testFailure) error {
issueTitle := fmt.Sprintf("Failing test(s): %s", testFailure.TestName)
issueBody, err := formatIssueBody(*testFailure)
if err != nil {
return fmt.Errorf("error building regex labels: %w", err)
return fmt.Errorf("error formatting issue body: %w", err)
}

labels := labeler.ComputeLabels([]string{testFailure.AffectedResource}, regexpLabels)
ticketLabels = append(ticketLabels, labels...)
ticketLabels, err := computeTicketLabels(testFailure)
if err != nil {
return fmt.Errorf("error getting ticket labels: %w", err)
}

issueRquest := &github.IssueRequest{
Title: github.String(issueTitle),
Expand Down
Loading
Loading