uber / arcanist Goto Github PK
View Code? Open in Web Editor NEWThis project forked from phacility/arcanist
Command line interface for Phabricator
Home Page: http://www.phabricator.com/docs/arcanist/
License: Apache License 2.0
This project forked from phacility/arcanist
Command line interface for Phabricator
Home Page: http://www.phabricator.com/docs/arcanist/
License: Apache License 2.0
Hi,
We are calling arc diff
non-interactively from CI tooling, and getting the following new prompt in some cases:
Some reviewers are currently away:
[REDACTED]
Continue even though reviewers are unavailable? [y/N]
This seems to be due to this new code merged from upstream: c5920b1#diff-669069c591e7d4fa8ba0a361efd01caa
This doesn't get skipped by arc diff --nolint --nounit
and I know of no other way to skip prompts other than echoing y
into it (hacky).
I'd like to add a --nointeractive
flag to our fork and start using that to gate prompts like this. I'd be happy to create that PR, but I'd thought I better first ask:
a) if there is a better way?,
b) whether we could instead get something like that upstreamed?,
c) if there is anything else I am not considering here
Trying to set up a new Golang service scaffolded from Weaver, I set "unit.engine" to "ConfigurableGolangTestEngine" in my .arcconfig. I am now receiving the following exception when I run arc unit
:
tag@tag-C02RQ11AG8WM ~/gocode/src/code.uber.internal/hwautomation/blacksmith $ arc unit --trace
ARGV '/usr/local/Cellar/arcanist/tip/arcanist/bin/../scripts/arcanist.php' 'unit' '--trace'
LOAD Loaded "phutil" from "/usr/local/Cellar/arcanist/tip/arcanist/externals/includes/libphutil/src".
LOAD Loaded "arcanist" from "/usr/local/Cellar/arcanist/tip/arcanist/src".
Config: Reading user configuration file "/Users/tag/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/Users/tag/gocode/src/code.uber.internal/hwautomation/blacksmith/.arcconfig".
Working Copy: Path "/Users/tag/gocode/src/code.uber.internal/hwautomation/blacksmith" is part of `git` working copy "/Users/tag/gocode/src/code.uber.internal/hwautomation/blacksmith".
Working Copy: Project root is at "/Users/tag/gocode/src/code.uber.internal/hwautomation/blacksmith".
Config: Did not find local configuration at "/Users/tag/gocode/src/code.uber.internal/hwautomation/blacksmith/.git/arc/config".
>>> [0] <exec> $ git rev-parse --verify HEAD^
<<< [0] <exec> 9,675 us
>>> [1] <exec> $ git cat-file -t 'origin/master'
<<< [1] <exec> 8,119 us
>>> [2] <exec> $ git merge-base 'origin/master' HEAD
<<< [2] <exec> 6,885 us
>>> [3] <exec> $ git diff --no-ext-diff --no-textconv --raw 'd64b8535f79526eb562f100ec10a69530e2a87fc' --
<<< [3] <exec> 34,996 us
>>> [4] <exec> $ git diff --no-ext-diff --no-textconv --raw 'HEAD' --
>>> [5] <exec> $ git ls-files --others --exclude-standard
<<< [5] <exec> 8,361 us
<<< [4] <exec> 35,103 us
>>> [6] <exec> $ git diff-files --name-only
<<< [6] <exec> 32,579 us
[2016-10-27 01:21:27] EXCEPTION: (BadFunctionCallException) Too many arguments to xsprintf(). at [<phutil>/src/xsprintf/xsprintf.php:83]
arcanist(head=master, ref.master=e9d6fcb78e5d), phutil(head=master, ref.master=84b0feab4220)
#0 xsprintf(string, array, array) called at [<phutil>/src/xsprintf/PhutilCommandString.php:45]
#1 PhutilCommandString::renderString(boolean) called at [<phutil>/src/xsprintf/PhutilCommandString.php:30]
#2 PhutilCommandString::getMaskedString() called at [<phutil>/src/xsprintf/PhutilCommandString.php:18]
#3 PhutilCommandString::__construct(array) called at [<phutil>/src/xsprintf/csprintf.php:36]
#4 csprintf(NULL, TempFile, TempFile) called at [<arcanist>/src/unit/engine/ConfigurableGolangTestEngine.php:25]
#5 ConfigurableGolangTestEngine::buildTestFuture(TempFile, TempFile) called at [<arcanist>/src/unit/engine/ConfigurableGolangTestEngine.php:14]
#6 ConfigurableGolangTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:167]
#7 ArcanistUnitWorkflow::run() called at [<arcanist>/scripts/arcanist.php:392]
The following command returns a command not found error.
arc install-certificate https://code.uberinternal.com/api/
AFAICT https://github.com/uber/node-dot-arcanist exists solely to work around the fact that we didn't have a fork. Can we deprecate that project and remove the functionality from our jenkins plugin?
Same issue as reported in https://secure.phabricator.com/T6912, and implemented in the ConfigurableGolangTestEngine, I would like to run a command that assumes it is being run from the root of the repository. I'm hoping it can be similar to copying the getProjectRoot()
code to the UberCustomCommandTestEngine.
I tried to get this merged upstream, but they're not ready for it: https://secure.phabricator.com/D12120
Our existing unit.pytest.command
stops working, I think because of the change from 30b7f12.
# our config
"unit.pytest.command": "env/bin/pytest --cov-report=xml --junit-xml=%s"
# arc diff output
EXCEPTION: (Exception) Config option "unit.pytest.command" must have two "%s" placeholders. The first is used for JUNIT_XML. The second for COVERAGE_XML.
Example:
make clean && make -j8 test-xml JUNIT_XML=%s COVERAGE_XML=%s
However, if we added the placeholder for COVERAGE_XML
as suggested, like env/bin/pytest --cov-report=xml:% --junit-xml=%s
, we would get the following error,
EXCEPTION: (BadFunctionCallException) Too few arguments to xsprintf(). at [<phutil>/src/xsprintf/xsprintf.php:63]
arcanist(head=master, ref.master=5f1a791f0f0a), phutil(head=master, ref.master=80b9ff4ad23b)
#0 xsprintf(string, array, array) called at [<phutil>/src/xsprintf/PhutilCommandString.php:45]
#1 PhutilCommandString::renderString(boolean) called at [<phutil>/src/xsprintf/PhutilCommandString.php:30]
#2 PhutilCommandString::getMaskedString() called at [<phutil>/src/xsprintf/PhutilCommandString.php:18]
#3 PhutilCommandString::__construct(array) called at [<phutil>/src/xsprintf/csprintf.php:37]
#4 csprintf(string, TempFile) called at [<arcanist>/src/unit/engine/ConfigurablePytestTestEngine.php:26]
#5 ConfigurablePytestTestEngine::buildTestFuture(TempFile, TempFile) called at [<arcanist>/src/unit/engine/ConfigurablePytestTestEngine.php:14]
#6 ConfigurablePytestTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:170]
#7 ArcanistUnitWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1434]
#8 ArcanistDiffWorkflow::runUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1322]
#9 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:486]
#10 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
With addition of #139 if git config doesn't have pushurl, arc land breaks with following error:
[2019-06-25 14:01:08] EXCEPTION: (CommandException) Command failed with error #1!
COMMAND
git config --get remote.'origin'.pushurl
STDOUT
(empty)
STDERR
(empty) at [<phutil>/src/future/exec/ExecFuture.php:380]
arcanist(head=master, ref.master=527c1882d563), custom-unit-test-engine(), phutil(head=master, ref.master=80b9ff4ad23b)
#0 ExecFuture::resolvex() called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:406]
#1 ArcanistRepositoryAPI::execxLocal(string, string) called at [<arcanist>/src/land/UberArcanistSubmitQueueEngine.php:104]
#2 UberArcanistSubmitQueueEngine::pushChangeToSubmitQueue() called at [<arcanist>/src/land/UberArcanistSubmitQueueEngine.php:44]
#3 UberArcanistSubmitQueueEngine::execute() called at [<arcanist>/src/workflow/ArcanistLandWorkflow.php:370]
#4 ArcanistLandWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.