Skip to content

Commit 06d576a

Browse files
authored
[rayci] allow concurrency key in buildkite step (#239)
Allow `concurrency` and `concurrency_group`; this is require to rate limit the concurrent run of certain release test types (see anyscale/llm-forge#387) Test: - CI --------- Signed-off-by: can <[email protected]>
1 parent 6525ecc commit 06d576a

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

raycicmd/converter_test.go

+33
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,39 @@ func TestConvertPipelineStep(t *testing.T) {
224224
},
225225
},
226226
}, {
227+
in: map[string]any{
228+
"label": "say hello",
229+
"key": "key",
230+
"command": "echo hello",
231+
"depends_on": "dep",
232+
"concurrency": 2,
233+
"concurrency_group": "group",
234+
},
235+
out: map[string]any{
236+
"label": "say hello",
237+
"key": "key",
238+
"command": "echo hello",
239+
"depends_on": "dep",
240+
"concurrency": 2,
241+
"concurrency_group": "group",
242+
243+
"agents": newBkAgents("fakerunner"),
244+
245+
"timeout_in_minutes": defaultTimeoutInMinutes,
246+
"artifact_paths": defaultArtifactPaths,
247+
"retry": defaultRayRetry,
248+
"env": map[string]string{
249+
"RAYCI_BUILD_ID": buildID,
250+
"RAYCI_TEMP": "s3://ci-temp/abc123/",
251+
"BUILDKITE_BAZEL_CACHE_URL": "https://bazel-build-cache",
252+
"RAYCI_WORK_REPO": "fakeecr",
253+
"RAYCI_BRANCH": "beta",
254+
"RAYCI_STEP_ID": fakeStepID,
255+
256+
"BUILDKITE_ARTIFACT_UPLOAD_DESTINATION": artifactDest,
257+
},
258+
},
259+
}, {
227260
in: map[string]any{
228261
"name": "forge",
229262
"label": "my forge",

raycicmd/rayci_pipeline.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
commandStepAllowedKeys = []string{
4444
"command", "commands", "priority", "parallelism", "if",
4545
"label", "name", "key", "depends_on", "soft_fail", "matrix",
46-
"allow_dependency_failure",
46+
"allow_dependency_failure", "concurrency", "concurrency_group",
4747

4848
// The following keys will be processed by rayci and dropped.
4949
"instance_type", "queue", "job_env", "tags",

0 commit comments

Comments
 (0)