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

Generate AWS Makefile via this tool #551

Merged
merged 9 commits into from
Sep 7, 2023
Merged

Conversation

guineveresaenger
Copy link
Contributor

@guineveresaenger guineveresaenger commented Sep 5, 2023

TO BE MERGED AFTER pulumi/pulumi-aws#2784.

Part of pulumi/pulumi-aws#2756
See corresponding PR: pulumi/pulumi-aws#2784

  • Disable Makefile skip and generate
  • Add XrunUpstreamTools to AWS Makefile to allow for the upstream target to run the AWS upstream tools
  • Back out XskipMakefile option from workflow generation
  • add upgrade tests to makefile template; regenerate pulumi-aws

Comment on lines 141 to 167
#{{- if eq .Config.team "ecosystem" }}#

#{{- if .Config.XrunUpstreamTools }}#

upstream::
# Use upstream.sh script to apply patches
ifneq ("$(wildcard upstream)","")
@$(SHELL) ./scripts/upstream.sh "$@" apply
endif

upstream::

# Ensure tool is installed
cd upstream-tools && yarn install --frozen-lockfile
# Apply all automated changes
cd upstream-tools && yarn --silent run apply
# Check for any pending replacements
cd upstream-tools && yarn --silent run check

#{{- else }}#

upstream:
ifneq ("$(wildcard upstream)","")
@$(SHELL) ./scripts/upstream.sh "$@" apply
endif

#{{- end }}#
Copy link
Member

Choose a reason for hiding this comment

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

If we're going to bake the upstream-tools calls directly into the main template, we may as well just attach them to the upstream: target. Multiple targets :: are only needed for more generic solutions, like pulumi/pulumi-aws#2784 (comment).

Suggested change
#{{- if eq .Config.team "ecosystem" }}#
#{{- if .Config.XrunUpstreamTools }}#
upstream::
# Use upstream.sh script to apply patches
ifneq ("$(wildcard upstream)","")
@$(SHELL) ./scripts/upstream.sh "$@" apply
endif
upstream::
# Ensure tool is installed
cd upstream-tools && yarn install --frozen-lockfile
# Apply all automated changes
cd upstream-tools && yarn --silent run apply
# Check for any pending replacements
cd upstream-tools && yarn --silent run check
#{{- else }}#
upstream:
ifneq ("$(wildcard upstream)","")
@$(SHELL) ./scripts/upstream.sh "$@" apply
endif
#{{- end }}#
#{{- if eq .Config.team "ecosystem" }}#
upstream:
# Use upstream.sh script to apply patches
ifneq ("$(wildcard upstream)","")
@$(SHELL) ./scripts/upstream.sh "$@" apply
endif
#{{- if .Config.XrunUpstreamTools }}#
# Ensure tool is installed
cd upstream-tools && yarn install --frozen-lockfile
# Apply all automated changes
cd upstream-tools && yarn --silent run apply
# Check for any pending replacements
cd upstream-tools && yarn --silent run check
#{{- end }}#
#{{- end }}#

Comment on lines 118 to 134
#{{- if .Config.extraTests }}#
test:
cd provider/shim && go test -v -coverprofile="coverage.txt" .
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h
test.upgrade::
cd examples && go test -v -tags=all -run TestProviderUpgrade -timeout 2h

test.upgrade.quick::
cd examples && go test -v -tags=all -run TestProviderUpgrade/Quick

test.upgrade.record::
cd examples && PULUMI_ACCEPT=true go test -v -tags all -run TestProviderUpgrade -timeout 2h
#{{- else }}#

test:
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h
#{{- end }}#
Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid repeating the test target?

Suggested change
#{{- if .Config.extraTests }}#
test:
cd provider/shim && go test -v -coverprofile="coverage.txt" .
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h
test.upgrade::
cd examples && go test -v -tags=all -run TestProviderUpgrade -timeout 2h
test.upgrade.quick::
cd examples && go test -v -tags=all -run TestProviderUpgrade/Quick
test.upgrade.record::
cd examples && PULUMI_ACCEPT=true go test -v -tags all -run TestProviderUpgrade -timeout 2h
#{{- else }}#
test:
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h
#{{- end }}#
test:
#{{- if .Config.extraTests }}#
# Run the shim test before the examples test, since we assume it is faster.
cd provider/shim && go test -v -coverprofile="coverage.txt" .
#{{- end }}#
cd examples && go test -v -tags=all -parallel $(TESTPARALLELISM) -timeout 2h
#{{- if .Config.extraTests }}#
test.upgrade::
cd examples && go test -v -tags=all -run TestProviderUpgrade -timeout 2h
test.upgrade.quick::
cd examples && go test -v -tags=all -run TestProviderUpgrade/Quick
test.upgrade.record::
cd examples && PULUMI_ACCEPT=true go test -v -tags all -run TestProviderUpgrade -timeout 2h
#{{- end }}#

@guineveresaenger guineveresaenger merged commit ae5e4d1 into master Sep 7, 2023
@guineveresaenger guineveresaenger deleted the guin/make-aws branch September 7, 2023 01:12
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