Skip to content

Commit b6cb2a9

Browse files
ivorbCopilot
andcommitted
Make the shared lab infrastructure canonical and check it for drift
main.bicep, resources.bicep and main.parameters.json were byte-identical across Labs A, B and C, and write_env.ps1/.sh and azure.yaml differed only by a lab name and one guidance line. Nothing told you when one copy was updated and the others were not. The copies stay - each lab folder has to be self-contained, so a learner who opens one lab has everything it needs without traversing to a shared folder. What changes is that they are now generated from a canonical source and verified. - Labfiles/_shared/ holds the canonical files, with three tokens for the values that genuinely differ per lab. - manifest.yml lists the labs that consume them. - sync.py regenerates the copies; --check fails with a diff if any has drifted, and runs in the content-checks workflow. - Generated files carry a header saying so. main.parameters.json does not, because JSON has no comment syntax, but it is still checked. check_env.py, bootstrap_agent.py and requirements.txt are genuinely lab-specific and are deliberately not managed here. Verified by regenerating all 15 files: every one is identical to what was already committed apart from the added header, so the templates reproduce the current content exactly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dc4690cc-57d6-48a7-abc8-bc8570113ab1
1 parent 5017f7f commit b6cb2a9

26 files changed

Lines changed: 623 additions & 1 deletion

File tree

.github/workflows/content-checks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ jobs:
5050
- name: Line endings match .gitattributes
5151
if: always()
5252
run: python tools/checks/check_line_endings.py
53+
54+
- name: Shared lab infrastructure is in sync
55+
if: always()
56+
run: python Labfiles/_shared/sync.py --check

Labfiles/A-build-and-extend-ai-agents/azure.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
2+
# Edit the file under Labfiles/_shared/, then run:
3+
# python Labfiles/_shared/sync.py
4+
15
# azd configuration for the Tailwind Traders lab (OPTIONAL infra path).
26
#
37
# This is a convenience for learners/instructors who want to provision the

Labfiles/A-build-and-extend-ai-agents/infra/main.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
2+
// Edit the file under Labfiles/_shared/, then run:
3+
// python Labfiles/_shared/sync.py
4+
15
// Optional azd infrastructure for the Tailwind Traders lab.
26
//
37
// Provisions a Microsoft Foundry (Azure AI Services) resource, a Foundry

Labfiles/A-build-and-extend-ai-agents/infra/resources.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
2+
// Edit the file under Labfiles/_shared/, then run:
3+
// python Labfiles/_shared/sync.py
4+
15
// Foundry account + project + model deployment for the lab.
26
// Deployed into the resource group created by main.bicep.
37

Labfiles/A-build-and-extend-ai-agents/setup/write_env.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
2+
# Edit the file under Labfiles/_shared/, then run:
3+
# python Labfiles/_shared/sync.py
4+
15
# Copies the endpoint + model deployment name that 'azd up' just provisioned
26
# into the lab's Python/.env, so the task scripts can read them.
37
#

Labfiles/A-build-and-extend-ai-agents/setup/write_env.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/sh
2+
# GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
3+
# Edit the file under Labfiles/_shared/, then run:
4+
# python Labfiles/_shared/sync.py
5+
26
# Copies the endpoint + model deployment name that 'azd up' just provisioned
37
# into the lab's Python/.env, so the task scripts can read them.
48
#

Labfiles/B-integrate-agents-with-enterprise-knowledge-and-m365/azure.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
2+
# Edit the file under Labfiles/_shared/, then run:
3+
# python Labfiles/_shared/sync.py
4+
15
# azd configuration for the Tailwind Traders enterprise-knowledge lab (OPTIONAL infra path).
26
#
37
# This is a convenience for learners/instructors who want to provision the

Labfiles/B-integrate-agents-with-enterprise-knowledge-and-m365/infra/main.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
2+
// Edit the file under Labfiles/_shared/, then run:
3+
// python Labfiles/_shared/sync.py
4+
15
// Optional azd infrastructure for the Tailwind Traders lab.
26
//
37
// Provisions a Microsoft Foundry (Azure AI Services) resource, a Foundry

Labfiles/B-integrate-agents-with-enterprise-knowledge-and-m365/infra/resources.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
2+
// Edit the file under Labfiles/_shared/, then run:
3+
// python Labfiles/_shared/sync.py
4+
15
// Foundry account + project + model deployment for the lab.
26
// Deployed into the resource group created by main.bicep.
37

Labfiles/B-integrate-agents-with-enterprise-knowledge-and-m365/setup/write_env.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# GENERATED FROM Labfiles/_shared/ - DO NOT EDIT THIS COPY.
2+
# Edit the file under Labfiles/_shared/, then run:
3+
# python Labfiles/_shared/sync.py
4+
15
# Copies the endpoint + model deployment name that 'azd up' just provisioned
26
# into the lab's Python/.env, so the task scripts can read them.
37
#

0 commit comments

Comments
 (0)