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

breaking-change(redis): deprecated expire option #88

Merged
merged 4 commits into from
Oct 4, 2021

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Oct 3, 2021

What did you implement:

Expire was introduced to ensure safe operation in Redis, but since expire can only be set per key, it is not very useful for Sets and Hash.
Therefore, if there is any old content in each fetch, it will be deleted.

Also, ConvertToModels has been moved from the db package to the models package.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: NO

Reference

@MaineK00n MaineK00n self-assigned this Oct 3, 2021
@kotakanbe
Copy link
Collaborator

kotakanbe commented Oct 4, 2021

 ubuntu@dev  ~│g│s│g│v│gost  ⎇ MaineK00n/deprecated-expire~  make diff-server-rdb && make diff-server-redis && make diff-server-rdb-redis
integration/gost.old server --dbpath=integration/gost.old.sqlite3 --port 1325 > /dev/null 2>&1 &
integration/gost.new server --dbpath=integration/gost.new.sqlite3 --port 1326 > /dev/null 2>&1 &
make diff-cveid
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:56:13] start debian server mode test(mode: cveid)
INFO[10-04|08:56:13] check the communication with the server
INFO[10-04|08:56:13] communication with the server has been confirmed
INFO[10-04|08:56:17] start ubuntu server mode test(mode: cveid)
INFO[10-04|08:56:17] check the communication with the server
INFO[10-04|08:56:17] communication with the server has been confirmed
INFO[10-04|08:56:28] start redhat server mode test(mode: cveid)
INFO[10-04|08:56:28] check the communication with the server
INFO[10-04|08:56:28] communication with the server has been confirmed
# @ python integration/diff_server_mode.py cveid --sample_rate 0.01 microsoft
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
make diff-cveids
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:56:32] start debian server mode test(mode: cveids)
INFO[10-04|08:56:32] check the communication with the server
INFO[10-04|08:56:32] communication with the server has been confirmed
INFO[10-04|08:56:33] start ubuntu server mode test(mode: cveids)
INFO[10-04|08:56:33] check the communication with the server
INFO[10-04|08:56:33] communication with the server has been confirmed
INFO[10-04|08:56:38] start redhat server mode test(mode: cveids)
INFO[10-04|08:56:38] check the communication with the server
INFO[10-04|08:56:38] communication with the server has been confirmed
# @ python integration/diff_server_mode.py cveids --sample_rate 0.01 microsoft
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
make diff-package
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:56:40] start debian server mode test(mode: package)
INFO[10-04|08:56:40] check the communication with the server
INFO[10-04|08:56:40] communication with the server has been confirmed
INFO[10-04|08:56:43] start ubuntu server mode test(mode: package)
INFO[10-04|08:56:43] check the communication with the server
INFO[10-04|08:56:43] communication with the server has been confirmed
INFO[10-04|08:56:59] start redhat server mode test(mode: package)
INFO[10-04|08:56:59] check the communication with the server
INFO[10-04|08:56:59] communication with the server has been confirmed
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
pkill gost.old
pkill gost.new
integration/gost.old server --dbtype redis --dbpath "redis://127.0.0.1:6379/0" --port 1325 > /dev/null 2>&1 &
integration/gost.new server --dbtype redis --dbpath "redis://127.0.0.1:6380/0" --port 1326 > /dev/null 2>&1 &
make diff-cveid
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:57:01] start debian server mode test(mode: cveid)
INFO[10-04|08:57:01] check the communication with the server
INFO[10-04|08:57:01] communication with the server has been confirmed
INFO[10-04|08:57:04] start ubuntu server mode test(mode: cveid)
INFO[10-04|08:57:04] check the communication with the server
INFO[10-04|08:57:05] communication with the server has been confirmed
INFO[10-04|08:57:14] start redhat server mode test(mode: cveid)
INFO[10-04|08:57:14] check the communication with the server
INFO[10-04|08:57:14] communication with the server has been confirmed
# @ python integration/diff_server_mode.py cveid --sample_rate 0.01 microsoft
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
make diff-cveids
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:57:18] start debian server mode test(mode: cveids)
INFO[10-04|08:57:18] check the communication with the server
INFO[10-04|08:57:18] communication with the server has been confirmed
INFO[10-04|08:57:19] start ubuntu server mode test(mode: cveids)
INFO[10-04|08:57:19] check the communication with the server
INFO[10-04|08:57:19] communication with the server has been confirmed
INFO[10-04|08:57:23] start redhat server mode test(mode: cveids)
INFO[10-04|08:57:23] check the communication with the server
INFO[10-04|08:57:23] communication with the server has been confirmed
# @ python integration/diff_server_mode.py cveids --sample_rate 0.01 microsoft
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
make diff-package
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:57:25] start debian server mode test(mode: package)
INFO[10-04|08:57:25] check the communication with the server
INFO[10-04|08:57:25] communication with the server has been confirmed
INFO[10-04|08:57:27] start ubuntu server mode test(mode: package)
INFO[10-04|08:57:27] check the communication with the server
INFO[10-04|08:57:27] communication with the server has been confirmed
INFO[10-04|08:57:59] start redhat server mode test(mode: package)
INFO[10-04|08:57:59] check the communication with the server
INFO[10-04|08:57:59] communication with the server has been confirmed
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
pkill gost.old
pkill gost.new
integration/gost.new server --dbpath=integration/gost.new.sqlite3 --port 1325 > /dev/null 2>&1 &
integration/gost.new server --dbtype redis --dbpath "redis://127.0.0.1:6380/0" --port 1326 > /dev/null 2>&1 &
make diff-cveid
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:58:01] start debian server mode test(mode: cveid)
INFO[10-04|08:58:01] check the communication with the server
INFO[10-04|08:58:01] communication with the server has been confirmed
INFO[10-04|08:58:05] start ubuntu server mode test(mode: cveid)
INFO[10-04|08:58:05] check the communication with the server
INFO[10-04|08:58:05] communication with the server has been confirmed
INFO[10-04|08:58:15] start redhat server mode test(mode: cveid)
INFO[10-04|08:58:15] check the communication with the server
INFO[10-04|08:58:15] communication with the server has been confirmed
# @ python integration/diff_server_mode.py cveid --sample_rate 0.01 microsoft
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
make diff-cveids
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:58:20] start debian server mode test(mode: cveids)
INFO[10-04|08:58:20] check the communication with the server
INFO[10-04|08:58:20] communication with the server has been confirmed
INFO[10-04|08:58:21] start ubuntu server mode test(mode: cveids)
INFO[10-04|08:58:21] check the communication with the server
INFO[10-04|08:58:21] communication with the server has been confirmed
INFO[10-04|08:58:27] start redhat server mode test(mode: cveids)
INFO[10-04|08:58:27] check the communication with the server
INFO[10-04|08:58:27] communication with the server has been confirmed
# @ python integration/diff_server_mode.py cveids --sample_rate 0.01 microsoft
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
make diff-package
make[1]: Entering directory '/home/ubuntu/go/src/github.com/vulsio/gost'
INFO[10-04|08:58:28] start debian server mode test(mode: package)
INFO[10-04|08:58:28] check the communication with the server
INFO[10-04|08:58:28] communication with the server has been confirmed
INFO[10-04|08:58:31] start ubuntu server mode test(mode: package)
INFO[10-04|08:58:31] check the communication with the server
INFO[10-04|08:58:31] communication with the server has been confirmed
INFO[10-04|08:59:09] start redhat server mode test(mode: package)
INFO[10-04|08:59:09] check the communication with the server
INFO[10-04|08:59:09] communication with the server has been confirmed
make[1]: Leaving directory '/home/ubuntu/go/src/github.com/vulsio/gost'
pkill gost.new
 ubuntu@dev  ~│g│s│g│v│gost  ⎇ MaineK00n/deprecated-expire~  ./integration/gost.old version
gost v0.4.0 3e6372b
 ubuntu@dev  ~│g│s│g│v│gost  ⎇ MaineK00n/deprecated-expire~  ./integration/gost.new version
gost v0.4.0 1cc0341

@kotakanbe kotakanbe self-requested a review October 4, 2021 00:02
@kotakanbe kotakanbe merged commit 69dd7f6 into master Oct 4, 2021
@kotakanbe kotakanbe deleted the MaineK00n/deprecated-expire branch October 4, 2021 00:06
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.

2 participants