Skip to content

Commit

Permalink
v77.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-boris committed Dec 17, 2024
1 parent e4ffc45 commit 4e04b19
Show file tree
Hide file tree
Showing 331 changed files with 794 additions and 783 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
IMAGE=taskcluster/taskcluster:v76.0.0
IMAGE_DEV=taskcluster/taskcluster:v76.0.0-devel
IMAGE_GENERIC_WORKER=taskcluster/generic-worker:v76.0.0
IMAGE=taskcluster/taskcluster:v77.0.0
IMAGE_DEV=taskcluster/taskcluster:v77.0.0-devel
IMAGE_GENERIC_WORKER=taskcluster/generic-worker:v77.0.0
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,60 @@
<!-- `yarn release` will insert the existing changelog snippets here: -->
<!-- NEXT RELEASE HERE -->

## v77.0.0

### WORKER-DEPLOYERS

▶ [MAJOR]
Generic Worker: adds worker config feature toggles to quickly/easily enable/disable features across entire worker pools. All features are enabled, by default.

Generic Worker: adds `d2gConfig` worker config to configure D2G translations. `enableD2G` and `containerEngine` config settings have been moved into this new config. The following is the new structure (with default values shown):

```json
{
...
"d2gConfig": {
"enableD2G": false,
"allowChainOfTrust": true,
"allowDisableSeccomp": true,
"allowHostSharedMemory": true,
"allowInteractive": true,
"allowKVM": true,
"allowLoopbackAudio": true,
"allowLoopbackVideo": true,
"allowPrivileged": true,
"allowPtrace": true,
"allowTaskclusterProxy": true,
"containerEngine": "docker"
},
...
}
```

Tasks using disabled features will be resolved as `exception/malformed-payload`.

▶ [minor] [#7390](https://github.com/taskcluster/taskcluster/issues/7390)
Generic Worker: adds `d2gConfig.allowGPUs` (default: `false`) and `d2gConfig.gpus` (default: `all`) worker config to provide NVIDIA GPU access to the running container for d2g-translated task payloads.

The translation will add the gpus flag: `--gpus <d2gConfig.gpus>` to the `docker run ...` command. Read more about the usage [here](https://docs.docker.com/reference/cli/docker/container/run/#gpus).

▶ [minor]
Generic Worker: adds `disableNativePayloads` (default: `false`) worker config option (`linux` only) to require all task payloads to be Docker Worker payloads. If this option is set to `true`, the task log will no longer contain the translated task definition and the warning about using Docker Worker payloads.

Tasks submitted with native payloads will be resolved as `exception/malformed-payload`.

Generic Worker: adds `d2gConfig.logTranslation` (default: `true`) worker config to control whether the D2G-translated task definition is logged to the task logs.

### Automated Package Updates

<details>
<summary>2 Dependabot updates</summary>

* build(deps): bump nanoid from 3.3.6 to 3.3.8 (e451def2d)
* build(deps): bump golang.org/x/crypto from 0.29.0 to 0.31.0 (e2f947058)

</details>

## v76.0.0

### GENERAL
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ARG DOCKER_FLOW_VERSION
RUN if [ -n "${DOCKER_FLOW_VERSION}" ]; then \
echo "${DOCKER_FLOW_VERSION}" > version.json; \
else \
echo \{\"version\": \"76.0.0\", \"commit\": \"local\", \"source\": \"https://github.com/taskcluster/taskcluster\", \"build\": \"NONE\"\} > version.json; \
echo \{\"version\": \"77.0.0\", \"commit\": \"local\", \"source\": \"https://github.com/taskcluster/taskcluster\", \"build\": \"NONE\"\} > version.json; \
fi

# Build the UI and discard everything else in that directory
Expand Down
29 changes: 0 additions & 29 deletions changelog/T8oPf7ajRwOtMOA5QG1TZQ.md

This file was deleted.

8 changes: 0 additions & 8 deletions changelog/TLW2aOmER_-7eM2Um6TfEQ.md

This file was deleted.

7 changes: 0 additions & 7 deletions changelog/issue-7390.md

This file was deleted.

70 changes: 35 additions & 35 deletions clients/client-go/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Taskcluster Client for Go


[![GoDoc](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go?status.svg)](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go)
[![GoDoc](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go?status.svg)](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go)
[![License](https://img.shields.io/badge/license-MPL%202.0-orange.svg)](http://mozilla.org/MPL/2.0)

**A Taskcluster client library for Go.**
Expand All @@ -19,55 +19,55 @@ This library provides the following packages to interface with Taskcluster:
### HTTP APIs

<!--HTTP-API-start-->
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcauth
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcauth

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcgithub
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcgithub

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tchooks
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tchooks

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcindex
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcindex

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcnotify
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcnotify

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcobject
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcobject

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcpurgecache
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcpurgecache

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueue
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueue

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcsecrets
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcsecrets

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcworkermanager
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcworkermanager
<!--HTTP-API-end-->

### AMQP APIs

<!--AMQP-API-start-->
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcauthevents
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcauthevents

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcgithubevents
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcgithubevents

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tchooksevents
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tchooksevents

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcnotifyevents
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcnotifyevents

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueueevents
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueueevents

* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcworkermanagerevents
* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcworkermanagerevents
<!--AMQP-API-end-->

### Setup

Before invoking API methods, create a client object corresponding to the service you wish to communicate with.
See the [client subdirectories](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go#pkg-subdirectories) for the list of available packages, each beginning with `tc`.
See the [client subdirectories](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go#pkg-subdirectories) for the list of available packages, each beginning with `tc`.

The most common case is to use `NewFromEnv`, reading environment variables for credentials:

```go
import (
"github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueue"
"github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueue"

tcclient "github.com/taskcluster/taskcluster/v76/clients/client-go"
tcclient "github.com/taskcluster/taskcluster/v77/clients/client-go"
)
queue := tcqueue.NewFromEnv()
```
Expand Down Expand Up @@ -97,15 +97,15 @@ For example, the `CreateTask` method is called like this:

```go
import (
"github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueue"
"github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueue"
"github.com/taskcluster/slugid-go"
)
task := tcqueue.TaskDefinitionRequest{..};
taskId: = slugid.Nice()
status := queue.CreateTask(taskId, &task)
```

Complete Godoc documentation of the available methods and types is [here](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go); see the "Directories" section to find the interfaces defined for specific services.
Complete Godoc documentation of the available methods and types is [here](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go); see the "Directories" section to find the interfaces defined for specific services.

### Specifying exponential backoff settings for HTTP request retries

Expand All @@ -120,7 +120,7 @@ something like this:
import (
"github.com/cenkalti/backoff/v3"
"github.com/taskcluster/httpbackoff/v3"
"github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueue"
"github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueue"
)
queue := tcqueue.NewFromEnv()
settings := &backoff.ExponentialBackOff{
Expand All @@ -142,7 +142,7 @@ queue.HTTPBackoffClient = &httpbackoff.Client{

API methods which take credentials and have method GET can be invoked with a signed URL.
To generate such a URL, use the method with suffix `_SignedURL`, and pass as its final argument the duration for which the URL should be valid.
For example, to generate a URL for [Queue.GetArtifact](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueue#Queue.GetArtifact_SignedURL):
For example, to generate a URL for [Queue.GetArtifact](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueue#Queue.GetArtifact_SignedURL):

```go
url := queue.GetArtifact_SignedURL(taskId, runId, "my/secret/artifact.txt", 5 * time.Minutes)
Expand All @@ -156,9 +156,9 @@ party. See [the manual](https://docs.taskcluster.net/docs/manual/design/env-vars
more information.

Create named credentials with
[`Credentials.CreateNamedTemporaryCredentials`](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go#Credentials.CreateNamedTemporaryCredentials),
[`Credentials.CreateNamedTemporaryCredentials`](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go#Credentials.CreateNamedTemporaryCredentials),
or unnamed credentials with
[`Credentials.CreateTemporaryCredentials`](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go#Credentials.CreateTemporaryCredentials).
[`Credentials.CreateTemporaryCredentials`](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go#Credentials.CreateTemporaryCredentials).
Named credentials are preferred if you are not sure which type to use.

#### Example
Expand All @@ -173,8 +173,8 @@ import (
"strconv"
"time"

tcclient "github.com/taskcluster/taskcluster/v76/clients/client-go"
"github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueue"
tcclient "github.com/taskcluster/taskcluster/v77/clients/client-go"
"github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueue"
)

const (
Expand Down Expand Up @@ -229,7 +229,7 @@ func main() {
### Handling Timestamps

Taskcluster uses RFC3339 timestamps, specifically with millisecond precision and a `Z` timestamp.
To support serializing and deserializing this format exactly, use the [`tcclient.Time`](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go#Time) type instead of with the built-in `time.Time` type.
To support serializing and deserializing this format exactly, use the [`tcclient.Time`](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go#Time) type instead of with the built-in `time.Time` type.

All timestamp arithmetic should be performed with the built-in `time` package.

Expand Down Expand Up @@ -307,7 +307,7 @@ queue := tcqueue.New()
data, contentType, contentLength, err := queue.DownloadArtifactToBuf(taskId, runId, name)
```

See the [Go documentation](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueue) for more detail.
See the [Go documentation](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueue) for more detail.

## Compatibility

Expand All @@ -322,9 +322,9 @@ Any incompatibilities are noted in the [Changelog](https://github.com/taskcluste

To get you started quickly, some example programs are included that use both the HTTP APIs and the AMQP APIs:

* This [HTTP example program](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcauth#example-package--Scopes) demonstrates the use of the [tcauth](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcauth) package to query the expiry and expanded scopes of a given clientId.
* This [HTTP example program](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcauth#example-package--UpdateClient) demonstrates the use of the [tcauth](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcauth) package to update an existing clientId with a new description and expiry.
* The [AMQP example program](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueueevents#example-package--TaskclusterSniffer) demonstrates the use of the [tcqueueevents](https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueueevents) package to listen in on Taskcluster tasks being defined and executed.
* This [HTTP example program](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcauth#example-package--Scopes) demonstrates the use of the [tcauth](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcauth) package to query the expiry and expanded scopes of a given clientId.
* This [HTTP example program](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcauth#example-package--UpdateClient) demonstrates the use of the [tcauth](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcauth) package to update an existing clientId with a new description and expiry.
* The [AMQP example program](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueueevents#example-package--TaskclusterSniffer) demonstrates the use of the [tcqueueevents](https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueueevents) package to listen in on Taskcluster tasks being defined and executed.

### Creating a Task

Expand All @@ -338,8 +338,8 @@ import (
"time"

"github.com/taskcluster/slugid-go/slugid"
tcclient "github.com/taskcluster/taskcluster/v76/clients/client-go"
"github.com/taskcluster/taskcluster/v76/clients/client-go/tcqueue"
tcclient "github.com/taskcluster/taskcluster/v77/clients/client-go"
"github.com/taskcluster/taskcluster/v77/clients/client-go/tcqueue"
)

// *********************************************************
Expand Down
4 changes: 2 additions & 2 deletions clients/client-go/codegenerator/model/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sort"
"strings"

"github.com/taskcluster/taskcluster/v76/tools/jsonschema2go/text"
"github.com/taskcluster/taskcluster/v77/tools/jsonschema2go/text"
)

//////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -122,7 +122,7 @@ import (
"errors"
"net/url"
"time"
tcclient "github.com/taskcluster/taskcluster/v76/clients/client-go"
tcclient "github.com/taskcluster/taskcluster/v77/clients/client-go"
)
type ` + api.Name() + ` tcclient.Client
Expand Down
4 changes: 2 additions & 2 deletions clients/client-go/codegenerator/model/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package model
import (
"fmt"

"github.com/taskcluster/taskcluster/v76/tools/jsonschema2go/text"
"github.com/taskcluster/taskcluster/v77/tools/jsonschema2go/text"
)

////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -157,7 +157,7 @@ func (exchange *Exchange) generateAPICode(exchangeName string) string {
import (
"reflect"
"strings"
tcclient "github.com/taskcluster/taskcluster/v76/clients/client-go"
tcclient "github.com/taskcluster/taskcluster/v77/clients/client-go"
)
`
Expand Down
4 changes: 2 additions & 2 deletions clients/client-go/codegenerator/model/generatemodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"regexp"

docopt "github.com/docopt/docopt-go"
"github.com/taskcluster/taskcluster/v76/clients/client-go/codegenerator/model"
"github.com/taskcluster/taskcluster/v76/tools/jsonschema2go"
"github.com/taskcluster/taskcluster/v77/clients/client-go/codegenerator/model"
"github.com/taskcluster/taskcluster/v77/tools/jsonschema2go"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions clients/client-go/codegenerator/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"regexp"
"strings"

"github.com/taskcluster/taskcluster/v76/tools/jsonschema2go"
"github.com/taskcluster/taskcluster/v77/tools/jsonschema2go"
"golang.org/x/tools/imports"
)

Expand Down Expand Up @@ -184,7 +184,7 @@ func FormatSourceAndSave(sourceFile string, sourceCode []byte) {
// in GOPATH, so reset the TC version to the appropriate value. Note that
// the last argument here will be updated to the current version by `yarn
// release`, so this will always substitute the correct version.
formattedContent = regexp.MustCompile(`github\.com/taskcluster/taskcluster/v[0-9]+/`).ReplaceAll(formattedContent, []byte("github.com/taskcluster/taskcluster/v76/"))
formattedContent = regexp.MustCompile(`github\.com/taskcluster/taskcluster/v[0-9]+/`).ReplaceAll(formattedContent, []byte("github.com/taskcluster/taskcluster/v77/"))

// only perform general format, if that worked...
formattedContent, err = format.Source(formattedContent)
Expand Down Expand Up @@ -268,10 +268,10 @@ func (apiDefs APIDefinitions) GenerateCode(goOutputDir string) {

for i := range apiDefs {
if strings.Contains(apiDefs[i].PackageName, "events") {
amqpApiLinks += "\n" + "* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/" + apiDefs[i].PackageName + "\n"
amqpApiLinks += "\n" + "* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/" + apiDefs[i].PackageName + "\n"

} else {
httpApiLinks += "\n" + "* https://pkg.go.dev/github.com/taskcluster/taskcluster/v76/clients/client-go/" + apiDefs[i].PackageName + "\n"
httpApiLinks += "\n" + "* https://pkg.go.dev/github.com/taskcluster/taskcluster/v77/clients/client-go/" + apiDefs[i].PackageName + "\n"

}
}
Expand Down
Loading

0 comments on commit 4e04b19

Please sign in to comment.