|
| 1 | +# Shared Foundry module |
| 2 | + |
| 3 | +```go |
| 4 | +module github.com/azure/azure-dev/cli/shared/foundry |
| 5 | +``` |
| 6 | + |
| 7 | +This independently versioned Go library is a build-time dependency for Foundry |
| 8 | +extensions. It is not an azd extension or gRPC capability and has no registry |
| 9 | +entry. Its `go.mod`, implementation, and transitive build graph must not require |
| 10 | +or import `github.com/azure/azure-dev/cli/azd` or extension-internal packages. |
| 11 | + |
| 12 | +## Packages |
| 13 | + |
| 14 | +- **`access/`**: ARM-first Foundry project data-plane access preparation, role |
| 15 | + equivalence inspection (`Foundry User`, `Cognitive Services User`, |
| 16 | + `Foundry Project Manager`, `Foundry Owner`), general ARM role inspection and |
| 17 | + idempotent assignment (`HasAnyRoleAssignment`, `AssignRole`), deterministic |
| 18 | + UUIDv5 `RoleAssignmentName` generation, 15-second initial settling, bounded |
| 19 | + propagation/sync polling (`Ensure[T]`, `PollReadiness`), and sanitized write |
| 20 | + error remediation (`WriteError`). |
| 21 | +- **`ferrors/`**: Module-owned typed errors (`*ferrors.Error`, `Category`, |
| 22 | + `CodeAuthFailed`) that extensions translate into their local `exterrors` or |
| 23 | + `azdext.LocalError` / `azdext.ServiceError` representation at the extension |
| 24 | + boundary. |
| 25 | + |
| 26 | +## Versioning and release |
| 27 | + |
| 28 | +The API starts at **v0.x**. Record breaking changes explicitly in release notes; |
| 29 | +consumers pin exact released versions. Release independently from azd core and |
| 30 | +extension binaries using `cli/shared/foundry/v0.x.y` tags. See |
| 31 | +[RELEASING.md](RELEASING.md). |
| 32 | + |
| 33 | +## Development |
| 34 | + |
| 35 | +From `cli/shared/foundry`, independent of the core and extension workspaces: |
| 36 | + |
| 37 | +```sh |
| 38 | +GOWORK=off go mod download |
| 39 | +GOWORK=off go build ./... |
| 40 | +GOWORK=off go test ./... -count=1 |
| 41 | +GOWORK=off go test -race ./... -count=1 # requires a supported CGO toolchain |
| 42 | +GOWORK=off go vet ./... |
| 43 | +python eng/check-boundaries.py |
| 44 | +``` |
0 commit comments