Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Include individual resource sync errors in Sync events #970

Merged
merged 3 commits into from
Mar 12, 2018

Commits on Mar 9, 2018

  1. Use resource.Resource throughout

    Before we had an interface representing resources, they were generally
    passed around as a pair of (id string, definition []byte). We can cut
    down on the number of representations of resources by just using
    `resource.Resource`.
    
    This includes returning synchronisation errors with the whole
    resource, rather than simply by name. Doing so means we will be able
    to better surface sync problems with individual resources.
    squaremo committed Mar 9, 2018
    Configuration menu
    Copy the full SHA
    a3ce2ed View commit details
    Browse the repository at this point in the history
  2. Report sync errors including source file

    Include an error report in the sync notification, with resources
    v. errors (with the latter coming from `kubectl` most likely).
    
    The most useful bit of information when a resource fails to sync --
    more useful than the error from kubectl, even -- is the file that had
    a problem. Include that in the notification.
    
    Secondarily: to avoid having a long, tmpfile path in messages, make
    the source of resources relative to the repo.
    squaremo committed Mar 9, 2018
    Configuration menu
    Copy the full SHA
    4c92f1d View commit details
    Browse the repository at this point in the history
  3. Supply more structured info in sync errors

    Instead of using a map, which forces us to give a glommed-together
    string as the key (so that it can be JSONed), use a slice of structs
    with the unglommed data.
    squaremo committed Mar 9, 2018
    Configuration menu
    Copy the full SHA
    cdca842 View commit details
    Browse the repository at this point in the history