Skip to content

feat: Add support for filtering Jobs by an array of scopes #3827

Merged
jdalrymple merged 5 commits into
jdalrymple:mainfrom
X-Guardian:job-scope-fix
Jan 30, 2026
Merged

feat: Add support for filtering Jobs by an array of scopes #3827
jdalrymple merged 5 commits into
jdalrymple:mainfrom
X-Guardian:job-scope-fix

Conversation

@X-Guardian

@X-Guardian X-Guardian commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Add support for the scope parameter to accept both string and array of strings in Jobs API methods, aligning with the GitLab API.

Changes

Updated Methods

  • Jobs.all() - Updated scope parameter to accept JobScope | JobScope[]
  • Jobs.allPipelineBridges() - Updated scope parameter to accept JobScope | JobScope[]

Reference

@X-Guardian

Copy link
Copy Markdown
Contributor Author

Hi @jdalrymple, I'm getting intermittent test failures i.e.: https://circleci.com/gh/jdalrymple/gitbeaker/1719

 FAIL  test/unit/resources/Search.ts
  ● Test suite failed to run

    A jest worker process (pid=341) was terminated by another process: signal=SIGKILL, exitCode=null. Operating system logs may contain more information on why this occurred.

      at ChildProcessWorker._onExit (../../node_modules/.pnpm/jest-worker@30.2.0/node_modules/jest-worker/build/index.js:968:23)

 FAIL  test/unit/resources/Deployments.ts
  ● Test suite failed to run

    A jest worker process (pid=385) was terminated by another process: signal=SIGKILL, exitCode=null. Operating system logs may contain more information on why this occurred.

But I think the change is good, and I've tested it locally against gitlab.com

@jdalrymple jdalrymple added the type:feature Changes add a new feature label Jan 30, 2026
@jdalrymple

Copy link
Copy Markdown
Owner

Hi @jdalrymple, I'm getting intermittent test failures i.e.: https://circleci.com/gh/jdalrymple/gitbeaker/1719

 FAIL  test/unit/resources/Search.ts
  ● Test suite failed to run

    A jest worker process (pid=341) was terminated by another process: signal=SIGKILL, exitCode=null. Operating system logs may contain more information on why this occurred.

      at ChildProcessWorker._onExit (../../node_modules/.pnpm/jest-worker@30.2.0/node_modules/jest-worker/build/index.js:968:23)

 FAIL  test/unit/resources/Deployments.ts
  ● Test suite failed to run

    A jest worker process (pid=385) was terminated by another process: signal=SIGKILL, exitCode=null. Operating system logs may contain more information on why this occurred.

But I think the change is good, and I've tested it locally against gitlab.com

Ive seen these as well. I've tried to figure out where its coming from but it seems inconsistent. I've been looking for solutions to hopefully get around this behaviour.

@jdalrymple jdalrymple changed the title feat: Jobs scope attribute: Add array of strings support feat: Add support for filtering Jobs by an array of scopes Jan 30, 2026
@jdalrymple jdalrymple merged commit 18b724a into jdalrymple:main Jan 30, 2026
14 of 16 checks passed
@X-Guardian

Copy link
Copy Markdown
Contributor Author

Ive seen these as well. I've tried to figure out where its coming from but it seems inconsistent. I've been looking for solutions to hopefully get around this behaviour.

I expect the container is running out of memory. Have you tried bumping the CircleCI node-executor resource class to medium+ (6GB) or large (8GB)? They look like they are available on the free tier.

@X-Guardian X-Guardian deleted the job-scope-fix branch February 1, 2026 12:29
@jdalrymple

Copy link
Copy Markdown
Owner

Ill give it a look! Not sure why jest is needing 8Gbs though :/ hahaha, i might shard them to see if that improves things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature Changes add a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants