This adds a new mutation that lets us trigger a reindex from frontend.
The goal is to add a reindex button, calling this mutation, to the index
status page.
Move sg's docgen code into lib/cliutil/docgen for sharing with the mi CLI. In the future we can move other useful utilities for urfave/cli and CLIs in general into this set of subpackages for use in mi.
In a following PR, I want to fix a double fetch error which will be easier to fix if this is already in place. Since we don't intend to use this, it feels safe to me to remove.
This commit doesn't include changes in GraphQL layer, these will follow in the next one for the sake of keeping the commits smaller.
Test plan:
`sg migration` up-down-up, updated tests.
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
The previous tests we not testing cloning via p4-fusion, the following was happening:
git p4 test runs, completes and deletes external service which then soft
deletes repo. p4-fusion can't find repo to delete since it's name has changed
so does nothing. Repo is still on disk so we end up fetching rather than
cloning. Even if that fails, we still find the repo on disk and mark the test
as passed.
To fix this we now:
* Delete the repo on disk before deleting the service. (Confirmed locally that the repo is removed on disk)
* Clone a different repo in each test
The tests were also refactored to make things a little more explicit.
* allow repos to be incrementally fetched and updated
* check errors and print first 5
* move log line
* check result errrors
* move around next page logic
Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
Using `sg ci build -c $commit` when you're on the main branch, like when
you're requesting a build for a PR from an external contributor, would
previously end up on the `main` branch in Buildkite, even though it's
actually not on the `main` branch in the repository.
This is quite scary for the random bystander and in the end, very
confusing and wrong.
This change merely hotfixes the problem and the `sg ci build` command
should be rewritten as we also discovered other issues such as
`sg ci build main-dry-run -c $commit` will actually push the current
commit and not $commit on `main-dry-run/main`, which also quite
confusing.
* update prettier and fix yarn script
* fake change
* ensure format lint always runs unless specified otherwise
* remove formatting from default if specified
* do not add format if the target is format
* fix subcommand output
* restore original code
* ensure formatting is run when specified and not specified
* fix page format lint said is wrong
* Update package.json
* rename no-format-check flag
* update reference doc
Creates an additional command, `dx` which the DevX team uses as a
playground to script and add commands without having to think too much
about design and can host crude hacks before merging those in `sg`.