Skip to content

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

Open
wants to merge 5 commits into
base: development/8.2
Choose a base branch
from

Conversation

francoisferrand
Copy link
Contributor

@francoisferrand francoisferrand commented May 2, 2025

  • accept lifecycle config only if all rules are supported
  • return arsenal error of same type when available
  • Fix crash on buckets created with 7.70 branch
  • Fix validation of unsupported rules
  • Fix compute ContentLength from location

Issue: ARSN-490

Kerkesni and others added 5 commits April 29, 2025 13:19
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
@bert-e
Copy link
Contributor

bert-e commented May 2, 2025

Hello francoisferrand,

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.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented May 2, 2025

Waiting for approval

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

  • the author

  • 2 peers

Copy link

codecov bot commented May 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.05%. Comparing base (e14f533) to head (b483aef).

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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

francoisferrand added a commit to scality/cloudserver that referenced this pull request May 2, 2025
Copy link
Contributor

@williamlardier williamlardier left a 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

Comment on lines 246 to 248
const msg = 'lifecycle action not implemented';
const error = errorInstances.NotImplemented.customizeDescription(msg);
return { error };
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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 {
Copy link
Contributor

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 = {
Copy link
Contributor

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?

Suggested change
export type XMLRule = {
export type XMLLifecycleRule = {

... and change the replication rule

assert.deepStrictEqual(result, [
'Expiration',
'NoncurrentVersionTransitions',
'Transition'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'Transition'
'Transition',

francoisferrand added a commit to scality/cloudserver that referenced this pull request May 2, 2025
return { ...actionsObj, error };
}

actionsObj.actions.push({ actionName: `${action}` });
Copy link
Contributor

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
Copy link
Contributor

@benzekrimaha benzekrimaha May 7, 2025

Choose a reason for hiding this comment

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

Suggested change
// Memoize the supported lifecycle rules to avoid recalculating them
// Memorize the supported lifecycle rules to avoid recalculating them

Copy link
Contributor Author

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

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