-
Notifications
You must be signed in to change notification settings - Fork 20
Fixes for cloudserver unification #2373
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
base: development/8.2
Are you sure you want to change the base?
Conversation
Metadata (the component) does return Arsenal errors but not as an instance of the Arsenal errors class. We should keep the same error type instead of returning an internal error. Issue: ARSN-490
The validation is more strict, to explicitely reject non-supported rules. Issue: ARSN-490
The length cannot be computed when some data locations do not have a size, in which case the function must return `undefined` instead of possibly reporting any value. Issue: ARSN-490
Hello francoisferrand,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## development/8.2 #2373 +/- ##
===================================================
+ Coverage 69.91% 70.05% +0.13%
===================================================
Files 218 218
Lines 17440 17443 +3
Branches 3592 3585 -7
===================================================
+ Hits 12194 12219 +25
+ Misses 5242 5220 -22
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
esp. needs [1] [1] scality/Arsenal#2373 Issue: CLDSRV-638
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments, not blocking
lib/models/LifecycleConfiguration.ts
Outdated
const msg = 'lifecycle action not implemented'; | ||
const error = errorInstances.NotImplemented.customizeDescription(msg); | ||
return { error }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const msg = 'lifecycle action not implemented'; | |
const error = errorInstances.NotImplemented.customizeDescription(msg); | |
return { error }; | |
return { | |
error: errorInstances.NotImplemented | |
.customizeDescription('lifecycle action not implemented'); | |
}; |
* @param err - Error to convert | ||
* @returns ArsenalError instance | ||
*/ | ||
export function toArsenalError(err: ArsenalError | Error): ArsenalError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a candidate for lib/errorUtils.ts
? Or a static member of ArsenalError
?
@@ -89,11 +88,24 @@ export type LifecycleConfigurationMetadata = { | |||
rules: Rule[], | |||
}; | |||
|
|||
export type XMLRule = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To differentiate between the XMLRule for replication, shall we use a more specific name?
export type XMLRule = { | |
export type XMLLifecycleRule = { |
... and change the replication rule
assert.deepStrictEqual(result, [ | ||
'Expiration', | ||
'NoncurrentVersionTransitions', | ||
'Transition' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Transition' | |
'Transition', |
esp. needs [1] [1] scality/Arsenal#2373 Issue: CLDSRV-638
return { ...actionsObj, error }; | ||
} | ||
|
||
actionsObj.actions.push({ actionName: `${action}` }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we use ${...}
to copy the string? I don't think it's needed since we don't modify the contents of action
, and strings are immutable anyways.
this._ruleIDs = []; | ||
this._tagKeys = []; | ||
this._config = {}; | ||
} | ||
|
||
// Memoize the supported lifecycle rules to avoid recalculating them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Memoize the supported lifecycle rules to avoid recalculating them | |
// Memorize the supported lifecycle rules to avoid recalculating them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No typo, Memoization is the right term here
Issue: ARSN-490