Issues

Select view

Select search mode

 

Rewrite the Users module to use stripes-connect throughout

Done

Description

At present it uses isomorphic-fetch in quite a few places. A few of those might be inherently necessary with the platform as it stands, but not all of them. I want to fix what can be easily fixed, so we can think more clearly about the ones that can't (if any).

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Details

Assignee

Reporter

Priority

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created May 22, 2017 at 4:42 PM
Updated November 3, 2017 at 7:05 PM
Resolved November 3, 2017 at 7:02 PM

Activity

Show:

Mike Taylor November 3, 2017 at 7:01 PM

With complete, this is done. And it's really nice.

Mike Taylor May 23, 2017 at 11:45 AM

Exactly. This is a philosophical issue, to do with how comprehensively stripes-connect provides us with the communication mechanisms we need.

But, yes, it does happen also give us a great motivating example of the kinds of compound-write operations we're going to be needing the business-logic modules to do, and gives us a chance to establish a general framework for how they might work.

Niels Erik Nielsen May 23, 2017 at 11:30 AM

I don't want to see frontend work get impeded in the meantime.

Just to be clear, there's no currently scheduled front-end work being blocked by this

Mike Taylor May 23, 2017 at 11:15 AM

Right. Here's how I see this.

1. UI posts a composite record to a high-level endpoint

2. users-bl plucks the creds and perms records out of the user record, so it's left with three separate records of different types, each of which it knows how to handle.

3. users-bl invokes the three operations in the context of some kind of transaction API. Maybe something like this:

Nominally, didItWork is a status for the whole three-operation transaction.

4. But for now, the transaction object is implemented by just running each operation as it comes in and remembering if it succeeded. If they all succeed, it returns true, otherwise false. Because that's sort of Good Enough for now.

5. When it's convenient, you can upgrade the implementation of the transaction object to do back-patching if something goes wrong.

6. The day may come when we somehow have to upgrade this to do real transactions; but it is not this day.

Kurt Nordstrom May 23, 2017 at 11:12 AM

You are correct. I was talking in the sense of: "Does JSONAPI offer us a way to design a transaction-type API that we can follow?"

TestRail: Cases
TestRail: Runs