Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide support in generic worker payload builder for docker worker properties #289

Open
petemoore opened this issue Jul 7, 2023 · 0 comments

Comments

@petemoore
Copy link
Member

Taskgraph has worker-implementation-specific payload builders to convert abstract job definitions into taskcluster tasks. Payload builders declare a schema for the job properties they support. Jobs designed for Docker Worker contain properties that are currently not allowed by the Generic Worker payload builder, such as docker-image, allow-ptrace etc.

The d2g tool demonstrates that it is possible to transform a Docker Worker task definition into an equivalent Generic Worker task definition, and soon Generic Worker will perform this translation internally when running Docker Worker task payloads. However, task definitions designed for Docker Worker will not be able to use features that exist in Generic Worker only. Therefore it would be beneficial for the Generic Worker payload builder to support Docker Worker job definitions natively, and directly generate Generic Worker payloads that do not need to run through d2g inside of Generic Worker.

The d2g source code and command line utility can be used as a reference for understanding how to support Docker Worker features under Generic Worker. Furthermore, to validate that the updated payload builder works as anticipated, tests can be written that generate Docker Worker payloads from job definitions, transform them to Generic Worker using d2g, and compare the results to the same input job processed directly with the Generic Worker payload builder. The two should ideally be identical.

Note, the advantage of doing this, rather than having a transform step that runs d2g after generating a Docker Worker payload, is that eventually we can remove the Docker Worker payload builder altogether, and reduce the code footprint and complexity of dealing with multiple payload formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant