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

feat(PDiskPage): add decommission button #1168

Merged
merged 3 commits into from
Sep 4, 2024
Merged

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Aug 15, 2024

Closes #1092

Test stand: https://nda.ya.ru/t/FBNWq_Uf77bWwM

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
124 119 0 5 0

Bundle Size: 🔺

Current: 78.91 MB | Main: 78.88 MB
Diff: +0.03 MB (0.04%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@artemmufazalov artemmufazalov force-pushed the 1092-pdisk-decomission branch 4 times, most recently from dcc572b to f334fea Compare August 22, 2024 13:21
@artemmufazalov artemmufazalov marked this pull request as ready for review August 22, 2024 13:36
@@ -96,7 +101,33 @@ export function PDiskPage() {
return undefined;
};

const handleAfterRestart = () => {
const handleDecommissionChange = async (
Copy link
Contributor

Choose a reason for hiding this comment

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

const handleDecommissionChange = async (
    newDecommissionStatus?: EDecommitStatus,
    isRetry?: boolean
): Promise<void | undefined> => {
    if (!pDiskParamsDefined) {
        return undefined;
    }

    try {
        const response = await window.api.changePDiskStatus({
            nodeId,
            pDiskId,
            force: isRetry,
            decommissionStatus: newDecommissionStatus,
        });

        if (response?.result === false) {
            const err = {
                statusText: response.error,
                retryPossible: response.forceRetryPossible,
            };
            throw err;
        }
    } catch (error) {
        // Re-throw the error to be handled by the caller
        throw error;
    }
};

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I didn't get your point. Your version looks more aligned with our codebase

@astandrik astandrik self-requested a review September 3, 2024 16:57
astandrik
astandrik previously approved these changes Sep 3, 2024
astandrik
astandrik previously approved these changes Sep 4, 2024
@artemmufazalov artemmufazalov merged commit d3e5f70 into main Sep 4, 2024
6 checks passed
@artemmufazalov artemmufazalov deleted the 1092-pdisk-decomission branch September 4, 2024 16:09
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.

pdisk page – add decommission control
2 participants