Skip to content

Conversation

@Harsh-Microsoft
Copy link
Contributor

Purpose

This pull request introduces several updates to improve the development environment, streamline deployment processes, and enhance script robustness. Key changes include updates to the dev container configuration, adjustments to deployment scripts, and documentation improvements.

Development Environment Updates:

  • Updated .devcontainer/devcontainer.json to replace postStartCommand with postCreateCommand, which now runs a new setup_env.sh script for environment setup. Added Node.js, Azure CLI, and Azure Dev CLI features for enhanced tooling. ([[1]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-24ad71c8613ddcf6fd23818cb3bb477a1fb6d83af4550b0bad43099813088686L6-R20), [[2]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-24ad71c8613ddcf6fd23818cb3bb477a1fb6d83af4550b0bad43099813088686L19-R33))
  • Created a new setup_env.sh script to fetch the latest code and set up necessary script permissions. ([.devcontainer/setup_env.shR1-R7](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-884be0103962fdae0355a22edc0c050cf6051ef4952a1df7d2a9bff7a0d73ed6R1-R7))

Deployment and Script Enhancements:

  • Enhanced infra/scripts/copy_kb_files.sh to include retries for Azure role assignment verification and reintroduced logic to handle zip file extraction and uploads. ([[1]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-62df67e895a2f88a1ba5b89ba176066fd9b5cfb6eee33b274b1f61bac30ba603R41-R57), [[2]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-62df67e895a2f88a1ba5b89ba176066fd9b5cfb6eee33b274b1f61bac30ba603R66-R86))
  • Improved infra/scripts/process_sample_data.sh to fetch missing parameters from the Azure Developer CLI environment, reducing manual input requirements. ([infra/scripts/process_sample_data.shR11-R35](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-5f42277e379c1334fbdc9a52828c031d1620d82b99cded3dc825000a68e0ae0cR11-R35))
  • Updated infra/scripts/run_create_index_scripts.sh to dynamically detect the Python version, improve virtual environment activation, and handle script errors more gracefully. ([infra/scripts/run_create_index_scripts.shR75-R141](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-21e11cc6b3117a93e991ffaf6e0fb1169e58a590feb0085a11099801b0edb601R75-R141))

Documentation Improvements:

  • Updated README_LOCAL.md to clarify instructions for local setup, including references to the src folder for .env and deployment commands. Added support for both start.cmd and start.sh scripts. ([[1]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-bcf42577702c01e3f56c2b67075763796a7b2142e8c9ab87ae47d1819cfd8211L4-R4), [[2]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-bcf42577702c01e3f56c2b67075763796a7b2142e8c9ab87ae47d1819cfd8211L20-R20), [[3]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-bcf42577702c01e3f56c2b67075763796a7b2142e8c9ab87ae47d1819cfd8211L78-R81))

Other Changes:

  • Adjusted .vscode/launch.json to set the working directory to src for Python debugging. ([.vscode/launch.jsonL9-R9](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-bd5430ee7c51dc892a67b3f2829d1f5b6d223f0fd48b82322cfd45baf9f5e945L9-R9))
  • Modified src/start.sh to restore Python packages before starting the backend and simplified backend startup commands. ([[1]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-408951acb4e1dd1f37de3d4508358574cde6c06106566f250e75ab2af0cb231dR5-R14), [[2]](https://github.com/microsoft/document-generation-solution-accelerator/pull/413/files#diff-408951acb4e1dd1f37de3d4508358574cde6c06106566f250e75ab2af0cb231dL25-R38))

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • I have built and tested the code locally and in a deployed app
  • For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
  • This is a change for all users of this app. No code or asset is specific to my use case or my organization.

Other Information

…guration

- Updated devcontainer.json to include Node.js and Azure CLI features.
- Added setup_env.sh for environment initialization.
- Modified launch.json to set the correct working directory.
- Improved README.md with clearer instructions for sample data processing.
- Updated azure.yaml to simplify sample data command.
- Revised README_LOCAL.md for better clarity on local setup.
- Refactored copy_kb_files.sh to improve role assignment verification.
- Enhanced process_sample_data.sh to fetch parameters from azd env.
- Updated run_create_index_scripts.sh for better Python command handling and error reporting.
- Improved start.sh to ensure backend Python packages are restored before starting the server.
@Roopan-Microsoft Roopan-Microsoft merged commit d5ae230 into dev Apr 29, 2025
4 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the psl-hb-fixes-28apr branch April 29, 2025 09:52
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants