Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Evan Elias a6838bde9a Internal dependency management: use Go modules, not Dep
This commit moves Skeema from tracking dependencies using Dep to now using
Golang's newer module support.

The version of Golang used in CI is now updated to v1.12.

This commit also updates the version of several third-party dependencies.
2019-09-04 01:00:27 -04:00
Evan Elias c63a2ad837 Internal refactor to subdirectory handling
This commit adds a new field to the fs.Dir struct, ParseError, for storing
any error that occurred while parsing the directory. This then allows
Dir.Subdirs() to return all subdirs -- even ones with parse errors --
permitting the callsite to decide what to do about subdirs that had problems.

Previously, callsites had no exposure to what was wrong with a subdir,
limiting the ability to provide informative logging.

This commit also includes related logging improvements to various Subdirs()
callsites, and reduction in gocyclo complexity for several overly-large
recursive subdirectory-walking functions.
2019-08-29 19:26:38 -04:00
Evan Elias c756378df5 UI: use word-wrapping in STDERR logger, --help text
This commit aims to improve the readability of Skeema's output by using
word-wrapping and indentation in two places:

* STDERR log messages
* Option descriptions on --help screens

This logic is only applied if the relevant output device is a TTY, rather than
a normal file.
2019-08-20 17:33:23 -04:00
Evan Elias 42d3772bf7 Major internal refactor to use subpackages
This PR moves much of Skeema's logic out of the main package and into several
new sub-packages, which can be imported by other applications if desired.

Functionality is largely unchanged, and no new features have been added. But a
few foundational benefits of this work include:

* The codebase no longer assumes a 1:1 mapping between *.sql files and tables.
  This will eventually permit non-table object types (views, procs, grants, etc)
  to be stored in the same repo as schemas, if desired. See #41 for background.

* In the upcoming Skeema 1.1.x series, it will be possible to use a local Docker
  instance for temp schema operations. This performs better in high-latency,
  high-table-count scenarios; see #25 for background.

* The limit on max *.sql file size has been removed. Closes #34.

* `skeema pull` now performs much better than before, as long as --normalize is
  enabled (which it is by default).

* The code supporting `skeema push --concurrent-instances` is now much cleaner
  and more idiomatic.

* Test coverage has been improved.
2018-10-26 18:04:46 -04:00
Evan Elias 22c347a48a Update dep github.com/skeema/tengo, and simplify pull and push 2018-06-05 23:29:29 -04:00
Evan Elias 9dff23ce23 IsTerminal no longer exported by github.com/sirupsen/logrus 2018-05-08 14:47:14 -04:00
Evan Elias d287f82f82 Temporarily nuke vendoring, and use new capitalization of github.com/sirupsen/logrus 2018-05-08 14:37:30 -04:00
Evan Elias 8ef8ea34c9 Logging: update to latest version of logrus dep
This also required a minor code change, since logrus.IsTerminal now takes
an arg.
2017-05-09 22:55:52 -04:00
Evan Elias d83468af24 diff and push: Clean up output and logging
Update vendored version of skeema/tengo to latest (incl cleaner return val for
unsupported DDL), and improve output/logging/exitcode for unsupported DDL.

Improve output/logging for errors and skipped operations.

Add global --debug option. So far only used in logging exit codes, but more
debug output will be added soon.
2016-11-12 20:03:59 -05:00
Evan Elias 2101e13115 Start adding support for more advanced logging
Now using logrus for logging. Still just goes to STDERR for now.

Not many callsites are using this yet; more will be added in subsequent
commits.
2016-11-11 00:37:29 -05:00