Skip to content

Pre-alias refactors#3900

Merged
danielrbradley merged 2 commits into
masterfrom
schema-refactor
Jan 28, 2025
Merged

Pre-alias refactors#3900
danielrbradley merged 2 commits into
masterfrom
schema-refactor

Conversation

@danielrbradley

Copy link
Copy Markdown
Contributor

A couple of minor clean-ups pulled out from the alias work:

  1. Leverage map iteration helper & rename variables in main schema builder.
  2. Make version passing consistent. Only pass via ldflags OR CLI arg, but not both.

Previously, we had the version both embedded via ldflags into `version.Version` but also passed in to the gen program as a CLI argument.
The version should _always_ be embedded during a proper build, but might be missing for when debugging via an IDE.

1. Make everything work without having to pass the version as a CLI argument.
2. Assert that the version is set by exactly one of the CLI argument or the ldflags for consistency.
3. Use the parsed semver.Version object everywhere after initialization.

This removes passing the version by CLI completely in the makefile.
@github-actions

Copy link
Copy Markdown
Contributor

Does the PR have any schema changes?

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

@danielrbradley danielrbradley enabled auto-merge (squash) January 28, 2025 15:17
@codecov

codecov Bot commented Jan 28, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 30.00000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 57.21%. Comparing base (7d76160) to head (98107c3).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
provider/cmd/pulumi-gen-azure-native/main.go 0.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3900      +/-   ##
==========================================
- Coverage   57.26%   57.21%   -0.05%     
==========================================
  Files          78       78              
  Lines       12438    12436       -2     
==========================================
- Hits         7122     7115       -7     
- Misses       4769     4774       +5     
  Partials      547      547              

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

@pulumi-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped in release v2.85.0.

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.

3 participants