diff --git a/.github/workflows/ext/check_license.py b/.github/workflows/ext/check_license.py new file mode 100644 index 0000000000..0d16e9f9d6 --- /dev/null +++ b/.github/workflows/ext/check_license.py @@ -0,0 +1,91 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Script for checking license header in C++/Python sources. +Usage: +python3 check_license.py [--path PATH] +optional arguments: + --path PATH to the directory containing sources to check +""" +import argparse +import glob +from pathlib import Path +import re + + +def load_license_template(path: str) -> list[re.Pattern]: + with open(path, "r") as f: + lines = f.readlines() + + return [re.compile(line) for line in lines] + + +def check_license(fpath: str, expressions: list[re.Pattern]) -> bool: + with open(fpath, "r") as f: + ln = f.readline() + if ln.startswith("#!"): # skip possible shebang at the beginning of the file + ln = f.readline() + + for expr in expressions: + if not expr.match(ln): + print(f"{fpath}:") + print(ln) + print("") + return False + ln = f.readline() + return True + + +def main() -> None: + parser = argparse.ArgumentParser( + prog=f"python3 -m {check_license.__name__}", + description="License checker", + ) + + parser.add_argument( + "--path", + default=".", + type=str, + action="store", + metavar="PATH", + help="PATH to the directory containing sources to check", + ) + + args = parser.parse_args() + + checks = { + "*.cpp": "cxx_license_template.txt", + "*.h": "cxx_license_template.txt", + "*.c": "cxx_license_template.txt", + "*.hpp": "cxx_license_template.txt", + "*.py": "python_license_template.txt", + } + + script_dir = Path(__file__).absolute().parent + + for ext, template in checks.items(): + fpaths = glob.glob(args.path + "/**/" + ext, recursive=True) + fpaths.sort() + if len(fpaths) == 0: + continue + + expressions = load_license_template(script_dir.joinpath(template)) + for fpath in fpaths: + check_license(fpath, expressions) + + +if __name__ == "__main__": + main() diff --git a/.github/workflows/ext/cxx_license_template.txt b/.github/workflows/ext/cxx_license_template.txt new file mode 100644 index 0000000000..21b76dfc8a --- /dev/null +++ b/.github/workflows/ext/cxx_license_template.txt @@ -0,0 +1,14 @@ +// Copyright [\d-]+ Bloomberg Finance L.P. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 \(the "License"\); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. diff --git a/.github/workflows/ext/python_license_template.txt b/.github/workflows/ext/python_license_template.txt new file mode 100644 index 0000000000..fcd622326f --- /dev/null +++ b/.github/workflows/ext/python_license_template.txt @@ -0,0 +1,14 @@ +# Copyright [\d-]+ Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 \(the "License"\); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/.github/workflows/license-check.yaml b/.github/workflows/license-check.yaml new file mode 100644 index 0000000000..352c5aa79a --- /dev/null +++ b/.github/workflows/license-check.yaml @@ -0,0 +1,23 @@ +name: License check + +on: + pull_request: + types: + - "opened" + - "reopened" + - "synchronize" + - "labeled" + - "unlabeled" + +jobs: + license_check: + runs-on: ubuntu-latest + name: License Check + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: license check + run: | + python3 ${{ github.workspace }}/.github/workflows/ext/check_license.py --path=${{ github.workspace }} | tee missing_licenses.txt + if [ -s missing_licenses.txt ]; then exit 1; fi diff --git a/src/groups/mqb/mqbc/mqbc_clusterdata.cpp b/src/groups/mqb/mqbc/mqbc_clusterdata.cpp index fe7023ee35..3d60e190e1 100644 --- a/src/groups/mqb/mqbc/mqbc_clusterdata.cpp +++ b/src/groups/mqb/mqbc/mqbc_clusterdata.cpp @@ -8,10 +8,10 @@ // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // mqbc_clusterdata.cpp -*-C++-*- #include diff --git a/src/integration-tests/__init__.py b/src/integration-tests/__init__.py index e69de29bb2..1dfd29ae62 100644 --- a/src/integration-tests/__init__.py +++ b/src/integration-tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/integration-tests/conftest.py b/src/integration-tests/conftest.py index 575e637b75..3a586edc4a 100644 --- a/src/integration-tests/conftest.py +++ b/src/integration-tests/conftest.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import contextlib import logging import pytest diff --git a/src/integration-tests/test_admin_client.py b/src/integration-tests/test_admin_client.py index 9d8e33e898..bf108680f3 100644 --- a/src/integration-tests/test_admin_client.py +++ b/src/integration-tests/test_admin_client.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ This suite of test cases exercises admin session connection and some basic commands. diff --git a/src/integration-tests/test_alarms.py b/src/integration-tests/test_alarms.py index d18ab114b1..7728f99a9b 100644 --- a/src/integration-tests/test_alarms.py +++ b/src/integration-tests/test_alarms.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Testing broker ALARMS. """ diff --git a/src/integration-tests/test_appids.py b/src/integration-tests/test_appids.py index 66938dd2fa..0a002366b3 100644 --- a/src/integration-tests/test_appids.py +++ b/src/integration-tests/test_appids.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import time from typing import List diff --git a/src/integration-tests/test_auto_subscriptions.py b/src/integration-tests/test_auto_subscriptions.py index da3d6d72e7..fd8100d256 100644 --- a/src/integration-tests/test_auto_subscriptions.py +++ b/src/integration-tests/test_auto_subscriptions.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import blazingmq.dev.it.testconstants as tc import pytest diff --git a/src/integration-tests/test_breathing.py b/src/integration-tests/test_breathing.py index 0ec93f6cff..a6ef99e063 100644 --- a/src/integration-tests/test_breathing.py +++ b/src/integration-tests/test_breathing.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ This test suite exercises basic routing functionality to in the presence of all types of queues. diff --git a/src/integration-tests/test_broadcast.py b/src/integration-tests/test_broadcast.py index 765f5fb37b..38193c11f4 100644 --- a/src/integration-tests/test_broadcast.py +++ b/src/integration-tests/test_broadcast.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from itertools import islice import blazingmq.dev.it.testconstants as tc diff --git a/src/integration-tests/test_cluster_node_shutdown.py b/src/integration-tests/test_cluster_node_shutdown.py index f1b3a094e7..8588c13657 100644 --- a/src/integration-tests/test_cluster_node_shutdown.py +++ b/src/integration-tests/test_cluster_node_shutdown.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Integration test that shuts down a cluster node and confirms that the system recovers and keeps working as expected. For detailed documentation and diagrams diff --git a/src/integration-tests/test_compression.py b/src/integration-tests/test_compression.py index 65f3e8a4d5..a4e4b18af0 100644 --- a/src/integration-tests/test_compression.py +++ b/src/integration-tests/test_compression.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Integration test that tests the successful sending and receiving of compressed payload in various scenarios as listed below: diff --git a/src/integration-tests/test_confirm_after_killing_primary.py b/src/integration-tests/test_confirm_after_killing_primary.py index 6899d90d63..bb07879f55 100644 --- a/src/integration-tests/test_confirm_after_killing_primary.py +++ b/src/integration-tests/test_confirm_after_killing_primary.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ This test case verifies fix for the broker crash when virtual iterator goes out of sync while processing CONFIRM after converting priority queue to diff --git a/src/integration-tests/test_confirms_buffering.py b/src/integration-tests/test_confirms_buffering.py index eb09a95fa9..d82761c075 100644 --- a/src/integration-tests/test_confirms_buffering.py +++ b/src/integration-tests/test_confirms_buffering.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import blazingmq.dev.it.testconstants as tc from blazingmq.dev.it.fixtures import ( # pylint: disable=unused-import Cluster, diff --git a/src/integration-tests/test_fanout_priorities.py b/src/integration-tests/test_fanout_priorities.py index 5c123d349a..87df096748 100644 --- a/src/integration-tests/test_fanout_priorities.py +++ b/src/integration-tests/test_fanout_priorities.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ This suite of test cases exercises functionality of prioritizing fanout consumers . diff --git a/src/integration-tests/test_graceful_shutdown.py b/src/integration-tests/test_graceful_shutdown.py index c6cdb0a6a9..ef5c4184f6 100644 --- a/src/integration-tests/test_graceful_shutdown.py +++ b/src/integration-tests/test_graceful_shutdown.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import functools import re from typing import Iterator diff --git a/src/integration-tests/test_leader_node_delay.py b/src/integration-tests/test_leader_node_delay.py index 01c69c70ab..846b423046 100644 --- a/src/integration-tests/test_leader_node_delay.py +++ b/src/integration-tests/test_leader_node_delay.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Integration test that temporarily suspends the leader node, waits for followers to notice the inactivity of the leader ("leader passive"), then resumes the diff --git a/src/integration-tests/test_list_messages.py b/src/integration-tests/test_list_messages.py index e78de5d77f..aab3a78f1d 100644 --- a/src/integration-tests/test_list_messages.py +++ b/src/integration-tests/test_list_messages.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import time import blazingmq.dev.it.testconstants as tc diff --git a/src/integration-tests/test_maxqueues.py b/src/integration-tests/test_maxqueues.py index 85596212f0..57fc284eb0 100644 --- a/src/integration-tests/test_maxqueues.py +++ b/src/integration-tests/test_maxqueues.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import blazingmq.dev.it.testconstants as tc from blazingmq.dev.it.fixtures import ( # pylint: disable=unused-import Cluster, diff --git a/src/integration-tests/test_maxunconfirmed.py b/src/integration-tests/test_maxunconfirmed.py index 2322538155..2938e6eed7 100644 --- a/src/integration-tests/test_maxunconfirmed.py +++ b/src/integration-tests/test_maxunconfirmed.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import blazingmq.dev.it.testconstants as tc from blazingmq.dev.it.fixtures import ( # pylint: disable=unused-import Cluster, diff --git a/src/integration-tests/test_poison_messages.py b/src/integration-tests/test_poison_messages.py index 001e4b4f14..b35dff60ab 100644 --- a/src/integration-tests/test_poison_messages.py +++ b/src/integration-tests/test_poison_messages.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Testing poison message detection and handling. """ diff --git a/src/integration-tests/test_puts_retransmission.py b/src/integration-tests/test_puts_retransmission.py index caea628c10..829d9860bf 100644 --- a/src/integration-tests/test_puts_retransmission.py +++ b/src/integration-tests/test_puts_retransmission.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # pylint: disable=protected-access; TODO: fix from pathlib import Path diff --git a/src/integration-tests/test_queue_close.py b/src/integration-tests/test_queue_close.py index 13183147d9..80d2587815 100644 --- a/src/integration-tests/test_queue_close.py +++ b/src/integration-tests/test_queue_close.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Integration test that tests closing a queue when the broker is down. """ diff --git a/src/integration-tests/test_queue_reopen.py b/src/integration-tests/test_queue_reopen.py index 84f65353e2..8bafaf170b 100644 --- a/src/integration-tests/test_queue_reopen.py +++ b/src/integration-tests/test_queue_reopen.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Integration tests for queue re-open scenarios. """ diff --git a/src/integration-tests/test_reconfigure_domains.py b/src/integration-tests/test_reconfigure_domains.py index 995ad3825b..89aca318a0 100644 --- a/src/integration-tests/test_reconfigure_domains.py +++ b/src/integration-tests/test_reconfigure_domains.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Testing runtime reconfiguration of domains. """ diff --git a/src/integration-tests/test_reopen_queue_failure.py b/src/integration-tests/test_reopen_queue_failure.py index 8817a87968..e640021584 100644 --- a/src/integration-tests/test_reopen_queue_failure.py +++ b/src/integration-tests/test_reopen_queue_failure.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ This test case verifies a fix for the broker crash when replica or proxy node crashes while processing a configure or close queue response after a reopen diff --git a/src/integration-tests/test_restart.py b/src/integration-tests/test_restart.py index 5d97cf44aa..064f0c0768 100644 --- a/src/integration-tests/test_restart.py +++ b/src/integration-tests/test_restart.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Integration test that tests some basic things while restarting *entire* cluster in the middle of things. Note that this test does not test the HA diff --git a/src/integration-tests/test_strong_consistency.py b/src/integration-tests/test_strong_consistency.py index a70ae7e3f9..d324a8a91b 100644 --- a/src/integration-tests/test_strong_consistency.py +++ b/src/integration-tests/test_strong_consistency.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import contextlib import blazingmq.dev.it.testconstants as tc diff --git a/src/integration-tests/test_subscriptions.py b/src/integration-tests/test_subscriptions.py index fc792cd9c6..f5af63e22a 100644 --- a/src/integration-tests/test_subscriptions.py +++ b/src/integration-tests/test_subscriptions.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Tests for subscriptions. diff --git a/src/plugins/bmqprometheus/tests/bmqprometheus_prometheusstatconsumer_test.py b/src/plugins/bmqprometheus/tests/bmqprometheus_prometheusstatconsumer_test.py index fe7f700ef2..2ec1c66ba1 100755 --- a/src/plugins/bmqprometheus/tests/bmqprometheus_prometheusstatconsumer_test.py +++ b/src/plugins/bmqprometheus/tests/bmqprometheus_prometheusstatconsumer_test.py @@ -1,4 +1,19 @@ #!/usr/bin/env python3 +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Integration tests for BlazingMQ Prometheus plugin. Test plan: diff --git a/src/python/bin/tweakgen b/src/python/bin/tweakgen index 33aef86bda..5c5ebb2793 100755 --- a/src/python/bin/tweakgen +++ b/src/python/bin/tweakgen @@ -1,4 +1,18 @@ #!/bin/env python +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """ Tweak generator. @@ -66,7 +80,21 @@ def generate(cls: Type, indent: int, file: IO[str]): ) -HEADER = r''' +HEADER = r'''# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ GENERATED CODE - DO NOT EDIT """ diff --git a/src/python/blazingmq/__init__.py b/src/python/blazingmq/__init__.py index e69de29bb2..1dfd29ae62 100644 --- a/src/python/blazingmq/__init__.py +++ b/src/python/blazingmq/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/python/blazingmq/core.py b/src/python/blazingmq/core.py index c789ca4a76..456d79bb05 100644 --- a/src/python/blazingmq/core.py +++ b/src/python/blazingmq/core.py @@ -1,2 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + class BMQError(RuntimeError): "Base class for all exceptions raised by BMQ." diff --git a/src/python/blazingmq/dev/__init__.py b/src/python/blazingmq/dev/__init__.py index e69de29bb2..1dfd29ae62 100644 --- a/src/python/blazingmq/dev/__init__.py +++ b/src/python/blazingmq/dev/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/python/blazingmq/dev/configurator/__init__.py b/src/python/blazingmq/dev/configurator/__init__.py index 73dba05e78..0ea7b8e613 100644 --- a/src/python/blazingmq/dev/configurator/__init__.py +++ b/src/python/blazingmq/dev/configurator/__init__.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Support for creating a "configurator", i.e. a collection of directories and scripts for running a cluster. diff --git a/src/python/blazingmq/dev/configurator/__main__.py b/src/python/blazingmq/dev/configurator/__main__.py index eb30f058e4..4fe6984a54 100644 --- a/src/python/blazingmq/dev/configurator/__main__.py +++ b/src/python/blazingmq/dev/configurator/__main__.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Create a configurator for running a cluster. diff --git a/src/python/blazingmq/dev/fuzztest/__init__.py b/src/python/blazingmq/dev/fuzztest/__init__.py index 92629bb078..644a0bd3dd 100644 --- a/src/python/blazingmq/dev/fuzztest/__init__.py +++ b/src/python/blazingmq/dev/fuzztest/__init__.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Utilities for fuzz testing BlazingMQ Broker. diff --git a/src/python/blazingmq/dev/fuzztest/__main__.py b/src/python/blazingmq/dev/fuzztest/__main__.py index eb10f3f62c..5e00bf068f 100644 --- a/src/python/blazingmq/dev/fuzztest/__main__.py +++ b/src/python/blazingmq/dev/fuzztest/__main__.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Main function for running fuzz testing with a BlazingMQ Broker. usage: diff --git a/src/python/blazingmq/dev/it/__init__.py b/src/python/blazingmq/dev/it/__init__.py index 84251b6db2..6550302979 100644 --- a/src/python/blazingmq/dev/it/__init__.py +++ b/src/python/blazingmq/dev/it/__init__.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """BlazingMQ Integration Tests diff --git a/src/python/blazingmq/dev/it/cluster.py b/src/python/blazingmq/dev/it/cluster.py index 630f1119c7..e5d92daacb 100644 --- a/src/python/blazingmq/dev/it/cluster.py +++ b/src/python/blazingmq/dev/it/cluster.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Run a cluster.""" import collections diff --git a/src/python/blazingmq/dev/it/fixtures.py b/src/python/blazingmq/dev/it/fixtures.py index 7a28b7c764..bda08bc5a4 100644 --- a/src/python/blazingmq/dev/it/fixtures.py +++ b/src/python/blazingmq/dev/it/fixtures.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ blazingmq.dev.it.fixtures diff --git a/src/python/blazingmq/dev/it/logging.py b/src/python/blazingmq/dev/it/logging.py index 5ceb34b35d..744de69ca2 100644 --- a/src/python/blazingmq/dev/it/logging.py +++ b/src/python/blazingmq/dev/it/logging.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This contains the bmqit configuration; set in 'conftest.py' and used in # 'fixtures'py. diff --git a/src/python/blazingmq/dev/it/process/__init__.py b/src/python/blazingmq/dev/it/process/__init__.py index 6594bfab75..0c9f0b9cc6 100644 --- a/src/python/blazingmq/dev/it/process/__init__.py +++ b/src/python/blazingmq/dev/it/process/__init__.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """BMQ Integration Tests PURPOSE: Provide wrappers for processes. diff --git a/src/python/blazingmq/dev/it/process/admin.py b/src/python/blazingmq/dev/it/process/admin.py index 5f6b646b3a..70a994b744 100644 --- a/src/python/blazingmq/dev/it/process/admin.py +++ b/src/python/blazingmq/dev/it/process/admin.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ blazingmq.dev.it.process.admin diff --git a/src/python/blazingmq/dev/it/process/bmqproc.py b/src/python/blazingmq/dev/it/process/bmqproc.py index e69503118c..bccc0281bd 100644 --- a/src/python/blazingmq/dev/it/process/bmqproc.py +++ b/src/python/blazingmq/dev/it/process/bmqproc.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from blazingmq.dev.it.process.proc import Process import blazingmq.dev.it.logging diff --git a/src/python/blazingmq/dev/it/process/broker.py b/src/python/blazingmq/dev/it/process/broker.py index e5e1443726..98348b273b 100644 --- a/src/python/blazingmq/dev/it/process/broker.py +++ b/src/python/blazingmq/dev/it/process/broker.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ blazingmq.dev.it.process.broker diff --git a/src/python/blazingmq/dev/it/process/client.py b/src/python/blazingmq/dev/it/process/client.py index f7fa358aea..10182085d9 100644 --- a/src/python/blazingmq/dev/it/process/client.py +++ b/src/python/blazingmq/dev/it/process/client.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ blazingmq.dev.it.process.client diff --git a/src/python/blazingmq/dev/it/process/proc.py b/src/python/blazingmq/dev/it/process/proc.py index 09f65706c8..04b25d59e9 100644 --- a/src/python/blazingmq/dev/it/process/proc.py +++ b/src/python/blazingmq/dev/it/process/proc.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ blazingmq.dev.it.process.proc diff --git a/src/python/blazingmq/dev/it/process/tests/__init__.py b/src/python/blazingmq/dev/it/process/tests/__init__.py index e69de29bb2..1dfd29ae62 100644 --- a/src/python/blazingmq/dev/it/process/tests/__init__.py +++ b/src/python/blazingmq/dev/it/process/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/python/blazingmq/dev/it/process/tests/test_client.py b/src/python/blazingmq/dev/it/process/tests/test_client.py index 0e097214de..2913e73349 100644 --- a/src/python/blazingmq/dev/it/process/tests/test_client.py +++ b/src/python/blazingmq/dev/it/process/tests/test_client.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from blazingmq.dev.it.process.client import _bool_lower, _build_command diff --git a/src/python/blazingmq/dev/it/testconstants.py b/src/python/blazingmq/dev/it/testconstants.py index a5f9540409..ad048d2384 100644 --- a/src/python/blazingmq/dev/it/testconstants.py +++ b/src/python/blazingmq/dev/it/testconstants.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + DOMAIN_PRIORITY = "bmq.test.mmap.priority" DOMAIN_PRIORITY_SC = "bmq.test.mmap.priority.sc" DOMAIN_FANOUT = "bmq.test.mmap.fanout" diff --git a/src/python/blazingmq/dev/it/tests/__init__.py b/src/python/blazingmq/dev/it/tests/__init__.py index e69de29bb2..1dfd29ae62 100644 --- a/src/python/blazingmq/dev/it/tests/__init__.py +++ b/src/python/blazingmq/dev/it/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/python/blazingmq/dev/it/tests/test_logging.py b/src/python/blazingmq/dev/it/tests/test_logging.py index 7b443b0be3..2441ca3406 100644 --- a/src/python/blazingmq/dev/it/tests/test_logging.py +++ b/src/python/blazingmq/dev/it/tests/test_logging.py @@ -1,4 +1,19 @@ -from blazingmq.dev.it.logging import * +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from blazingmq.dev.it.logging import clip def test_clip(): diff --git a/src/python/blazingmq/dev/it/tests/test_tweaks.py b/src/python/blazingmq/dev/it/tests/test_tweaks.py index 3459027325..cc47c321d7 100644 --- a/src/python/blazingmq/dev/it/tests/test_tweaks.py +++ b/src/python/blazingmq/dev/it/tests/test_tweaks.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from blazingmq.dev.it.tweaks import tweak, TWEAK_ATTRIBUTE from blazingmq.dev.configurator import Configurator diff --git a/src/python/blazingmq/dev/it/tweaks/__init__.py b/src/python/blazingmq/dev/it/tweaks/__init__.py index 2636b6ddcc..d063dba50e 100644 --- a/src/python/blazingmq/dev/it/tweaks/__init__.py +++ b/src/python/blazingmq/dev/it/tweaks/__init__.py @@ -1,6 +1,21 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import logging import re -from typing import Any, Callable, List, Optional +from typing import Any, Callable from blazingmq.dev.configurator import Configurator diff --git a/src/python/blazingmq/dev/it/tweaks/generated.py b/src/python/blazingmq/dev/it/tweaks/generated.py index 841b80e721..24f8933aeb 100644 --- a/src/python/blazingmq/dev/it/tweaks/generated.py +++ b/src/python/blazingmq/dev/it/tweaks/generated.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ GENERATED CODE - DO NOT EDIT """ diff --git a/src/python/blazingmq/dev/it/util.py b/src/python/blazingmq/dev/it/util.py index cc28f390b9..c4bc123cfc 100644 --- a/src/python/blazingmq/dev/it/util.py +++ b/src/python/blazingmq/dev/it/util.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ blazingmq.dev.it.util diff --git a/src/python/blazingmq/dev/paths.py b/src/python/blazingmq/dev/paths.py index d0888934f7..fc819d0e8e 100644 --- a/src/python/blazingmq/dev/paths.py +++ b/src/python/blazingmq/dev/paths.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Provide a cache of paths (to build dir, to broker, etc), derived from this module's path, with possible overrides via environment variables. diff --git a/src/python/blazingmq/dev/processtools.py b/src/python/blazingmq/dev/processtools.py index 8e5b83e9f8..6cc4e13acf 100644 --- a/src/python/blazingmq/dev/processtools.py +++ b/src/python/blazingmq/dev/processtools.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Provide utilities to facilitate launching and manipulating processes. """ diff --git a/src/python/blazingmq/dev/pytest.py b/src/python/blazingmq/dev/pytest.py index 038099f05f..30a2afb8af 100644 --- a/src/python/blazingmq/dev/pytest.py +++ b/src/python/blazingmq/dev/pytest.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Provide various pytest utilities. """ diff --git a/src/python/blazingmq/dev/reserveport.py b/src/python/blazingmq/dev/reserveport.py index f1a66a99f5..8ddffed465 100644 --- a/src/python/blazingmq/dev/reserveport.py +++ b/src/python/blazingmq/dev/reserveport.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ blazingmq.dev.reserveport diff --git a/src/python/blazingmq/schemas/__init__.py b/src/python/blazingmq/schemas/__init__.py index 452eef94d0..d243437dd2 100644 --- a/src/python/blazingmq/schemas/__init__.py +++ b/src/python/blazingmq/schemas/__init__.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from blazingmq.schemas.mqbconf import ( BrokerIdentity, Consistency, diff --git a/src/python/blazingmq/schemas/broker.py b/src/python/blazingmq/schemas/broker.py index 229f6be3e5..8d961ecb70 100644 --- a/src/python/blazingmq/schemas/broker.py +++ b/src/python/blazingmq/schemas/broker.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ BlazingMQ Broker schemas. """ diff --git a/src/python/blazingmq/schemas/mqbcfg.py b/src/python/blazingmq/schemas/mqbcfg.py index 0d772af3c0..05fa6801ff 100644 --- a/src/python/blazingmq/schemas/mqbcfg.py +++ b/src/python/blazingmq/schemas/mqbcfg.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from dataclasses import dataclass, field from enum import Enum from typing import List, Optional diff --git a/src/python/blazingmq/schemas/mqbconf.py b/src/python/blazingmq/schemas/mqbconf.py index f2af15bba2..b16ec0fe37 100644 --- a/src/python/blazingmq/schemas/mqbconf.py +++ b/src/python/blazingmq/schemas/mqbconf.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from dataclasses import dataclass, field from decimal import Decimal from enum import Enum diff --git a/src/python/blazingmq/util/__init__.py b/src/python/blazingmq/util/__init__.py index e69de29bb2..1dfd29ae62 100644 --- a/src/python/blazingmq/util/__init__.py +++ b/src/python/blazingmq/util/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/python/blazingmq/util/logging.py b/src/python/blazingmq/util/logging.py index a9afbd74c4..50fff32660 100644 --- a/src/python/blazingmq/util/logging.py +++ b/src/python/blazingmq/util/logging.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Provide a mechanism for setting log levels from the command line. diff --git a/src/python/blazingmq/util/test/logging_test.py b/src/python/blazingmq/util/test/logging_test.py index 2594986649..e5f1d828e8 100644 --- a/src/python/blazingmq/util/test/logging_test.py +++ b/src/python/blazingmq/util/test/logging_test.py @@ -1,3 +1,18 @@ +# Copyright 2024 Bloomberg Finance L.P. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Test suite for blazingmq.util.logging. """