Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions lib/models/ObjectMD.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,24 @@ export type Backend = {
site: string;
status: string;
dataStoreVersionId: string;
destination?: string;
role?: string;
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.

mandatory for CRR, right?

Copy link
Copy Markdown
Contributor Author

@maeldonn maeldonn May 20, 2026

Choose a reason for hiding this comment

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

Yes, but optional for backward compatibility.

};

export type ReplicationInfo = {
status: string;
backends: Backend[];
content: string[];
destination: string;
storageClass: string;
role: string;
storageType: string;
dataStoreVersionId: string;
/** @deprecated in favor of per-backend destination for multi-destination CRR. */
destination?: string;
/** @deprecated in favor of per-backend storageClass for multi-destination CRR. */
storageClass?: string;
/** @deprecated in favor of per-backend role for multi-destination CRR. */
role?: string;
/** @deprecated in favor of per-backend storageType for multi-destination CRR. */
storageType?: string;
/** @deprecated in favor of per-backend dataStoreVersionId for multi-destination. */
dataStoreVersionId?: string;
Comment thread
maeldonn marked this conversation as resolved.
isNFS?: boolean;
};

Expand Down Expand Up @@ -1175,6 +1182,7 @@ export default class ObjectMD {
return undefined;
}

/** @deprecated in favor of per-backend dataStoreVersionId for multi-destination CRR. */
setReplicationDataStoreVersionId(versionId: string) {
this._data.replicationInfo.dataStoreVersionId = versionId;
return this;
Expand Down Expand Up @@ -1205,26 +1213,31 @@ export default class ObjectMD {
return this;
}

/** @deprecated in favor of per-backend storageType for multi-destination CRR. */
setReplicationStorageType(storageType: string) {
this._data.replicationInfo.storageType = storageType;
return this;
}

/** @deprecated in favor of per-backend storageClass for multi-destination CRR. */
setReplicationStorageClass(storageClass: string) {
this._data.replicationInfo.storageClass = storageClass;
return this;
}

/** @deprecated in favor of per-backend destination for multi-destination CRR. */
setReplicationTargetBucket(destination: string) {
this._data.replicationInfo.destination = destination;
return this;
}

/** @deprecated in favor of per-backend role for multi-destination CRR. */
setReplicationRoles(role: string) {
this._data.replicationInfo.role = role;
return this;
}

/** @deprecated in favor of per-backend dataStoreVersionId for multi-destination. */
getReplicationDataStoreVersionId() {
return this._data.replicationInfo.dataStoreVersionId;
}
Expand All @@ -1241,20 +1254,24 @@ export default class ObjectMD {
return this._data.replicationInfo.content;
}

/** @deprecated in favor of per-backend role for multi-destination CRR. */
getReplicationRoles() {
return this._data.replicationInfo.role;
}

/** @deprecated in favor of per-backend storageType for multi-destination CRR. */
getReplicationStorageType() {
return this._data.replicationInfo.storageType;
}

/** @deprecated in favor of per-backend storageClass for multi-destination CRR. */
getReplicationStorageClass() {
return this._data.replicationInfo.storageClass;
}

/** @deprecated in favor of per-backend destination for multi-destination CRR. */
getReplicationTargetBucket() {
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.

should this function still be used?
(if it is just for backwards compatibility with existing backbeat, maybe time to create a new arsenal branch, that we'll bump in the next backbeat branch)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This function is now deprecated.

const destBucketArn = this._data.replicationInfo.destination;
const destBucketArn = this._data.replicationInfo.destination ?? '';
return destBucketArn.split(':').slice(-1)[0];
}

Expand Down
Loading
Loading