From 5afb4d59feef95cbf11fc253c8c41fd2ac6cfce6 Mon Sep 17 00:00:00 2001 From: leolord Date: Sat, 15 Aug 2026 12:10:32 +0800 Subject: [PATCH 1/3] fix[ci]: authenticate private integration dependencies Problem: - Nested test workflows could not access the ProtonSamples repository secret - The shared install command could not distinguish test dependencies from ordinary CI dependencies Solution: - Add an optional test-install-command workflow input - Forward proton_samples_token only to the test workflow - Inject temporary Git URL authentication during the dependency installation step Test: - Validate reusable workflow YAML files - Verify the integration dependency profile installs ProtonSamples JIRA: PDIST-625 --- .github/workflows/reusable-python-ci.yml | 12 +++++++++++- .github/workflows/reusable-tests.yml | 8 ++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-python-ci.yml b/.github/workflows/reusable-python-ci.yml index 3d0b8b0..5335c64 100644 --- a/.github/workflows/reusable-python-ci.yml +++ b/.github/workflows/reusable-python-ci.yml @@ -19,6 +19,11 @@ on: required: false type: string default: 'pip install -e ".[dev]"' + test-install-command: + description: 'Command to install project dependencies for tests' + required: false + type: string + default: '' skip-commit-check: description: 'Skip commit message check' required: false @@ -59,6 +64,9 @@ on: required: false type: number default: 500 + secrets: + proton_samples_token: + required: false jobs: pr-size-check: @@ -105,4 +113,6 @@ jobs: uses: ./.github/workflows/reusable-tests.yml with: python-version: ${{ inputs.python-version || '3.11' }} - install-command: ${{ inputs.install-command || 'pip install -e ".[dev]"' }} + install-command: ${{ inputs.test-install-command || inputs.install-command || 'pip install -e ".[dev]"' }} + secrets: + proton_samples_token: ${{ secrets.proton_samples_token }} diff --git a/.github/workflows/reusable-tests.yml b/.github/workflows/reusable-tests.yml index 2f8301f..2bcf7f8 100644 --- a/.github/workflows/reusable-tests.yml +++ b/.github/workflows/reusable-tests.yml @@ -23,6 +23,9 @@ on: required: false type: boolean default: true + secrets: + proton_samples_token: + required: false jobs: comprehensive-tests: @@ -43,6 +46,11 @@ jobs: python-version: ${{ inputs.python-version }} - name: Install dependencies + env: + GIT_CONFIG_COUNT: ${{ secrets.proton_samples_token != '' && '1' || '0' }} + GIT_CONFIG_KEY_0: 'url.https://x-access-token:${{ secrets.proton_samples_token }}@github.com/IS-Model-Framework/ProtonSamples.insteadOf' + GIT_CONFIG_VALUE_0: 'https://github.com/IS-Model-Framework/ProtonSamples' + GIT_TERMINAL_PROMPT: '0' run: | python -m pip install --upgrade pip ${{ inputs.install-command }} From 753419efe2202d332cfe3e845574aa0db1ac4c05 Mon Sep 17 00:00:00 2001 From: leolord Date: Sat, 15 Aug 2026 12:10:32 +0800 Subject: [PATCH 2/3] fix[ci]: authenticate private integration dependencies Problem: - Nested test workflows could not access the ProtonSamples repository secret - The shared install command could not distinguish test dependencies from ordinary CI dependencies Solution: - Add an optional test-install-command workflow input - Forward proton_samples_token only to the test workflow - Inject temporary Git URL authentication during the dependency installation step Test: - Validate reusable workflow YAML files - Verify the integration dependency profile installs ProtonSamples JIRA: PDIST-625 --- scripts/check_mr_logs.py | 4 ++-- scripts/code_format_helper.py | 2 +- scripts/typing_helper.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/check_mr_logs.py b/scripts/check_mr_logs.py index 55280bf..85344fd 100644 --- a/scripts/check_mr_logs.py +++ b/scripts/check_mr_logs.py @@ -26,7 +26,7 @@ def get_commit_log(commit_hash): try: result = subprocess.run( - ["git", "show", "-s", f"--format=%B%nAuthor: %an <%ae>", commit_hash], + ["git", "show", "-s", "--format=%B%nAuthor: %an <%ae>", commit_hash], capture_output=True, text=True, check=True, @@ -49,7 +49,7 @@ def check_header(commit_msg): if not header_match: return ( False, - f"Invalid header format. Should be: []: ", + "Invalid header format. Should be: []: ", ) return True, "" diff --git a/scripts/code_format_helper.py b/scripts/code_format_helper.py index cecda7a..1bd97b7 100644 --- a/scripts/code_format_helper.py +++ b/scripts/code_format_helper.py @@ -36,7 +36,7 @@ class FormatArgs: verbose: bool = True def __init__(self, args: Optional[argparse.Namespace] = None) -> None: - if not args is None: + if args is not None: self.start_rev = args.start_rev self.end_rev = args.end_rev self.changed_files = args.changed_files diff --git a/scripts/typing_helper.py b/scripts/typing_helper.py index 0763cdc..92e2f2a 100644 --- a/scripts/typing_helper.py +++ b/scripts/typing_helper.py @@ -30,7 +30,7 @@ class TypingArgs: verbose: bool = True def __init__(self, args: Optional[argparse.Namespace] = None) -> None: - if not args is None: + if args is not None: self.changed_files = args.changed_files @@ -142,5 +142,5 @@ def typing_run(self, changed_files: List[str], args: TypingArgs) -> bool: sys.exit(1) if not helper.run(changed_files, args): - print(f"error: static typing for python failed") + print("error: static typing for python failed") sys.exit(1) From 35685f6c060f4f806f8785d4934c293a355646cb Mon Sep 17 00:00:00 2001 From: leolord Date: Sat, 15 Aug 2026 12:10:32 +0800 Subject: [PATCH 3/3] fix[ci]: authenticate private integration dependencies Problem: - Nested test workflows could not access the ProtonSamples repository secret - The shared install command could not distinguish test dependencies from ordinary CI dependencies Solution: - Add an optional test-install-command workflow input - Forward proton_samples_token only to the test workflow - Inject temporary Git URL authentication during the dependency installation step Test: - Validate reusable workflow YAML files - Verify the integration dependency profile installs ProtonSamples JIRA: PDIST-625 --- .github/workflows/reusable-python-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/reusable-python-ci.yml b/.github/workflows/reusable-python-ci.yml index 5335c64..9dfb2b3 100644 --- a/.github/workflows/reusable-python-ci.yml +++ b/.github/workflows/reusable-python-ci.yml @@ -1,7 +1,6 @@ name: Reusable - Complete Python CI on: - pull_request: workflow_call: inputs: python-version: