Preserve TypeSystem compatibility with older CLIs - #19506
Conversation
Fixes: microsoft#19503 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19506Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19506" |
There was a problem hiding this comment.
Pull request overview
Preserves TypeScript AppHost compatibility when newer SDK codegen runs against an older CLI-provided TypeSystem contract.
Changes:
- Capability-probes optional certificate metadata.
- Adds legacy-contract regression coverage.
- Documents frozen-contract compatibility requirements.
Show a summary per file
| File | Description |
|---|---|
TypeScriptLanguageSupportTests.cs |
Tests legacy runtime-spec compatibility. |
Aspire.TypeSystem.csproj |
Documents additive-member compatibility rules. |
TypeScriptLanguageSupport.cs |
Sets certificate metadata only when supported. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
Jose Perez Rodriguez (joperezr)
left a comment
There was a problem hiding this comment.
Change looks good and I understand the reasoning, just left a small comment given I believe there might be another case that we should test if it fails similarly and see if this is something we have to fix too.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
/backport to release/13.5 |
|
Started backporting to |
|
Adam Ratzman (@adamint) backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Preserve TypeSystem compatibility with older CLIs
Applying: Handle Java TypeSystem compatibility
Using index info to reconstruct a base tree...
M src/Aspire.Hosting.CodeGeneration.Java/JavaLanguageSupport.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Hosting.CodeGeneration.Java/JavaLanguageSupport.cs
CONFLICT (content): Merge conflict in src/Aspire.Hosting.CodeGeneration.Java/JavaLanguageSupport.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Handle Java TypeSystem compatibility
Error: The process '/usr/bin/git' failed with exit code 128 |
|
The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests. Suspected flaky test(s):
Suggested actions:
You can re-run the failed jobs from the workflow run page. |
Description
A TypeScript AppHost using SDK/codegen 13.5 fails under CLI 13.4.6 because the CLI force-shares its older
Aspire.TypeSystemcontract. The assembly identity still binds, but the newer codegen directly calls aRuntimeSpec.CertificateBundleEnvironmentVariablesetter that does not exist in the older contract.Java codegen has the same compatibility boundary for
CommandSpec.UpToDateCheck; CLI 13.4.6 is missing both the property and theCommandUpToDateChecktype.This probes the additive properties before using them. Current CLIs still pass
NODE_EXTRA_CA_CERTSand retain Java's incremental compile check. Older CLIs skip those unsupported capabilities while the rest of code generation continues.Validation:
TypeScriptLanguageSupportTests: 14 passedAspire.Hosting.CodeGeneration.Java.Tests: 45 passedAspire.Hosting.CodeGeneration.TypeScript,Aspire.Hosting.CodeGeneration.Java, andAspire.Hosting.RemoteHost: built with 0 warnings and 0 errorsMissingMethodException;NODE_EXTRA_CA_CERTSwas omittedNODE_EXTRA_CA_CERTSpopulatedCould not load type 'Aspire.TypeSystem.CommandUpToDateCheck'Fixes #19503
Checklist
<remarks />and<code />elements on your triple slash comments?