⚠️ Troubleshooting CI/CD events

Validating your events

The easiest way to confirm your data was added correctly to Faros is to inspect it with GraphQL.

Validating CI events

CI events create artifacts and builds in Faros. Run the query below to inspect your artifact and build data in Faros. Check that :

  • There is at least one commit associated to your artifact: the commit sha has a non-null sha, and the repository that it comes from has a non-null name.
  • There is at least one commit associated to your build: the commit sha has a non-null sha, and the repository that it comes from has a non-null name. The status of the build is correct, and the timespan between startedAt and endedAt of the build event makes sense with regard to experienced build time of your engineers
query MyQuery {
  cicd_Artifact(limit: 100) {
    uid
    commitAssociations(limit: 100) {
      commit {
        id
        sha
        message
        isPhantom
        repository {
          name
          organization {
            uid
            source
          }
        }
      }
    }
  }
}
query MyQuery {
  cicd_Build(limit:100) {
    uid
    status
    startedAt
    endedAt
    commitAssociations {
      commit {
        sha
        repository {
          name
          organization {
            uid
            source
          }
        }
      }
    }
  }
}

Validating CD events

CD events create deployment objects. Run the query below to inspect your deployment data in Faros. Check that:

  • There are deployments in the system
  • Fields you expect to have values are not null
  • Deployment references an artifact that exists in the system: the artifact uid is non-null
  • The commit exists in the system: the commit sha is non-null. You can debug null sha's here.
  • isPhantom is false for all
query MyQuery {
  cicd_Deployment(limit: 100) {
    origin
    uid
    envCategory
    application {
      name
    }
    artifacts(limit: 100) {
      artifact {
        uid
        isPhantom
        commitAssociations(limit: 100) {
          commit {
            isPhantom
            sha
          }
        }
      }
    }
  }
}

Validating CD and Artifacts connection

If you are sending both CI and CD events, you will want to verify that the artifacts you create are correctly tied to their deployments. Check the following:

  • Deployment fields are non-null for the values you expect
  • The commit exists in the system: the commit sha is non-null. You can debug null sha's here.
  • isPhantom is false for all
query MyQuery {
  cicd_Artifact(limit: 100) {
    uid
    deployments(limit: 100) {
      deployment {
        startedAt
        endedAt
        statusCategory
        envCategory
        envDetail
        application {
          name
        }
      }
    }
    commitAssociations(limit: 100) {
      commit {
        id
        sha
        message
        isPhantom
        repository {
          name
          organization {
            name
          }
        }
      }
    }
  }
}

Investigating missing commits

If a commit sha does not appear this means the commit that is being references is not present in Faros. This can be for 2 reasons:

  1. The commit doesn't exist in the source system
  2. The commit exists but is not in Faros

If the commit doesn't exist in the source system you'll need to correct the sha that is sent in your instrumentation.

For all other cases try the following:

  • Verify that the commit is on the default branch. If a commit is on a non-trunk branch it does not get pulled into Faros.
  • Make sure the repo for your commit is being pulled. You can check if a repo is included on the Repositories page.
  • If a commit is recent it may not be present because the source hasn't synced the new data. To resolve this, sync your source, wait for it to complete then run your query again.

Visualizations

Once the CI and CD events appear in GraphQL, sync the graph so the events can be visualized in your favorite Faros dashboards and charts. If you have any questions, reach out to [email protected] for help!