Skip to content

Remove git clean -fxd from build_python target#4573

Merged
Zaid-Ajaj merged 2 commits into
masterfrom
copilot/fix-issue-4452
Mar 3, 2026
Merged

Remove git clean -fxd from build_python target#4573
Zaid-Ajaj merged 2 commits into
masterfrom
copilot/fix-issue-4452

Conversation

Copilot AI commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

build_python runs git clean -fxd before building the wheel, which deletes all untracked files in sdk/python/. When generated Python SDK files aren't tracked by git, this wipes them out and produces an empty wheel.

  • Removed git clean -fxd from the build_python Makefile target
  • Added ./venv/ to the existing rm -rf to clean stale virtualenvs from prior builds

The existing rm -rf ./bin/ ../python.bin/ already ensures a clean build directory — git clean was redundant at best, destructive at worst.

# Before
cd sdk/python && \
    git clean -fxd && \
    rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \

# After
cd sdk/python && \
    rm -rf ./bin/ ../python.bin/ ./venv/ && cp -R . ../python.bin && mv ../python.bin ./bin && \

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…K files (#4452)

Replace `git clean -fxd` with adding `./venv/` to the existing `rm -rf`
cleanup. This preserves untracked generated Python SDK files while still
cleaning build artifacts (bin, venv) before the build.

Co-authored-by: Zaid-Ajaj <13316248+Zaid-Ajaj@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue #4452 Remove git clean -fxd from build_python target Mar 3, 2026
@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@Zaid-Ajaj Zaid-Ajaj marked this pull request as ready for review March 3, 2026 23:06
@Zaid-Ajaj Zaid-Ajaj merged commit 0d27659 into master Mar 3, 2026
15 of 16 checks passed
@Zaid-Ajaj Zaid-Ajaj deleted the copilot/fix-issue-4452 branch March 3, 2026 23:06
@codecov

codecov Bot commented Mar 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.86%. Comparing base (bd8b0f5) to head (28e64e4).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4573   +/-   ##
=======================================
  Coverage   62.86%   62.86%           
=======================================
  Files          90       90           
  Lines       10936    10936           
=======================================
  Hits         6875     6875           
  Misses       3416     3416           
  Partials      645      645           

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pulumi-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped in release v3.15.0.

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.

3 participants