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

Fixed group refresh bug #14

Merged
merged 3 commits into from
Feb 28, 2018
Merged

Fixed group refresh bug #14

merged 3 commits into from
Feb 28, 2018

Conversation

alexcasalboni
Copy link
Owner

Fixes #13 (see new test)

FYI @benkehoe

@coveralls
Copy link

coveralls commented Feb 23, 2018

Pull Request Test Coverage Report for Build 35

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 21: 0.0%
Covered Lines: 100
Relevant Lines: 100

💛 - Coveralls

@@ -93,7 +93,7 @@ def parameter(self, name):
""" Create a new SSMParameter by name (or retrieve an existing one) """
if name in self._parameters:
return self._parameters[name]
parameter = SSMParameter(name)
parameter = SSMParameter(name, max_age=self._max_age)
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't strictly necessary, especially since it's not a public field

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, but it sounded like the whole Refreshable class would be inconsistent without it. Imagine we add a new method is_cached(): return self._max_age is not None; to Refreshable in the future. I will expect param.is_cached() to return True even if it's part of a group. So I was trying to keep the data Refreshable consistent.

Indeed, an alternative implementation would require to keep _max_age and _last_refresh_time updated for each individual parameter as well (and not redefining _should_refresh at all). What do you think?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I am removing this for now, and creating a new issue to eventually improve the "consistency" between individual params and their group (internally).

Repository owner deleted a comment from coveralls Feb 28, 2018
@alexcasalboni alexcasalboni merged commit 1b91852 into master Feb 28, 2018
@alexcasalboni alexcasalboni deleted the 13-group-bugfix branch June 15, 2018 10:34
alexcasalboni added a commit that referenced this pull request Oct 23, 2018
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.

3 participants