This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/main by this push:
new c503244db PROTON-2644: Fix Github workflow build to remove deprecation
warnings
c503244db is described below
commit c503244db60815b7f6800b6b1112b3f8c001441a
Author: Andrew Stitcher <[email protected]>
AuthorDate: Wed Apr 17 09:37:13 2024 -0400
PROTON-2644: Fix Github workflow build to remove deprecation warnings
It looks like the MacOS image/python actions are fixed now
Also removed the work around for Proton-2295 as the go version on MacOS
is no longer a problem.
---
.github/workflows/build.yml | 32 ++++++++++++++------------------
cpp/include/proton/work_queue.hpp | 2 +-
cpp/src/proactor_container_impl.cpp | 13 +++----------
3 files changed, 18 insertions(+), 29 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e45f36e8b..fbbbb6d90 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,21 +25,12 @@ jobs:
PKG_CONFIG_PATH: ${{matrix.pkg_config_path}}
VCPKG_DEFAULT_TRIPLET: x64-windows
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Create Build and Install directories
run: mkdir -p "${BuildDir}" "${InstallPrefix}"
shell: bash
-
- # PROTON-2295 avoid using go 1.15.3 on macOS, which is broken
- - if: runner.os == 'macOS'
- name: Setup go (Mac OS)
- uses: actions/setup-go@v3
- with:
- go-version: '^1.15.4'
-
- # PROTON-2644 upgrading setup-python to v4 breaks cmake discovery of
openssl on macOS
- name: Setup python
- uses: actions/setup-python@v3
+ uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
@@ -74,15 +65,20 @@ jobs:
run: cmake --build "${BuildDir}" --config ${BuildType} -t install
shell: bash
- name: Upload Install
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: qpid_proton_pkg_${{matrix.os}}_${{matrix.buildType}}
path: ${{env.InstallPrefix}}
- - name: Upload python packages
- uses: actions/upload-artifact@v3
+ - name: Upload python source
+ uses: actions/upload-artifact@v4
+ with:
+ name: python-src_${{matrix.os}}
+ path: ${{env.BuildDir}}/python/dist/*.tar.gz
+ - name: Upload python wheel
+ uses: actions/upload-artifact@v4
with:
- name: python-pkgs
- path: ${{env.BuildDir}}/python/dist
+ name: python-wheel_${{matrix.os}}
+ path: ${{env.BuildDir}}/python/dist/*.whl
- id: ctest
name: ctest
working-directory: ${{env.BuildDir}}
@@ -90,12 +86,12 @@ jobs:
shell: bash
- name: Upload Test results
if: always() && (steps.ctest.outcome == 'failure' || steps.ctest.outcome
== 'success')
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: Test_Results_${{matrix.os}}_${{matrix.buildType}}
path: ${{env.BuildDir}}/Testing/**/*.xml
- name: Upload Python & C build directories on failure
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
if: failure()
with:
name: Debug-python-C-BLD_${{matrix.os}}_${{matrix.buildType}}
diff --git a/cpp/include/proton/work_queue.hpp
b/cpp/include/proton/work_queue.hpp
index defe1aaa7..e917fa3ce 100644
--- a/cpp/include/proton/work_queue.hpp
+++ b/cpp/include/proton/work_queue.hpp
@@ -280,7 +280,7 @@ class work {
/// **Unsettled API**
///
/// Execute the piece of work
- void operator()() const { item_(); }
+ void operator()() { item_(); }
~work() = default;
diff --git a/cpp/src/proactor_container_impl.cpp
b/cpp/src/proactor_container_impl.cpp
index 228002e38..e965be730 100644
--- a/cpp/src/proactor_container_impl.cpp
+++ b/cpp/src/proactor_container_impl.cpp
@@ -542,16 +542,9 @@ void container::impl::run_timer_jobs() {
// NB. We copied the due tasks in reverse order so execute from end
for (int i = tasks.size()-1; i>=0; --i) {
- const auto& task = tasks[i];
- bool active;
-
- {
- GUARD(deferred_lock_);
- // NB. erase returns the number of items erased
- active = is_active_.erase(task.w_handle);
- }
- if (active) {
- task.task();
+ if(is_active_.count(tasks[i].w_handle)) {
+ tasks[i].task();
+ is_active_.erase(tasks[i].w_handle);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]