Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Fix cached values #3599

Merged
merged 9 commits into from
Aug 29, 2015
Merged

Fix cached values #3599

merged 9 commits into from
Aug 29, 2015

Conversation

rohitpaulk
Copy link
Contributor

No description provided.

@chadwhitacre
Copy link
Contributor

Ready for review yet, @rohitpaulk? :)

@rohitpaulk
Copy link
Contributor Author

Not yet, @whit537. I've been busy lately, will get back to this as soon as I can.

@chadwhitacre
Copy link
Contributor

What's left to do? I can spend some time on this ...

@rohitpaulk
Copy link
Contributor Author

@whit537 -

  • Update Participant#update_receiving, and revive related tests.
  • Update fake_payday.sql

@rohitpaulk
Copy link
Contributor Author

^ That's the functionality part. Once that's done, expose giving/receiving in the UI for participants, and only receiving for teams.

@chadwhitacre
Copy link
Contributor

!m @rohitpaulk

Thanks, I'll take a look.

@chadwhitacre
Copy link
Contributor

P.S. In Python, methods are spelled Participant.update_giving, not Participant#update_giving. ;-)

@chadwhitacre
Copy link
Contributor

Rebased on master.

@chadwhitacre
Copy link
Contributor

Hrm ... we're still using set_tip_to extensively in the test suite. It's about time to nix set_tip_to, I think.

@chadwhitacre
Copy link
Contributor

Rebased on master.

@chadwhitacre
Copy link
Contributor

Rebased on master to pick up #3655.

@chadwhitacre
Copy link
Contributor

I don't want to touch tips in absorptions/take_over, because one ~user could take over another and then migrate to a Team: we'd want the tips from both ~users to make their way through to the Team.

@chadwhitacre
Copy link
Contributor

We've standardized our nomenclature. How does that apply here? What are the values we're caching? Do we want both sum and count for each variable? What would that be?

@chadwhitacre
Copy link
Contributor

                sum           count        sharing bit
                ----------------------------------------------
current  ~user  giving        —            anonymous_giving
                receiving     npatrons     anonymous_receiving
                taking        —            anonymous_receiving

         Team   receiving     nsupporters  —
                payroll       nmembers     —       

target   ~user  giving        nrecipients  anonymous_giving
                taking        nteams       anonymous_taking

         Team   receiving     ngivers      —
                distributing  nmembers     —

Look right?

@chadwhitacre
Copy link
Contributor

Are we just giving up on the JSON APIs? 2.0 is a breaking change from 1.0. We simply don't have the same semantics anymore. We don't have a receiving or an npatrons to show for ~users. Right? Does that mean we should 404 all old-fashioned endpoints? Or are we okay with changing the endpoints in subtly non-backwards-compatible ways?

@chadwhitacre
Copy link
Contributor

I don't think we should pretend that npatrons is what I'm calling nteams above: the count of the number of teams a ~user is taking from.

@chadwhitacre
Copy link
Contributor

We shouldn't silently masquerade the value of nteams as the value of npatrons.

chadwhitacre added a commit that referenced this pull request Aug 18, 2015
This fixes the 500 (#3674), but not the cached values (#3599).
This was referenced Aug 18, 2015
@chadwhitacre
Copy link
Contributor

Rebased on master.

@chadwhitacre
Copy link
Contributor

Rebased on master again.

chadwhitacre added a commit that referenced this pull request Aug 29, 2015
@chadwhitacre chadwhitacre merged commit cda65ce into master Aug 29, 2015
@chadwhitacre chadwhitacre deleted the fix-cached-values branch August 29, 2015 01:26
@chadwhitacre
Copy link
Contributor

Tests are passing and we've stared at this for months. I've merged this and will pick up with further rationalizations on a new PR.

!m @rohitpaulk

@chadwhitacre chadwhitacre mentioned this pull request May 12, 2016
11 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants