-
Notifications
You must be signed in to change notification settings - Fork 622
Move pgbackrest-restore test to Kyverno Chainsaw #4228
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
base: main
Are you sure you want to change the base?
Conversation
This test has a number of scripts and jobs that pass and share data. Chainsaw's bindings and templates are a nice way to break this test up, and its "catch" operations provide good context when a step fails. Tested with Kyverno Chainsaw 0.2.12 See: https://kyverno.github.io/chainsaw/main
This helped me reproduce a race in "pg_ctl start" during Postgres recovery. Issue: PGO-1945
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
use: { template: '21-lose-data.yaml' } | ||
|
||
- name: 'Point-In-Time Restore' | ||
use: { template: '22-point-in-time-restore.yaml' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth it to regularize the file/template names? I always liked the numbered files because you can just read through a directory (well, could, before we started to use the subdir files
), but if Chainsaw uses this file to sequence the tests, maybe another convention is worth talking about (at a later date!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. I think I started with numbers close to the KUTTL ones to ease review/migration, but where I landed is not that!
I like the filenames going in a similar order as the test, too, but now they can get reused so... 🤷🏻
Maybe something more like "scenario one," "... two," 🤔 🌱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, if the templates are being reused (hopefully!), then putting them in order doesn't make sense. Maybe descriptive titles could make it easier to read?
run: | | ||
curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.13.0/kubectl-kuttl_0.13.0_linux_x86_64 | ||
chmod +x /usr/local/bin/kubectl-kuttl | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to install KUTTL any longer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Make targets do go run ...@latest
by default. The binary download is faster, but not as easy to latest
.
I'm on the fence. Do you have a preference?
Confirm that data was restored to the point-in-time and the cluster is healthy | ||
use: { template: '23-verify-primary.yaml' } | ||
|
||
- name: 'Confirm Replica' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again: not for today, but I wonder if we could templatize a verify step and reuse it in our 4 verify steps. Note: this is the longest sustained look I've had at chainsaw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I thought I was reusing verify 02 and 12, but i see each only once.
Should those be like this?
- Create Data [A] on [one]
- Verify Data [A] on [one] <-- new
- Clone [one] to [two]
- Verify Data [A] on [two]
@@ -0,0 +1,62 @@ | |||
apiVersion: chainsaw.kyverno.io/v1alpha1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file getting called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not. I used it while diagnosing a bug about parameters in the WAL stream a long time ago.
I called this multiple times from the main test to... 🤔 raise and lower max_connections
maybe. 44b1847
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 If the file stays, it deserves a comment explaining what it does and why it isn't currently used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking a lot like 11 ...
Checklist:
Type of Changes:
Other Information:
This test failed in this other PR, and the KUTTL logs did not give me enough information to diagnose the cause. Chainsaw did much better and unblocked me over there.