bf: ARSN-494 exception when parsing replication config without endpoint#2382
Conversation
Hello jonathan-gramain,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
|
/create_integration_branches |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the The following options are set: create_integration_branches |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/7.70/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration origin/development/7.70
$ git merge origin/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/7.70/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfigurationThe following options are set: create_integration_branches |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/8.1/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration origin/development/8.1
$ git merge origin/w/7.70/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/8.1/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfigurationThe following options are set: create_integration_branches |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/8.2/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration origin/development/8.2
$ git merge origin/w/8.1/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/8.2/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfigurationThe following options are set: create_integration_branches |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_integration_branches |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an exception in ReplicationConfiguration parsing when no replication endpoint is configured in Cloudserver and improves test coverage for various configuration scenarios.
- Adds comprehensive unit tests for both valid and invalid replication configurations.
- Refactors error message construction in ReplicationConfiguration.ts for clarity and consistency.
- Updates minor dependencies, including the package version and GitHub Actions configuration.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/unit/models/ReplicationConfiguration.spec.ts | New unit tests covering valid and invalid configuration scenarios |
| lib/models/ReplicationConfiguration.ts | Refactored error messages and added endpoint check for replication config |
| package.json | Updated project version |
| .github/workflows/tests.yaml | Upgraded Node setup action from v2 to v4 |
Comments suppressed due to low confidence (1)
lib/models/ReplicationConfiguration.ts:427
- The new check returning errors.InvalidRequest.customizeDescription('No configured replication endpoint') may not strictly equal errors.InvalidRequest in the tests. Consider verifying that the tests compare error codes or properties rather than relying on strict object equality.
const { replicationEndpoints } = this._config;
Add test cases to cover most of the validation of the ReplicationConfiguration model, which did not have unit test coverage. Also polished some error messages and the code style, as we now have a more relaxed linter than when the code was originally written. Note that the error types returned are kept and tested as they are now, even if they may benefit from a more consistent handling, to avoid any risk of regression due to a behavior change. We could revisit this later, separately from this bugfix.
Fix an exception that occurs when parsing a ReplicationConfiguration (provided from a `PutBucketReplication` API call) where no replication endpoint is configured in Cloudserver. In such case, return an InvalidRequest error.
a6cdcb6 to
4d12025
Compare
History mismatchMerge commit #1baf548588e4d7004279339c9cff140aa4939df8 on the integration branch It is likely due to a rebase of the branch Please use the The following options are set: create_integration_branches |
|
/reset |
Reset completeI have successfully deleted this pull request's integration branches. The following options are set: create_integration_branches |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/7.70/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration origin/development/7.70
$ git merge origin/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/7.70/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfigurationThe following options are set: create_integration_branches |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/8.1/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration origin/development/8.1
$ git merge origin/w/7.70/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/8.1/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfigurationThe following options are set: create_integration_branches |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/8.2/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration origin/development/8.2
$ git merge origin/w/8.1/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfiguration
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/8.2/bugfix/ARSN-494-cloudserverCrashPuttingReplicationConfigurationThe following options are set: create_integration_branches |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_integration_branches |
|
/approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue ARSN-494. Goodbye jonathan-gramain. The following options are set: approve, create_integration_branches |
Fix an exception that occurs when parsing a ReplicationConfiguration (provided from a
PutBucketReplicationAPI call) where no replication endpoint is configured in Cloudserver.In such case, return an InvalidRequest error.
Also added new test cases for ReplicationConfiguration, which lacked unit test coverage.