Closed dpordomingo closed 5 years ago
This is tricky, because what you describe is more convenient from the sourced-ce point of view. But from the point of view of ghsync, it's correct to fail when a mandatory argument is not given.
+1 for failing without argument
There is no expected external use case for ghsync
, and the proposed one https://github.com/src-d/ghsync/pull/56 follows the same approach as implemented in gitcollector
.
Also it might be reasonable that if you ask ghsync
to collect data from a list of orgs, and the list is empty, then it will return: ok, I collected data for the list of orgs that you passed me
, same as when it returns nothing to update
.
On the other hand, forcing source{d} CE to handle this use case can be not that trivial.
https://github.com/src-d/gitcollector/issues/64
When source{d} CE is inited with a local workdir,
shsync
is started and then it fails fast because it was not passed an org.It should have the same behavior than
gitcollector
, and imo it should be the following: if an empty org is passed, it should exit0
(asgitcollector
does), and log a warning, e.g.no organizations to scrape