diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /app/graphql/resolvers/ci/runner_jobs_resolver.rb | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'app/graphql/resolvers/ci/runner_jobs_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/ci/runner_jobs_resolver.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/app/graphql/resolvers/ci/runner_jobs_resolver.rb b/app/graphql/resolvers/ci/runner_jobs_resolver.rb index 9fe25a4d13d..b005702a71d 100644 --- a/app/graphql/resolvers/ci/runner_jobs_resolver.rb +++ b/app/graphql/resolvers/ci/runner_jobs_resolver.rb @@ -18,6 +18,8 @@ module Resolvers alias_method :runner, :object def resolve_with_lookahead(statuses: nil) + context[:job_field_authorization] = :read_build # Instruct JobType to perform field-level authorization + jobs = ::Ci::JobsFinder.new(current_user: current_user, runner: runner, params: { scope: statuses }).execute apply_lookahead(jobs) @@ -30,7 +32,7 @@ module Resolvers previous_stage_jobs_or_needs: [:needs, :pipeline], artifacts: [:job_artifacts], pipeline: [:user], - project: [{ project: [:route, { namespace: [:route] }] }], + project: [{ project: [:route, { namespace: [:route] }, :project_feature] }], detailed_status: [ :metadata, { pipeline: [:merge_request] }, @@ -42,9 +44,19 @@ module Resolvers play_path: [{ project: { namespace: [:route] } }], web_path: [{ project: { namespace: [:route] } }], short_sha: [:pipeline], - tags: [:tags] + tags: [:tags], + ai_failure_analysis: [{ project: [:project_feature, :namespace] }], + trace: [{ project: [:namespace] }, :job_artifacts_trace] } end + + def nested_preloads + super.merge({ + trace: { + html_summary: [:trace_chunks] + } + }) + end end end end |