Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDSRV-497 Fix BackbeatClient.putMetadata with versionID #5525

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

nicolas2bert
Copy link
Contributor

Issue: When Cloudserver BackbeatClient.putMetadata() option fields are sent to Metadata through the query string, they are converted to strings. As a result, Metadata interprets the value undefined in the versionId field as an empty string ('').

Background: Previously, the 'crrExistingObject' script used this bug/behavior as a workaround to generate an internal version ID to replicate null version (= objects created before versioning was enabled). However, this approach has led to inconsistencies, occasionally resulting in the creation of multiple null internal versions.

Resolution: To address this issue, the 'crrExistingObject' workaround will be deprecated. Instead, Backbeat will be enhanced to support the replication of null versions directly, thereby ensuring more reliable and consistent behavior in handling versioning.

@bert-e
Copy link
Contributor

bert-e commented Jan 26, 2024

Hello nicolas2bert,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@scality scality deleted a comment from bert-e Jan 26, 2024
@bert-e
Copy link
Contributor

bert-e commented Jan 26, 2024

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

// To prevent this, the versionId field is only included in options when it is defined.
if (versionId !== undefined) {
options.versionId = versionId;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

can you confirm this will have no impact when backend is mongo?

Copy link
Contributor Author

@nicolas2bert nicolas2bert Feb 1, 2024

Choose a reason for hiding this comment

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

Yes, I confirm

@nicolas2bert nicolas2bert force-pushed the bugfix/CLDSRV-497/putmetadata branch 2 times, most recently from 44a1c1c to 6a37bf3 Compare February 15, 2024 08:58
@nicolas2bert
Copy link
Contributor Author

/create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Conflict

A conflict has been raised during the creation of
integration branch w/8.6/bugfix/CLDSRV-497/putmetadata with contents from w/7.70/bugfix/CLDSRV-497/putmetadata
and development/8.6.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.6/bugfix/CLDSRV-497/putmetadata origin/development/8.6
 $ git merge origin/w/7.70/bugfix/CLDSRV-497/putmetadata
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.6/bugfix/CLDSRV-497/putmetadata

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Conflict

A conflict has been raised during the creation of
integration branch w/8.7/bugfix/CLDSRV-497/putmetadata with contents from w/8.6/bugfix/CLDSRV-497/putmetadata
and development/8.7.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.7/bugfix/CLDSRV-497/putmetadata origin/development/8.7
 $ git merge origin/w/8.6/bugfix/CLDSRV-497/putmetadata
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.7/bugfix/CLDSRV-497/putmetadata

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/7.4

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

@@ -11,7 +11,7 @@
"test-aws": "AWS_ON_AIR=true mocha -t 40000 test/",
"test-gcp": "mocha -t 40000 test/GCP/",
"test-routes": "mocha -t 40000 test/routes/",
"test": "mocha -t 40000 test/",
"test": "mocha -t 40000 test/routes/routeBackbeatForReplication.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this test be renamed as it's targetting now specific tests (unless this was just for testing purpose)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@anurag4DSB anurag4DSB left a comment

Choose a reason for hiding this comment

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

LGTM, but I want to know about Maha's comment as well, are we not planning to run the remaining tests?

'default', { signatureVersion: 'v4' });
const s3 = bucketUtil.s3;

const bucketSource = 'backbeatbucket-replication-source';
Copy link
Contributor

@anurag4DSB anurag4DSB Feb 15, 2024

Choose a reason for hiding this comment

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

Should we use unique bucket names? Does it matter?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for destination

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unique bucket names might hide cleaning issues when done without a clear purpose. Why would we need it?

Issue: When Cloudserver BackbeatClient.putMetadata() option fields are sent to Metadata through the query string, they are converted to strings. As a result, Metadata interprets the value undefined in the versionId field as an empty string ('').

Background: Previously, the 'crrExistingObject' script used this bug/behavior as a workaround to generate an internal version ID to replicate null version (= objects created before versioning was enabled). However, this approach has led to inconsistencies, occasionally resulting in the creation of multiple null internal versions.

Resolution: To address this issue, the 'crrExistingObject' workaround will be deprecated. Instead, Backbeat will be enhanced to support the replication of null versions directly, thereby ensuring more reliable and consistent behavior in handling versioning.
@nicolas2bert nicolas2bert force-pushed the bugfix/CLDSRV-497/putmetadata branch from 6a37bf3 to c52a3a6 Compare February 15, 2024 16:31
@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

History mismatch

Merge commit #6a37bf33d836379203a0049ebae8e411040f59fc on the integration branch
w/7.70/bugfix/CLDSRV-497/putmetadata is merging a branch which is neither the current
branch bugfix/CLDSRV-497/putmetadata nor the development branch
development/7.70.

It is likely due to a rebase of the branch bugfix/CLDSRV-497/putmetadata and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: create_integration_branches

@nicolas2bert
Copy link
Contributor Author

@bert-e reset

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Conflict

A conflict has been raised during the creation of
integration branch w/8.6/bugfix/CLDSRV-497/putmetadata with contents from w/7.70/bugfix/CLDSRV-497/putmetadata
and development/8.6.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.6/bugfix/CLDSRV-497/putmetadata origin/development/8.6
 $ git merge origin/w/7.70/bugfix/CLDSRV-497/putmetadata
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.6/bugfix/CLDSRV-497/putmetadata

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Conflict

A conflict has been raised during the creation of
integration branch w/8.7/bugfix/CLDSRV-497/putmetadata with contents from w/8.6/bugfix/CLDSRV-497/putmetadata
and development/8.7.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.7/bugfix/CLDSRV-497/putmetadata origin/development/8.7
 $ git merge origin/w/8.6/bugfix/CLDSRV-497/putmetadata
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.7/bugfix/CLDSRV-497/putmetadata

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/7.4

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

@nicolas2bert
Copy link
Contributor Author

@bert-e approve

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/7.10

  • ✔️ development/7.70

  • ✔️ development/8.6

  • ✔️ development/8.7

  • ✔️ development/8.8

The following branches will NOT be impacted:

  • development/7.4

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Feb 15, 2024

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/7.10

  • ✔️ development/7.70

  • ✔️ development/8.6

  • ✔️ development/8.7

  • ✔️ development/8.8

The following branches have NOT changed:

  • development/7.4

Please check the status of the associated issue CLDSRV-497.

Goodbye nicolas2bert.

@bert-e bert-e merged commit a6b283f into development/7.10 Feb 15, 2024
10 checks passed
@bert-e bert-e deleted the bugfix/CLDSRV-497/putmetadata branch February 15, 2024 19:00
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.

6 participants