Skip to content

Latest commit

 

History

History
71 lines (64 loc) · 1.93 KB

TODO.md

File metadata and controls

71 lines (64 loc) · 1.93 KB

TODO

Initial version requirements:

  • Better error handling of goroutines through errCh
  • Possible usage of a runner to abstract git operations from the consul package
  • Update on KV should be for modified and deleted files only
  • Switch from godep to glide
  • Switch to apex/log
  • Webhook polling
    • GitHub
    • Stash
    • Bitbucket
    • Gitlab
  • Accept consul configuration for the client
  • Add -once flag to run git2consul once
  • Better CD/CI pipeline
    • Cross-platform builds
    • Travis/appveyor

Bugs/Issues:

  • Need to update diffs on the KV side
    • This includes only updating changed files
    • Delete untracked files
  • If repositories slice is empty, stop the program
  • Directory check has to check if it's a repository first
  • Runner, and watchers need a Stop() to handle cleanup better
  • Handle DoneCh better on both the watcher and runner
  • Handle initial load state better
    • Watcher should handle initial changes from load state

Error handling:

  • Better error handling on LoadRepos()
    • Bad configuration should be ignored
  • Handle repository error with git reset or re-clone

Repo delta KV handling:

  • On added, modified: PUT KV
  • On delete: DEL KV
  • On rename: DEL old KV followed by PUT new KV

Test coverage

  • repository
    • New
    • Clone
    • Load
    • Pull
    • Diff
    • Ref
    • Checkout
  • config
    • Load
  • runner
    • New
  • watcher
    • Watcher
    • Interval
    • Webhook
  • kv
    • Handler
    • Branch
    • KV
    • InitHandler
    • UpdateHandler

Test suite enhancement:

  • git-init on repo should be done on init()

  • Setup and teardown for each test during

    • Setup resets "remote" repo to initial commit
    • Teardown cleans local store
  • Instead of testutil, we can use mocks to set up a mock repository.Repository object