bazelbuild / bazelbuild/rules_swift

Support proto as persistent worker protocol

Open
#1,562 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
353
Forks
172
Avg merge
23h 22m
Merged PRs (30d)
14

Description

Currently all swift actions running as persistent workers expect the worker to receive `WorkRequest` as JSON payload.

https://github.com/bazelbuild/rules_swift/blob/646d6d229edc0b22ea3b9dc891062de519d27d4c/swift/internal/actions.bzl#L203

This is however unsupported in certain remote execution service providers, such as [EngFlow](https://docs.engflow.com/re/client/remote-persistent-workers.html). The remote spawns in such environments will have `requires-worker-protocol` ignored even if it is supplied as execution requirements and hence, the worker will fail with

```
what(): [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: '�'
```

upon reading the first line of the `WorkRequest` since a proto payload is being sent instead.

This issue is therefore a feature request to support `proto` as worker protocol.

Contributor guide

Open the contributing guide

Research direction

Read swift/internal/actions.bzl around line 203 first, then trace how persistent workers currently receive JSON WorkRequest payloads. Verify that proto is supported as a worker protocol in remote environments such as EngFlow and that the first request no longer fails with the reported JSON parse error.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.