Skip to content

KeyError when Triggering Pipeline #14

@sushengloong

Description

@sushengloong

Hi,

We encountered the error below (KeyError) when running gocd-cli to trigger a pipeline.
Despite the error, the pipeline was actually triggered and run successfully though the duration was close to half-an-hour.
Not sure if it's gocd-cli or py-gocd or gocd server API itself that was causing the error.
Any pointer?

Furthermore the API response was not written into logs so it is difficult to troubleshoot.
Would you be able to suggest ways to improve logging in gocd-cli?
Thanks :)

+ exec gocd pipeline trigger PIPELINE_NAME_MASKED --unlock=true --wait-until-finished=true
Traceback (most recent call last):
  File "/usr/bin/gocd", line 60, in <module>
    result = utils.get_command(server, *sys.argv[1:]).run()
  File "/usr/lib/python2.6/site-packages/gocd_cli/commands/pipeline/__init__.py", line 75, in run
    while not self._stages_finished(response):
  File "/usr/lib/python2.6/site-packages/gocd_cli/commands/pipeline/__init__.py", line 105, in _stages_finished
    if stage['result'] not in self.pipeline.final_results:
KeyError: 'result'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions