Skip to content

Check for None for every field

Hongtao Yang requested to merge fix-graphql-success-condition into main

What does this merge request do and why?

Check for None for every field in success_condition. Otherwise we get errors like

  File "/Users/hongtaoyang/Projects/gitlab/model_validation/prompt-library/promptlib/completion/gitlab_models.py", line 376, in _success_condition
    return response["project"]["job"]["aiFailureAnalysis"] is not None
           ~~~~~~~~~~~~~~~~~~~^^^^^^^
TypeError: 'NoneType' object is not subscriptable [while running '0: Request completions root-cause-analysis']

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request checklist

  • I've ran the affected pipeline(s) to validate that nothing is broken.
  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.

Merge request reports