Skip to content

Pre-Deployment App Graph with Git Integration#142

Draft
willtsai wants to merge 13 commits intoradius-project:mainfrom
willtsai:001-git-app-graph-preview
Draft

Pre-Deployment App Graph with Git Integration#142
willtsai wants to merge 13 commits intoradius-project:mainfrom
willtsai:001-git-app-graph-preview

Conversation

@willtsai
Copy link
Contributor

Feature Specification: Git App Graph Preview

  • Added a comprehensive feature specification (specs/001-git-app-graph-preview/spec.md) describing static app graph generation from Bicep files, git metadata enrichment, diff-friendly output formats, GitHub PR integration, and related requirements, user stories, edge cases, and success criteria.
  • Introduced a quality checklist (specs/001-git-app-graph-preview/checklists/requirements.md) to validate the completeness and readiness of the specification before planning.

Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>

5. **Given** a Bicep file using the Radius Bicep extension types, **When** I run `rad app graph app.bicep`, **Then** the graph correctly identifies Radius-specific resource types and their relationships.

---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we have to resolve the environment in use and get to the details of in the graph? For instance, Radius.Data/store might be rendering a postgresSQL in one environment while it might render cosmosDB in another depending on env--> recipepack-->recipe resolution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5. **Given** a graph exported to markdown, **When** viewed in GitHub, **Then** the Mermaid diagram renders as a visual flowchart with distinct shapes for resource types (containers as rectangles, gateways as diamonds, databases as cylinders).

6. **Given** two app graphs from different commits, **When** I diff them, **Then** the diff is computed from JSON (not Markdown), and added/removed/modified resources are clearly identified.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this correspond to a cli command too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1. **Bicep Compiler Integration**: Should we use the official Bicep CLI for parsing, or implement a lightweight parser? Trade-off: accuracy vs. dependency management. **Recommendation**: Use official Bicep CLI per Constitution Principle VII (Simplicity Over Cleverness).

2. ~~**Graph Storage**: Should generated graphs be committed to the repo (e.g., `app-graph.json`)? Trade-off: visibility vs. repo noise.~~ **RESOLVED**: Yes, graphs are committed to `.radius/app-graph.json`. This enables lightweight GitHub Action (reads from git history, no tooling required) and provides auditable graph evolution.

Copy link
Contributor

@nithyatsu nithyatsu Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we not want to consider databases that can help make diff queries / genral queries easier? It does look like GitHub Actions artifacts + JSON query can help, But claude/ copilot also brought up some lightweight database options:
(1) SQLite file in repo, (2) Turso (SQLite edge), (3) Supabase (Postgres) (AI recommended for diff optimizations + json handling but paid after first 7 days rate limits free version), (4) GitHub Actions artifacts + JSON query, (5) SQLite + GH Cache (** AI recommended oevrall **) (6) construct each time the page is accessed

Copy link
Contributor Author

@willtsai willtsai Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4. **Diff Visualization**: What's the preferred format for showing diffs in PR comments—table-based, Mermaid side-by-side, or unified text diff?

5. **Parameter Handling**: How should we handle Bicep parameters without a params file—use defaults, require params, or mark as "unknown"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more questions:

  • Q: Where would the graph be displayed? On the README.md in the app.bicep repo and in the PR home pages?
  • Q: How should the system handle unresolvable module references? → A: Show partial graph with warning + display unresolved modules as placeholder nodes (taking a best effort approach than display error in case the full picture cannot be resolved)
  • Q: can we assume the repo has app.bicep checked in, and the workflow that generates graphs can query radius? Would this be the repo radius?
  • Q: What extent of info should the graph capture for specific resources that we can know only in the context of which environment the app.bicep is invoked in? ( environment -> recipe-pack--> recipe resolution dependent resources) Would we display "Radius.Data/database" Or get to the specifics such as postgreSQL?

Copy link
Contributor Author

@willtsai willtsai Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where would the graph be displayed? On the README.md in the app.bicep repo and in the PR home pages?

A: on the PR as comments that highlight the diffs, see https://github.com/willtsai/design-notes-radius/blob/001-git-app-graph-preview/specs/001-git-app-graph-preview/spec.md#user-story-4---github-action-for-pr-graph-diff-priority-p2

Q: can we assume the repo has app.bicep checked in, and the workflow that generates graphs can query radius? Would this be the repo radius?

A: eventually, yes, there would be integration with repo Radius so that the GitHub Action or UI can query via the Radius APIs. But for this initial implementation, we will assume the user generates the app graph and checks them into the repo so that we don't have to worry about querying the Radius API from inside the GH Action (which would need a "Repo Radius" or equivalent solution)

Q: What extent of info should the graph capture for specific resources that we can know only in the context of which environment the app.bicep is invoked in?

A: this is addressed in the spec now, under edge cases: https://github.com/willtsai/design-notes-radius/blob/001-git-app-graph-preview/specs/001-git-app-graph-preview/spec.md#edge-cases

Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com>
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.

2 participants