From 05b6eda2fcaa09d41fd4172bd19c8d3642c6071a Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:13:20 +0800 Subject: [PATCH 1/7] Update azure-pipelines.yml --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4ac382234..30784f353 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -53,9 +53,9 @@ stages: jobs: - job: - displayName: "amd64/ubuntu-20.04" + displayName: "amd64/ubuntu-22.04" pool: - vmImage: 'ubuntu-20.04' + vmImage: 'ubuntu-22.04' steps: - script: | From 8c670c9c24f767daac040f415faf349c0dbe6eda Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:22:02 +0800 Subject: [PATCH 2/7] Update events.cpp --- common/events.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/events.cpp b/common/events.cpp index 7c4f4eddd..b2c0d7ea4 100644 --- a/common/events.cpp +++ b/common/events.cpp @@ -365,7 +365,7 @@ EventSubscriber::init(bool use_cache, int recv_timeout, RET_ON_ERR(rc == 0, "Fails to set option rc=%d", rc); } else { - for (const auto e: *subs_sources) { + for (const auto& e: *subs_sources) { rc = zmq_setsockopt(sock, ZMQ_SUBSCRIBE, e.c_str(), e.size()); RET_ON_ERR(rc == 0, "Fails to set option rc=%d", rc); } @@ -400,14 +400,14 @@ EventSubscriber::prune_track() map > lst; /* Sort entries by last touched time */ - for(const auto e: m_track) { + for(const auto& e: m_track) { lst[e.second.epoch_secs].push_back(e.first); } /* By default it walks from lowest value / earliest timestamp */ map >::const_iterator itc = lst.begin(); for(; (itc != lst.end()) && (m_track.size() > MAX_PUBLISHERS_COUNT); ++itc) { - for (const auto r: itc->second) { + for (const auto& r: itc->second) { m_track.erase(r); } } From 80d2abdc0eb74a5bdc30060ca6dd51c9bf018ff6 Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:26:46 +0800 Subject: [PATCH 3/7] Update build-template.yml --- .azure-pipelines/build-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index f2a0ee496..3c50b9199 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -50,7 +50,7 @@ jobs: ${{ if ne(parameters.pool, 'default') }}: name: ${{ parameters.pool }} ${{ else }}: - vmImage: 'ubuntu-20.04' + vmImage: 'ubuntu-22.04' container: image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }} From 07bda991d558b1dc0730fb6787204e5111523cfe Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:27:21 +0800 Subject: [PATCH 4/7] Update build-sairedis-template.yml --- .azure-pipelines/build-sairedis-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/build-sairedis-template.yml b/.azure-pipelines/build-sairedis-template.yml index 49bb7d9ae..00cdd0601 100644 --- a/.azure-pipelines/build-sairedis-template.yml +++ b/.azure-pipelines/build-sairedis-template.yml @@ -46,7 +46,7 @@ jobs: ${{ if ne(parameters.pool, 'default') }}: name: ${{ parameters.pool }} ${{ else }}: - vmImage: 'ubuntu-20.04' + vmImage: 'ubuntu-22.04' container: image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }} From 9bcac88b9acfa6b5df78257ee4a7ef9a9a397990 Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:27:51 +0800 Subject: [PATCH 5/7] Update build-swss-template.yml --- .azure-pipelines/build-swss-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/build-swss-template.yml b/.azure-pipelines/build-swss-template.yml index a9c19bfcb..b964d75b9 100644 --- a/.azure-pipelines/build-swss-template.yml +++ b/.azure-pipelines/build-swss-template.yml @@ -42,7 +42,7 @@ jobs: ${{ if ne(parameters.pool, 'default') }}: name: ${{ parameters.pool }} ${{ else }}: - vmImage: 'ubuntu-20.04' + vmImage: 'ubuntu-22.04' container: image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }} From f28efff7b744b27837467b3edd3a91f4470e611b Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:29:05 +0800 Subject: [PATCH 6/7] Update build-docker-sonic-vs-template.yml --- .azure-pipelines/build-docker-sonic-vs-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/build-docker-sonic-vs-template.yml b/.azure-pipelines/build-docker-sonic-vs-template.yml index aa27bca9f..ce539171e 100644 --- a/.azure-pipelines/build-docker-sonic-vs-template.yml +++ b/.azure-pipelines/build-docker-sonic-vs-template.yml @@ -29,7 +29,7 @@ jobs: timeoutInMinutes: ${{ parameters.timeout }} pool: - vmImage: 'ubuntu-20.04' + vmImage: 'ubuntu-22.04' steps: - checkout: self From 3a688886eb22f43b3ca76c39f173cd70519fa14a Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:43:16 +0800 Subject: [PATCH 7/7] Update events_ut.cpp --- tests/events_ut.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/events_ut.cpp b/tests/events_ut.cpp index ae9c684bc..4850c0b49 100644 --- a/tests/events_ut.cpp +++ b/tests/events_ut.cpp @@ -137,7 +137,7 @@ parse_read_evt(string &source, internal_event_t &evt, EXPECT_FALSE(source.empty()); EXPECT_EQ(4, evt.size()); - for (const auto e: evt) { + for (const auto& e: evt) { if (e.first == EVENT_STR_DATA) { EXPECT_EQ(0, convert_from_json(e.second, key, params)); // cout << "EVENT_STR_DATA: " << e.second << "\n";