-
Notifications
You must be signed in to change notification settings - Fork 2k
input: add pause/resume callbacks #10616
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
6a9272f
network: preserve nonblocking accept errors
edsiper 7b927bd
downstream: accept connections in event coroutines
edsiper 6a5e2eb
input: support fallible pause callbacks
edsiper 08c70ae
input_thread: handle fallible pause callbacks
edsiper 33d111e
http_server: add pause and resume controls
edsiper adb1bef
in_http: implement pause and resume callbacks
edsiper da4d158
in_opentelemetry: implement pause and resume callbacks
edsiper 3b80835
in_elasticsearch: implement pause and resume callbacks
edsiper 3033477
in_prometheus_remote_write: implement pause callbacks
edsiper 835844b
in_splunk: implement pause and resume callbacks
edsiper 1e93a09
tests: internal: preserve nonblocking accept errors
edsiper b8c4b9a
tests: internal: cover fallible pause callbacks
edsiper aa885e0
tests: internal: cover HTTP server session teardown
edsiper 3c610d3
tests: integration: expand input pause resume coverage
edsiper 43b1f44
workflows: add input HTTP lifecycle tests
edsiper 58f516e
tests: internal: cover pause callback failures
edsiper 354bf54
tests: integration: cover input lifecycle edge cases
edsiper a5d52b0
tests: integration: synchronize max connection checks
edsiper d3607d5
downstream: dispatch callbacks on parent stack
edsiper ead6761
http_server: run request callbacks on parent stack
edsiper d7fd232
tests: cover parent stack callback dispatch
edsiper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| name: Input HTTP pause and lifecycle tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| paths: | ||
| - '.github/workflows/input-http-pause-tests.yaml' | ||
| - 'include/fluent-bit/flb_connection.h' | ||
| - 'include/fluent-bit/flb_downstream.h' | ||
| - 'include/fluent-bit/http_server/**' | ||
| - 'plugins/in_elasticsearch/**' | ||
| - 'plugins/in_http/**' | ||
| - 'plugins/in_opentelemetry/**' | ||
| - 'plugins/in_prometheus_remote_write/**' | ||
| - 'plugins/in_splunk/**' | ||
| - 'src/flb_downstream.c' | ||
| - 'src/flb_network.c' | ||
| - 'src/http_server/**' | ||
| - 'tests/integration/scenarios/in_elasticsearch/**' | ||
| - 'tests/integration/scenarios/in_http/**' | ||
| - 'tests/integration/scenarios/in_http_max_connections/**' | ||
| - 'tests/integration/scenarios/in_opentelemetry/**' | ||
| - 'tests/integration/scenarios/in_prometheus_remote_write/**' | ||
| - 'tests/integration/scenarios/in_splunk/**' | ||
| - 'tests/integration/src/**' | ||
| - 'tests/internal/http_server.c' | ||
| push: | ||
| branches: | ||
| - master | ||
| paths: | ||
| - 'include/fluent-bit/flb_connection.h' | ||
| - 'include/fluent-bit/flb_downstream.h' | ||
| - 'include/fluent-bit/http_server/**' | ||
| - 'plugins/in_elasticsearch/**' | ||
| - 'plugins/in_http/**' | ||
| - 'plugins/in_opentelemetry/**' | ||
| - 'plugins/in_prometheus_remote_write/**' | ||
| - 'plugins/in_splunk/**' | ||
| - 'src/flb_downstream.c' | ||
| - 'src/flb_network.c' | ||
| - 'src/http_server/**' | ||
| - 'tests/integration/scenarios/in_elasticsearch/**' | ||
| - 'tests/integration/scenarios/in_http/**' | ||
| - 'tests/integration/scenarios/in_http_max_connections/**' | ||
| - 'tests/integration/scenarios/in_opentelemetry/**' | ||
| - 'tests/integration/scenarios/in_prometheus_remote_write/**' | ||
| - 'tests/integration/scenarios/in_splunk/**' | ||
| - 'tests/integration/src/**' | ||
| - 'tests/internal/http_server.c' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| focused-linux: | ||
| name: Focused Linux integration and Valgrind | ||
| runs-on: ubuntu-22.04 | ||
| timeout-minutes: 30 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Install build and test dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| bison \ | ||
| build-essential \ | ||
| cmake \ | ||
| flex \ | ||
| libbpf-dev \ | ||
| libssl-dev \ | ||
| libsystemd-dev \ | ||
| libyaml-dev \ | ||
| python3-venv \ | ||
| valgrind | ||
|
|
||
| - name: Configure and build | ||
| run: | | ||
| tests/integration/setup-venv.sh | ||
| cmake -S . -B build \ | ||
| -DFLB_TESTS_RUNTIME=On \ | ||
| -DFLB_TESTS_INTERNAL=On | ||
| cmake --build build -j8 | ||
|
|
||
| - name: Run focused integration tests | ||
| run: | | ||
| tests/integration/.venv/bin/python -m pytest -q \ | ||
| tests/integration/scenarios/in_http/tests/test_in_http_001.py \ | ||
| tests/integration/scenarios/in_http_max_connections/tests/test_in_http_max_connections_001.py \ | ||
| tests/integration/scenarios/in_elasticsearch/tests/test_in_elasticsearch_001.py \ | ||
| tests/integration/scenarios/in_opentelemetry/tests/test_in_opentelemetry_001.py \ | ||
| tests/integration/scenarios/in_prometheus_remote_write/tests/test_in_prometheus_remote_write_001.py \ | ||
| tests/integration/scenarios/in_splunk/tests/test_in_splunk_001.py \ | ||
| -k 'pause_resume or shutdown_while or async_tls_accept_timeout or max_connections or idle_timeout' | ||
|
|
||
| - name: Run focused integration tests with strict Valgrind | ||
| env: | ||
| VALGRIND: 1 | ||
| VALGRIND_STRICT: 1 | ||
| run: | | ||
| tests/integration/.venv/bin/python -m pytest -q \ | ||
| tests/integration/scenarios/in_http/tests/test_in_http_001.py \ | ||
| tests/integration/scenarios/in_http_max_connections/tests/test_in_http_max_connections_001.py \ | ||
| tests/integration/scenarios/in_elasticsearch/tests/test_in_elasticsearch_001.py \ | ||
| tests/integration/scenarios/in_opentelemetry/tests/test_in_opentelemetry_001.py \ | ||
| tests/integration/scenarios/in_prometheus_remote_write/tests/test_in_prometheus_remote_write_001.py \ | ||
| tests/integration/scenarios/in_splunk/tests/test_in_splunk_001.py \ | ||
| -k 'pause_resume or shutdown_while or async_tls_accept_timeout or max_connections or idle_timeout' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.