Make sure that the CircleCI API token is truly required.

Review Request #12482 — Created July 21, 2022 and submitted

Information

rbintegrations
release-3.x

Reviewers

When configuring CircleCI, the API token field is required, but this is
only an aspect of the form field. We ended up running into some
situations (particularly in unit testing) where the integration was
configured but the API token was unset. In this case, we'd end up with
bad requests.

This change checks for an empty or missing API token, and preemptively
fails the operation. The error will be logged as well as included in the
status update.

  • Tested that attempting to start a request with a missing API token
    produced the correct log and error.
  • Ran unit tests.
Summary ID
Make sure that the CircleCI API token is truly required.
When configuring CircleCI, the API token field is required, but this is only an aspect of the form field. We ended up running into some situations (particularly in unit testing) where the integration was configured but the API token was unset. In this case, we'd end up with bad requests. This change checks for an empty or missing API token, and preemptively fails the operation. The error will be logged as well as included in the status update. Testing Done: - Tested that attempting to start a request with a missing API token produced the correct log and error. - Ran unit tests.
72ee7e53f9aaa71a6ab3083c5d3d61153ac1c33a
chipx86
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.x (a18be5b)