Skip to content

Commit 625c184

Browse files
authored
Sync main sept 17 feature branch resource identity (#15399)
2 parents 0c79dc5 + ac9adbe commit 625c184

File tree

508 files changed

+19738
-3879
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

508 files changed

+19738
-3879
lines changed

.ci/magician/cloudbuild/community.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ func (cb *Client) ApproveDownstreamGenAndTest(prNumber, commitSha string) error
3030
}
3131

3232
if buildId == "" {
33-
return fmt.Errorf("Failed to find pending build for PR %s", prNumber)
33+
fmt.Printf("WARNING: Failed to find pending build for PR %s\nThis build may have been approved already.\n", prNumber)
34+
return nil
3435
}
3536

3637
err = approveBuild(PROJECT_ID, buildId)

.ci/magician/cmd/collect_nightly_test_status.go

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,25 @@ import (
3030
)
3131

3232
const (
33-
NightlyDataBucket = "nightly-test-data"
33+
nightlyDataBucket = "nightly-test-data"
34+
tcTimeFormat = "20060102T150405Z0700"
3435
)
3536

3637
var cntsRequiredEnvironmentVariables = [...]string{
3738
"TEAMCITY_TOKEN",
3839
}
3940

4041
type TestInfo struct {
41-
Name string `json:"name"`
42-
Status string `json:"status"`
43-
Service string `json:"service"`
44-
ErrorMessage string `json:"error_message"`
45-
LogLink string `json"log_link`
46-
ProviderVersion string `json:"provider_version"`
47-
QueuedDate string `json:"queuedDate"`
48-
StartDate string `json:"startDate"`
49-
FinishDate string `json:"finishDate"`
50-
Duration int `json:"duration"`
42+
Name string `json:"name"`
43+
Status string `json:"status"`
44+
Service string `json:"service"`
45+
ErrorMessage string `json:"error_message"`
46+
LogLink string `json:"log_link"`
47+
ProviderVersion string `json:"provider_version"`
48+
QueuedDate time.Time `json:"queued_date"`
49+
StartDate time.Time `json:"start_date"`
50+
FinishDate time.Time `json:"finish_date"`
51+
Duration int `json:"duration"`
5152
}
5253

