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

Add resource consume test funcs #6747

Merged
merged 9 commits into from
Feb 14, 2024
Merged

Conversation

shayanh
Copy link

@shayanh shayanh commented Feb 13, 2024

Problem

Building on #5875 to add handy test functions for autoscaling.

Resolves #5609

Summary of changes

This PR makes the following changes to #5875:

  • Enable neon_test_utils extension in the compute node docker image, so we could use it in the e2e tests (as discussed with @kelvich).
  • Removed test functions related to disk as we don't use them for autoscaling.
  • Fix the warning with printf-ing unsigned long variables.

hlinnaka and others added 6 commits November 17, 2023 00:59
…l disk.

This is handy for testing VM autoscaling.
…base/neon into shayanh/add-resource-consume-test-funcs
Deleted test_consume_disk_space and test_release_disk_space functions as we
don't need them in autoscaling tests.
Copy link

github-actions bot commented Feb 13, 2024

2436 tests run: 2319 passed, 0 failed, 117 skipped (full report)


Code coverage (full report)

  • functions: 56.0% (12855 of 22974 functions)
  • lines: 82.6% (69546 of 84170 lines)

The comment gets automatically updated with the latest test results
1b6f878 at 2024-02-14T18:41:33.959Z :recycle:

@shayanh shayanh marked this pull request as ready for review February 14, 2024 01:39
@shayanh shayanh requested a review from a team as a code owner February 14, 2024 01:39
@shayanh shayanh requested review from skyzh, kelvich and hlinnaka and removed request for a team February 14, 2024 01:39
@skyzh
Copy link
Member

skyzh commented Feb 14, 2024

Depending on your use case, maybe you will need to add trusted = true at the end of the control file? trusted = true means that the extension will be loaded using superuser permission even if the one creating the extension is not a superuser.

https://github.com/neondatabase/neon/blob/main/pgxn/neon_test_utils/neon_test_utils.control

  • If you don't expect our end-user to use it -> don't add trusted = true so that it cannot be loaded on production environment, but you might need to find a way to load the extension in e2e test b/c IIRC the cloud e2e test uses the same permission as the end user so that you may not be able to load it...?
  • If you expect our end-user to use it -> add trusted = true. But I think this seems like an internal module and shouldn't be used by users.

Rest LGTM

@shayanh
Copy link
Author

shayanh commented Feb 14, 2024

@skyzh I already added trusted = true to the control file. Needed that bc e2e tests uses the same permission as a normal user.

@shayanh shayanh enabled auto-merge (squash) February 14, 2024 17:59
@shayanh shayanh merged commit fff2468 into main Feb 14, 2024
49 checks passed
@shayanh shayanh deleted the shayanh/add-resource-consume-test-funcs branch February 14, 2024 18:45
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.

Feature: Functions in neon_test_utils for synthetic resource usage to help test autoscaling
4 participants