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

[CLC-425]: Print Warnings Before Exit #420

Merged
merged 5 commits into from
Nov 3, 2023

Conversation

kutluhanmetin
Copy link
Contributor

No description provided.

@kutluhanmetin kutluhanmetin changed the base branch from main to dmt October 31, 2023 09:00
@kutluhanmetin kutluhanmetin requested review from yuce and srknzl October 31, 2023 09:00
ec.Logger().Error(err)
return
}
ec.PrintlnUnnecessary("* " + strings.Join(warnings, "\n* "))
Copy link
Member

Choose a reason for hiding this comment

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

If there're lots of them, it can be more reasonable to point to the migration report instead. The warnings will be in the report as well. If there're less than 5 we can directly print 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.

I think there won't be too many warning that makes it hard to display in the terminal.

Copy link
Member

Choose a reason for hiding this comment

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

There can be in the future. We'll keep adding things to warnings field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Note that, it's not just for future. 1000 ds skips can even happen now.

@kutluhanmetin kutluhanmetin requested a review from srknzl November 2, 2023 11:15
Comment on lines 285 to 287
if len(warnings) <= 5 {
ec.PrintlnUnnecessary("* " + strings.Join(warnings, "\n* "))
}
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a else block that says "you have x warnings that you can find in your migration report" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kutluhanmetin kutluhanmetin requested a review from srknzl November 3, 2023 10:51
@kutluhanmetin kutluhanmetin merged commit b9e7c18 into hazelcast:dmt Nov 3, 2023
4 checks passed
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