⚠️ 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 in Faros. Run the query below to inspect your artifacts data in Faros. Check that :
- There is at least one commit associated to the artifact that exists in the Faros system: the commit sha has a non-null sha.
- The repository exists in the Faros system: the repository name should be non-null
- The timespan between createdAt and startedAt makes sense with regard to experienced build time of your engineers
{
cicd {
artifacts(first: 100) {
nodes {
uid
commitAssociations(first: 100) {
nodes {
commit {
id
sha
message
metadata {
isPhantom
}
repository {
name
organization {
name
}
}
}
}
}
build {
endedAt
startedAt
}
}
}
}
}
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
{
cicd {
deployments(first: 100) {
nodes {
metadata {
origin
}
uid
env {
category
}
application {
name
}
artifacts(first: 100) {
nodes {
artifact {
uid
metadata {
isPhantom
}
commitAssociations(first: 100) {
nodes {
commit {
metadata {
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
{
cicd {
artifacts(first: 100) {
nodes {
uid
deployments(first: 100) {
nodes {
deployment {
startedAt
endedAt
status {
category
}
env {
category
detail
}
application {
name
}
}
}
}
commitAssociations(first: 100) {
nodes {
commit {
id
sha
message
metadata {
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:
- The commit doesn't exist in the source system
- 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!
Updated 3 months ago