Skip to content

remoteFDB - negotiate common set of client & server features - #340

Merged
danovaro merged 3 commits into
developfrom
fix/negotiate-wipe
Sep 2, 2026
Merged

remoteFDB - negotiate common set of client & server features#340
danovaro merged 3 commits into
developfrom
fix/negotiate-wipe

Conversation

@danovaro

@danovaro danovaro commented Aug 30, 2026

Copy link
Copy Markdown
Member

Description

extends the remoteFDB protocol handshaking with feature negotiation (currently only addressing wipe support)

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

🌈🌦️📖🚧 Documentation FDB 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/fdb/pull-requests/PR-340

@codecov-commenter

codecov-commenter commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.61224% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.58%. Comparing base (bdbdbd1) to head (56ce26d).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/fdb5/remote/client/ClientConnection.cc 60.00% 6 Missing ⚠️
src/fdb5/remote/server/CatalogueHandler.cc 16.66% 5 Missing ⚠️
src/fdb5/remote/server/StoreHandler.cc 16.66% 5 Missing ⚠️
src/fdb5/remote/Messages.cc 93.33% 1 Missing ⚠️
src/fdb5/remote/Messages.h 80.00% 1 Missing ⚠️
src/fdb5/remote/RemoteConfiguration.cc 95.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #340      +/-   ##
===========================================
+ Coverage    77.52%   77.58%   +0.05%     
===========================================
  Files          411      411              
  Lines        27612    27669      +57     
  Branches      2776     2769       -7     
===========================================
+ Hits         21407    21467      +60     
+ Misses        6205     6202       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds client/server feature negotiation to remoteFDB handshaking, initially covering wipe availability.

Changes:

  • Serializes and intersects feature masks during startup.
  • Rejects unsupported client requests before transmission.
  • Adjusts remote regression-test ports and startup delays.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/fdb5/remote/Messages.h Declares feature-mask helpers and changes header version.
src/fdb5/remote/Messages.cc Implements message-mask conversion and formatting.
src/fdb5/remote/RemoteConfiguration.h Exposes negotiated features and logging support.
src/fdb5/remote/RemoteConfiguration.cc Builds, serializes, and intersects feature masks.
src/fdb5/remote/client/ClientConnection.h Stores negotiated features.
src/fdb5/remote/client/ClientConnection.cc Parses negotiation results and guards requests.
tests/regressions/FDB-595/FDB-595.sh.in Adds a server startup delay.
tests/regressions/FDB-610/FDB-610.sh.in Reduces the startup delay.
tests/regressions/FDB-610/fdb-remote.yaml Updates the catalogue port.
tests/regressions/FDB-610/fdb_config_catalogue.yaml Updates catalogue and store endpoints.
tests/regressions/FDB-610/fdb_config_store.yaml Updates the store port.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/fdb5/remote/RemoteConfiguration.cc Outdated
Comment on lines +64 to +66
static bool wipeEnabled = eckit::Resource<bool>("fdbWipeEnabled;$FDB_WIPE_ENABLED", true);
if (wipeEnabled) {
enabledFeatures_ |= toMask(Message::Wipe);
Comment thread src/fdb5/remote/Messages.h Outdated
Comment thread src/fdb5/remote/RemoteConfiguration.cc Outdated
}

LOG_DEBUG_LIB(LibFdb5) << "Protocol negotiation - NumberOfConnections " << ncSelected << std::endl;
agreedConf.enabledFeatures_ = clientConf.enabledFeatures_ & serverConf.enabledFeatures_;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed. pr is missing test that verifies wipe is rejected

@danovaro
danovaro force-pushed the fix/negotiate-wipe branch 2 times, most recently from 023725d to b42eb17 Compare August 31, 2026 04:53

@mcakircali mcakircali left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be sensible to add "wipe is rejected" test case

also, you changed server ports of some tests, but seems not relevant to changes in this PR, and those changes were already done in other PR. re-doing work and will cause merge conflict later. I suggest to merge PR 333 to develop and update this PR.

}

LOG_DEBUG_LIB(LibFdb5) << "Protocol negotiation - NumberOfConnections " << ncSelected << std::endl;
agreedConf.enabledFeatures_ = clientConf.enabledFeatures_ & serverConf.enabledFeatures_;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed. pr is missing test that verifies wipe is rejected

@caraghbiner caraghbiner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@danovaro
danovaro force-pushed the fix/negotiate-wipe branch 2 times, most recently from 9a9340c to e1a2e17 Compare September 2, 2026 06:18
@danovaro
danovaro merged commit 06d24c9 into develop Sep 2, 2026
124 of 135 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants