Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove generic version calculation #3775

Merged
merged 5 commits into from
Dec 11, 2024
Merged

Conversation

danielrbradley
Copy link
Member

Remove unrequired complexity of parsing the version through pulumictl and the fiddly dependency because it's in a variable but uses a binary downloaded through a target.

Instead, just validate that the version isn't in the wrong format with a leading "v".

Speed boost

Speed up makefile initialisation by not scanning for updates of every individual spec file but instead just check the timestamp of the git internal file tracking what upstream HEAD is pointing at. This doesn't account for manual edits to the specs - this is not supported behaviour if using the default makefile build caching.

Remove SDK version injection

Use the same approach as bridged providers and just rely on gen-sdk to insert the version into the SDK which it's already been doing since enabling respectSchemaVersion in the schema for each language.

This saves ~3.5s per makefile run:

Before:
make schema  3.90s user 1.09s system 94% cpu 5.296 total

After:
make schema  0.12s user 0.18s system 80% cpu 0.369 total
This is no longer required since adding respectSchemaVersion in the schema which creates these SDK-specific version numbers for us.
- Remove version injection from dotnet, python and nodejs build steps.
- Remove the unused SDK-specific version variables.
- Create the dotnet version.txt as part of the generate step instead of the build.
- Remove dependencies on pulumictl
@danielrbradley danielrbradley requested review from thomas11, EronWright and a team December 11, 2024 10:27
@danielrbradley danielrbradley self-assigned this Dec 11, 2024
@danielrbradley danielrbradley added the kind/engineering Work that is not visible to an external user label Dec 11, 2024
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Contributor

@thomas11 thomas11 left a comment

Choose a reason for hiding this comment

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

awesome speed boost!

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.65%. Comparing base (fcdfe88) to head (f321a41).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3775      +/-   ##
==========================================
- Coverage   56.66%   56.65%   -0.01%     
==========================================
  Files          78       78              
  Lines       11975    11975              
==========================================
- Hits         6786     6785       -1     
- Misses       4688     4689       +1     
  Partials      501      501              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/engineering Work that is not visible to an external user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants