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

Testing Improvements #127

Merged
merged 35 commits into from
Sep 10, 2024
Merged

Testing Improvements #127

merged 35 commits into from
Sep 10, 2024

Conversation

gene-redpanda
Copy link
Contributor

@gene-redpanda gene-redpanda commented Aug 2, 2024

This PR contains changes to improve both testing and the developer experience. It also contains fixes for various bugs discovered as part of implementing more comprehensive tests, doc changes and mocks.

@gene-redpanda gene-redpanda force-pushed the add-testing-improvements branch from 7b297f5 to 33ce804 Compare August 2, 2024 20:04
Goals were to consolidate examples into more general purpose cluster creation, expand the amount of stuff each one does so that users have to go to fewer places and have them in standardized locations.

This is a NON FUNCTIONAL COMMIT, acceptance testing will fail.
The azure_private_link, aws_private_link and gcp_private_service_connect fields can only be used with their respective provider. This was causing fails on the cluster create call -- IOW about 20m into the process. Not ideal! The validator fails things at the terraform plan stage which saves the end user an immense amount of time.
Previously we were repeating the same test code in a LOT of places. This cuts all that away.

Next up is standing up multiple clusters using the providers for long term testing purposes.
@andrewhsu andrewhsu self-requested a review August 6, 2024 18:06
Dummy values cause failures in tests on GCP
.buildkite/pipeline.yml Outdated Show resolved Hide resolved
Co-authored-by: Andrew Hsu <xuzuan@gmail.com>
.buildkite/pipeline.yml Outdated Show resolved Hide resolved
gene-redpanda and others added 11 commits August 6, 2024 17:09
Co-authored-by: Andrew Hsu <xuzuan@gmail.com>
Ideally this would also have an API call to request the current throughput tiers with the baked tiers as a fallback but I didn't see that yet.
Added a bunch of mocks and unit tests to validate the more complex utils functions. Also added mock gen and relevant makefile elements.
Cluster was hard to read with all the supporting functions making the file super long. This way it is clearer what elements are part of the terraform config and what elements are supporting
The new changes allow the user to build a provider binary and use it to run any of the cluster examples for testing purposes. It will generate a random name and then persist it (git knows to ignore the file) across make runs so you can teardown/run again without issues.

Note that you must set REDPANDA_CLIENT_ID and REDPANDA_CLIENT_SECRET as usual, and must also set REDPANDA_CLOUD_ENVIRONMENT (probably to ign, but this allows you to target prd as well).

The intent is to support development by making it easier to build and test against a specific cluster (no deletion) repeatedly without having to fiddle around with the acceptance tests. This will be most useful when developing against the dataplane endpoints but should still have value for cluster creation testing as it is easier to fiddle the HCL directly against a cluster and then explore what went wrong.
TF was persisting the extra quotes with \
Updated the makefile to support running tests in buildkite.

Updated the buildkite pipeline to support running the make tests, making sure to put the slow and expensive cluster tests behind lint, unit and network tests.
Since we're already handling the linting in buildkite and it is an integral part of the testing process it makes no sense to also do it in actions as part of the release flow.

I also bumped the plugin versions on the remaining actions pipelines
@gene-redpanda gene-redpanda force-pushed the add-testing-improvements branch from 2198986 to 77ed6cf Compare August 14, 2024 20:08
@gene-redpanda gene-redpanda force-pushed the add-testing-improvements branch from 9e0863b to 2860c71 Compare August 14, 2024 20:41
Fixes an issue with a current install pack in integration that does not correctly work with GCP.
gofumpt doesn't support the property lang-version

we no longer need the exclude word rules

gci doesn't support no-prefix-comments

also includes file fixes for linter + headers

revive doesnt support error or warning
You still only need to change testtype. I've added the DATASOURCE_TEST_DIR to allow toggling between them without messing up the name persisting by cloud provider. standup and teardown are the verbs for local dev, no other thought needed there.
@gene-redpanda gene-redpanda force-pushed the add-testing-improvements branch from bed84e2 to caa1509 Compare August 17, 2024 00:45
@gene-redpanda gene-redpanda marked this pull request as ready for review August 17, 2024 00:45
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
examples/cluster/gcp/main.tf Outdated Show resolved Hide resolved
.buildkite/pipeline.yml Show resolved Hide resolved
redpanda/utils/utils.go Outdated Show resolved Hide resolved
redpanda/validators/throughput_tiers.go Show resolved Hide resolved
Also rename standup to apply
Copy link
Contributor

@r-vasquez r-vasquez left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Users should not provide a topic config element with an empty value.
@gene-redpanda gene-redpanda force-pushed the add-testing-improvements branch from 27a0bbc to 89c6578 Compare September 10, 2024 20:35
@gene-redpanda gene-redpanda merged commit a83ac76 into main Sep 10, 2024
10 checks passed
@gene-redpanda gene-redpanda deleted the add-testing-improvements branch September 10, 2024 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants