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

UX improvements for Merge configuration #4529

Merged
merged 8 commits into from
Sep 6, 2022
Merged

UX improvements for Merge configuration #4529

merged 8 commits into from
Sep 6, 2022

Conversation

MarekM25
Copy link
Contributor

@MarekM25 MarekM25 commented Sep 6, 2022

UX improvements for merge configuration + log fix

@MarekM25 MarekM25 requested review from asdacap, LukaszRozmej and marcindsobczak and removed request for asdacap and LukaszRozmej September 6, 2022 07:18
Copy link
Contributor

@asdacap asdacap left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -120,7 +131,8 @@ private void EnsureReceiptAvailable()
{
if (!syncConfig.DownloadReceiptsInFastSync || !syncConfig.DownloadBodiesInFastSync)
{
throw new InvalidOperationException("Receipt and body must be available for merge to function");
if (_logger.IsError) _logger.Error("Receipt and body must be available for merge to function. The following configs values should be set to true: Sync.DownloadReceiptsInFastSync, Sync.DownloadBodiesInFastSync");
_environment.Exit(1);
Copy link
Member

@LukaszRozmej LukaszRozmej Sep 6, 2022

Choose a reason for hiding this comment

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

I would create some static ExitCodes class and name those + make unique codes, so if we get info from users we can actually diagnose it easily

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 would create some static ExitCodes class and name those + make unique codes, so if we get info from users we can actually diagnose it easily

Done :)

Comment on lines 22 to 24
public const int NoEngineModule = 1;

public const int NoDownloadOldReceiptsOrBlocks = 2;
Copy link
Member

Choose a reason for hiding this comment

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

I would divide the errors in some numbers, for example configuration errors would be between 1_000 and 1_999, wouldn't go from 1 :)

@MarekM25 MarekM25 merged commit 5a8e4df into master Sep 6, 2022
@MarekM25 MarekM25 deleted the merge/ux_fixes branch September 6, 2022 12:12
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.

None yet

4 participants