Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/daily-issues-report.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/workflow/copilot_engine_installation.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func getCopilotSDKInstallSpec(command string) copilotSDKInstallSpec {
switch runtimeID {
case "python":
spec.stepName = "Install GitHub Copilot SDK (Python)"
spec.command = workspaceCommandPrefix + "pip install --disable-pip-version-check github-copilot-sdk==" + version
spec.command = workspaceCommandPrefix + "python3 -m pip install --disable-pip-version-check github-copilot-sdk==" + version
case "typescript":
spec.stepName = "Install GitHub Copilot SDK (TypeScript)"
spec.command = workspaceCommandPrefix + "npm install --ignore-scripts --no-save @github/copilot-sdk@" + version + " ts-node typescript"
Expand Down
8 changes: 4 additions & 4 deletions pkg/workflow/copilot_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,7 @@ func TestCopilotEngineInstallationWithCommandAndCopilotSDK(t *testing.T) {
name: "python command uses pip sdk install",

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.

Stale test name: "python command uses pip sdk install" no longer accurately describes the install mechanism and will mislead anyone diagnosing a future failure.

💡 Suggested rename

The test now asserts python3 -m pip install, so the name should match:

name: "python command uses python3 -m pip for sdk install",

Stale names make test failures harder to diagnose because the output says "pip" but the generated command says python3 -m pip.

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.

[/tdd] Stale test name — still says "pip sdk install" but the install command is now python3 -m pip.

Updating test names to describe the actual behaviour keeps the test suite self-documenting and makes future regressions easier to diagnose.

💡 Suggested rename
name: "python command uses python3 -m pip install",

command: "python3 main.py",
expectedName: "name: Install GitHub Copilot SDK (Python)",
expectedRun: "pip install --disable-pip-version-check github-copilot-sdk==" + string(constants.DefaultCopilotSDKVersion),
expectedRun: "python3 -m pip install --disable-pip-version-check github-copilot-sdk==" + string(constants.DefaultCopilotSDKVersion),
expectedSteps: 1,
},
{
Expand Down Expand Up @@ -2178,14 +2178,14 @@ func TestCopilotEngineInstallationWithCommandAndCopilotSDK(t *testing.T) {
name: "env wrapper command is detected",
command: "env FOO=bar python script.py",
expectedName: "name: Install GitHub Copilot SDK (Python)",
expectedRun: "pip install --disable-pip-version-check github-copilot-sdk==" + string(constants.DefaultCopilotSDKVersion),
expectedRun: "python3 -m pip install --disable-pip-version-check github-copilot-sdk==" + string(constants.DefaultCopilotSDKVersion),
expectedSteps: 1,
},
{
name: "custom command with firewall keeps awf and sdk installs",
command: "python script.py",
expectedName: "name: Install GitHub Copilot SDK (Python)",
expectedRun: "pip install --disable-pip-version-check github-copilot-sdk==" + string(constants.DefaultCopilotSDKVersion),
expectedRun: "python3 -m pip install --disable-pip-version-check github-copilot-sdk==" + string(constants.DefaultCopilotSDKVersion),
withFirewall: true,
expectedSteps: 2,
},
Expand Down Expand Up @@ -2249,7 +2249,7 @@ func TestCopilotEngineInstallationWithCopilotSDKDriver(t *testing.T) {
name: "python driver uses pip sdk install",

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.

Stale test name: "python driver uses pip sdk install" is now inaccurate — the install command is python3 -m pip install, not pip install.

💡 Suggested rename
name: "python driver uses python3 -m pip for sdk install",

Consistent with fixing the sibling test name on the WithCommandAndCopilotSDK test function above.

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.

[/tdd] Stale test name — "python driver uses pip sdk install" no longer matches the python3 -m pip install command actually being verified.

💡 Suggested rename
name: "python driver uses python3 -m pip install",

driver: "my_driver.py",
expectedName: "name: Install GitHub Copilot SDK (Python)",
expectedRun: "pip install --disable-pip-version-check github-copilot-sdk==" + string(constants.DefaultCopilotSDKVersion),
expectedRun: "python3 -m pip install --disable-pip-version-check github-copilot-sdk==" + string(constants.DefaultCopilotSDKVersion),
},
{
name: "typescript driver installs ts-node toolchain and sdk",
Expand Down
Loading