Skip to content

fix(openapi): allow cancel deployment with login session#6789

Open
luobily wants to merge 1 commit into
erda-project:masterfrom
luobily:codex/bugfix-deployment-cancel-401
Open

fix(openapi): allow cancel deployment with login session#6789
luobily wants to merge 1 commit into
erda-project:masterfrom
luobily:codex/bugfix-deployment-cancel-401

Conversation

@luobily

@luobily luobily commented Jul 10, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Which issue(s) this PR fixes:

Specified Reviewers:

/assign @your-reviewer

ChangeLog

Language Changelog
🇺🇸 English fix(openapi): allow cancel deployment with login session
🇨🇳 中文 修复取消部署报错登陆 401 的问题

Need cherry-pick to release versions?

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5ca32e059

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

i18n.SetGoroutineBindLang(localeName)
// clear all global context
defer goroutine_context.ClearContext()
defer redactSensitiveRequestHeaders(r.Header)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Redact sensitive headers before request dumps

When HTTP_DUMP or the __dump__ query flag is enabled, this defer runs only after the inner handler returns, while the dump interceptor is configured with order 0 and calls httputil.DumpRequest before invoking the next handler; this filter is order 11 in cmd/erda-server/bootstrap.yaml. As a result Authorization, Cookie, and CSRF values are still printed by the dump path despite this redaction, so the redaction needs to happen in the dump interceptor or before it runs.

Useful? React with 👍 / 👎.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.85%. Comparing base (2ed3a04) to head (b5ca32e).

Files with missing lines Patch % Lines
...nternal/tools/orchestrator/endpoints/deployment.go 66.66% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6789   +/-   ##
=======================================
  Coverage   15.84%   15.85%           
=======================================
  Files        3998     3998           
  Lines      328165   328175   +10     
=======================================
+ Hits        51989    52023   +34     
+ Misses     270277   270252   -25     
- Partials     5899     5900    +1     
Flag Coverage Δ
by-github-actions 15.85% <81.81%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...pi/openapi-ng/interceptors/common/client_header.go 82.60% <100.00%> (+82.60%) ⬆️
...nternal/tools/orchestrator/endpoints/deployment.go 2.03% <66.66%> (+2.03%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Development

Successfully merging this pull request may close these issues.

2 participants