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

Split redis #1643

Merged
6 commits merged into from
May 20, 2022
Merged

Split redis #1643

6 commits merged into from
May 20, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 19, 2022

closes #1636

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #1643 (10b00fc) into master (22274b6) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1643      +/-   ##
==========================================
- Coverage   77.83%   77.83%   -0.01%     
==========================================
  Files         230      232       +2     
  Lines       18181    18209      +28     
==========================================
+ Hits        14152    14173      +21     
- Misses       4029     4036       +7     
Impacted Files Coverage Δ
lib/cosmos/api/settings_api.rb 33.33% <0.00%> (-19.30%) ⬇️
lib/cosmos/api/config_api.rb 52.63% <0.00%> (-11.66%) ⬇️
lib/cosmos/topics/topic.rb 80.00% <0.00%> (-10.91%) ⬇️
config/initializers/cts.rb 94.44% <0.00%> (-5.56%) ⬇️
lib/cosmos/utilities/store_autoload.rb 88.54% <0.00%> (-0.26%) ⬇️
lib/cosmos/utilities/store.rb 100.00% <0.00%> (ø)
lib/cosmos/models/settings_model.rb 86.66% <0.00%> (ø)
lib/cosmos/models/tool_config_model.rb 60.00% <0.00%> (ø)
lib/cosmos/system/system.rb 90.00% <0.00%> (+0.16%) ⬆️
lib/cosmos/topics/limits_event_topic.rb 95.23% <0.00%> (+0.23%) ⬆️
... and 4 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 22274b6...10b00fc. Read the comment docs.

@ghost
Copy link
Author

ghost commented May 19, 2022

closes #1627

@ghost
Copy link
Author

ghost commented May 19, 2022

Failed playwright test I think is just flaky. Works for me locally. I believe this is ready to merge.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Tons of cleanup in here, nice!

@@ -5,4 +5,6 @@ FROM ${COSMOS_REGISTRY}/redis:6.2
RUN mkdir /config
COPY ./config/* /config/

EXPOSE 3680
Copy link

Choose a reason for hiding this comment

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

What is this for?

Copy link
Author

Choose a reason for hiding this comment

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

Expose controls what is shown when you do "docker ps" or whatever. Unfortunately you can't remove an earlier EXPOSE, so I just added 3680 to the container so both 3679 and 3680 would show.

@@ -0,0 +1,4 @@
appendonly no
save ""
Copy link

Choose a reason for hiding this comment

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

Does this disable saving the state?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, this fully turns off persistence.

@@ -0,0 +1,4 @@
appendonly no
save ""
port 6380
Copy link

Choose a reason for hiding this comment

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

The existing redis.conf doesn't have a port specified ... I assume its the default?

Copy link
Author

Choose a reason for hiding this comment

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

6379 is the default

end
# Return the results sorted by target, packet
result.sort_by { |a| [a[0], a[1]] }
end
Copy link

Choose a reason for hiding this comment

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

???

Copy link
Author

Choose a reason for hiding this comment

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

get_all_cmd_tlm_info wasn't used anywhere. _get_cnt I moved to Topic.

require 'cosmos/models/model'

module Cosmos
class SettingsModel < Model
Copy link

Choose a reason for hiding this comment

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

Wow we didn't already have this?

Copy link
Author

Choose a reason for hiding this comment

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

Apparently got a little lazy with the models. Store should be completely isolated to Models and Topic now.


def self.read_topics(topics, offsets = nil, timeout_ms = 1000, &block)
Store.read_topics(topics, offsets, timeout_ms, &block)
if RUBY_VERSION < "3"
Copy link

Choose a reason for hiding this comment

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

Why is this just < "3"?

Copy link
Author

Choose a reason for hiding this comment

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

It works to check for all 2.x versions

@ghost
Copy link

ghost commented May 20, 2022

Looks like the playwright failed on the calendar test. That one is a little flaky so I wouldn't worry too much about it.

@ghost ghost merged commit c7d7d39 into master May 20, 2022
@ghost ghost deleted the split_redis branch May 20, 2022 00:34
This pull request was closed.
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.

Break Redis into Ephemeral and Persistent Services
1 participant