Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running a build against a shelved CL that doesn't exist should give a nicer error than a stacktrace. #215

Open
petemounce opened this issue Dec 2, 2020 · 0 comments

Comments

@petemounce
Copy link
Contributor

Versions of relevant software used

4.4.0 bk plugin

What happened

Python stacktrace

What you expected to happen

Something like

ERROR: your CL (75176) does not exist in perforce.

How to reproduce it (as minimally and precisely as possible):

Trigger a build of a shelved CL where that does not exist.

Full logs to relevant components

Logs

Running plugin perforce checkout hook | 5s
-- | --
  | # A hook runner was written to "/var/lib/buildkite-agent/tmp/20693f98-b9ca-44d8-a1de-a880198dba21/buildkite-agent-bootstrap-hook-runner-571790165" with the following:
  | $ /var/lib/buildkite-agent/tmp/20693f98-b9ca-44d8-a1de-a880198dba21/buildkite-agent-bootstrap-hook-runner-571790165
  | You are using pip version 8.1.1, however version 20.2.4 is available.
  | You should consider upgrading via the 'pip install --upgrade pip' command.
  | 10:12:41 p4python INFO: p4 trust -y
  | 10:12:42 p4python INFO: p4 client -o bk-p4-something-something
  | 10:12:42 p4python INFO: p4 client -i
  | 10:12:43 p4python INFO: Client bk-p4-something-something not changed.
  | 10:12:43 p4python INFO: p4 revert -w //...
  | 10:12:43 p4python WARNING: //... - file(s) not opened on this client.
  | 10:12:43 p4python INFO: p4 sync --parallel=threads=0 //my-depot/my-folder/my-second-folder/.buildkite/...@75176
  | 10:12:43 p4python WARNING: //my-depot/my-folder/my-second-folder/.buildkite/...@75176 - file(s) up-to-date.
  | 10:12:44 p4python INFO: p4 describe -S 75177
  | Traceback (most recent call last):
  | File "/var/lib/buildkite-agent/plugins/github-com-improbable-eng-perforce-buildkite-plugin-v4-4-0/hooks/../python/checkout.py", line 47, in <module>
  | main()
  | File "/var/lib/buildkite-agent/plugins/github-com-improbable-eng-perforce-buildkite-plugin-v4-4-0/hooks/../python/checkout.py", line 37, in main
  | repo.p4print_unshelve(changelist)
  | File "/var/lib/buildkite-agent/plugins/github-com-improbable-eng-perforce-buildkite-plugin-v4-4-0/python/perforce.py", line 291, in p4print_unshelve
  | depotfiles = changeinfo['depotFile']
  | KeyError: 'depotFile'

Anything else we need to know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant