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

Mint - Avoid invalid JSON output #1201

Closed
wants to merge 1 commit into from

Conversation

iternity-dotcom
Copy link
Contributor

Description

The console outputs have been removed.

Motivation and Context

Testing with Mint Suite generates a log.json file. We want to process the file, but MinIO Java generates invalid JSON.

How to test this PR?

Running the tests against a minio server data{1...4} should now return a valid JSON.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Optimization (provides speedup with no functional changes)

  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)

  • Documentation updated

  • Unit tests added/updated

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@balamurugana balamurugana left a comment

Choose a reason for hiding this comment

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

Run functional test like below instead of changing current behavior

FunctionalTest <ENDPOINT> <ACCESSKEY> <SECRETKEY> <REGION>

@vadmeste
Copy link
Member

Run functional test like below instead of changing current behavior

FunctionalTest <ENDPOINT> <ACCESSKEY> <SECRETKEY> <REGION>

Oh downloadMinio() is not executed during functional tests ?

@balamurugana
Copy link
Member

Run functional test like below instead of changing current behavior

FunctionalTest <ENDPOINT> <ACCESSKEY> <SECRETKEY> <REGION>

Oh downloadMinio() is not executed during functional tests ?

It is called if not those four arguments are passed.

@iternity-dotcom
Copy link
Contributor Author

@balamurugana: So this call has to be changed somewhere else? I don‘t quite understand.

@balamurugana
Copy link
Member

@iternity-dotcom The functional test can be run in two ways

  1. Without any arguments
  • it downloads minio server and runs with fixed configuration for functional tests to run
  1. With arguments
  • functional tests run against on provided S3 endpoint.

If you are using functional tests on mint, you would need to run your own s3 server and run functional tests against that.

@iternity-dotcom
Copy link
Contributor Author

Thanks @balamurugana for your explanation.
We run the mint tests against our own Minio instance and observe the above behavior.
The functional minio-java tests are implicitly called by mint. So maybe this is a problem on how functional tests are called by mint?

@andrebruch Can you also share your thoughts on this?

@iternity-dotcom
Copy link
Contributor Author

iternity-dotcom commented Jun 16, 2021

@andrebruch Maybe we are missing the REGION param?

@iternity-dotcom
Copy link
Contributor Author

@balamurugana Another question: Why does it make sense to write the removed console outputs to log.json in case the functional tests are called without params (thus downloading the Minio automatically)? Wouldn't this also result in an invalid log.json?

@andrebruch
Copy link

@balamurugana For us the 2nd way is relevant.
With this way no invalid JSON is actually generated.

@iternity-dotcom The 1st way was called by a change on my part in mint:
I passed the RUN_ON_FAIL variable as an environment variable and additionally (that was the mistake) as a parameter to minio-java.

I corrected the RUN_ON_FAIL-PR: #1180.
So it is correct that this PR is closed.

@balamurugana
Copy link
Member

@iternity-dotcom

@balamurugana Another question: Why does it make sense to write the removed console outputs to log.json in case the functional tests are called without params (thus downloading the Minio automatically)? Wouldn't this also result in an invalid log.json?

Result as JSON is outputted only if MINT_MODE env is set i.e. JSON output is relevant to mint only. May be you could send a fix to error out if four arguments are not passed if MINT_MODE env is set.

@iternity-dotcom
Copy link
Contributor Author

@balamurugana OK. Thanks for concluding the conversation here.

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