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

Modify/datetime #330

Merged
merged 11 commits into from
Jul 28, 2022
Merged

Modify/datetime #330

merged 11 commits into from
Jul 28, 2022

Conversation

lpoli
Copy link
Contributor

@lpoli lpoli commented Jul 14, 2022

Modify system tests w.r.t. changes in PR 0chain/blobber#748.

@service-0chain
Copy link
Contributor

Manual system tests [failure] with the following config

config value
tests skipped FALSE
system-tests modify/datetime
gosdk modify/datetime
zboxcli modify/datetime
zwalletcli staging
0chain staging
blobber modify/datetime
authorizer staging
0box staging
0block staging
0dns staging
explorer staging
0proxy staging
0search staging

@service-0chain
Copy link
Contributor

Manual system tests [success] with the following config

config value
tests skipped FALSE
system-tests modify/datetime
gosdk modify/datetime
zboxcli modify/datetime
zwalletcli staging
0chain staging
blobber modify/datetime
authorizer staging
0box staging
0block staging
0dns staging
explorer staging
0proxy staging
0search staging

@@ -109,7 +109,8 @@ func TestCreateDir(t *testing.T) {
output, err := createDir(t, configPath, allocID, longDirName, false)
require.NotNil(t, err, "expected create dir failure command executed with output: ", strings.Join(output, "\n"))
require.Len(t, output, 1)
require.True(t, strings.HasPrefix(output[0], `CreateDir failed: {"error":"ERROR: value too long for type character varying(100) (SQLSTATE 22001)"}`), "expected create dir failure command executed with output: ", strings.Join(output, "\n"))
aggregatedOutput := strings.Join(output, " ")
require.Contains(t, aggregatedOutput, "consensus failed")
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a backward change. The error should be something meaningful, atleast saying createDir failed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I thought about it. But you know, when blobbers are rejecting commit request, it means consensus is not met.
If an allocation would have 128 blobbers, then there will be 128 messages. Gosdk can't figure out which error to consider for.

Maybe we could collect common messages among blobbers and return to the user with large count.
Previous directory creation process was incomplete.

Copy link
Contributor

Choose a reason for hiding this comment

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

"when blobbers are rejecting commit request, it means consensus is not met."
based on this, let's translate the error message to "directory creation failed" - something a bit more meaningful to the end user

@lpoli lpoli requested a review from Kishan-Dhakan July 17, 2022 12:56
Copy link
Contributor

@stewartie4 stewartie4 left a comment

Choose a reason for hiding this comment

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

agree with Kishan - a better error message is needed, even if it is just create failed

@@ -349,7 +322,8 @@ func TestCreateDir(t *testing.T) {
output, err = createDirForWallet(t, configPath, nonAllocOwnerWallet, true, allocID, true, "/mydir", false)
require.NotNil(t, err, "Expected create dir failure but got output: ", strings.Join(output, "\n"))
require.Len(t, output, 1)
require.True(t, strings.HasPrefix(output[0], `CreateDir failed: {"code":"invalid_signature","error":"invalid_signature: Invalid signature"}`), "Expected create dir failure but got output: "+strings.Join(output, "\n"))
aggregatedOutput := strings.Join(output, " ")
require.Contains(t, aggregatedOutput, `consensus not met`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

@lpoli lpoli merged commit 61c994d into master Jul 28, 2022
@Kishan-Dhakan Kishan-Dhakan deleted the modify/datetime branch January 4, 2023 12:34
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.

4 participants