Skip to content

Add TypeScript SDK refresh workflow#15299

Merged
joperezr merged 2 commits intorelease/13.2from
sebros/update-polyglot-sdk-workflow
Mar 18, 2026
Merged

Add TypeScript SDK refresh workflow#15299
joperezr merged 2 commits intorelease/13.2from
sebros/update-polyglot-sdk-workflow

Conversation

@sebastienros
Copy link
Contributor

Description

Adds scheduled automation to regenerate the checked-in TypeScript polyglot playground AppHost SDKs so they stay aligned with the current CLI/codegen output.

Summary of changes:

  • adds .github/workflows/refresh-typescript-sdks.yml to run on a schedule or via manual dispatch
  • adds eng/refreshTypeScriptSdks.ps1 to discover playground/polyglot/TypeScript/*/ValidationAppHost apps, install npm dependencies, clear stale .modules output, run aspire restore, and verify the generated SDK files exist
  • mirrors the existing manifest refresh pattern by having the workflow update a fixed automation branch and generated PR target main

Validation performed:

  • validated the new workflow YAML parses successfully
  • reviewed the PowerShell script statically
  • did not run the PowerShell script end-to-end in this local environment because pwsh is not installed here; I plan to validate it on another machine

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15299

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15299"

@github-actions
Copy link
Contributor

The transient CI rerun workflow requested reruns for the following jobs after analyzing the failed attempt.
GitHub's job rerun API also reruns dependent jobs, so the retry is being tracked in the rerun attempt.
The job links below point to the failed attempt that matched the retry-safe transient failure rules.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit ded7cfa:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RunWithMissingAwaitShowsHelpfulError ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ❌ Upload failed
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #23200909462

@sebastienros sebastienros marked this pull request as ready for review March 17, 2026 14:48
Copilot AI review requested due to automatic review settings March 17, 2026 14:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds scheduled automation to keep the checked-in TypeScript polyglot playground AppHost SDKs refreshed and aligned with current CLI/codegen output.

Changes:

  • Introduces a GitHub Actions workflow to run the refresh on a schedule or manually, then open/update an automated PR.
  • Adds a PowerShell script to locate ValidationAppHost playground apps, run restore + npm install, clear stale .modules, and validate expected outputs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
eng/refreshTypeScriptSdks.ps1 Implements the SDK refresh logic (discover apps, install deps, run restore, validate generated files).
.github/workflows/refresh-typescript-sdks.yml Schedules/runs the refresh script and creates/updates an automation PR targeting main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
uses: dotnet/actions-create-pull-request@e8d799aa1f8b17f324f9513832811b0a62f1e0b1
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-typescript-playground-sdks
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a unique branch name each time? Or at least see if there is already a PR open and update the branch associated with that one, and if not create a new branch for a new PR?

@@ -0,0 +1,45 @@
name: Refresh TypeScript Playground SDKs
Copy link
Member

Choose a reason for hiding this comment

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

Would it be out of the question to use the existing "manifest" workflow for this? That way we only get 1 PR for all.

https://github.com/dotnet/aspire/blob/main/.github/workflows/refresh-manifests.yml

It would be easier to manage and less to maintain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Meh, what about automating the merge with another workflow? I don't want one to break the other ...

Copy link
Member

Choose a reason for hiding this comment

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

The issue is that now we have 2 PRs that we are going to ignore instead of just one.

run: |
./eng/refreshTypeScriptSdks.ps1

- name: Create or update pull request
Copy link
Member

Choose a reason for hiding this comment

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

Note that this will break in the microsoft move as you need to add a step to fetch the token differently. I can help fixing it at that point.

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Infra change, so tell-mode

@joperezr joperezr merged commit 860cf9c into release/13.2 Mar 18, 2026
255 checks passed
@joperezr joperezr deleted the sebros/update-polyglot-sdk-workflow branch March 18, 2026 22:18
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 18, 2026
Copilot AI pushed a commit that referenced this pull request Mar 18, 2026
* Add TypeScript SDK refresh workflow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address TypeScript SDK workflow review comments

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@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.

5 participants