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

Testing improvements for snovault and indirectly for cgap #241

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

netsettler
Copy link
Collaborator

No description provided.

# which was an object that was always less than any other version than itself.
# We don't care about negative versions, so let's just say that parse_version
# for our purposes can return version 0.
return raw_parse_version(version_string or '0')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I fussed a bit about whether to default this to '-9999', '0', or '1', but I think we never use negative versions and '0' is therefore the lower bound. And I wanted a way to distinguish between this default and the earliest version I thought was likely to be specified explicitly, which is probably '1'.

Comment on lines +950 to +955
cached = _sid_cache(request)
found_sid = cached.get(linked['uuid'])
if not found_sid:
db_res = request.registry[STORAGE].write.get_by_uuid(linked['uuid'])
if db_res:
request._sid_cache[linked['uuid']] = db_res.sid
found_sid = request._sid_cache.get(linked['uuid'])
cached[linked['uuid']] = found_sid = db_res.sid
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed the logic here so please double-check carefully, but I think this way of expressing what found_sid is will be easier to read.

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.

1 participant