5354
// collectNightlyTestStatusCmd represents the collectNightlyTestStatus command
@@ -168,17 +169,31 @@ func createTestReport(pVersion provider.Version, tc TeamcityClient, gcs Cloudsto
168169
if testResult.Status == "FAILURE" || testResult.Status == "UNKNOWN" {
169170
errorMessage = convertErrorMessage(testResult.ErrorMessage)
170171
}
172+
173+
queuedTime, err := time.Parse(tcTimeFormat, build.QueuedDate)
174+
if err != nil {
175+
return fmt.Errorf("failed to parse QueuedDate: %v", err)
176+
}
177+
startTime, err := time.Parse(tcTimeFormat, build.StartDate)
178+
if err != nil {
179+
return fmt.Errorf("failed to parse StartDate: %v", err)
180+
}
181+
finishTime, err := time.Parse(tcTimeFormat, build.FinishDate)
182+
if err != nil {
183+
return fmt.Errorf("failed to parse FinishDate: %v", err)
184+
}
185+
171186
testInfoList = append(testInfoList, TestInfo{
172187
Name: testResult.Name,
173188
Status: testResult.Status,
174189
Service: serviceName,
175190
ErrorMessage: errorMessage,
176191
LogLink: logLink,
177-
ProviderVersion: pVersion.String(),
192+
ProviderVersion: strings.ToUpper(pVersion.String()),
178193
Duration: testResult.Duration,
179-
QueuedDate: build.QueuedDate,
180-
StartDate: build.StartDate,
181-
FinishDate: build.FinishDate,
194+
QueuedDate: queuedTime,
195+
StartDate: startTime,
196+
FinishDate: finishTime,
182197
})
183198
}
184199
}
@@ -193,7 +208,7 @@ func createTestReport(pVersion provider.Version, tc TeamcityClient, gcs Cloudsto
193208

194209
// Upload test status data file to gcs bucket
195210
objectName := fmt.Sprintf("test-metadata/%s/%s", pVersion.String(), testStatusFileName)
196-
err = gcs.WriteToGCSBucket(NightlyDataBucket, objectName, testStatusFileName)
211+
err = gcs.WriteToGCSBucket(nightlyDataBucket, objectName, testStatusFileName)
197212
if err != nil {
198213
return err
199214
}

.ci/magician/cmd/create_test_failure_ticket.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func getTestInfoList(pVersion provider.Version, date time.Time, gcs Cloudstorage
268268
objectName := fmt.Sprintf("test-metadata/%s/%s", pVersion.String(), testStatusFileName)
269269

270270
var testInfoList []TestInfo
271-
err := gcs.DownloadFile(NightlyDataBucket, objectName, testStatusFileName)
271+
err := gcs.DownloadFile(nightlyDataBucket, objectName, testStatusFileName)
272272
if err != nil {
273273
return testInfoList, err
274274
}
@@ -506,13 +506,13 @@ func storeErrorMessage(pVersion provider.Version, gcs CloudstorageClient, errorM
506506

507507
// upload file to GCS
508508
objectName := fmt.Sprintf("test-errors/%s/%s/%s", pVersion.String(), date, fileName)
509-
err = gcs.WriteToGCSBucket(NightlyDataBucket, objectName, fileName)
509+
err = gcs.WriteToGCSBucket(nightlyDataBucket, objectName, fileName)
510510
if err != nil {
511511
return "", fmt.Errorf("failed to upload error message file %s to GCS bucket: %w", objectName, err)
512512
}
513513

514514
// compute object view path
515-
link := fmt.Sprintf("https://storage.cloud.google.com/%s/%s", NightlyDataBucket, objectName)
515+
link := fmt.Sprintf("https://storage.cloud.google.com/%s/%s", nightlyDataBucket, objectName)
516516
return link, nil
517517
}
518518

.ci/magician/cmd/test_terraform_vcr.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ func execTestTerraformVCR(prNumber, mmCommitSha, buildID, projectID, buildStep,
237237
}
238238

239239
notRunBeta, notRunGa := notRunTests(tpgRepo.UnifiedZeroDiff, tpgbRepo.UnifiedZeroDiff, replayingResult)
240-
241240
postReplayData := postReplay{
242241
RunFullVCR: runFullVCR,
243242
AffectedServices: sort.StringSlice(servicesArr),

.ci/magician/github/membership_data.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ var (
8383
"melinath": {
8484
vacations: []Vacation{
8585
{
86-
startDate: newDate(2025, 6, 26),
87-
endDate: newDate(2025, 7, 7),
86+
startDate: newDate(2025, 9, 17),
87+
endDate: newDate(2025, 9, 22),
8888
},
8989
},
9090
},
@@ -140,13 +140,17 @@ var (
140140
startDate: newDate(2025, 8, 7),
141141
endDate: newDate(2025, 8, 10),
142142
},
143+
{
144+
startDate: newDate(2025, 9, 18),
145+
endDate: newDate(2025, 9, 28),
146+
},
143147
},
144148
},
145149
"zli82016": {
146150
vacations: []Vacation{
147151
{
148-
startDate: newDate(2025, 1, 15),
149-
endDate: newDate(2025, 2, 9),
152+
startDate: newDate(2025, 8, 27),
153+
endDate: newDate(2025, 9, 2),
150154
},
151155
},
152156
},
@@ -155,7 +159,6 @@ var (
155159
// This is for new team members who are onboarding
156160
trustedContributors = map[string]struct{}{
157161
"bbasata": struct{}{},
158-
"jaylonmcshan03": struct{}{},
159162
"malhotrasagar2212": struct{}{},
160163
}
161164
)

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
# Initializes the CodeQL tools for scanning.
3232
- name: Initialize CodeQL
33-
uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
33+
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
3434
with:
3535
languages: ${{ matrix.language }}
3636
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
4444
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
4545
# If this step fails, then you should remove it and run the build manually (see below)
4646
- name: Autobuild
47-
uses: github/codeql-action/autobuild@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
47+
uses: github/codeql-action/autobuild@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
4848

4949
# ℹ️ Command-line programs to run using the OS shell.
5050
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -57,6 +57,6 @@ jobs:
5757
# ./location_of_script_within_repo/buildscript.sh
5858

5959
- name: Perform CodeQL Analysis
60-
uses: github/codeql-action/analyze@v3
60+
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
6161
with:
6262
category: "/language:${{matrix.language}}"

docs/content/reference/field.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,11 @@ Example:
107107
sensitive: true
108108
```
109109

110-
### `write_only`
111-
Set to true to enable write-only functionality for this field.
112-
If true, the write-only fields will be automatically generated by the code generator (`<field_name>_wo` and `<field_name>_wo_version`).
113-
When the write-only variant of a field is used, it means that its value will be obscured in Terraform output as well as not be stored in state.
114-
This field is meant to replace `sensitive` as it doesn't store the value in state.
115-
See [Ephemerality in Resources - Use Write-only arguments](https://developer.hashicorp.com/terraform/language/resources/ephemeral/write-only) for more information.
110+
### `write_only_legacy` (deprecated)
111+
If true, the field is considered "write-only", which means that its value will
112+
be obscured in Terraform output as well as not be stored in state. This field is meant to replace `sensitive` as it doesn't store the value in state.
113+
See [Ephemerality in Resources - Use Write-only arguments](https://developer.hashicorp.com/terraform/language/resources/ephemeral/write-only)
114+
for more information.
116115

117116
Write-only fields are only supported in Terraform v1.11+. Because the provider supports earlier Terraform versions, write only fields must be paired with (mutually exclusive) `sensitive` fields covering the same functionality for compatibility with those older versions.
118117
This field cannot be used in conjuction with `immutable` or `sensitive`.
@@ -122,9 +121,11 @@ This field cannot be used in conjuction with `immutable` or `sensitive`.
122121
Example:
123122

124123
```yaml
125-
write_only: true
124+
write_only_legacy: true
126125
```
127126

127+
**Deprecated**: This field is deprecated and will be removed in a future release.
128+
128129
### `ignore_read`
129130
If true, the provider sets the field's value in the resource state based only
130131
on the user's configuration. If false or unset, the provider sets the field's

0 commit comments

Comments
 (0)