Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Event history #134

Merged
merged 7 commits into from
Jul 12, 2021
Merged

Event history #134

merged 7 commits into from
Jul 12, 2021

Conversation

itowlson
Copy link
Contributor

This PR adds an append-only persistent log of events, and a table for viewing recent events for an application.

The work is not complete at this stage: I am putting out a draft early so that we can discuss it before I spend more time on it.

  • Is the architecture right? I feel like I am adding things in several places - should we audit at the moment we hit the database, or do we need to centralise more of the business logic, or what?
  • What is the desired set of events? I have sketched out the ones that occurred to me (but have not implemented all of them yet) - are they right? Are there others?
  • How do we want the UI to look? I prototyped a simple recent app history table but there probably needs to be something more high-powered for admins and platform operators.
  • Anything else

(Per @bacongobbler I am also completely happy with the "ship it and noodle on it once it's out there" approach.)

TODO: once we agree on what we want the schema to look like, we need to generate migrations before we merge!

Fixes #131

// order, or whatever you feel is aesthetically important. The values are
// a CONTRACT. If you change them YOU WILL BREAK EVENT LOGGING.

AccountCreated = 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want an event log when objects are deleted?

Say three users and a bot account are collaborating on an app, and the bot account removes the app. Do we want to log that event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will do, but we don't have that feature yet.

@bacongobbler bacongobbler mentioned this pull request Jul 12, 2021
@flynnduism
Copy link
Member

This is a wonderful addition, thanks @itowlson

How do we want the UI to look?

I can work on polishing this today, to try and get as much as possible polished up and ready for the demo

<td>@string.Join(", ", item.ActiveOn().Select(c => c.Name))</td>
</tr>
}
</tbody>
</table>

<div class="row" style="padding-bottom: 20px; padding-top: 20px;">
<h3>The Haps</h3>
Copy link
Member

Choose a reason for hiding this comment

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

👏🏻

@itowlson itowlson marked this pull request as ready for review July 12, 2021 23:48
@itowlson itowlson merged commit 47eb7f1 into deislabs:main Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audit history
3 participants