Skip to content

Modify exitcode returned when operating system check fails - #391

Merged
Rajasi Rane (rane-rajasi) merged 1 commit into
masterfrom
rarane/modifyerrorcode
Oct 2, 2026
Merged

Rajasi Rane (rane-rajasi) merged 1 commit into
masterfrom
rarane/modifyerrorcode

Conversation

@rane-rajasi

@rane-rajasi Rajasi Rane (rane-rajasi) commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Tests:

It's difficult to test this E2E on a VM. Since the error is in install command, GA re-downloads extension bits for each new API call. So manually modifying code bits on a VM doesn't work. I did validate by manually invoking install command but it won't go through e2e since it isn't an API call.

Validated by manually editing the extension file and adding a few additional log statements that aren't in code:
image

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Linux-specific setup can fail before OS validation, causing unsupported hosts to still return HandlerFailed.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates install handling to propagate the unsupported operating-system exit code and report it in status output.

Changes:

  • Returns exit code 51 for unsupported platforms.
  • Adds exit-code details to failed install statuses.
  • Expands install and status tests.
File Description
src/​extension/​src/​InstallCommandHandler.py Propagates OS validation failures.
src/​extension/​src/​ActionHandler.py Records install exit codes in status messages.
src/​extension/​tests/​Test_InstallCommandHandler.py Tests unsupported-platform handling.
src/​extension/​tests/​Test_ActionHandler.py Tests install return codes and statuses.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/extension/src/InstallCommandHandler.py
@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.98%. Comparing base (dc07072) to head (fcb3de3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #391   +/-   ##
=======================================
  Coverage   94.98%   94.98%           
=======================================
  Files         113      113           
  Lines       21936    21955   +19     
=======================================
+ Hits        20835    20855   +20     
+ Misses       1101     1100    -1     
Flag Coverage Δ
python27 94.98% <100.00%> (+<0.01%) ⬆️
python312 94.98% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yashnap

yashnap commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Please add testing logs for this.

@rane-rajasi
Rajasi Rane (rane-rajasi) merged commit 9911dcd into master Oct 2, 2026
11 checks passed
@rane-rajasi
Rajasi Rane (rane-rajasi) deleted the rarane/modifyerrorcode branch October 2, 2026 20:08
Koshy John (kjohn-msft) pushed a commit that referenced this pull request Oct 2, 2026
This release contains:

- Modify exitcode returned when operating system check fails:
[391](#391)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants