Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Persist edit history for site configuration including author and expose via GraphQL #46031

@mrnugget

Description

@mrnugget

Part of https://github.com/sourcegraph/sourcegraph/issues/40377 but only about site-configuration.

Tasks

  • Persist author for site config changes (we already persist the history in critical_and_site_config but don't record the author) internal: Persist author in site config #46150
  • Maybe, depending on whether it's encrypted: re-encrypt history when encryption key changes?
    • We do not encrypt site config at the moment in the application layer
  • Define API to expose the site config history via GraphQL graphqlbackend: Add API spec for site config history diff #46205,
    • API would need to expose history with date/time, who, diff to previous edit.
    • Needs to support pagination
    • Draft:
      siteConfiguration {
        // ...
        editHistory(last: 10) {
        nodes {
          id
          author { firstname, lastname } // <-- this is a User node
          date
          diff // <-- this is a diff
          // lines changed? removed? we already have a "diff" node in our GraphQL API, maybe we can reuse?
        }
        pageInfo {
          totalCount
          // ...
        }
        }
      }
  • Implement API (Fully implemented in: https://github.com/sourcegraph/sourcegraph/pull/47310)
    • Handle changes to "redacted" values
    • Compute diffs on the backend after loading requested number of edits

Metadata

Metadata

Assignees

Labels

estimate/1dsite-admin-uxIssues related to site-admin UX: bugs, papercuts, design, ...

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions