{"record":{"id":"677f1676a83c1b59","repo":"kubernetes/kops","slug":"failed-to-list-records-w","errorCode":null,"errorMessage":"failed to list records: %w","messagePattern":"failed to list records: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go","lineNumber":415,"sourceCode":"\tif len(r.additions) == 0 && len(r.removals) == 0 && len(r.upserts) == 0 {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n// ResourceRecordSets returns the associated resourceRecordSets of a changeset\nfunc (r *resourceRecordChangeset) ResourceRecordSets() dnsprovider.ResourceRecordSets {\n\treturn r.rrsets\n}\n\n// listRecords returns a list of scaleway records given a zone name (the name of the record doesn't end with the zone name)\nfunc listRecords(api DomainAPI, zoneName string) ([]*domain.Record, error) {\n\trecords, err := api.ListDNSZoneRecords(&domain.ListDNSZoneRecordsRequest{\n\t\tDNSZone: zoneName,\n\t}, scw.WithAllPages())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list records: %w\", err)\n\t}\n\n\treturn records.Records, err\n}\n\nfunc putRecordToAddInChangeBatch(changeBatch []*domain.RecordChange, rrset dnsprovider.ResourceRecordSet, zoneName string) []*domain.RecordChange {\n\trecordsToAdd := []*domain.Record(nil)\n\trecordName := strings.TrimSuffix(rrset.Name(), \".\")\n\trecordName = strings.TrimSuffix(recordName, \".\"+zoneName)\n\tfor _, rrdata := range rrset.Rrdatas() {\n\t\trecordsToAdd = append(recordsToAdd, &domain.Record{\n\t\t\tName: recordName,\n\t\t\tData: rrdata,\n\t\t\tTTL:  uint32(rrset.Ttl()),\n\t\t\tType: domain.RecordType(rrset.Type()),\n\t\t})\n\t}\n\tklog.V(8).Infof(\"adding new DNS record %q to zone %q\", recordName, zoneName)","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go#L397-L433","documentation":"listRecords wraps a failure of ListDNSZoneRecords for a given zone. It fires when the Scaleway API errors while listing existing records (used both for reading records and for preparing change batches in Apply); the SDK error is propagated via %w.","triggerScenarios":"Thrown at dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go:415 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the zone name is correct","Check Scaleway API access","Retry the record listing"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}