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

Simplify provider-ci makefile #993

Merged
merged 8 commits into from
Jun 25, 2024
Merged

Simplify provider-ci makefile #993

merged 8 commits into from
Jun 25, 2024

Conversation

danielrbradley
Copy link
Member

@danielrbradley danielrbradley commented Jun 25, 2024

Rewrite example provider testing targets to be more linear and easy to follow. This is a clean-up in order to add more providers to test as we start to migrate new ones in (i.e. native providers & components).

  • Move "test-workflows" to "test-providers" - we're generating more than just GH workflows.
  • Move config files for testing into each provider repo - named .ci-mgmt.yaml - just like the real repo.
  • Move temp linting repo into the bin directory which is fully ignored as it's just temp files.
  • This also fixes the random new fiiles showing up in the git working tree.

This is now slightly faster for running both clean and repeated runs of make.

Clean run on make:

  • Old: 2.40s user 2.76s system 159% cpu 3.224 total
  • New: 1.39s user 1.77s system 127% cpu 2.480 total

Repeated run of make:

  • Old: 1.63s user 1.99s system 231% cpu 1.561 total
  • New: 0.63s user 0.95s system 243% cpu 0.649 total

- Rewrite example provider testing targets to be more linear and easy to follow.
- Move "test-workflows" to "test-providers".
- Move config files for testing into each provider repo - named .ci-mgmt.yaml - just like the real repo.
- Move temp linting repo into the bin directory which is fully ignored as it's just temp files.
@danielrbradley danielrbradley self-assigned this Jun 25, 2024
@danielrbradley danielrbradley requested a review from a team June 25, 2024 09:32
rm -rf bin/test-provider/$*/repo/.git

# Fetch the latest .ci-mgmt.yaml from the provider repositories ready for testing.
update-provider-configs:
Copy link
Contributor

Choose a reason for hiding this comment

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

Who/what will be calling this target, and when?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just whenever we want to update our test data - would be manual right now but could create a CI job to call this. It seems like this hasn't been done in quite a while - see the follow-up PR stacked on this one.

- Use path filters to only test things that have changed.
- Only run downstream tests for provider-ci.
The ci-mgmt makefiles themselves don't use pulumictl - we only need this when calling `make upstream` during rollouts.
- Use explicit tag & cache.
- Use custom token.
@danielrbradley danielrbradley merged commit 1a6c4f1 into master Jun 25, 2024
3 checks passed
@danielrbradley danielrbradley deleted the refactor-makefile branch June 25, 2024 15:31
danielrbradley added a commit that referenced this pull request Jun 25, 2024
Update the test configs to match the real repos by running `make
update-provider-configs`, then re-run `make` to re-generate.

Stacked on #993
guineveresaenger added a commit that referenced this pull request Jun 25, 2024
#993 refactored the Required "Run actionlint and shellcheck" job,
limiting it to top-level `.github` paths.
This caused #995 and #996 to hang indefinitely.

This pull request re-enables this check to run on every pull request.
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.

2 participants