Skip to content

fix CI add gitee token temporarily - #17263

Merged
JinHai-CN merged 1 commit into
infiniflow:mainfrom
myf-bee:fix-python-environment
Jul 22, 2026
Merged

JinHai-CN merged 1 commit into
infiniflow:mainfrom
myf-bee:fix-python-environment

Conversation

@myf-bee

@myf-bee myf-bee commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

fix CI add gitee token temporarily

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 22, 2026
@myf-bee myf-bee added the ci Continue Integration label Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CI workflows now configure OAuth2-based Git URL rewrites for gitee.com in preflight, Infinity, and Elasticsearch Python environment setup steps before dependency installation.

Changes

Gitee CI authentication

Layer / File(s) Summary
Configure authenticated Gitee fetches
.github/workflows/sep-tests.yml, .github/workflows/tests.yml
The three test environment setup steps in each workflow rewrite Gitee HTTPS URLs to use OAuth2 credentials before uv sync and package installation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: yuzhichang, 6ba3i

Poem

A rabbit hops through workflows bright,
With Gitee keys tucked out of sight.
Preflight, Infinity, Elasticsearch too,
Fetch their private repos as they should do.
uv sync runs smooth and spry—
CI carrots reach the sky! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: temporarily adding a Gitee token to CI.
Description check ✅ Passed The description includes the required Summary section and states the CI/Gitee token change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
.github/workflows/sep-tests.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

.github/workflows/tests.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/sep-tests.yml:
- Line 241: Rotate and revoke the exposed token, then replace the literal
credentials in the git configuration commands at .github/workflows/sep-tests.yml
lines 241, 355, and 929, and .github/workflows/tests.yml lines 135, 229, and 673
with a GitHub secret. Use temporary, non-global Git configuration, clean it up
on exit, and provide an explicit unauthenticated or safe fallback for fork pull
requests where the secret is unavailable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4952767b-e816-4713-8ddd-9aaced4b9f4f

📥 Commits

Reviewing files that changed from the base of the PR and between 2539d11 and ee4e79c.

📒 Files selected for processing (2)
  • .github/workflows/sep-tests.yml
  • .github/workflows/tests.yml

- name: Prepare Python test environment
if: steps.detect_changes.outputs.has_python_changes == 'true'
run: |
git config --global url."https://oauth2:[email protected]/".insteadOf "https://gitee.com/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🔴 Critical | 🏗️ Heavy lift

Remove the committed token and avoid global credential persistence.

The same credential is exposed in workflow source and stored globally on self-hosted runners. Rotate/revoke it immediately; use a GitHub secret, local temporary Git configuration, cleanup on exit, and an explicit fallback for fork PRs where secrets may be unavailable.

  • .github/workflows/sep-tests.yml#L241-L241: replace the literal token with secret-backed authentication.
  • .github/workflows/sep-tests.yml#L355-L355: replace the literal token with secret-backed authentication.
  • .github/workflows/sep-tests.yml#L929-L929: replace the literal token with secret-backed authentication.
  • .github/workflows/tests.yml#L135-L135: replace the literal token with secret-backed authentication.
  • .github/workflows/tests.yml#L229-L229: replace the literal token with secret-backed authentication.
  • .github/workflows/tests.yml#L673-L673: replace the literal token with secret-backed authentication.
📍 Affects 2 files
  • .github/workflows/sep-tests.yml#L241-L241 (this comment)
  • .github/workflows/sep-tests.yml#L355-L355
  • .github/workflows/sep-tests.yml#L929-L929
  • .github/workflows/tests.yml#L135-L135
  • .github/workflows/tests.yml#L229-L229
  • .github/workflows/tests.yml#L673-L673
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/sep-tests.yml at line 241, Rotate and revoke the exposed
token, then replace the literal credentials in the git configuration commands at
.github/workflows/sep-tests.yml lines 241, 355, and 929, and
.github/workflows/tests.yml lines 135, 229, and 673 with a GitHub secret. Use
temporary, non-global Git configuration, clean it up on exit, and provide an
explicit unauthenticated or safe fallback for fork pull requests where the
secret is unavailable.

@JinHai-CN
JinHai-CN merged commit 92c1a23 into infiniflow:main Jul 22, 2026
7 of 8 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 23, 2026
@myf-bee
myf-bee deleted the fix-python-environment branch August 5, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants