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

feat(plugin): new jobs plugin #726

Merged
merged 122 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
d4c92e4
- Jobs plugin initial commit
rustatian Jun 15, 2021
cee4bc4
- Update jobs sources
rustatian Jun 16, 2021
bdcfdd2
Merge remote-tracking branch 'origin/master' into feature/jobs_plugin
rustatian Jun 21, 2021
41bb9fa
- Rework dispatcher, pipeline, job (not completely)
rustatian Jun 21, 2021
260d69c
- Temporary turn off CI
rustatian Jun 22, 2021
1a2a1f4
- Remove all old code, reformat, fix linters, return GA
rustatian Jun 22, 2021
5627146
- Move common interfaces and structures to the 'common' folder
rustatian Jun 22, 2021
035e432
- Folders struct
rustatian Jun 22, 2021
effa24b
Merge branch 'master' into feature/jobs_plugin
rustatian Jun 22, 2021
b0e7ac1
- Update arch, pluign
rustatian Jun 23, 2021
7fc0995
- Swithc from value to pointer to the pool configuration. Interface
rustatian Jun 23, 2021
521aeb8
- Add PQ (priority_queue) mock
rustatian Jun 23, 2021
28f8182
- Fix broadcast tests panic
rustatian Jun 23, 2021
64d41f6
- Update logger for the broadcast tests
rustatian Jun 24, 2021
09041fe
Merge remote-tracking branch 'origin/master' into feature/jobs_plugin
rustatian Jun 25, 2021
ad1ca84
- Update jobs interface
rustatian Jun 25, 2021
53e50a0
Merge remote-tracking branch 'origin/master' into feature/jobs_plugin
rustatian Jun 26, 2021
d26749a
- Merge master branch
rustatian Jun 26, 2021
c0f808b
Merge remote-tracking branch 'origin/master' into feature/jobs_plugin
rustatian Jun 28, 2021
2ac3b24
- Update arch diagrams
rustatian Jun 30, 2021
a233ef3
- Remove unused methods from the QueueImpl
rustatian Jun 30, 2021
cd64c6c
Merge remote-tracking branch 'origin/master' into feature/jobs_plugin
rustatian Jun 30, 2021
a4b9d0c
- Remove Dispatcher
rustatian Jul 1, 2021
e4834e0
- joinTopics/Server as constants, do not allocate strings on every
rustatian Jul 2, 2021
677db79
- Initial binary_heap
rustatian Jul 3, 2021
1dd43e3
- Finish binary_heap
rustatian Jul 5, 2021
01ba1da
- Include PQ tests into the CI
rustatian Jul 5, 2021
300166e
- Update PQ tests
rustatian Jul 5, 2021
207739f
- Update PQ
rustatian Jul 5, 2021
2c78e93
Rework ephemeral and binary heaps
rustatian Jul 6, 2021
36bf922
Update Jobs interface...
rustatian Jul 6, 2021
127186a
Rework test env...
rustatian Jul 7, 2021
60c229c
Updated ephemeral plugin, PQ and protobuf...
rustatian Jul 7, 2021
b84a7cb
New Methods in the binary heap interface...
rustatian Jul 7, 2021
bb7b6a4
Add length limiter for the binary heaps data structure. After max length
rustatian Jul 8, 2021
c7becb2
Unlock binary heaps max length in the consume-rate test
rustatian Jul 8, 2021
0595648
Add pipeline and job plugin options...
rustatian Jul 8, 2021
eab69b1
maxLen for the binary heaps should be more than 0
rustatian Jul 8, 2021
5f84c5d
Remove duplicated test-helpers
rustatian Jul 8, 2021
4566f88
AMQP update...
rustatian Jul 8, 2021
4fcb597
AMQP job driver...
rustatian Jul 9, 2021
242022e
Merge branch 'master' into feature/jobs_plugin
rustatian Jul 9, 2021
fa57fa6
Properly parse amqp items (jobs).
rustatian Jul 9, 2021
96d437f
Update Consumer interface, List method returns []string of the
rustatian Jul 10, 2021
a90c34e
DeliveryMode -> amqp.Persistent
rustatian Jul 10, 2021
3de13b2
DeliveryMode -> amqp.Persistent for all Publish operations
rustatian Jul 10, 2021
435cfae
SQS skeleton
rustatian Jul 10, 2021
453eb10
Return structure instead of interface in places where that possible
rustatian Jul 10, 2021
cb2665d
Move interfaces to its consumers
rustatian Jul 10, 2021
589f759
Update informer interface to return slice of pointers (do not over-copy
rustatian Jul 11, 2021
510e193
unpack: use fast string convert
rustatian Jul 11, 2021
240b114
Dead letter exchange optimization. Cache for the DLX queues. If the
rustatian Jul 11, 2021
0f70f1e
Update JOBS interface, Renamed Consume -> Run.
rustatian Jul 11, 2021
e82e924
Finish dynamic declaration of the pipelines. Fix issue with
rustatian Jul 12, 2021
b924032
Implement Reset operation.
rustatian Jul 12, 2021
87971c4
Typo in the pool configuration.
rustatian Jul 12, 2021
aa1437d
Update JOBS interface, remove List() method, implemented on the root RPC
rustatian Jul 12, 2021
0be3e79
Return proper error type in the redial
rustatian Jul 12, 2021
ec7c049
Add JOBS tests to the Makefile and GitHub CI.
rustatian Jul 12, 2021
d099e47
SQS driver.
rustatian Jul 14, 2021
cd07985
Implement Pause/Resume/Stop
rustatian Jul 14, 2021
3ce3b5a
Merge remote-tracking branch 'origin/master' into feature/jobs_plugin
rustatian Jul 14, 2021
04fde6d
Merge master
rustatian Jul 14, 2021
7ea2277
Fix incorrect path in the CI. Implement FromPipeline for the sqs.
rustatian Jul 14, 2021
b38a0ff
NPE when stopping RMQ channels.
rustatian Jul 14, 2021
3483f96
Fix early return
rustatian Jul 14, 2021
0505556
Update SQS item.
rustatian Jul 14, 2021
f4feb30
Remove duplicated logging
rustatian Jul 14, 2021
9c51360
Started beanstalk driver. Add new Queue impl (not finished yet).
rustatian Jul 18, 2021
9784511
Remove channel from the Queue
rustatian Jul 18, 2021
02fc366
Worker watcher interface update.
rustatian Jul 19, 2021
9750751
Beanstalk initial commit
rustatian Jul 19, 2021
a149f83
Make beanstalk import not indirect
rustatian Jul 19, 2021
50cf036
Beanstalk driver alpha version ready.
rustatian Jul 20, 2021
b2da831
Fix AMQP context, add ID, job, other fields.
rustatian Jul 21, 2021
e4b9551
Update beanstalk redial algo.
rustatian Jul 21, 2021
182199a
Reduce tests timeout
rustatian Jul 21, 2021
05660fc
Update consumers, tests stabilization
rustatian Jul 22, 2021
609e614
Add headers parsing
rustatian Jul 22, 2021
fedf012
BC for the Pool, worker interfaces, pass/return payload by pointer
rustatian Jul 22, 2021
b28dbda
Passing by ptr is slightly faster:
rustatian Jul 22, 2021
92aa2e4
Format-ed
rustatian Jul 22, 2021
ae2bdd7
Update static_pool_batched test
rustatian Jul 22, 2021
6561c6a
Update Echo bench
rustatian Jul 22, 2021
83b246c
Benchmark tests comments
rustatian Jul 22, 2021
e9713a1
Fix AMQP bugs, add more amqp tests
rustatian Jul 22, 2021
2ceebd6
Linters
rustatian Jul 22, 2021
584e9ad
Initial tests for all drivers
rustatian Jul 22, 2021
71e3b0f
Update GA, codeconv bump to v2
rustatian Jul 22, 2021
ed36f3e
Remove completed TODOs from the beanstalk driver.
rustatian Jul 22, 2021
3f45d2c
Update beanstalk options. Fix tube priority (correctly pass to the Put
rustatian Jul 22, 2021
6764d0f
Remove time.Now() from beanstalk tube declaration
rustatian Jul 23, 2021
54a5c4f
EventPipeRun -> EvenPipeActive
rustatian Jul 23, 2021
c851b56
SQS configuration and tests update
rustatian Jul 23, 2021
f585c65
Use zap logger in AMQP tests instead of mocked (temporarly)
rustatian Jul 23, 2021
9079cc5
Tests refactoring
rustatian Jul 23, 2021
e88dfd5
Add AMQP initial durability test
rustatian Jul 23, 2021
c617566
SQS initial durability test
rustatian Jul 23, 2021
34c561a
Fix AMQP toxic
rustatian Jul 23, 2021
d73344d
Beanstalk initial durability test
rustatian Jul 24, 2021
6f65b5a
Uniform push to pipelines in the durability tests
rustatian Jul 24, 2021
c25616b
Remove unused code
rustatian Jul 24, 2021
685d7b4
Remove unused toPtr conversions
rustatian Jul 24, 2021
d721811
Mooore constants :)
rustatian Jul 24, 2021
1e59ec2
Initial support for the cancellation via context
rustatian Jul 27, 2021
c90c11b
Rework vec based on the channel. Use select statement with the default
rustatian Aug 1, 2021
31752d8
Update CI, move all tests to the single source of truth - makefile
rustatian Aug 2, 2021
606e217
In a rare cases, when user set small timeout to allocate a worker,
rustatian Aug 3, 2021
fba3d92
Update goridge to v3.2.0, update all frames operations.
rustatian Aug 9, 2021
0f16b25
Update response_protocol.md
rustatian Aug 9, 2021
d379c28
Add initial support for the php worker protocol.
rustatian Aug 9, 2021
a8a7f41
Add jobs protocol support for the AMQP driver
rustatian Aug 10, 2021
d449d9d
Add support for the jobs-worker protocol for the beanstalk,ephemeral and
rustatian Aug 10, 2021
3e2e9fb
Replace all 'localhost' with '127.0.0.1'. Fix default configuration and
rustatian Aug 11, 2021
aeb7d30
Increase timeout to 60s.
rustatian Aug 11, 2021
2924f4b
Add headers to the protocol
rustatian Aug 11, 2021
de37ed3
Add headers support to the jobs protocol
rustatian Aug 11, 2021
e855ae9
Remove attempts from the proto, and general jobs options
rustatian Aug 11, 2021
2d46006
Durable requeue algo. Update AMQP and Beanstalk tests to use mock
rustatian Aug 11, 2021
bf2f716
Made QoS production like
rustatian Aug 12, 2021
4169e83
Fix various bugs in the SQS. Implement SQS tests for the
rustatian Aug 12, 2021
ecbfc5c
Remove unneeded options, complete tests for the ephemeral, update proto
rustatian Aug 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
/tests
/bin
composer.json
vendor_php
vendor_php
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: daily


- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
- name: Run linter
uses: golangci/golangci-lint-action@v2 # Action page: <https://github.com/golangci/golangci-lint-action>
with:
version: v1.40 # without patch version
version: v1.41 # without patch version
only-new-issues: false # show only new issues if it's a pull request
args: --timeout=10m
38 changes: 4 additions & 34 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
php: [ "7.4", "8.0" ]
go: [ "1.16" ]
os: [ ubuntu-20.04 ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2 # action page: <https://github.com/actions/setup-go>
Expand Down Expand Up @@ -64,40 +64,10 @@ jobs:
- name: Install Go dependencies
run: go mod download

- name: Run golang tests on Linux
run: |
docker-compose -f ./tests/docker-compose.yaml up -d
mkdir ./coverage-ci
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/pipe.txt -covermode=atomic ./pkg/transport/pipe
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/socket.txt -covermode=atomic ./pkg/transport/socket
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/pool.txt -covermode=atomic ./pkg/pool
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/worker.txt -covermode=atomic ./pkg/worker
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/bst.txt -covermode=atomic ./pkg/bst
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/worker_stack.txt -covermode=atomic ./pkg/worker_watcher
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/http_config.txt -covermode=atomic ./plugins/http/config
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/server_cmd.txt -covermode=atomic ./plugins/server
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/http.txt -covermode=atomic ./tests/plugins/http
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/informer.txt -covermode=atomic ./tests/plugins/informer
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/reload.txt -covermode=atomic ./tests/plugins/reload
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/server.txt -covermode=atomic ./tests/plugins/server
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/service.txt -covermode=atomic ./tests/plugins/service
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/status.txt -covermode=atomic ./tests/plugins/status
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/config.txt -covermode=atomic ./tests/plugins/config
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/gzip.txt -covermode=atomic ./tests/plugins/gzip
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/headers.txt -covermode=atomic ./tests/plugins/headers
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/logger.txt -covermode=atomic ./tests/plugins/logger
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/metrics.txt -covermode=atomic ./tests/plugins/metrics
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/redis.txt -covermode=atomic ./tests/plugins/redis
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/resetter.txt -covermode=atomic ./tests/plugins/resetter
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/rpc.txt -covermode=atomic ./tests/plugins/rpc
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/kv_plugin.txt -covermode=atomic ./tests/plugins/kv
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/broadcast_plugin.txt -covermode=atomic ./tests/plugins/broadcast
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/websockets.txt -covermode=atomic ./tests/plugins/websockets
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/ws_origin.txt -covermode=atomic ./plugins/websockets
docker-compose -f ./tests/docker-compose.yaml down
cat ./coverage-ci/*.txt > ./coverage-ci/summary.txt
- name: Run golang tests with coverage
run: make test_coverage

- uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action>
- uses: codecov/codecov-action@v2 # Docs: <https://github.com/codecov/codecov-action>
with:
file: ./coverage-ci/summary.txt
fail_ci_if_error: false
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
CHANGELOG
=========

v2.4.0 (_.08.2021)
-------------------

## 💔 Internal BC:

- 🔨 Pool, worker interfaces: payload now passed and returned by pointer.

## 👀 New:

- ✏️ Long awaited, reworked `Jobs` plugin with pluggable drivers. Now you can allocate/destroy pipelines in the runtime.
Drivers included in the initial release: `RabbitMQ (0-9-1)`, `SQS v2`, `beanstalk`, `ephemeral`. All jobs can be prioritized now --> [PR](https://github.com/spiral/roadrunner/pull/726)

## 🩹 Fixes:

- 🐛 Fix:

## 📈 Summary:

- RR Milestone [2.4.0]()

---

v2.3.2 (14.07.2021)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[version]: https://www.contributor-covenant.org/version/2/0/code_of_conduct/
138 changes: 75 additions & 63 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,56 @@
SHELL = /bin/sh

test_coverage:
docker-compose -f tests/docker-compose.yaml up -d --remove-orphans
rm -rf coverage
mkdir coverage
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/pipe.out -covermode=atomic ./pkg/transport/pipe
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/socket.out -covermode=atomic ./pkg/transport/socket
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/pool.out -covermode=atomic ./pkg/pool
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/worker.out -covermode=atomic ./pkg/worker
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/worker_stack.out -covermode=atomic ./pkg/worker_watcher
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/bst.out -covermode=atomic ./pkg/bst
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/http.out -covermode=atomic ./tests/plugins/http
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/http_config.out -covermode=atomic ./plugins/http/config
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/server_cmd.out -covermode=atomic ./plugins/server
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/informer.out -covermode=atomic ./tests/plugins/informer
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/reload.out -covermode=atomic ./tests/plugins/reload
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/server.out -covermode=atomic ./tests/plugins/server
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/service.out -covermode=atomic ./tests/plugins/service
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/status.out -covermode=atomic ./tests/plugins/status
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/config.out -covermode=atomic ./tests/plugins/config
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/gzip.out -covermode=atomic ./tests/plugins/gzip
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/headers.out -covermode=atomic ./tests/plugins/headers
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/logger.out -covermode=atomic ./tests/plugins/logger
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/metrics.out -covermode=atomic ./tests/plugins/metrics
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/redis.out -covermode=atomic ./tests/plugins/redis
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/resetter.out -covermode=atomic ./tests/plugins/resetter
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/rpc.out -covermode=atomic ./tests/plugins/rpc
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/kv_plugin.out -covermode=atomic ./tests/plugins/kv
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/broadcast_plugin.out -covermode=atomic ./tests/plugins/broadcast
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/ws_plugin.out -covermode=atomic ./tests/plugins/websockets
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/ws_origin.out -covermode=atomic ./plugins/websockets
cat ./coverage/*.out > ./coverage/summary.out
docker-compose -f tests/docker-compose.yaml down
docker-compose -f tests/env/docker-compose.yaml up -d --remove-orphans
rm -rf coverage-ci
mkdir ./coverage-ci
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/pipe.txt -covermode=atomic ./pkg/transport/pipe
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/socket.txt -covermode=atomic ./pkg/transport/socket
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/pool.txt -covermode=atomic ./pkg/pool
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/worker.txt -covermode=atomic ./pkg/worker
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/bst.txt -covermode=atomic ./pkg/bst
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/pq.txt -covermode=atomic ./pkg/priority_queue
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/worker_stack.txt -covermode=atomic ./pkg/worker_watcher
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/http_config.txt -covermode=atomic ./plugins/http/config
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/server_cmd.txt -covermode=atomic ./plugins/server
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/struct_jobs.txt -covermode=atomic ./plugins/jobs/job
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/pipeline_jobs.txt -covermode=atomic ./plugins/jobs/pipeline
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/http.txt -covermode=atomic ./tests/plugins/http
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/informer.txt -covermode=atomic ./tests/plugins/informer
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/reload.txt -covermode=atomic ./tests/plugins/reload
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/server.txt -covermode=atomic ./tests/plugins/server
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/service.txt -covermode=atomic ./tests/plugins/service
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/status.txt -covermode=atomic ./tests/plugins/status
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/config.txt -covermode=atomic ./tests/plugins/config
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/gzip.txt -covermode=atomic ./tests/plugins/gzip
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/headers.txt -covermode=atomic ./tests/plugins/headers
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/logger.txt -covermode=atomic ./tests/plugins/logger
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/metrics.txt -covermode=atomic ./tests/plugins/metrics
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/redis.txt -covermode=atomic ./tests/plugins/redis
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/resetter.txt -covermode=atomic ./tests/plugins/resetter
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/rpc.txt -covermode=atomic ./tests/plugins/rpc
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/kv_plugin.txt -covermode=atomic ./tests/plugins/kv
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/broadcast_plugin.txt -covermode=atomic ./tests/plugins/broadcast
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/websockets.txt -covermode=atomic ./tests/plugins/websockets
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/ws_origin.txt -covermode=atomic ./plugins/websockets
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/jobs_core.txt -covermode=atomic ./tests/plugins/jobs
cat ./coverage-ci/*.txt > ./coverage-ci/summary.txt
docker-compose -f tests/env/docker-compose.yaml down

test: ## Run application tests
docker-compose -f tests/docker-compose.yaml up -d
docker-compose -f tests/env/docker-compose.yaml up -d
go test -v -race -tags=debug ./pkg/transport/pipe
go test -v -race -tags=debug ./pkg/transport/socket
go test -v -race -tags=debug ./pkg/pool
go test -v -race -tags=debug ./pkg/worker
go test -v -race -tags=debug ./pkg/worker_watcher
go test -v -race -tags=debug ./pkg/bst
go test -v -race -tags=debug ./tests/plugins/http
go test -v -race -tags=debug ./pkg/priority_queue
go test -v -race -tags=debug ./plugins/jobs/job
go test -v -race -tags=debug ./plugins/jobs/pipeline
go test -v -race -tags=debug ./plugins/http/config
go test -v -race -tags=debug ./plugins/server
go test -v -race -tags=debug ./tests/plugins/http
go test -v -race -tags=debug ./tests/plugins/informer
go test -v -race -tags=debug ./tests/plugins/reload
go test -v -race -tags=debug ./tests/plugins/server
Expand All @@ -65,34 +72,39 @@ test: ## Run application tests
go test -v -race -tags=debug ./tests/plugins/broadcast
go test -v -race -tags=debug ./tests/plugins/websockets
go test -v -race -tags=debug ./plugins/websockets
docker-compose -f tests/docker-compose.yaml down
go test -v -race -tags=debug ./tests/plugins/jobs
docker-compose -f tests/env/docker-compose.yaml down

testGo1.17beta1: ## Run application tests
docker-compose -f tests/docker-compose.yaml up -d
go1.17beta1 test -v -race -tags=debug ./pkg/transport/pipe
go1.17beta1 test -v -race -tags=debug ./pkg/transport/socket
go1.17beta1 test -v -race -tags=debug ./pkg/pool
go1.17beta1 test -v -race -tags=debug ./pkg/worker
go1.17beta1 test -v -race -tags=debug ./pkg/worker_watcher
go1.17beta1 test -v -race -tags=debug ./pkg/bst
go1.17beta1 test -v -race -tags=debug ./tests/plugins/http
go1.17beta1 test -v -race -tags=debug ./plugins/http/config
go1.17beta1 test -v -race -tags=debug ./plugins/server
go1.17beta1 test -v -race -tags=debug ./tests/plugins/informer
go1.17beta1 test -v -race -tags=debug ./tests/plugins/reload
go1.17beta1 test -v -race -tags=debug ./tests/plugins/server
go1.17beta1 test -v -race -tags=debug ./tests/plugins/service
go1.17beta1 test -v -race -tags=debug ./tests/plugins/status
go1.17beta1 test -v -race -tags=debug ./tests/plugins/config
go1.17beta1 test -v -race -tags=debug ./tests/plugins/gzip
go1.17beta1 test -v -race -tags=debug ./tests/plugins/headers
go1.17beta1 test -v -race -tags=debug ./tests/plugins/logger
go1.17beta1 test -v -race -tags=debug ./tests/plugins/metrics
go1.17beta1 test -v -race -tags=debug ./tests/plugins/redis
go1.17beta1 test -v -race -tags=debug ./tests/plugins/resetter
go1.17beta1 test -v -race -tags=debug ./tests/plugins/rpc
go1.17beta1 test -v -race -tags=debug ./tests/plugins/kv
go1.17beta1 test -v -race -tags=debug ./tests/plugins/websockets
go1.17beta1 test -v -race -tags=debug ./tests/plugins/broadcast
go1.17beta1 test -v -race -tags=debug ./plugins/websockets
docker-compose -f tests/docker-compose.yaml down
testGo1.17rc1: ## Run application tests
docker-compose -f tests/env/docker-compose.yaml up -d
go1.17rc1 test -v -race -tags=debug ./pkg/transport/pipe
go1.17rc1 test -v -race -tags=debug ./pkg/transport/socket
go1.17rc1 test -v -race -tags=debug ./pkg/pool
go1.17rc1 test -v -race -tags=debug ./pkg/worker
go1.17rc1 test -v -race -tags=debug ./pkg/worker_watcher
go1.17rc1 test -v -race -tags=debug ./pkg/bst
go1.17rc1 test -v -race -tags=debug ./pkg/priority_queue
go1.17rc1 test -v -race -tags=debug ./plugins/jobs/job
go1.17rc1 test -v -race -tags=debug ./plugins/jobs/pipeline
go1.17rc1 test -v -race -tags=debug ./plugins/http/config
go1.17rc1 test -v -race -tags=debug ./plugins/server
go1.17rc1 test -v -race -tags=debug ./plugins/websockets
go1.17rc1 test -v -race -tags=debug ./tests/plugins/http
go1.17rc1 test -v -race -tags=debug ./tests/plugins/informer
go1.17rc1 test -v -race -tags=debug ./tests/plugins/reload
go1.17rc1 test -v -race -tags=debug ./tests/plugins/server
go1.17rc1 test -v -race -tags=debug ./tests/plugins/service
go1.17rc1 test -v -race -tags=debug ./tests/plugins/status
go1.17rc1 test -v -race -tags=debug ./tests/plugins/config
go1.17rc1 test -v -race -tags=debug ./tests/plugins/gzip
go1.17rc1 test -v -race -tags=debug ./tests/plugins/headers
go1.17rc1 test -v -race -tags=debug ./tests/plugins/logger
go1.17rc1 test -v -race -tags=debug ./tests/plugins/metrics
go1.17rc1 test -v -race -tags=debug ./tests/plugins/redis
go1.17rc1 test -v -race -tags=debug ./tests/plugins/resetter
go1.17rc1 test -v -race -tags=debug ./tests/plugins/rpc
go1.17rc1 test -v -race -tags=debug ./tests/plugins/kv
go1.17rc1 test -v -race -tags=debug ./tests/plugins/websockets
go1.17rc1 test -v -race -tags=debug ./tests/plugins/broadcast
go1.17rc1 test -v -race -tags=debug ./tests/plugins/jobs
docker-compose -f tests/env/docker-compose.yaml down
4 changes: 0 additions & 4 deletions bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ status = [
'Linux / Build (Go 1.15, PHP 7.4, OS ubuntu-20.04)',
'Linux / Build (Go 1.16, PHP 8.0, OS ubuntu-20.04)',
'Linux / Build (Go 1.15, PHP 8.0, OS ubuntu-20.04)',
'macOS / Build (Go 1.16, PHP 7.4, OS macos-latest)',
'macOS / Build (Go 1.15, PHP 7.4, OS macos-latest)',
'macOS / Build (Go 1.16, PHP 8.0, OS macos-latest)',
'macOS / Build (Go 1.15, PHP 8.0, OS macos-latest)',
'Linux / Golang-CI (lint) ',
]
required_approvals = 0
Expand Down
9 changes: 9 additions & 0 deletions common/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
Package common used to collect common interfaces/structures which might be implemented (or imported) by a different plugins.
For example, 'pubsub' interface might be implemented by memory, redis, websockets and many other plugins.

Folders:
- kv - contains KV interfaces and structures
- pubsub - contains pub-sub interfaces and structures
*/
package common
Loading