Proposed Breaking Changes to the API v2 (Preview)

We’ve made some recent updates to our list of proposed breaking changes to the v2 API as of Nov 5. The team will be rolling out these changes in the coming weeks weeks. Please take some time to review the change log to avoid any interruptions to your automation: https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/breaking.md#proposed-changes

If you are currently using the v2 endpoints please take some time to review the revised set of breaking changes in our log. You can give us feedback on these changes by replying in this thread or opening an issue on our api-preview-docs repo

The endpoint to Get a pipeline’s workflows GET /pipeline/{pipeline-id}/workflow has been released.

The workflow key in the Get a pipeline GET /pipeline/{pipeline-id} response is now deprecated and is scheduled to be deleted on Dec 9, 2019

Instances where the workflow key is being referenced from the Get a pipeline GET /pipeline/{pipeline-id} response should be modified to make a call to Get a pipeline’s workflows GET /pipeline/{pipeline-id}/workflow instead.

Reminder, you can keep track of the latest breaking changes (proposed and actual) in our changelog here https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/breaking.md

I’m observing unexpected behavior when using Pipelines in combination with Conditional Workflows (https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/conditional-workflows.md).

  1. I’ve specified an unless conditional for a single workflow I wish to skip when manually triggering a pipeline via API.

  2. When triggering the pipeline, I observe that the desired jobs are run in CircleCI.

  3. However, the new pipeline shows no workflows at https://app.circleci.com/github/:org/:project/pipelines, and the API response to /pipeline/:id/workflow is { next_page_token: null, items: [] }. My guess is that these problems are related, as the Pipeline UI appears to leverage API v2.

Is it possible that a bug exists when combining Conditional Workflows and the Pipelines API?

Can you post the config?

@ndintenfass I’ve supplied a reduced version of the configuration to highlight the elements related to the pipeline parameter.

Some things I’m curious about

  • Could the inclusion of triggers impact the workflows that are executed using the pipeline parameter?
  • Could the API be excluding workflows when a pipeline parameter is supplied?
version: 2.1

parameters:
  some_param:
    description: The param triggered via API
    type: boolean
    default: false

jobs:
  first_workflow_first_job:
    ...
  second_workflow_first_job:
    ...
  third_workflow_first_job:
    ...

workflows:
  first_workflow:
    unless: << pipeline.parameters.some_param >>
    jobs:
      - first_workflow_first_job

  second_workflow:
    triggers:
      - schedule:
          cron: '45 0,2,4,6,8,10,12,14,16,18,20,22 * * *'
          filters:
            branches:
              only:
                - some-branch
    jobs:
      - second_workflow_first_job

  third_workflow:
    triggers:
      - schedule:
          cron: '45 * * * *'
          filters:
            branches:
              only:
                - master
    jobs:
      - third_workflow_first_job