Skip to content

feat: skip clone when component repo already exists (#428)#429

Open
sihbher wants to merge 2 commits intoAzure:developfrom
sihbher:feat/issue-428-skip-existing-repos
Open

feat: skip clone when component repo already exists (#428)#429
sihbher wants to merge 2 commits intoAzure:developfrom
sihbher:feat/issue-428-skip-existing-repos

Conversation

@sihbher
Copy link

@sihbher sihbher commented Mar 9, 2026

Purpose

Contributing guidelines

Please see Contributing Guidelines before creating your Pull Request.

Type of change

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes
  • Other... Please describe:

Related Backlog Item or Issue

If applicable, provide a link to the relevant backlog item or issue.

Is this change disruptive or does it break existing applications?

If deploying this change could impact existing applications, please specify.

  • Yes
  • No

Cross-Repository Dependencies

If this change depends on pull requests in other repositories within the solution, provide the links below.

Does this require changes to project documentation?

If the changes add new functionality, update the documentation accordingly.

  • Yes
  • No

Documentation Link

If this change adds a new functionality, provide a link to its documentation.

Code quality checklist

  • I verified the changes locally to ensure they work as expected
  • I have tested the new functionality and ensured existing features still work
  • I have reviewed the code for readability, maintainability, and adherence to project conventions
  • I have added at least two reviewers to the Pull Request

sihbher and others added 2 commits March 9, 2026 12:22
The cleanup block at the end of postProvision.sh fails under set -euo pipefail
when rm -rf cannot remove the Python 3.14 venv directory on macOS (file handles
still held by recently completed python -m invocations).

- Add trap EXIT handler to ensure cleanup runs even on early script exits
- Replace rm -rf with python3 shutil.rmtree (handles locked files gracefully)
- Skip deactivate at script end (no shell state to restore)

Brings postProvision.sh to parity with the care already applied in
postProvision.ps1, which has its cleanup commented out for the same reason.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
preDeploy.ps1 and preDeploy.sh unconditionally delete and re-clone all 4
component repos on every azd deploy, even when they already exist locally.

- Check if target directory exists before cloning; skip if present
- Keep .azure env copy and child deploy execution unconditional
- Print informational message when skipping a clone

First-time deployments (no local repos) behave identically to before.
To force a fresh clone, delete the specific folder before running azd deploy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sihbher sihbher changed the title Feat/issue 428 skip existing repos feat: skip clone when component repo already exists (#428) Mar 9, 2026
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.

1 participant