Repository: cloudflare/cloudflare-go
Pull request #1189 (2023-01-30 01:57:10)

ci: remove mac + windows jobs
We added MacOS and Windows runners after we had a dependency library incompatible upgrade occur. We haven't seen anything like this recently so let's remove it for now given our tight budget on GitHub Action runners.



Patch:
diff --git a/.changelog/1142.txt b/.changelog/1142.txt
deleted file mode 100644
index 48f9efbcd..000000000
--- a/.changelog/1142.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:enhancement
-teams_rules: adds support for Egress Policies
-```
diff --git a/.changelog/1167.txt b/.changelog/1167.txt
deleted file mode 100644
index 6dacacf5e..000000000
--- a/.changelog/1167.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:bug
-dns: don't send "priority" for list operations as it isn't supported and is only used for internal filtering
-```
diff --git a/.changelog/1170.txt b/.changelog/1170.txt
deleted file mode 100644
index 0a3b278ea..000000000
--- a/.changelog/1170.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-```release-note:note
-dns: remove additional lookup from `Update` operations when `Name` or `Type` was omitted
-```
-
-```release-note:breaking-change
-dns: remove these read-only fields from `UpdateDNSRecordParams`: `CreatedOn`, `ModifiedOn`, `Meta`, `ZoneID`, `ZoneName`, `Proxiable`, and `Locked`
-```
diff --git a/.changelog/1171.txt b/.changelog/1171.txt
deleted file mode 100644
index 174071f00..000000000
--- a/.changelog/1171.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:enhancement
-dns: update default `per_page` attribute to 100 records
-```
diff --git a/.changelog/1172.txt b/.changelog/1172.txt
deleted file mode 100644
index 9b4a5bff2..000000000
--- a/.changelog/1172.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:bug
-managednetworks: Update should be PUT
-```
diff --git a/.changelog/1173.txt b/.changelog/1173.txt
deleted file mode 100644
index 403a2feff..000000000
--- a/.changelog/1173.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-```release-note:bug
-dns: the field `Tags` in `ListDNSRecordsParams` was not correctly serialized into URL queries
-```
-
-```release-note:enhancement
-dns: the URL parameter `tag-match` for listing DNS records is now supported as the field `TagMatch` in `ListDNSRecordsParams`
-```
-
-```release-note:breaking-change
-dns: the fields `CreatedOn` and `ModifiedOn` are removed from `ListDNSRecordsParams`
-```
diff --git a/.changelog/1174.txt b/.changelog/1174.txt
deleted file mode 100644
index 686be2ad1..000000000
--- a/.changelog/1174.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:enhancement
-dns: `GetDNSRecord`, `UpdateDNSRecord` and `DeleteDNSRecord` now return the new, dedicated error `ErrMissingDNSRecordID` when an empty DNS record ID is given.
-```
diff --git a/.changelog/1176.txt b/.changelog/1176.txt
deleted file mode 100644
index 4d3e6d894..000000000
--- a/.changelog/1176.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:enhancement
-workers: script upload now supports Queues bindings
-```
\ No newline at end of file
diff --git a/.changelog/1177.txt b/.changelog/1177.txt
deleted file mode 100644
index bb9f8d81e..000000000
--- a/.changelog/1177.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:enhancement
-workers: Add support for compatibility_date and compatibility_flags when upoading a worker script
-```
diff --git a/.changelog/1180.txt b/.changelog/1180.txt
deleted file mode 100644
index 8d21a99d7..000000000
--- a/.changelog/1180.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:dependency
-deps: bumps github.com/urfave/cli/v2 from 2.23.7 to 2.24.1
-```
diff --git a/.changelog/1183.txt b/.changelog/1183.txt
deleted file mode 100644
index 01e394768..000000000
--- a/.changelog/1183.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:enhancement
-rulesets: add support for `score_per_period` and `score_response_header_name`
-```
diff --git a/.changelog/1184.txt b/.changelog/1184.txt
deleted file mode 100644
index 7e721c577..000000000
--- a/.changelog/1184.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:dependency
-deps: bumps dependabot/fetch-metadata from 1.3.5 to 1.3.6
-```
diff --git a/.changelog/1185.txt b/.changelog/1185.txt
deleted file mode 100644
index 5cf856200..000000000
--- a/.changelog/1185.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-```release-note:enhancement
-magic_transit_ipsec_tunnel: makes customer endpoint an optional field for ipsec tunnel creation
-```
diff --git a/.github/workflows/changelog-check.yml b/.github/workflows/changelog-check.yml
index dba1a7f54..45b8c408b 100644
--- a/.github/workflows/changelog-check.yml
+++ b/.github/workflows/changelog-check.yml
@@ -3,16 +3,13 @@ on: [pull_request_target]
 
 jobs:
   changelog-check:
-    runs-on: ${{ matrix.os }}
-    strategy:
-      matrix:
-        os: [ubuntu-latest]
+    runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v3
       - name: Set up Go
         uses: actions/setup-go@v3
         with:
-          go-version: ^1.17
+          go-version-file: 'internal/tools/go.mod'
       - run: go generate -tags tools internal/tools/tools.go
       - run: go run cmd/changelog-check/main.go ${{ github.event.pull_request.number }}
         working-directory: ./internal/tools
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 7dfe116df..57870aa4a 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -4,11 +4,11 @@ jobs:
   coverage:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/setup-go@v3
-        with:
-          go-version: 1.18
       - name: Checkout code
         uses: actions/checkout@v3
+      - uses: actions/setup-go@v3
+        with:
+          go-version-file: 'go.mod'
       - uses: actions/cache@v3
         with:
           path: ~/go/pkg/mod
diff --git a/.github/workflows/dependabot-changelog.yml b/.github/workflows/dependabot-changelog.yml
index 8219a4ac6..88e6036bc 100644
--- a/.github/workflows/dependabot-changelog.yml
+++ b/.github/workflows/dependabot-changelog.yml
@@ -12,7 +12,7 @@ jobs:
     steps:
       - name: Fetch dependabot metadata
         id: dependabot-metadata
-        uses: dependabot/fetch-metadata@v1.3.6
+        uses: dependabot/fetch-metadata@v1.3.5
       - uses: actions/checkout@v3
       - run: |
           gh pr checkout $PR_URL
diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml
index 341cf5c9d..b8029ae78 100644
--- a/.github/workflows/generate-changelog.yml
+++ b/.github/workflows/generate-changelog.yml
@@ -8,12 +8,12 @@ jobs:
     if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch'
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/setup-go@v3
-        with:
-          go-version: 1.18
       - uses: actions/checkout@v3
         with:
           fetch-depth: 0
+      - uses: actions/setup-go@v3
+        with:
+          go-version-file: 'internal/tools/go.mod'
       - run: go generate -tags tools internal/tools/tools.go
       - run: ./scripts/generate-changelog.sh
       - run: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7063c4e37..0830c1050 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -15,7 +15,7 @@ jobs:
           fetch-depth: 0
       - uses: actions/setup-go@v3
         with:
-          go-version: ^1.17
+          go-version-file: 'go.mod'
       - name: Run GoReleaser
         uses: goreleaser/goreleaser-action@v4.1.0
         with:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d5301a4c3..45255e0b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,40 +1,8 @@
-## 0.60.0 (Unreleased)
-
-ENHANCEMENTS:
-
-* magic_transit_ipsec_tunnel: makes customer endpoint an optional field for ipsec tunnel creation ([#1185](https://github.com/cloudflare/cloudflare-go/issues/1185))
-
-DEPENDENCIES:
-
-* deps: bumps dependabot/fetch-metadata from 1.3.5 to 1.3.6 ([#1184](https://github.com/cloudflare/cloudflare-go/issues/1184))
-* deps: bumps github.com/urfave/cli/v2 from 2.23.7 to 2.24.1 ([#1180](https://github.com/cloudflare/cloudflare-go/issues/1180))
-
-## 0.59.0 (January 18th, 2023)
-
-BREAKING CHANGES:
-
-* dns: remove these read-only fields from `UpdateDNSRecordParams`: `CreatedOn`, `ModifiedOn`, `Meta`, `ZoneID`, `ZoneName`, `Proxiable`, and `Locked` ([#1170](https://github.com/cloudflare/cloudflare-go/issues/1170))
-* dns: the fields `CreatedOn` and `ModifiedOn` are removed from `ListDNSRecordsParams` ([#1173](https://github.com/cloudflare/cloudflare-go/issues/1173))
-
-NOTES:
-
-* dns: remove additional lookup from `Update` operations when `Name` or `Type` was omitted ([#1170](https://github.com/cloudflare/cloudflare-go/issues/1170))
+## 0.59.0 (Unreleased)
 
 ENHANCEMENTS:
 
 * access_organization: add user_seat_expiration_inactive_time field ([#1159](https://github.com/cloudflare/cloudflare-go/issues/1159))
-* dns: `GetDNSRecord`, `UpdateDNSRecord` and `DeleteDNSRecord` now return the new, dedicated error `ErrMissingDNSRecordID` when an empty DNS record ID is given. ([#1174](https://github.com/cloudflare/cloudflare-go/issues/1174))
-* dns: the URL parameter `tag-match` for listing DNS records is now supported as the field `TagMatch` in `ListDNSRecordsParams` ([#1173](https://github.com/cloudflare/cloudflare-go/issues/1173))
-* dns: update default `per_page` attribute to 100 records ([#1171](https://github.com/cloudflare/cloudflare-go/issues/1171))
-* teams_rules: adds support for Egress Policies ([#1142](https://github.com/cloudflare/cloudflare-go/issues/1142))
-* workers: Add support for compatibility_date and compatibility_flags when upoading a worker script ([#1177](https://github.com/cloudflare/cloudflare-go/issues/1177))
-* workers: script upload now supports Queues bindings ([#1176](https://github.com/cloudflare/cloudflare-go/issues/1176))
-
-BUG FIXES:
-
-* dns: don't send "priority" for list operations as it isn't supported and is only used for internal filtering ([#1167](https://github.com/cloudflare/cloudflare-go/issues/1167))
-* dns: the field `Tags` in `ListDNSRecordsParams` was not correctly serialized into URL queries ([#1173](https://github.com/cloudflare/cloudflare-go/issues/1173))
-* managednetworks: Update should be PUT ([#1172](https://github.com/cloudflare/cloudflare-go/issues/1172))
 
 ## 0.58.1 (January 5th, 2023)
 
diff --git a/cloudflare.go b/cloudflare.go
index 5d6904325..5b0c220fc 100644
--- a/cloudflare.go
+++ b/cloudflare.go
@@ -363,6 +363,9 @@ func (api *API) makeRequestWithAuthTypeAndHeadersComplete(ctx context.Context, m
 // *http.Response, or an error if one occurred. The caller is responsible for
 // closing the response body.
 func (api *API) request(ctx context.Context, method, uri string, reqBody io.Reader, authType int, headers http.Header) (*http.Response, error) {
+	log.SetPrefix(time.Now().Format(time.RFC3339Nano) + " [DEBUG] cloudflare")
+	log.SetFlags(0)
+
 	req, err := http.NewRequestWithContext(ctx, method, api.BaseURL+uri, reqBody)
 	if err != nil {
 		return nil, fmt.Errorf("HTTP request creation failed: %w", err)
diff --git a/cloudflare_experimental.go b/cloudflare_experimental.go
index c4bc4934e..e01c7a60d 100644
--- a/cloudflare_experimental.go
+++ b/cloudflare_experimental.go
@@ -161,6 +161,9 @@ func NewExperimental(config *ClientParams) (*Client, error) {
 // *http.Response, or an error if one occurred. The caller is responsible for
 // closing the response body.
 func (c *Client) request(ctx context.Context, method, uri string, reqBody io.Reader, headers http.Header) (*http.Response, error) {
+	log.SetPrefix(time.Now().Format(time.RFC3339Nano) + " [DEBUG] cloudflare")
+	log.SetFlags(0)
+
 	req, err := http.NewRequestWithContext(ctx, method, c.BaseURL.String()+uri, reqBody)
 	if err != nil {
 		return nil, fmt.Errorf("HTTP request creation failed: %w", err)
diff --git a/cmd/flarectl/dns.go b/cmd/flarectl/dns.go
index fd5a52816..aa7617e02 100644
--- a/cmd/flarectl/dns.go
+++ b/cmd/flarectl/dns.go
@@ -112,12 +112,14 @@ func dnsCreateOrUpdate(c *cli.Context) error {
 				}
 				resp = &cloudflare.DNSRecordResponse{
 					Result: cloudflare.DNSRecord{
-						ID:      rr.ID,
-						Name:    rr.Name,
-						Type:    rr.Type,
-						Content: rr.Content,
-						TTL:     rr.TTL,
-						Proxied: &proxy,
+						ID:        rr.ID,
+						Name:      rr.Name,
+						Type:      rr.Type,
+						Content:   rr.Content,
+						TTL:       rr.TTL,
+						Proxiable: rr.Proxiable,
+						Proxied:   &proxy,
+						Locked:    rr.Locked,
 					},
 				}
 			}
diff --git a/devices_managed_networks.go b/devices_managed_networks.go
index 2e308eb21..1f6129a6a 100644
--- a/devices_managed_networks.go
+++ b/devices_managed_networks.go
@@ -103,7 +103,7 @@ func (api *API) UpdateDeviceManagedNetwork(ctx context.Context, rc *ResourceCont
 
 	uri := fmt.Sprintf("/%s/%s/devices/networks/%s", rc.Level, rc.Identifier, params.NetworkID)
 
-	res, err := api.makeRequestContext(ctx, http.MethodPut, uri, params)
+	res, err := api.makeRequestContext(ctx, http.MethodPatch, uri, params)
 	if err != nil {
 		return DeviceManagedNetwork{}, err
 	}
diff --git a/dns.go b/dns.go
index 9eaa52dc1..aa96e8a10 100644
--- a/dns.go
+++ b/dns.go
@@ -3,7 +3,6 @@ package cloudflare
 import (
 	"context"
 	"encoding/json"
-	"errors"
 	"fmt"
 	"net/http"
 	"time"
@@ -47,32 +46,40 @@ const (
 )
 
 type ListDNSRecordsParams struct {
-	Type      string        `url:"type,omitempty"`
-	Name      string        `url:"name,omitempty"`
-	Content   string        `url:"content,omitempty"`
-	Proxied   *bool         `url:"proxied,omitempty"`
-	Comment   string        `url:"comment,omitempty"`
-	Tags      []string      `url:"tag,omitempty"` // potentially multiple `tag=`
-	TagMatch  string        `url:"tag-match,omitempty"`
-	Order     string        `url:"order,omitempty"`
-	Direction ListDirection `url:"direction,omitempty"`
-	Match     string        `url:"match,omitempty"`
-	Priority  *uint16       `url:"-"`
+	CreatedOn  time.Time     `json:"created_on,omitempty" url:"created_on,omitempty"`
+	ModifiedOn time.Time     `json:"modified_on,omitempty" url:"modified_on,omitempty"`
+	Type       string        `json:"type,omitempty" url:"type,omitempty"`
+	Name       string        `json:"name,omitempty" url:"name,omitempty"`
+	Content    string        `json:"content,omitempty" url:"content,omitempty"`
+	Proxied    *bool         `json:"proxied,omitempty" url:"proxied,omitempty"`
+	Comment    string        `json:"comment,omitempty" url:"comment,omitempty"`
+	Tags       []string      `json:"tags,omitempty"`
+	Order      string        `url:"order,omitempty"`
+	Direction  ListDirection `url:"direction,omitempty"`
+	Match      string        `url:"match,omitempty"`
+	Priority   *uint16       `json:"priority,omitempty"`
 
 	ResultInfo
 }
 
 type UpdateDNSRecordParams struct {
-	Type     string      `json:"type,omitempty"`
-	Name     string      `json:"name,omitempty"`
-	Content  string      `json:"content,omitempty"`
-	Data     interface{} `json:"data,omitempty"` // data for: SRV, LOC
-	ID       string      `json:"-"`
-	Priority *uint16     `json:"-"` // internal use only
-	TTL      int         `json:"ttl,omitempty"`
-	Proxied  *bool       `json:"proxied,omitempty"`
-	Comment  string      `json:"comment,omitempty"`
-	Tags     []string    `json:"tags,omitempty"`
+	CreatedOn  time.Time   `json:"created_on,omitempty" url:"created_on,omitempty"`
+	ModifiedOn time.Time   `json:"modified_on,omitempty" url:"modified_on,omitempty"`
+	Type       string      `json:"type,omitempty" url:"type,omitempty"`
+	Name       string      `json:"name,omitempty" url:"name,omitempty"`
+	Content    string      `json:"content,omitempty" url:"content,omitempty"`
+	Meta       interface{} `json:"meta,omitempty"`
+	Data       interface{} `json:"data,omitempty"` // data returned by: SRV, LOC
+	ID         string      `json:"id,omitempty"`
+	ZoneID     string      `json:"zone_id,omitempty"`
+	ZoneName   string      `json:"zone_name,omitempty"`
+	Priority   *uint16     `json:"priority,omitempty"`
+	TTL        int         `json:"ttl,omitempty"`
+	Proxied    *bool       `json:"proxied,omitempty" url:"proxied,omitempty"`
+	Proxiable  bool        `json:"proxiable,omitempty"`
+	Locked     bool        `json:"locked,omitempty"`
+	Comment    string      `json:"comment,omitempty" url:"comment,omitempty"`
+	Tags       []string    `json:"tags,omitempty"`
 }
 
 // DNSListResponse represents the response from the list DNS records endpoint.
@@ -82,9 +89,6 @@ type DNSListResponse struct {
 	ResultInfo `json:"result_info"`
 }
 
-// listDNSRecordsDefaultPageSize represents the default per_page size of the API.
-var listDNSRecordsDefaultPageSize int = 100
-
 // nontransitionalLookup implements the nontransitional processing as specified in
 // Unicode Technical Standard 46 with almost all checkings off to maximize user freedom.
 var nontransitionalLookup = idna.New(
@@ -156,7 +160,9 @@ func (api *API) ListDNSRecords(ctx context.Context, rc *ResourceContainer, param
 		return nil, nil, ErrMissingZoneID
 	}
 
-	params.Name = toUTS46ASCII(params.Name)
+	if params.Name != "" {
+		params.Name = toUTS46ASCII(params.Name)
+	}
 
 	autoPaginate := true
 	if params.PerPage >= 1 || params.Page >= 1 {
@@ -164,7 +170,7 @@ func (api *API) ListDNSRecords(ctx context.Context, rc *ResourceContainer, param
 	}
 
 	if params.PerPage < 1 {
-		params.PerPage = listDNSRecordsDefaultPageSize
+		params.PerPage = 50
 	}
 
 	if params.Page < 1 {
@@ -193,9 +199,6 @@ func (api *API) ListDNSRecords(ctx context.Context, rc *ResourceContainer, param
 	return records, &listResponse.ResultInfo, nil
 }
 
-// ErrMissingDNSRecordID is for when DNS record ID is needed but not given.
-var ErrMissingDNSRecordID = errors.New("required DNS record ID missing")
-
 // GetDNSRecord returns a single DNS record for the given zone & record
 // identifiers.
 //
@@ -204,10 +207,6 @@ func (api *API) GetDNSRecord(ctx context.Context, rc *ResourceContainer, recordI
 	if rc.Identifier == "" {
 		return DNSRecord{}, ErrMissingZoneID
 	}
-	if recordID == "" {
-		return DNSRecord{}, ErrMissingDNSRecordID
-	}
-
 	uri := fmt.Sprintf("/zones/%s/dns_records/%s", rc.Identifier, recordID)
 	res, err := api.makeRequestContext(ctx, http.MethodGet, uri, nil)
 	if err != nil {
@@ -229,12 +228,25 @@ func (api *API) UpdateDNSRecord(ctx context.Context, rc *ResourceContainer, para
 	if rc.Identifier == "" {
 		return ErrMissingZoneID
 	}
-	if params.ID == "" {
-		return ErrMissingDNSRecordID
-	}
 
 	params.Name = toUTS46ASCII(params.Name)
 
+	// Populate the record name from the existing one if the update didn't
+	// specify it.
+	if params.Name == "" || params.Type == "" {
+		rec, err := api.GetDNSRecord(ctx, rc, params.ID)
+		if err != nil {
+			return err
+		}
+
+		if params.Name == "" {
+			params.Name = rec.Name
+		}
+		if params.Type == "" {
+			params.Type = rec.Type
+		}
+	}
+
 	uri := fmt.Sprintf("/zones/%s/dns_records/%s", rc.Identifier, params.ID)
 	res, err := api.makeRequestContext(ctx, http.MethodPatch, uri, params)
 	if err != nil {
@@ -256,10 +268,6 @@ func (api *API) DeleteDNSRecord(ctx context.Context, rc *ResourceContainer, reco
 	if rc.Identifier == "" {
 		return ErrMissingZoneID
 	}
-	if recordID == "" {
-		return ErrMissingDNSRecordID
-	}
-
 	uri := fmt.Sprintf("/zones/%s/dns_records/%s", rc.Identifier, recordID)
 	res, err := api.makeRequestContext(ctx, http.MethodDelete, uri, nil)
 	if err != nil {
diff --git a/go.mod b/go.mod
index 2c79c061b..3de4049df 100644
--- a/go.mod
+++ b/go.mod
@@ -7,7 +7,7 @@ require (
 	github.com/hashicorp/go-retryablehttp v0.7.2
 	github.com/olekukonko/tablewriter v0.0.5
 	github.com/stretchr/testify v1.8.1
-	github.com/urfave/cli/v2 v2.24.1
+	github.com/urfave/cli/v2 v2.23.7
 	golang.org/x/net v0.0.0-20220722155237-a158d28d115b
 	golang.org/x/time v0.0.0-20220224211638-0e9765cccd65
 )
diff --git a/go.sum b/go.sum
index f2d0e8d73..ca36a2231 100644
--- a/go.sum
+++ b/go.sum
@@ -60,8 +60,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
 github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
-github.com/urfave/cli/v2 v2.24.1 h1:/QYYr7g0EhwXEML8jO+8OYt5trPnLHS0p3mrgExJ5NU=
-github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
+github.com/urfave/cli/v2 v2.23.7 h1:YHDQ46s3VghFHFf1DdF+Sh7H4RqhcM+t0TmZRJx4oJY=
+github.com/urfave/cli/v2 v2.23.7/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
 github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
 github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
 golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
diff --git a/magic_transit_ipsec_tunnel.go b/magic_transit_ipsec_tunnel.go
index 6ac5f22c2..cf9076a51 100644
--- a/magic_transit_ipsec_tunnel.go
+++ b/magic_transit_ipsec_tunnel.go
@@ -32,7 +32,7 @@ type MagicTransitIPsecTunnel struct {
 	CreatedOn          *time.Time                          `json:"created_on,omitempty"`
 	ModifiedOn         *time.Time                          `json:"modified_on,omitempty"`
 	Name               string                              `json:"name"`
-	CustomerEndpoint   string                              `json:"customer_endpoint,omitempty"`
+	CustomerEndpoint   string                              `json:"customer_endpoint"`
 	CloudflareEndpoint string                              `json:"cloudflare_endpoint"`
 	InterfaceAddress   string                              `json:"interface_address"`
 	Description        string                              `json:"description,omitempty"`
diff --git a/rulesets.go b/rulesets.go
index 27521b024..1f18d64a7 100644
--- a/rulesets.go
+++ b/rulesets.go
@@ -643,14 +643,12 @@ type RulesetRule struct {
 
 // RulesetRuleRateLimit contains the structure of a HTTP rate limit Ruleset Rule.
 type RulesetRuleRateLimit struct {
-	Characteristics         []string `json:"characteristics,omitempty"`
-	RequestsPerPeriod       int      `json:"requests_per_period,omitempty"`
-	ScorePerPeriod          int      `json:"score_per_period,omitempty"`
-	ScoreResponseHeaderName string   `json:"score_response_header_name,omitempty"`
-	Period                  int      `json:"period,omitempty"`
-	MitigationTimeout       int      `json:"mitigation_timeout,omitempty"`
-	CountingExpression      string   `json:"counting_expression,omitempty"`
-	RequestsToOrigin        bool     `json:"requests_to_origin,omitempty"`
+	Characteristics    []string `json:"characteristics,omitempty"`
+	RequestsPerPeriod  int      `json:"requests_per_period,omitempty"`
+	Period             int      `json:"period,omitempty"`
+	MitigationTimeout  int      `json:"mitigation_timeout,omitempty"`
+	CountingExpression string   `json:"counting_expression,omitempty"`
+	RequestsToOrigin   bool     `json:"requests_to_origin,omitempty"`
 }
 
 // RulesetRuleExposedCredentialCheck contains the structure of an exposed
diff --git a/teams_rules.go b/teams_rules.go
index 16c5134e2..5a7732049 100644
--- a/teams_rules.go
+++ b/teams_rules.go
@@ -35,14 +35,6 @@ type TeamsRuleSettings struct {
 
 	// whether to disable dnssec validation for allow action
 	InsecureDisableDNSSECValidation bool `json:"insecure_disable_dnssec_validation"`
-
-	EgressSettings *EgressSettings `json:"egress"`
-}
-
-type EgressSettings struct {
-	Ipv6Range    string `json:"ipv6"`
-	Ipv4         string `json:"ipv4"`
-	Ipv4Fallback string `json:"ipv4_fallback"`
 }
 
 // TeamsL4OverrideSettings used in l4 filter type rule with action set to override.
@@ -69,10 +61,9 @@ type TeamsFilterType string
 type TeamsGatewayAction string
 
 const (
-	HttpFilter   TeamsFilterType = "http"
-	DnsFilter    TeamsFilterType = "dns"
-	L4Filter     TeamsFilterType = "l4"
-	EgressFilter TeamsFilterType = "egress"
+	HttpFilter TeamsFilterType = "http"
+	DnsFilter  TeamsFilterType = "dns"
+	L4Filter   TeamsFilterType = "l4"
 )
 
 const (
@@ -88,7 +79,6 @@ const (
 	NoIsolate    TeamsGatewayAction = "noisolate"
 	Override     TeamsGatewayAction = "override"
 	L4Override   TeamsGatewayAction = "l4_override"
-	Egress       TeamsGatewayAction = "egress"
 )
 
 func TeamsRulesActionValues() []string {
@@ -105,7 +95,6 @@ func TeamsRulesActionValues() []string {
 		string(NoIsolate),
 		string(Override),
 		string(L4Override),
-		string(Egress),
 	}
 }
 
diff --git a/workers.go b/workers.go
index 0a983bdc3..b834c58b1 100644
--- a/workers.go
+++ b/workers.go
@@ -35,16 +35,6 @@ type CreateWorkerParams struct {
 	// Bindings should be a map where the keys are the binding name, and the
 	// values are the binding content
 	Bindings map[string]WorkerBinding
-
-	// CompatibilityDate is a date in the form yyyy-mm-dd,
-	// which will be used to determine which version of the Workers runtime is used.
-	//  https://developers.cloudflare.com/workers/platform/compatibility-dates/
-	CompatibilityDate string
-
-	// CompatibilityFlags are the names of features of the Workers runtime to be enabled or disabled,
-	// usually used together with CompatibilityDate.
-	//  https://developers.cloudflare.com/workers/platform/compatibility-dates/#compatibility-flags
-	CompatibilityFlags []string
 }
 
 // WorkerScriptParams provides a worker script and the associated bindings.
@@ -234,7 +224,7 @@ func (api *API) UploadWorker(ctx context.Context, rc *ResourceContainer, params
 		err         error
 	)
 
-	if params.Module || params.Logpush != nil || len(params.Bindings) > 0 || params.CompatibilityDate != "" || len(params.CompatibilityFlags) > 0 {
+	if params.Module || params.Logpush != nil || len(params.Bindings) > 0 {
 		contentType, body, err = formatMultipartBody(params)
 		if err != nil {
 			return WorkerScriptResponse{}, err
@@ -268,17 +258,13 @@ func formatMultipartBody(params CreateWorkerParams) (string, []byte, error) {
 	// Write metadata part
 	var scriptPartName string
 	meta := struct {
-		BodyPart           string              `json:"body_part,omitempty"`
-		MainModule         string              `json:"main_module,omitempty"`
-		Bindings           []workerBindingMeta `json:"bindings"`
-		Logpush            *bool               `json:"logpush,omitempty"`
-		CompatibilityDate  string              `json:"compatibility_date,omitempty"`
-		CompatibilityFlags []string            `json:"compatibility_flags,omitempty"`
+		BodyPart   string              `json:"body_part,omitempty"`
+		MainModule string              `json:"main_module,omitempty"`
+		Bindings   []workerBindingMeta `json:"bindings"`
+		Logpush    *bool               `json:"logpush,omitempty"`
 	}{
-		Bindings:           make([]workerBindingMeta, 0, len(params.Bindings)),
-		Logpush:            params.Logpush,
-		CompatibilityDate:  params.CompatibilityDate,
-		CompatibilityFlags: params.CompatibilityFlags,
+		Bindings: make([]workerBindingMeta, 0, len(params.Bindings)),
+		Logpush:  params.Logpush,
 	}
 
 	if params.Module {
diff --git a/workers_bindings.go b/workers_bindings.go
index 11f4ba7cd..963106589 100644
--- a/workers_bindings.go
+++ b/workers_bindings.go
@@ -39,8 +39,6 @@ const (
 	WorkerR2BucketBindingType WorkerBindingType = "r2_bucket"
 	// WorkerAnalyticsEngineBindingType is the type for Analytics Engine dataset bindings.
 	WorkerAnalyticsEngineBindingType WorkerBindingType = "analytics_engine"
-	// WorkerQueueBindingType is the type for queue bindings.
-	WorkerQueueBindingType WorkerBindingType = "queue"
 )
 
 type ListWorkerBindingsParams struct {
@@ -311,34 +309,6 @@ func (b WorkerAnalyticsEngineBinding) serialize(bindingName string) (workerBindi
 	}, nil, nil
 }
 
-// WorkerQueueBinding is a binding to a Workers Queue.
-//
-// https://developers.cloudflare.com/workers/platform/bindings/#queue-bindings
-type WorkerQueueBinding struct {
-	Binding string
-	Queue   string
-}
-
-// Type returns the type of the binding.
-func (b WorkerQueueBinding) Type() WorkerBindingType {
-	return WorkerQueueBindingType
-}
-
-func (b WorkerQueueBinding) serialize(bindingName string) (workerBindingMeta, workerBindingBodyWriter, error) {
-	if b.Binding == "" {
-		return nil, nil, fmt.Errorf(`Binding name for binding "%s" cannot be empty`, bindingName)
-	}
-	if b.Queue == "" {
-		return nil, nil, fmt.Errorf(`Queue name for binding "%s" cannot be empty`, bindingName)
-	}
-
-	return workerBindingMeta{
-		"type":       b.Type(),
-		"name":       b.Binding,
-		"queue_name": b.Queue,
-	}, nil, nil
-}
-
 // Each binding that adds a part to the multipart form body will need
 // a unique part name so we just generate a random 128bit hex string.
 func getRandomPartName() string {
@@ -407,12 +377,6 @@ func (api *API) ListWorkerBindings(ctx context.Context, rc *ResourceContainer, p
 			bindingListItem.Binding = WorkerKvNamespaceBinding{
 				NamespaceID: namespaceID,
 			}
-		case WorkerQueueBindingType:
-			queueName := jsonBinding["queue_name"].(string)
-			bindingListItem.Binding = WorkerQueueBinding{
-				Binding: name,
-				Queue:   queueName,
-			}
 		case WorkerWebAssemblyBindingType:
 			bindingListItem.Binding = WorkerWebAssemblyBinding{
 				Module: &bindingContentReader{


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a7cfdd13f..087d4c4aa 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -5,8 +5,7 @@ jobs:
     strategy:
       matrix:
         go-version: [1.17, 1.18, 1.19]
-        os: [ubuntu-latest, macos-latest, windows-latest]
-    runs-on: ${{ matrix.os }}
+    runs-on: ubuntu-latest
     steps:
       - uses: actions/setup-go@v3
         with:
diff --git a/devices_managed_networks_test.go b/devices_managed_networks_test.go
index c62c7c679..7f2f4bb6b 100644
--- a/devices_managed_networks_test.go
+++ b/devices_managed_networks_test.go
@@ -149,57 +149,6 @@ func TestCreateDeviceManagedNetwork(t *testing.T) {
 	}
 }
 
-func TestUpdateDeviceManagedNetwork(t *testing.T) {
-	setup()
-	defer teardown()
-
-	handler := func(w http.ResponseWriter, r *http.Request) {
-		assert.Equal(t, http.MethodPut, r.Method, "Expected method 'PUT', got %s", r.Method)
-		w.Header().Set("content-type", "application/json")
-		fmt.Fprintf(w, `{
-			"success": true,
-			"errors": [],
-			"messages": [],
-			"result":
-			  {
-				"network_id": "%s",
-				"type": "tls",
-				"name": "managed-network-1",
-				"config": {
-				  "tls_sockaddr": "foobar:1234",
-				  "sha256": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"
-				}
-			  }
-		  }`, testNetworkID)
-	}
-
-	want := DeviceManagedNetwork{
-		NetworkID: testNetworkID,
-		Type:      "tls",
-		Name:      "managed-network-1",
-		Config: &Config{
-			TlsSockAddr: "foobar:1234",
-			Sha256:      "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
-		},
-	}
-
-	mux.HandleFunc("/accounts/"+testAccountID+"/devices/networks/"+testNetworkID, handler)
-
-	actual, err := client.UpdateDeviceManagedNetwork(context.Background(), AccountIdentifier(testAccountID), UpdateDeviceManagedNetworkParams{
-		NetworkID: testNetworkID,
-		Type:      "tls",
-		Name:      "managed-network-1",
-		Config: &Config{
-			TlsSockAddr: "foobar:1234",
-			Sha256:      "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
-		},
-	})
-
-	if assert.NoError(t, err) {
-		assert.Equal(t, want, actual)
-	}
-}
-
 func TestDeleteDeviceManagedNetwork(t *testing.T) {
 	setup()
 	defer teardown()
diff --git a/dns_test.go b/dns_test.go
index 086f32ade..08a55e4eb 100644
--- a/dns_test.go
+++ b/dns_test.go
@@ -139,7 +139,7 @@ func TestCreateDNSRecord(t *testing.T) {
 	}
 
 	_, err := client.CreateDNSRecord(context.Background(), ZoneIdentifier(""), CreateDNSRecordParams{})
-	assert.ErrorIs(t, err, ErrMissingZoneID)
+	assert.Equal(t, ErrMissingZoneID, err)
 
 	actual, err := client.CreateDNSRecord(context.Background(), ZoneIdentifier(testZoneID), CreateDNSRecordParams{
 		Type:     "A",
@@ -153,7 +153,7 @@ func TestCreateDNSRecord(t *testing.T) {
 	assert.Equal(t, want, actual)
 }
 
-func TestListDNSRecords(t *testing.T) {
+func TestDNSRecords(t *testing.T) {
 	setup()
 	defer teardown()
 
@@ -230,7 +230,7 @@ func TestListDNSRecords(t *testing.T) {
 	}}
 
 	_, _, err := client.ListDNSRecords(context.Background(), ZoneIdentifier(""), ListDNSRecordsParams{})
-	assert.ErrorIs(t, err, ErrMissingZoneID)
+	assert.Equal(t, ErrMissingZoneID, err)
 
 	actual, _, err := client.ListDNSRecords(context.Background(), ZoneIdentifier(testZoneID), ListDNSRecordsParams{
 		Name:    "😺.example.com",
@@ -242,7 +242,7 @@ func TestListDNSRecords(t *testing.T) {
 	assert.Equal(t, want, actual)
 }
 
-func TestListDNSRecordsSearch(t *testing.T) {
+func TestDNSRecordsSearch(t *testing.T) {
 	setup()
 	defer teardown()
 
@@ -261,8 +261,6 @@ func TestListDNSRecordsSearch(t *testing.T) {
 		assert.Equal(t, "1", r.URL.Query().Get("page"))
 		assert.Equal(t, "type", r.URL.Query().Get("order"))
 		assert.Equal(t, "asc", r.URL.Query().Get("direction"))
-		assert.Equal(t, "any", r.URL.Query().Get("tag-match"))
-		assert.ElementsMatch(t, []string{"tag1", "tag2"}, r.URL.Query()["tag"])
 
 		w.Header().Set("content-type", "application/json")
 		fmt.Fprint(w, `{
@@ -336,8 +334,6 @@ func TestListDNSRecordsSearch(t *testing.T) {
 		Name:      "example.com",
 		Type:      "A",
 		Content:   "198.51.100.4",
-		TagMatch:  "any",
-		Tags:      []string{"tag1", "tag2"},
 	})
 	require.NoError(t, err)
 	assert.Equal(t, 2000, resultInfo.Total)
@@ -345,43 +341,7 @@ func TestListDNSRecordsSearch(t *testing.T) {
 	assert.Equal(t, want, actual)
 }
 
-func TestListDNSRecordsPagination(t *testing.T) {
-	// change listDNSRecordsDefaultPageSize value to 1 to force pagination
-	listDNSRecordsDefaultPageSize = 1
-
-	setup()
-	defer teardown()
-
-	var page1Called, page2Called bool
-	handler := func(w http.ResponseWriter, r *http.Request) {
-		page := r.URL.Query().Get("page")
-		w.Header().Set("content-type", "application/json")
-
-		var response string
-		switch page {
-		case "1":
-			response = loadFixture("dns", "list_page_1")
-			page1Called = true
-		case "2":
-			response = loadFixture("dns", "list_page_2")
-			page2Called = true
-		default:
-			assert.Failf(t, "Unexpeted page requested: %s", page)
-			return
-		}
-		fmt.Fprint(w, response)
-	}
-
-	mux.HandleFunc("/zones/"+testZoneID+"/dns_records", handler)
-
-	actual, _, err := client.ListDNSRecords(context.Background(), ZoneIdentifier(testZoneID), ListDNSRecordsParams{})
-	require.NoError(t, err)
-	assert.True(t, page1Called)
-	assert.True(t, page2Called)
-	assert.Len(t, actual, 2)
-}
-
-func TestGetDNSRecord(t *testing.T) {
+func TestDNSRecord(t *testing.T) {
 	setup()
 	defer teardown()
 
@@ -446,10 +406,7 @@ func TestGetDNSRecord(t *testing.T) {
 	}
 
 	_, err := client.GetDNSRecord(context.Background(), ZoneIdentifier(""), dnsRecordID)
-	assert.ErrorIs(t, err, ErrMissingZoneID)
-
-	_, err = client.GetDNSRecord(context.Background(), ZoneIdentifier(testZoneID), "")
-	assert.ErrorIs(t, err, ErrMissingDNSRecordID)
+	assert.Equal(t, ErrMissingZoneID, err)
 
 	actual, err := client.GetDNSRecord(context.Background(), ZoneIdentifier(testZoneID), dnsRecordID)
 	require.NoError(t, err)
@@ -465,7 +422,7 @@ func TestUpdateDNSRecord(t *testing.T) {
 	input := DNSRecord{
 		ID:      "372e67954025e0ba6aaa6d586b9e0b59",
 		Type:    "A",
-		Name:    "xn--138h.example.com",
+		Name:    "example.com",
 		Content: "198.51.100.4",
 		TTL:     120,
 		Proxied: &proxied,
@@ -477,7 +434,6 @@ func TestUpdateDNSRecord(t *testing.T) {
 		var v DNSRecord
 		err := json.NewDecoder(r.Body).Decode(&v)
 		require.NoError(t, err)
-		v.ID = "372e67954025e0ba6aaa6d586b9e0b59"
 		assert.Equal(t, input, v)
 
 		w.Header().Set("content-type", "application/json")
@@ -511,15 +467,232 @@ func TestUpdateDNSRecord(t *testing.T) {
 
 	mux.HandleFunc("/zones/"+testZoneID+"/dns_records/"+dnsRecordID, handler)
 
-	err := client.UpdateDNSRecord(context.Background(), ZoneIdentifier(""), UpdateDNSRecordParams{ID: dnsRecordID})
-	assert.ErrorIs(t, err, ErrMissingZoneID)
+	err := client.UpdateDNSRecord(context.Background(), ZoneIdentifier(""), UpdateDNSRecordParams{})
+	assert.Equal(t, ErrMissingZoneID, err)
+
+	err = client.UpdateDNSRecord(context.Background(), ZoneIdentifier(testZoneID), UpdateDNSRecordParams{
+		ID:      dnsRecordID,
+		Type:    "A",
+		Name:    "example.com",
+		Content: "198.51.100.4",
+		TTL:     120,
+		Proxied: &proxied,
+	})
+	require.NoError(t, err)
+}
+
+func TestUpdateDNSRecordWithoutName(t *testing.T) {
+	setup()
+	defer teardown()
+
+	proxied := false
+
+	asciiInput := DNSRecord{
+		ID:      "372e67954025e0ba6aaa6d586b9e0b59",
+		Name:    "xn--138h.example.com",
+		Type:    "A",
+		Content: "198.51.100.4",
+		TTL:     120,
+		Proxied: &proxied,
+	}
+
+	handleUpdateDNSRecord := func(w http.ResponseWriter, r *http.Request) {
+		assert.Equal(t, http.MethodPatch, r.Method, "Expected method 'PATCH', got %s", r.Method)
+
+		var v DNSRecord
+		err := json.NewDecoder(r.Body).Decode(&v)
+		require.NoError(t, err)
+		assert.Equal(t, asciiInput, v)
+
+		w.Header().Set("content-type", "application/json")
+		fmt.Fprint(w, `{
+			"success": true,
+			"errors": [],
+			"messages": [],
+			"result": {
+				"id": "372e67954025e0ba6aaa6d586b9e0b59",
+				"type": "A",
+				"name": "xn--138h.example.com",
+				"content": "198.51.100.4",
+				"proxiable": true,
+				"proxied": false,
+				"ttl": 120,
+				"locked": false,
+				"zone_id": "d56084adb405e0b7e32c52321bf07be6",
+				"zone_name": "example.com",
+				"created_on": "2014-01-01T05:20:00Z",
+				"modified_on": "2014-01-01T05:20:00Z",
+				"data": {},
+				"meta": {
+					"auto_added": true,
+					"source": "primary"
+				}
+			}
+		}`)
+	}
+
+	handleDNSRecord := func(w http.ResponseWriter, r *http.Request) {
+		assert.Equal(t, http.MethodGet, r.Method, "Expected method 'GET', got %s", r.Method)
+
+		w.Header().Set("content-type", "application/json")
+		fmt.Fprint(w, `{
+			"success": true,
+			"errors": [],
+			"messages": [],
+			"result": {
+				"id": "372e67954025e0ba6aaa6d586b9e0b59",
+				"type": "A",
+				"name": "xn--138h.example.com",
+				"content": "198.51.100.4",
+				"proxiable": true,
+				"proxied": false,
+				"ttl": 120,
+				"locked": false,
+				"zone_id": "d56084adb405e0b7e32c52321bf07be6",
+				"zone_name": "example.com",
+				"created_on": "2014-01-01T05:20:00Z",
+				"modified_on": "2014-01-01T05:20:00Z",
+				"data": {},
+				"meta": {
+					"auto_added": true,
+					"source": "primary"
+				}
+			}
+		}`)
+	}
+
+	handler := func(w http.ResponseWriter, r *http.Request) {
+		if r.Method == http.MethodGet {
+			handleDNSRecord(w, r)
+			return
+		}
+
+		if r.Method == http.MethodPatch {
+			handleUpdateDNSRecord(w, r)
+			return
+		}
+
+		assert.Failf(t, "Expected method 'GET' or `PATCH`, got %s", r.Method)
+	}
+
+	dnsRecordID := "372e67954025e0ba6aaa6d586b9e0b59"
+
+	mux.HandleFunc("/zones/"+testZoneID+"/dns_records/"+dnsRecordID, handler)
 
-	err = client.UpdateDNSRecord(context.Background(), ZoneIdentifier(testZoneID), UpdateDNSRecordParams{})
-	assert.ErrorIs(t, err, ErrMissingDNSRecordID)
+	err := client.UpdateDNSRecord(context.Background(), ZoneIdentifier(""), UpdateDNSRecordParams{})
+	assert.Equal(t, ErrMissingZoneID, err)
 
 	err = client.UpdateDNSRecord(context.Background(), ZoneIdentifier(testZoneID), UpdateDNSRecordParams{
 		ID:      dnsRecordID,
 		Type:    "A",
+		Name:    "xn--138h.example.com",
+		Content: "198.51.100.4",
+		TTL:     120,
+		Proxied: &proxied,
+	})
+	require.NoError(t, err)
+}
+
+func TestUpdateDNSRecordWithoutType(t *testing.T) {
+	setup()
+	defer teardown()
+
+	proxied := false
+
+	completedASCIIInput := DNSRecord{
+		Name:    "xn--138h.example.com",
+		Type:    "A",
+		Content: "198.51.100.4",
+		TTL:     120,
+		Proxied: &proxied,
+		ID:      "372e67954025e0ba6aaa6d586b9e0b59",
+	}
+
+	handleUpdateDNSRecord := func(w http.ResponseWriter, r *http.Request) {
+		assert.Equal(t, http.MethodPatch, r.Method, "Expected method 'PATCH', got %s", r.Method)
+
+		var v DNSRecord
+		err := json.NewDecoder(r.Body).Decode(&v)
+		require.NoError(t, err)
+		assert.Equal(t, completedASCIIInput, v)
+
+		w.Header().Set("content-type", "application/json")
+		fmt.Fprint(w, `{
+			"success": true,
+			"errors": [],
+			"messages": [],
+			"result": {
+				"id": "372e67954025e0ba6aaa6d586b9e0b59",
+				"type": "A",
+				"name": "example.com",
+				"content": "198.51.100.4",
+				"proxiable": true,
+				"proxied": false,
+				"ttl": 120,
+				"locked": false,
+				"zone_id": "d56084adb405e0b7e32c52321bf07be6",
+				"zone_name": "example.com",
+				"created_on": "2014-01-01T05:20:00Z",
+				"modified_on": "2014-01-01T05:20:00Z",
+				"data": {},
+				"meta": {
+					"auto_added": true,
+					"source": "primary"
+				}
+			}
+		}`)
+	}
+
+	handleDNSRecord := func(w http.ResponseWriter, r *http.Request) {
+		assert.Equal(t, http.MethodGet, r.Method, "Expected method 'GET', got %s", r.Method)
+
+		w.Header().Set("content-type", "application/json")
+		fmt.Fprint(w, `{
+			"success": true,
+			"errors": [],
+			"messages": [],
+			"result": {
+				"id": "372e67954025e0ba6aaa6d586b9e0b59",
+				"type": "A",
+				"name": "example.com",
+				"content": "198.51.100.4",
+				"proxiable": true,
+				"proxied": false,
+				"ttl": 120,
+				"locked": false,
+				"zone_id": "d56084adb405e0b7e32c52321bf07be6",
+				"zone_name": "example.com",
+				"created_on": "2014-01-01T05:20:00Z",
+				"modified_on": "2014-01-01T05:20:00Z",
+				"data": {},
+				"meta": {
+					"auto_added": true,
+					"source": "primary"
+				}
+			}
+		}`)
+	}
+
+	handler := func(w http.ResponseWriter, r *http.Request) {
+		if r.Method == http.MethodGet {
+			handleDNSRecord(w, r)
+			return
+		}
+
+		if r.Method == http.MethodPatch {
+			handleUpdateDNSRecord(w, r)
+			return
+		}
+
+		assert.Failf(t, "Expected method 'GET' or `PATCH`, got %s", r.Method)
+	}
+
+	dnsRecordID := "372e67954025e0ba6aaa6d586b9e0b59"
+
+	mux.HandleFunc("/zones/"+testZoneID+"/dns_records/"+dnsRecordID, handler)
+
+	err := client.UpdateDNSRecord(context.Background(), ZoneIdentifier(testZoneID), UpdateDNSRecordParams{
+		ID:      dnsRecordID,
 		Name:    "😺.example.com",
 		Content: "198.51.100.4",
 		TTL:     120,
@@ -551,10 +724,7 @@ func TestDeleteDNSRecord(t *testing.T) {
 	mux.HandleFunc("/zones/"+testZoneID+"/dns_records/"+dnsRecordID, handler)
 
 	err := client.DeleteDNSRecord(context.Background(), ZoneIdentifier(""), dnsRecordID)
-	assert.ErrorIs(t, err, ErrMissingZoneID)
-
-	err = client.DeleteDNSRecord(context.Background(), ZoneIdentifier(testZoneID), "")
-	assert.ErrorIs(t, err, ErrMissingDNSRecordID)
+	assert.Equal(t, ErrMissingZoneID, err)
 
 	err = client.DeleteDNSRecord(context.Background(), ZoneIdentifier(testZoneID), dnsRecordID)
 	require.NoError(t, err)
diff --git a/testdata/fixtures/dns/list_page_1.json b/testdata/fixtures/dns/list_page_1.json
deleted file mode 100644
index 15acc5533..000000000
--- a/testdata/fixtures/dns/list_page_1.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-    "success": true,
-    "errors": [],
-    "messages": [],
-    "result": [
-        {
-            "id": "372e67954025e0ba6aaa6d586b9e0b59",
-            "type": "A",
-            "name": "example.com",
-            "content": "198.51.100.4",
-            "proxiable": true,
-            "proxied": true,
-            "ttl": 120,
-            "locked": false,
-            "zone_id": "d56084adb405e0b7e32c52321bf07be6",
-            "zone_name": "example.com",
-            "created_on": "2014-01-01T05:20:00Z",
-            "modified_on": "2014-01-01T05:20:00Z",
-            "data": {},
-            "meta": {
-                "auto_added": true,
-                "source": "primary"
-            },
-            "tags": [
-                "tag1",
-                "tag2extended"
-            ]
-        }
-    ],
-    "result_info": {
-        "count": 1,
-        "page": 1,
-        "per_page": 1,
-        "total_count": 2,
-        "total_pages": 2
-    }
-}
diff --git a/testdata/fixtures/dns/list_page_2.json b/testdata/fixtures/dns/list_page_2.json
deleted file mode 100644
index b7836c01c..000000000
--- a/testdata/fixtures/dns/list_page_2.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-    "success": true,
-    "errors": [],
-    "messages": [],
-    "result": [
-        {
-            "id": "372e67954025e0ba6aaa6d586b9e0b59",
-            "type": "A",
-            "name": "www.example.com",
-            "content": "198.51.100.4",
-            "proxiable": true,
-            "proxied": true,
-            "ttl": 120,
-            "locked": false,
-            "zone_id": "d56084adb405e0b7e32c52321bf07be6",
-            "zone_name": "example.com",
-            "created_on": "2014-01-01T05:20:00Z",
-            "modified_on": "2014-01-01T05:20:00Z",
-            "data": {},
-            "meta": {
-                "auto_added": true,
-                "source": "primary"
-            },
-            "tags": [
-                "tag1",
-                "tag2extended"
-            ]
-        }
-    ],
-    "result_info": {
-        "count": 1,
-        "page": 2,
-        "per_page": 1,
-        "total_count": 2,
-        "total_pages": 2
-    }
-}
diff --git a/workers_test.go b/workers_test.go
index 348abed24..c76b7d053 100644
--- a/workers_test.go
+++ b/workers_test.go
@@ -275,11 +275,9 @@ func getFileDetails(r *http.Request, key string) (*multipart.FileHeader, error)
 }
 
 type multipartUpload struct {
-	Script             string
-	BindingMeta        map[string]workerBindingMeta
-	Logpush            *bool
-	CompatibilityDate  string
-	CompatibilityFlags []string
+	Script      string
+	BindingMeta map[string]workerBindingMeta
+	Logpush     *bool
 }
 
 func parseMultipartUpload(r *http.Request) (multipartUpload, error) {
@@ -290,12 +288,10 @@ func parseMultipartUpload(r *http.Request) (multipartUpload, error) {
 	}
 
 	var metadata struct {
-		BodyPart           string              `json:"body_part,omitempty"`
-		MainModule         string              `json:"main_module,omitempty"`
-		Bindings           []workerBindingMeta `json:"bindings"`
-		Logpush            *bool               `json:"logpush,omitempty"`
-		CompatibilityDate  string              `json:"compatibility_date,omitempty"`
-		CompatibilityFlags []string            `json:"compatibility_flags,omitempty"`
+		BodyPart   string              `json:"body_part,omitempty"`
+		MainModule string              `json:"main_module,omitempty"`
+		Bindings   []workerBindingMeta `json:"bindings"`
+		Logpush    *bool               `json:"logpush,omitempty"`
 	}
 	err = json.Unmarshal(mdBytes, &metadata)
 	if err != nil {
@@ -322,11 +318,9 @@ func parseMultipartUpload(r *http.Request) (multipartUpload, error) {
 	}
 
 	return multipartUpload{
-		Script:             string(script),
-		BindingMeta:        bindingMeta,
-		Logpush:            metadata.Logpush,
-		CompatibilityDate:  metadata.CompatibilityDate,
-		CompatibilityFlags: metadata.CompatibilityFlags,
+		Script:      string(script),
+		BindingMeta: bindingMeta,
+		Logpush:     metadata.Logpush,
 	}, nil
 }
 
@@ -865,71 +859,3 @@ func TestUploadWorker_WithLogpush(t *testing.T) {
 		assert.Equal(t, want, res)
 	}
 }
-
-func TestUploadWorker_WithCompatibilityFlags(t *testing.T) {
-	setup()
-	defer teardown()
-
-	compatibilityDate := time.Now().Format("2006-01-02")
-	compatibilityFlags := []string{"formdata_parser_supports_files"}
-
-	handler := func(w http.ResponseWriter, r *http.Request) {
-		assert.Equal(t, http.MethodPut, r.Method, "Expected method 'PUT', got %s", r.Method)
-
-		mpUpload, err := parseMultipartUpload(r)
-		assert.NoError(t, err)
-
-		assert.Equal(t, workerScript, mpUpload.Script)
-		assert.Equal(t, compatibilityDate, mpUpload.CompatibilityDate)
-		assert.Equal(t, compatibilityFlags, mpUpload.CompatibilityFlags)
-
-		w.Header().Set("content-type", "application/json")
-		fmt.Fprint(w, uploadWorkerResponseData)
-	}
-	mux.HandleFunc("/accounts/"+testAccountID+"/workers/scripts/bar", handler)
-
-	_, err := client.UploadWorker(context.Background(), AccountIdentifier(testAccountID), CreateWorkerParams{
-		ScriptName:         "bar",
-		Script:             workerScript,
-		CompatibilityDate:  compatibilityDate,
-		CompatibilityFlags: compatibilityFlags,
-	})
-	assert.NoError(t, err)
-}
-
-func TestUploadWorker_WithQueueBinding(t *testing.T) {
-	setup()
-	defer teardown()
-
-	handler := func(w http.ResponseWriter, r *http.Request) {
-		assert.Equal(t, http.MethodPut, r.Method, "Expected method 'PUT', got %s", r.Method)
-
-		mpUpload, err := parseMultipartUpload(r)
-		assert.NoError(t, err)
-
-		expectedBindings := map[string]workerBindingMeta{
-			"b1": {
-				"name":       "b1",
-				"type":       "queue",
-				"queue_name": "test-queue",
-			},
-		}
-		assert.Equal(t, workerScript, mpUpload.Script)
-		assert.Equal(t, expectedBindings, mpUpload.BindingMeta)
-
-		w.Header().Set("content-type", "application/json")
-		fmt.Fprint(w, uploadWorkerResponseData)
-	}
-	mux.HandleFunc("/accounts/"+testAccountID+"/workers/scripts/bar", handler)
-
-	_, err := client.UploadWorker(context.Background(), AccountIdentifier(testAccountID), CreateWorkerParams{
-		ScriptName: "bar",
-		Script:     workerScript,
-		Bindings: map[string]WorkerBinding{
-			"b1": WorkerQueueBinding{
-				Binding: "b1",
-				Queue:   "test-queue",
-			},
-		}})
-	assert.NoError(t, err)
-}