Confusing `HasStatus.complete?`

HasStatus has the following public methods and scopes regarding finished state.

  • HaStatus#complete?
  • HaStatus.finished

What's confusing here is that complete? != finished?, as finished doesn't take into account of skipped.

  • COMPLETED_STATUSES = %w[success failed canceled skipped].freeze
  • scope :finished, -> { with_status(:success, :failed, :canceled) }

We should sort out what's considered as "finished" and "completed" in GitLab CI terminologies.


Follow-up from "Make Fixed Email Notification GA (V2)"

The following discussion from !28338 (merged) should be addressed:

  • @fabiopitino started a discussion: (+1 comment)

    Interesting! I would have named this completed? but then I saw COMPLETED_STATUSES which IMO should have been more FINAL_STATUSES, as skipped or canceled don't indicate that the job has been "completed". 🤷 😄 I'll probably create an issue to fix it.