Skip to content
This repository was archived by the owner on Feb 13, 2026. It is now read-only.

Migrate to go1.12 to simplify our cmd/http package#7302

Merged
kannappanr merged 1 commit intominio:masterfrom
harshavardhana:fix-tls
Apr 3, 2019
Merged

Migrate to go1.12 to simplify our cmd/http package#7302
kannappanr merged 1 commit intominio:masterfrom
harshavardhana:fix-tls

Conversation

@harshavardhana
Copy link
Member

@harshavardhana harshavardhana commented Feb 27, 2019

Description

Migrate to go1.12 to simplify our cmd/http package

Motivation and Context

Simplify the cmd/http package overall by removing
custom plain text v/s tls connection detection, by
migrating to go1.12 and choose a minimum version
to be go1.12

Also remove all the vendored deps, since they
are not useful anymore.

Regression

No

How Has This Been Tested?

Using go 1.12

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added unit tests to cover my changes.
  • I have added/updated functional tests in mint. (If yes, add mint PR # here: )
  • All new and existing tests passed.

@harshavardhana
Copy link
Member Author

Moving this PR as blocked on the decision to move to Go 1.12 until then we don't need this PR.

@minio minio deleted a comment from minio-ops Feb 27, 2019
@minio minio deleted a comment from minio-ops Feb 27, 2019
@minio minio deleted a comment from minio-ops Feb 27, 2019
@harshavardhana harshavardhana force-pushed the fix-tls branch 2 times, most recently from 58ea3d3 to f1fe8fc Compare February 27, 2019 01:28
@minio minio deleted a comment from minio-ops Feb 27, 2019
@minio minio deleted a comment from minio-ops Feb 27, 2019
@minio minio deleted a comment from minio-ops Feb 27, 2019
@harshavardhana
Copy link
Member Author

This PR is okayed by @abperiasamy

@codecov
Copy link

codecov bot commented Feb 28, 2019

Codecov Report

Merging #7302 into master will increase coverage by 0.45%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7302      +/-   ##
==========================================
+ Coverage   47.58%   48.04%   +0.45%     
==========================================
  Files         286      296      +10     
  Lines       35707    46725   +11018     
==========================================
+ Hits        16990    22447    +5457     
- Misses      16666    22203    +5537     
- Partials     2051     2075      +24
Impacted Files Coverage Δ
cmd/http/server.go 23.58% <ø> (-0.23%) ⬇️
cmd/http/listener.go 84.55% <100%> (-3.38%) ⬇️
cmd/http/deadlineconn.go 80% <100%> (ø)
cmd/disk-usage.go 78.94% <0%> (-21.06%) ⬇️
cmd/service.go 27.27% <0%> (-10.23%) ⬇️
cmd/http/conn_bug_21133.go 66.66% <0%> (-8.34%) ⬇️
cmd/gateway-main.go 14.95% <0%> (-7.37%) ⬇️
pkg/madmin/utils.go 16.66% <0%> (-7.15%) ⬇️
cmd/config-dir.go 40.74% <0%> (-7.09%) ⬇️
cmd/globals.go 55.88% <0%> (-7.09%) ⬇️
... and 266 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c23e6f...04a7d0d. Read the comment docs.

@harshavardhana
Copy link
Member Author

Still needs updates to our CI systems such as gateway-tests until then its still blocked.

@harshavardhana
Copy link
Member Author

All the more reason to move towards Go 1.12 golang/go#29439

@harshavardhana harshavardhana force-pushed the fix-tls branch 2 times, most recently from e59a8ba to 913fe32 Compare March 3, 2019 20:44
@minio minio deleted a comment from minio-ops Mar 3, 2019
@minio minio deleted a comment from minio-ops Mar 3, 2019
@minio minio deleted a comment from minio-ops Mar 3, 2019
@minio minio deleted a comment from minio-ops Mar 4, 2019
@minio minio deleted a comment from minio-ops Mar 4, 2019
@minio minio deleted a comment from minio-ops Mar 4, 2019
@harshavardhana
Copy link
Member Author

Now that we have merged #7354 - this PR moves forward to next version and disables Minio to be built with any version other than go1.12

Also the PR is rebased and updated PTAL @balamurugana @wlan0

@harshavardhana
Copy link
Member Author

Blocking merge until I figure out the gateway tests issue on SimpleCI.

@harshavardhana
Copy link
Member Author

~ docker run --rm --net=host -e SERVER_ENDPOINT=localhost:9001 -e ACCESS_KEY=minio -e SECRET_KEY=minio123 -e ENABLE_HTTPS=0 -e MINT_MODE=full minio/mint:edge
Running with
SERVER_ENDPOINT:      localhost:9001
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp 3973cb986766:/mint/log /tmp/mint-logs'

(1/14) Running aws-sdk-go tests ... done in 0 seconds
(2/14) Running aws-sdk-java tests ... done in 2 seconds
(3/14) Running aws-sdk-php tests ... done in 41 seconds
(4/14) Running aws-sdk-ruby tests ... done in 3 seconds
(5/14) Running awscli tests ... done in 1 minutes and 39 seconds
(6/14) Running healthcheck tests ... done in 0 seconds
(7/14) Running mc tests ... done in 10 seconds
(8/14) Running minio-dotnet tests ... done in 23 seconds
(9/14) Running minio-go tests ... done in 48 seconds
(10/14) Running minio-java tests ... done in 17 seconds
(11/14) Running minio-js tests ... done in 24 seconds
(12/14) Running minio-py tests ... done in 58 seconds
(13/14) Running s3cmd tests ... done in 55 seconds
(14/14) Running security tests ... done in 0 seconds

All tests ran successfully

For posterity posting it here if SimpleCI fails.

Simplify the cmd/http package overall by removing
custom plain text v/s tls connection detection, by
migrating to go1.12 and choose minimum version
to be go1.12

Also remove all the vendored deps, since they
are not useful anymore.
@minio-ops
Copy link

Mint Automation

Test Result
mint-compression-xl.sh ✔️
mint-large-bucket.sh ✔️
mint-compression-dist-xl.sh ✔️
mint-compression-fs.sh ✔️
mint-worm.sh ✔️
mint-dist-xl.sh ✔️
mint-gateway-nas.sh ✔️
mint-xl.sh more...
mint-fs.sh more...

7302-04a7d0d/mint-xl.sh.log:

Running with
SERVER_ENDPOINT:      72.28.97.57:32439
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp e4a3ddb99ecc:/mint/log /tmp/mint-logs'

(1/14) Running aws-sdk-go tests ... FAILED in 4 seconds
{
  "alert": "",
  "args": {
    "bucketName": "aws-sdk-go-test-6kemnzglbfxgqx",
    "expiry": 60000000000,
    "objectName": "presignedTest"
  },
  "duration": 3051,
  "error": "RequestError: send request failed\ncaused by: Put http://72.28.97.57:32439/aws-sdk-go-test-6kemnzglbfxgqx: dial tcp 72.28.97.57:32439: connect: no route to host",
  "function": "PresignedPut",
  "message": "AWS SDK Go CreateBucket Failed",
  "name": "aws-sdk-go",
  "status": "FAIL"
}

Executed 0 out of 14 tests successfully.

7302-04a7d0d/mint-fs.sh.log:

Running with
SERVER_ENDPOINT:      72.28.97.56:30698
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp 0bfdbd695964:/mint/log /tmp/mint-logs'

(1/14) Running aws-sdk-go tests ... done in 1 seconds
(2/14) Running aws-sdk-java tests ... done in 0 seconds
(3/14) Running aws-sdk-php tests ... done in 43 seconds
(4/14) Running aws-sdk-ruby tests ... done in 2 seconds
(5/14) Running awscli tests ... done in 1 minutes and 52 seconds
(6/14) Running healthcheck tests ... done in 0 seconds
(7/14) Running mc tests ... done in 24 seconds
(8/14) Running minio-dotnet tests ... done in 28 seconds
(9/14) Running minio-go tests ... done in 45 seconds
(10/14) Running minio-java tests ... done in 2 minutes and 38 seconds
(11/14) Running minio-js tests ... done in 37 seconds
(12/14) Running minio-py tests ... FAILED in 5 minutes and 12 seconds
{
  "duration": 140,
  "status": "FAIL",
  "message": "AccessDenied: message: Access Denied",
  "function": "presigned_get_object(bucket_name, object_name, expires, response_headers, request_date)",
  "args": {
    "bucket_name": "minio-py-test-1cc8d0f6-e79f-4bbe-a33f-6fdad87b6f2a",
    "object_name": "7b27b948-107f-4321-a8bd-3fb6cdd4b2c0"
  },
  "name": "minio-py:test_presigned_get_object_expiry_5sec",
  "error": "Traceback (most recent call last):\n  File \"/mint/run/core/minio-py/tests.py\", line 1220, in test_presigned_get_object_expiry_5sec\n    object_name).get_exception()\nminio.error.AccessDenied: AccessDenied: message: Access Denied\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/mint/run/core/minio-py/tests.py\", line 1885, in main\n    test_presigned_get_object_expiry_5sec(client, log_output)\n  File \"/mint/run/core/minio-py/tests.py\", line 1228, in test_presigned_get_object_expiry_5sec\n    raise Exception(err)\nException: AccessDenied: message: Access Denied\n"
}

Executed 11 out of 14 tests successfully.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants