Skip to content

Conversation

@joperezr
Copy link
Member

@joperezr joperezr commented Feb 2, 2025

Description

This PR adds a workflow that runs once a day (or can also be triggered on-demand) which will re-generate the API surface files with latest code in main branch, and will send (or update if one is open already) a PR to show what has changed since last release. Once a new release ships, this PR will be merged, so that the new PR that gets created the next day will show now the diff against the recently shipped released.

This PR is also adding all the API surface as it was in our 9.0.0 release, so that the PR that gets created once we merge this, will show the new surface to be introduced in 9.1. The purpose of the generated PR is to use it to review the new API, and add comments and make corrections in between releases so that we are happy with the API to be released in the next version.

PR is best reviewed commit by commit:

  • First commit introduces the workflow, as well as the required infrastructure changes needed to generate the api surface files.
  • Second commit adds the API surface as of 9.0.0 release

cc: @davidfowl @ericstj @DamianEdwards @danmoseley

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?

@davidfowl
Copy link
Member

Can we exclude the dashboard

@davidfowl
Copy link
Member

We're going to need to exclude a set of projects.

@joperezr
Copy link
Member Author

joperezr commented Feb 2, 2025

Sure, apart from dashboard, which others come to mind? If not many we can just skip in the workflow itself, if many then we can instead fine-tune the targets so they only run in case we ship them as packages

@davidfowl
Copy link
Member

src/Tools/ConfigurationSchemaGenerator

@joperezr
Copy link
Member Author

joperezr commented Feb 2, 2025

We're going to need to exclude a set of projects.

Ok, done. I've changed it such that we only do this for projects that have 'IsPackable' set to true, which will automatically exclude things like Dashboard and internal tools. I've also updated the 9.0 api surface to only add the relevant files here. I tested this workflow on my fork, and PRs seem to be generated correctly, so I think this is ready for feedback to go in.

@joperezr
Copy link
Member Author

joperezr commented Feb 2, 2025

Here is what the diff between 9.0 and 9.1 looks like in my fork: joperezr#4

@joperezr
Copy link
Member Author

joperezr commented Feb 2, 2025

@eerhardt I'm merging now in order to test that the auto-PRs get created correctly on the main fork, but if you (or anyone else) has any other feedback I'll gladly address it in a follow-up.

@joperezr joperezr enabled auto-merge (squash) February 2, 2025 18:16
@joperezr joperezr merged commit 088d336 into dotnet:main Feb 2, 2025
65 checks passed
@joperezr joperezr deleted the AddAPIDiffWorkflow branch February 2, 2025 18:17
eerhardt added a commit to eerhardt/aspire that referenced this pull request Feb 3, 2025
This is no longer necessary after dotnet#7369
davidfowl pushed a commit that referenced this pull request Feb 3, 2025
This is no longer necessary after #7369
-->
<NoWarn>$(NoWarn);CS1570;CS1591</NoWarn>
<!--<DefineConstants>$(DefineConstants);LAUNCH_DEBUGGER</DefineConstants>-->
<RollForward>Major</RollForward>
Copy link
Member

Choose a reason for hiding this comment

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

@joperezr - what was this needed for?

Copy link
Member Author

Choose a reason for hiding this comment

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

As part of building each project and running the task to generate the ref source, the schema generator was being invoked (not sure if by design or that was not expected). Given the only dotnet we were installing is the one in global.json (which was 9.0.x) and this tool was targeting net8, the build was failing saying that in order for this tool to run we'd need to install net8 shared fx. By adding rollforward this tool is now able to run with a newer sdk.

Independently on whether or not it was expected for this to run as part of the build, I thought this was a change worth doing anyway as we want people who only have the 9.0 sdk without the net8 shared fx to be able to build and generate the schema.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2025
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Mar 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants