Skip to content

👷(CLDSRV-860) Monitor async await migration#6088

Open
DarkIsDude wants to merge 8 commits intodevelopment/9.3from
feature/CLDSRV-860/monitor-async-await-migration
Open

👷(CLDSRV-860) Monitor async await migration#6088
DarkIsDude wants to merge 8 commits intodevelopment/9.3from
feature/CLDSRV-860/monitor-async-await-migration

Conversation

@DarkIsDude
Copy link
Contributor

Pull request template

Description

Motivation and context

Why is this change required? What problem does it solve?

Related issues

Please use the following link syntaxes #600 to reference issues in the
current repository

Checklist

Add tests to cover the changes

New tests added or existing tests modified to cover all changes

Code conforms with the style guide

Sign your work

In order to contribute to the project, you must sign your work
https://github.com/scality/Guidelines/blob/master/CONTRIBUTING.md#sign-your-work

Thank you again for contributing! We will try to test and integrate the change
as soon as we can.

@DarkIsDude DarkIsDude self-assigned this Feb 25, 2026
@bert-e

This comment was marked as resolved.

@bert-e

This comment was marked as resolved.

@DarkIsDude DarkIsDude changed the base branch from development/9.2 to development/9.3 February 25, 2026 15:48
@bert-e

This comment was marked as resolved.

@codecov

This comment was marked as resolved.

@DarkIsDude DarkIsDude marked this pull request as ready for review March 10, 2026 16:09
@DarkIsDude DarkIsDude requested review from a team, benzekrimaha and delthas March 10, 2026 16:09
@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-860/monitor-async-await-migration branch from 93020af to 8981239 Compare March 10, 2026 16:10
@claude

This comment was marked as resolved.

@@ -0,0 +1,142 @@
/**
* Check that all new/modified functions in the current git diff use async/await.
* Fails with exit code 1 if any additions introduce callback-style functions or .then() chains.
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we use https://github.com/tj-actions/eslint-changed-files for this purpose?
seems quite similar...

or run eslint like this: eslint --fix $(git diff --name-only HEAD | xargs) (c.f. https://stackoverflow.com/questions/54511168/enable-eslint-only-for-edited-files)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't want to run it only on the file but also on the line. We have pretty big file with big function and changing all of them can be a mess 😬. What do you think @francoisferrand ?

}
}

const migrationPercent = totalFunctions > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not correct : not all functions will be (ever) be async.

the migration progress is really 1 - callbackFunctions / (callbackFunctions_before_migration)....

as a "kind of proxy", we may compute callbackFunctions / (asyncFunctions + callbackFunctions) ; but not sure it is that useful...

Copy link
Contributor

Choose a reason for hiding this comment

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

(completion is really just when callbackFunctions == 0)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed. The goal here is just to have an indicator about progress (maybe to be able to follow that over time) not to have something really accurate. Reaching 100% is not the goal, the real goal is the 0... I would like to keep the calcul simple

@bert-e

This comment was marked as resolved.

@bert-e

This comment was marked as resolved.

@bert-e

This comment was marked as resolved.

@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-860/monitor-async-await-migration branch from a64c535 to f1e7018 Compare March 19, 2026 13:23
@claude

This comment was marked as resolved.

@claude

This comment was marked as resolved.

@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-860/monitor-async-await-migration branch from f1e7018 to c4d81e1 Compare March 19, 2026 13:26
@claude

This comment was marked as resolved.

@claude

This comment was marked as resolved.

@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-860/monitor-async-await-migration branch from f3ff7ea to 8612e12 Compare March 19, 2026 16:35
@claude

This comment was marked as resolved.

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.

3 participants