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

Align CI workflows with ci-mgmt generated workflows. #29

Open
AaronFriel opened this issue Jun 5, 2023 · 0 comments
Open

Align CI workflows with ci-mgmt generated workflows. #29

AaronFriel opened this issue Jun 5, 2023 · 0 comments
Assignees
Labels
kind/engineering Work that is not visible to an external user

Comments

@AaronFriel
Copy link
Member

The Makefile may diverge as this relies on the Go Provider SDK, but we should be able to maintain this and pulumi-command without significant overhead.

@AaronFriel AaronFriel self-assigned this Jun 5, 2023
@AaronFriel AaronFriel added the kind/engineering Work that is not visible to an external user label Jun 5, 2023
AaronFriel added a commit to pulumi/ci-mgmt that referenced this issue Jun 6, 2023
Seeking to resolve the CI disparity between ecosystem managed repositories and
pulumi/pulumi-std#29, it quickly became apparent that the style of GitHub
Actions - using reusable workflows - in that repository and in pulumi-command
would require a major rewrite of the templating in this repository.

Making large changes to the templating in this repository is more difficult as
it requires modifying the Node scripts and the type-safe "generator" to reverse
engineer CI workflows into a known form.

Directly generating text templates, we skip the intermediate steps and can more
naturally write the intended GitHub Actions YAML.

The Go utility in this repository can be run and a diff with the current
repository scripts generated via:

```
cd ./package-ci
./scripts/test.sh
```

The committed template, "bridged-provider", is intended to be bit-for-bit
identical in output to the current scripts to the extent possible. As a result,
there is no semantic diff with the current output.

The two cases where the output was not identical are in the New Relic provider,
and the diff is inconsequential wrapping behavior in the current Node scripts
that is not present in the Go text template, both appearing in `.goreleaser`
files. In this case, the wrapping has no effect on Goreleaser:

```diff
diff --git a/../provider-ci/providers/newrelic/repo/.goreleaser.prerelease.yml b/./test-output/providers/newrelic/repo/.goreleaser.prerelease.yml
index 439adbf7a..a5b009761 100644
--- a/../provider-ci/providers/newrelic/repo/.goreleaser.prerelease.yml
+++ b/./test-output/providers/newrelic/repo/.goreleaser.prerelease.yml
@@ -29,8 +29,7 @@ builds:
   ignore: []
   ldflags:
   - -X github.com/pulumi/pulumi-newrelic/provider/v5/pkg/version.Version={{.Tag}}
-  - -X
-    github.com/newrelic/terraform-provider-newrelic/v2/main.UserAgentServiceName=pulumi
+  - -X github.com/newrelic/terraform-provider-newrelic/v2/main.UserAgentServiceName=pulumi
   main: ./cmd/pulumi-resource-newrelic/
```
AaronFriel added a commit to pulumi/ci-mgmt that referenced this issue Jun 7, 2023
Seeking to resolve the CI disparity between ecosystem managed repositories and
pulumi/pulumi-std#29, it quickly became apparent that the style of GitHub
Actions - using reusable workflows - in that repository and in pulumi-command
would require a major rewrite of the templating in this repository.

Making large changes to the templating in this repository is more difficult as
it requires modifying the Node scripts and the type-safe "generator" to reverse
engineer CI workflows into a known form.

Directly generating text templates, we skip the intermediate steps and can more
naturally write the intended GitHub Actions YAML.

The Go utility in this repository can be run and a diff with the current
repository scripts generated via:

```
cd ./package-ci
./scripts/test.sh
```

The committed template, "bridged-provider", is intended to be bit-for-bit
identical in output to the current scripts to the extent possible. As a result,
there is no semantic diff with the current output.

The two cases where the output was not identical are in the New Relic provider,
and the diff is inconsequential wrapping behavior in the current Node scripts
that is not present in the Go text template, both appearing in `.goreleaser`
files. In this case, the wrapping has no effect on Goreleaser:

```diff
diff --git a/../provider-ci/providers/newrelic/repo/.goreleaser.prerelease.yml b/./test-output/providers/newrelic/repo/.goreleaser.prerelease.yml
index 439adbf7a..a5b009761 100644
--- a/../provider-ci/providers/newrelic/repo/.goreleaser.prerelease.yml
+++ b/./test-output/providers/newrelic/repo/.goreleaser.prerelease.yml
@@ -29,8 +29,7 @@ builds:
   ignore: []
   ldflags:
   - -X github.com/pulumi/pulumi-newrelic/provider/v5/pkg/version.Version={{.Tag}}
-  - -X
-    github.com/newrelic/terraform-provider-newrelic/v2/main.UserAgentServiceName=pulumi
+  - -X github.com/newrelic/terraform-provider-newrelic/v2/main.UserAgentServiceName=pulumi
   main: ./cmd/pulumi-resource-newrelic/
```
AaronFriel added a commit to pulumi/ci-mgmt that referenced this issue Jun 9, 2023
Seeking to resolve the CI disparity between ecosystem managed repositories and
pulumi/pulumi-std#29, it quickly became apparent that the style of GitHub
Actions - using reusable workflows - in that repository and in pulumi-command
would require a major rewrite of the templating in this repository.

Making large changes to the templating in this repository is more difficult as
it requires modifying the Node scripts and the type-safe "generator" to reverse
engineer CI workflows into a known form.

Directly generating text templates, we skip the intermediate steps and can more
naturally write the intended GitHub Actions YAML.

The Go utility in this repository can be run and a diff with the current
repository scripts generated via:

```
cd ./package-ci
./scripts/test.sh
```

The committed template, "bridged-provider", is intended to be bit-for-bit
identical in output to the current scripts to the extent possible. As a result,
there is no semantic diff with the current output.

The two cases where the output was not identical are in the New Relic provider,
and the diff is inconsequential wrapping behavior in the current Node scripts
that is not present in the Go text template, both appearing in `.goreleaser`
files. In this case, the wrapping has no effect on Goreleaser:

```diff
diff --git a/../provider-ci/providers/newrelic/repo/.goreleaser.prerelease.yml b/./test-output/providers/newrelic/repo/.goreleaser.prerelease.yml
index 439adbf7a..a5b009761 100644
--- a/../provider-ci/providers/newrelic/repo/.goreleaser.prerelease.yml
+++ b/./test-output/providers/newrelic/repo/.goreleaser.prerelease.yml
@@ -29,8 +29,7 @@ builds:
   ignore: []
   ldflags:
   - -X github.com/pulumi/pulumi-newrelic/provider/v5/pkg/version.Version={{.Tag}}
-  - -X
-    github.com/newrelic/terraform-provider-newrelic/v2/main.UserAgentServiceName=pulumi
+  - -X github.com/newrelic/terraform-provider-newrelic/v2/main.UserAgentServiceName=pulumi
   main: ./cmd/pulumi-resource-newrelic/
```
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

No branches or pull requests

1 participant