Fix: Skip agent authorization check for environment creation in REST API
This change fixes a regression introduced in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/182221 which broke the cluster agent bootstrapping workflow. When creating environments via the REST API, we now skip checking for cluster agent authorization using a new `skip_agent_auth` parameter. During bootstrapping, environments are created before the agent connects for the first time, which means there are no DB entries for agent authorization yet. The previous behavior caused a 400 Unauthorized error, breaking glab cluster agent bootstrap commands. Related to https://gitlab.com/gitlab-org/cli/-/issues/7786. Changelog: fixed
显示
- app/services/environments/create_service.rb 7 个添加, 1 个删除app/services/environments/create_service.rb
- lib/api/environments.rb 1 个添加, 0 个删除lib/api/environments.rb
- spec/requests/api/environments_spec.rb 49 个添加, 62 个删除spec/requests/api/environments_spec.rb
- spec/services/environments/create_service_spec.rb 38 个添加, 14 个删除spec/services/environments/create_service_spec.rb
加载中
想要评论请 注册 或 登录