Bump Cli-testing to 1.3.0, update kafka libraries#2341
Bump Cli-testing to 1.3.0, update kafka libraries#2341SylvainSenechal wants to merge 20 commits intodevelopment/2.14from
Conversation
Hello sylvainsenechal,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
50ff85e to
b441c6e
Compare
b441c6e to
b0358e1
Compare
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Issue: ZENKO-5203
…e DLQ was ~250 in the tests, stopping sorbetclt from restoring objects Issue: ZENKO-5203
…rs instead of sleep Issue: ZENKO-5203
…prove debugging Issue: ZENKO-5203
b0358e1 to
e39e7a2
Compare
| "build": "tsc --build tsconfig.json", | ||
| "lint": "eslint ." | ||
| }, | ||
| "resolutions": { |
There was a problem hiding this comment.
related to issues newer azure libraries : https://scality.atlassian.net/browse/ZENKO-5213
There was a problem hiding this comment.
This was an infinite loop, although catched by global test timeout, still nicer to properly control while loops
There was a problem hiding this comment.
These are all small syntax changes because I did a huge bump of the kubernetes client from version 0.x to 1.4.0
| * new `putBucketNotificationConfiguration` to the connector before the | ||
| * test proceeds to trigger events. | ||
| */ | ||
| export async function waitForBucketInConnectorPipeline( |
There was a problem hiding this comment.
Used in bucket notification : Before, we were doing
- putBucketNotificationConfiguration
- sleep for 10sec and pray the oplog has picked up the change and updated kafka connector.
It was risky, because triggering the notification event before kafka connector was setup would imply the notification would never be sent
Now we detect the kafka connector is really setup.
I'm kinda sad though : I thought this would fix bucket notif flaky, but it doesn't, so there are other things to check
| assert.strictEqual(this.getResult().err?.includes('AccessDenied') || | ||
| this.getResult().err?.includes('403'), true); | ||
| this.getResult().err?.includes('403')|| | ||
| this.getResult().statusCode === 403, true); |
There was a problem hiding this comment.
For some reason, I got issues with this part not catching the 403 anymore.
Not fully sure why, but with the bump of the cli testing, the version of the sdk has increased quite a lot, from ~3.900 to ~3.100, maybe something changed I don't know
| Given that lifecycle is "resumed" for the "e2e-azure-archive" location | ||
| Then object "obj-1" should be "transitioning" and have the storage class "e2e-azure-archive" | ||
| And object "obj-2" should be "transitioning" and have the storage class "e2e-azure-archive" | ||
| # This test is flaky, and doesn't make much sense as it is : |
There was a problem hiding this comment.
@francoisferrand Let's discuss this. I only commented for now, maybe we wanna keep it ?
But looking at the test it doesnt make much sense (cf the comment I added in the code).
But at the same time I feel like I'm missing something, there must be a reason why this test was created
| cleanupAccount, | ||
| } from './utils'; | ||
|
|
||
| import 'cli-testing/hooks/KeycloakSetup'; |
There was a problem hiding this comment.
We have BeforeAll in Cli-testing, no import => they are not run
Imo should be in this repo but its a story for another day
| POD_NAME="${ZENKO_NAME}-ctst-tests" | ||
| CTST_VERSION=$(sed 's/.*"cli-testing": ".*#\(.*\)".*/\1/;t;d' ../../../tests/ctst/package.json) | ||
|
|
||
| # Configure keycloak |
There was a problem hiding this comment.
Seed keycloak is now done in a before all from Cli-testing
| import { safeJsonParse } from './utils'; | ||
| import assert from 'assert'; | ||
| import { Admin, Kafka } from 'kafkajs'; | ||
| import { Admin } from '@platformatic/kafka'; |
There was a problem hiding this comment.
Switched the kafka library
Before we were using kafkajs, and node-rdkafka.
These internally relied on librdkafka, a C library. Because of that, we needed to setup quite a few extra stuff to make them work : node-gyp (which was throwing weird python errors when doing yarn install in the Codespace), and also need a bunch of things to be installed in the dockerfile (you'll see later in the pr, librd-XXX).
Now this library is pure js, it removes some dependency, and also it will be compatible with Bun if we wanna use it later
| const tarName = await isObjectRehydrated(this, objectName); | ||
| assert(tarName); | ||
| await AzureHelper.sendBlobCreatedEventToQueue( | ||
| const sent = await AzureHelper.sendBlobCreatedEventToQueue( |
There was a problem hiding this comment.
Lost crazy amount of time on this :
sendBlobCreatedEventToQueue was erroring, the error wasn't thrown but instead the function return a boolean that was never checked -_-
Issue: ZENKO-5203
Ended up adding some extra stuff as I was testing my changes in Codespace and found a few stuff bothering me. I think the pr is still not too hard to review.
Can review commit by commit too