-
Notifications
You must be signed in to change notification settings - Fork 308
Rewrite of the dashboard reconciliation #3975
Conversation
fdd18d6
to
c853d65
Compare
<td>{{ fmt(balance) }}</td> | ||
<td>{{ fmt(fees) }}</td> | ||
</tr> | ||
{% for month, recs in by_month|dictsort %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Is this a Jinja2 thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
I see |
So these are the steps I think I have to make to show the null values in the dashboard reconciliation page:
|
This last commit is the changes made to database in order to capture the NULL values for route in the exchanges table that are not show on the reconciliation page. I tested it here but need real data as before so please review @whit537 as before... scratch I still have some worked based on the failed travis. I will look at it over the weekend. |
35fc223
to
c370b0d
Compare
Redid 35fc223 as c370b0d to uncomment SQL per IRL convo w/ @kaguillera. |
@whit537 : is the reconciliation page supposed to be public, since it's in the dashboard? Just to be sure. |
Yeah, if I remember right, earlier in the PR we had two sections on the reconciliation dashboard, one aggregate and one more detailed. The detailed one we wanted to protect, but I'm pretty sure it's gone now. We're okay with the aggregate numbers being public. |
Ok, thanks for the reply ;-) |
71e325a
to
3a99242
Compare
Finally started back working on this and realize(Trinidad/UK spelling) the reason for the error on Travis. |
Now this is finally up for review since travis is passing. ping @whit537 |
@kaguillera Ready for a rebase post-#3596, ya? |
Let me just verify this and get back to you... |
1a3f844
to
3a99242
Compare
Finally ready for review and merging. |
Need another rebase. 🐑 |
Talking through git wonkiness here. Trying to understand where the infamous "@kaguillera has added 250+ commits" is coming from. Planning to pick up tomorrow ... |
3a99242
to
00b0f2b
Compare
🎉 No more conflicts 🎉 ready for review again |
@@ -0,0 +1,163 @@ | |||
import calendar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's up with this reconciliation_new.spt
file? Is it supposed to replace reconciliation.spt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reconciliation_new.spt
is a scratch file that I need to (and going to now) remove. Originally it was going to be a separate page but decided against it I actually thought that I had removed it.
Weird. Green again! O.O |
5fcee84
to
bd7fd89
Compare
bd7fd89
to
0eb41a4
Compare
Rebased |
Ready again...what is the verdict...can we merge? |
-- network in exchange_route table | ||
INSERT INTO exchange_routes (participant, network, address, error) | ||
( | ||
SELECT DISTINCT participants.id, 'unknown'::payment_net, 'None', 'None' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Goofy to use the string "None" here. I think the empty string might be a better choice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a uniqueness constraint on (participant, network, address)
, which is why non-unique (network, address)
is fine.
gratipay-bak=# \d exchange_routes
Table "public.exchange_routes"
┌─────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
│ Column │ Type │ Modifiers │
├─────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ id │ integer │ not null default nextval('exchange_routes_id_seq'::regclass) │
│ participant │ bigint │ not null │
│ network │ payment_net │ not null │
│ address │ text │ not null │
│ error │ text │ not null │
│ fee_cap │ numeric(35,2) │ │
└─────────────┴───────────────┴──────────────────────────────────────────────────────────────┘
Indexes:
"exchange_routes_pkey" PRIMARY KEY, btree (id)
"exchange_routes_participant_network_address_key" UNIQUE CONSTRAINT, btree (participant, network, address)
Check constraints:
"exchange_routes_address_check" CHECK (address <> ''::text)
Foreign-key constraints:
"exchange_routes_participant_fkey" FOREIGN KEY (participant) REFERENCES participants(id)
Referenced by:
TABLE "exchanges" CONSTRAINT "exchanges_route_fkey" FOREIGN KEY (route) REFERENCES exchange_routes(id)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soooo...if we replace the None
for address and error will that be sufficient or do you still have some concerns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, let's switch to n/a
for address and the empty string for error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in bac13de.
Change default values for route address and error (and tweak comment)
Alright, I'm good here. I'm satisfied that we don't have code inserting new |
This is a rewrite of the reconciliation report in the dashboard directory (gratipay/finances#21) It still needs to be tested on a snapshot of actual data to verify it works properly in production. Any advice on how I can recreate a snapshot of the database to do proper testing