pulumi/.github/workflows
bors[bot] ad583131dc
Merge #12028 #12043 #12048 #12069
12028: Require linting before running unit, integ, and smoke tests. r=abhinav a=RobbieMcKinstry

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

**Update:** With https://github.com/pulumi/pulumi/pull/12031 linting runs in about a minute.

Linting should be an extremely low-watermark requirement for evaluating build health. Blocking on it allows use to reduce the number of concurrent runners who are canceled early.

**Trade-offs:**
* This should delay CI time by the amount of time it takes to lint: _e.g._ CI will be ~5 minutes slower on the happy path.
* When a job is queued that fails a lint check, fewer runners will be soaked up just to fail lint checks. This will decrease the overall queue time across all builds.
* Ultimately, we're trading slower happy-path builds for smarter build scheduling. 
* We can mitigate the linting bottleneck by speeding up the linting process (https://github.com/pulumi/pulumi/pull/12023).

<!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -->

This PR supports but isn't sufficient for https://github.com/pulumi/pulumi/issues/12019

## Checklist

**This PR is intended to impact CI only, and thus does not justify a CHANGELOG entry or a test.**

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Service,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


12043: sdk/go: Don't store DependsOn in a lossy form r=abhinav a=abhinav



The `DependsOn` and `DependsOnInputs` resource options
store their captured information on the `resourceOptions` struct
in a lossy format: they store function references.

This makes it impossible to go back to the original lists of resources
or resource array inputs for use cases like #11698.

As a step towards making this possible,
replace the stored closures with interfaces.

The implementations in the first commit
are a drop-in replacement for the prior behavior
with no logic changes whatsoever.

The second commit makes a minor optimization:
it adds URNs to the same set instead
of constantly allocating new sets and combining them afterwards.

Refs #11698


12048: ci/test-docs-generation: Attempt to use version-sets r=abhinav a=abhinav

Addresses the TODO and uses version-set generated by get-job-matrix
to decide which version of our various platforms should be used.


12069: test/integration: Capture component setup output r=abhinav a=abhinav

Issue #12050 would have been a lot easier to debug
if we had been capturing the output of the commands.

This changes runComponentSetup to execute bash with `-x`
so that every command in the shell script is logged before it's run.

This feeds that output into an `io.Writer` that logs to the testing.TB.
This way, if the test fails or times out,
we'll have a bunch of meaningful log output
associated with the tests that ran them.

Capturing the command output in a reliable way
required introduction of something slightly more complicated
than `strings.Split(\n)` because there's a good chance
that we'll have partial lines written to the writer.

The approach taken by the Writer here is:
it will log the input one line at a time usually,
but when it sees a partial line, it will buffer it in-memory
to be combined with the next write or flush.
Approach inspired by https://github.com/uber-go/zap/blob/v1.24.0/zapio/writer.go

Refs #12050


Co-authored-by: Robbie McKinstry <robbie@pulumi.com>
Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-02-04 02:25:15 +00:00
..
ci-build-binaries.yml feat: sign pulumi binaries with cosign 2022-12-16 09:32:51 -08:00
ci-build-sdks.yml Remove dotnet 2022-12-13 16:13:53 +00:00
ci-info.yml ci: Update post-release PR to align with release process 2022-10-18 22:45:59 -07:00
ci-lint.yml ci/lint: Upgrade to golangci-lint v1.51 2023-02-03 14:19:32 -08:00
ci-prepare-release.yml feat: sign pulumi binaries with cosign 2022-12-16 09:32:51 -08:00
ci-run-test.yml Remove dotnet 2022-12-13 16:13:53 +00:00
ci-test-codegen.yml ci: Enable testing of language version sets 2022-09-21 09:48:38 -07:00
ci-test-docs-generation.yml ci/test-docs-generation: Attempt to use version-sets 2023-02-03 14:19:33 -08:00
ci.yml Merge #12028 #12043 #12048 #12069 2023-02-04 02:25:15 +00:00
command-dispatch.yml ci: ensure trunk is always green 2022-09-13 13:38:14 -07:00
download-pulumi-cron.yml Disable failing windows-winget-install wokflow 2022-11-24 11:03:00 +01:00
on-community-pr.yml ci: fix community contributor workflows 2022-09-21 17:39:15 -07:00
on-merge.yml feat: sign pulumi binaries with cosign 2022-12-16 09:32:51 -08:00
on-pr-changelog.yml ci: fix community contributor workflows 2022-09-21 17:39:15 -07:00
on-pr-target.yml ci: Refactor linear-history check to run on pull request target for community PRs 2022-11-15 15:17:35 -08:00
on-pr.yml ci: Use macos-latest 2023-02-03 12:46:14 -08:00
on-release.yml ci: Update post-release PR to align with release process 2022-10-18 22:45:59 -07:00
pr-test-acceptance-on-dispatch.yml Rename "Smoke" test to "Acceptance" tests 2023-01-30 15:38:37 -05:00
pr-test-codegen-on-pr.yml ci: Clean up excess permissions, fix acceptance tests job 2022-09-15 17:48:16 -07:00
pr-test-codegen-test-on-dispatch.yml ci: Fix CI lint 2022-09-15 18:40:19 -07:00
pr-test-docs-gen-on-pr.yml ci: Clean up excess permissions, fix acceptance tests job 2022-09-15 17:48:16 -07:00
pr-test-docs-generation-on-dispatch.yml ci: Use merge ref on codegen and docs tests 2022-09-13 20:43:34 -07:00
rebase.yml Add /rebase command 2022-10-18 10:15:34 -07:00
release-homebrew-tap.yml ci: Enable gh cli in every step of job 2022-10-04 23:23:43 -07:00
release-pr.yml ci: Update post-release PR to align with release process 2022-10-18 22:45:59 -07:00
release.pub ci: ensure trunk is always green 2022-09-13 13:38:14 -07:00
release.yml Add dotnet back into the matrix 2022-12-20 16:06:54 -05:00
trigger-homebrew-event.yml ci: Reenable Brew publishing after GH runners removed brew from path 2022-09-27 11:10:38 -07:00
trigger-release-docs-event.yml Enable command dispatch workflow for dealing with PRs (#5851) 2020-12-07 19:29:04 +00:00