-
Notifications
You must be signed in to change notification settings - Fork 0
Add backbeat route apis #4
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: development/1.0
Are you sure you want to change the base?
Conversation
5305e7d to
670da80
Compare
51e8e9c to
3d0f040
Compare
3d0f040 to
e09c5a5
Compare
bfec561 to
f20d74a
Compare
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.
All models are coming from https://github.com/scality/zenkoclient/blob/development/1.3/zenko-2018-07-08-json.api.json
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.
All this new setup is just to be able to run backbeat api server. I don't particularly like it, most of it is copied from backbeat actions, and it's very long considering it's just for testing (and the tests aren't even thorough as you'll see). But it couldn't find anything else simplier
| import { describeForBackbeatSetup } from './testHelpers'; | ||
| import assert from 'assert'; | ||
|
|
||
| // Note : these tests are relatively simple, as it's not straightforward to setup |
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.
Might remove this comment actually 🤔 but you get the idea : With this setup, I can test that for example, making a "pauseLocation" call to backbeat is actually well received, but i don't have any location to pause, and no real lifecycle task to run. The best test is really just to start using this client in Zenko, we are already using these apis in Zenko, but implemented them manually.
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
| - name: Wait for Backbeat API to be ready | ||
| run: | | ||
| set -o pipefail | ||
| bash .github/scripts/wait_for_local_port.bash 8900 60 |
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.
should be added for docker-compose instead
| condition: service_started | ||
| command: node bin/backbeat.js | ||
|
|
||
| backbeat-queue-processor: |
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 queue processor needed?
AFAIU backbeat api routes should just target backbeat-api, and there is no "direct" link between both services...
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.
Technically, shouldn't be needed. But I can't make it work without it for one of the apis : I think what happens is the queue processor is doing some setup in kafka or zookeeper on startup (function setupZkSiteNode in backbeat), which is then useful for the apis. I tried to set this up in zookeeper from the docker compose file directly but can't make it work
.github/docker-compose.backbeat.yml
Outdated
| @@ -0,0 +1,216 @@ | |||
| version: '3.8' | |||
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.
there is quite a bit of overlap between the docker-compose; a better way would be to have a single one, and possibly use profiles to identify optional parts.
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.
I tried it, it works, I wouldn't say its worse but it creates quite a large file and add some other complexity compared with fully independent docker compose files for each test
b89315a to
9ffcbce
Compare
9ffcbce to
0ad1669
Compare
ISSUE: CLDSRVCLT-5