[ERROR ON COMMIT] Default:Resource Not Found/default:Error [SOLVED]

Hi @all.

I’ve been having problems with my repo robot_test2

The dronde-server logs doen’t show any relevant informatión

Server Logs

{
  "commit": "be741e9751d33211cdbd00b3c3991b9ab5ec6335",
  "event": "push",
  "level": "debug",
  "msg": "webhook parsed",
  "name": "robot_test1",
  "namespace": "gitadmin_created_public_org",
  "time": "2019-11-05T10:08:38Z"
}
{
  "commit": "be741e9751d33211cdbd00b3c3991b9ab5ec6335",
  "event": "push",
  "level": "debug",
  "msg": "trigger: received",
  "ref": "refs/heads/master",
  "repo": "gitadmin_created_public_org/robot_test1",
  "time": "2019-11-05T10:08:38Z"
}
{
  "fields.time": "2019-11-05T10:08:38Z",
  "latency": 114564135,
  "level": "debug",
  "method": "POST",
  "msg": "",
  "remote": "10.0.0.56:45796",
  "request": "/hook?secret=1l0qwKUYFGj4KGR2EUAVYZrycxLK4Xb0",
  "request-id": "1TBzwwGwKM2wQQsMbhLksoTahMS",
  "time": "2019-11-05T10:08:38Z"
}
{
  "level": "debug",
  "machine": "29cb5652b379",
  "msg": "manager: accept stage",
  "stage-id": 586,
  "time": "2019-11-05T10:08:38Z"
}
{
  "level": "debug",
  "machine": "29cb5652b379",
  "msg": "manager: stage accepted",
  "stage-id": 586,
  "time": "2019-11-05T10:08:38Z"
}
{
  "level": "debug",
  "msg": "manager: fetching stage details",
  "step-id": 586,
  "time": "2019-11-05T10:08:38Z"
}
{
  "level": "debug",
  "msg": "manager: stage is complete. teardown",
  "stage.id": 586,
  "time": "2019-11-05T10:08:38Z"
}
{
  "build.id": 597,
  "build.number": 15,
  "level": "debug",
  "msg": "manager: build is finished, teardown",
  "repo.id": 5,
  "stage.id": 586,
  "time": "2019-11-05T10:08:38Z"
}
{
  "arch": "amd64",
  "kernel": "",
  "kind": "pipeline",
  "level": "debug",
  "msg": "manager: request queue item",
  "os": "linux",
  "time": "2019-11-05T10:08:38Z",
  "type": "docker",
  "variant": ""
}

Runner Logs

time="2019-11-05T10:14:55Z" level=debug msg="stage received" stage.id=593 stage.name=default stage.number=1 thread=2
time="2019-11-05T10:14:55Z" level=debug msg="stage accepted" stage.id=593 stage.name=default stage.number=1 thread=2
time="2019-11-05T10:14:55Z" level=debug msg="stage details fetched" build.id=604 build.number=3 repo.id=6 repo.name=robot_test2 repo.namespace=gitadmin_created_private_org stage.id=593 stage.name=default stage.number=1 thread=2
time="2019-11-05T10:14:55Z" level=error msg="cannot find pipeline resource" build.id=604 build.number=3 error="resource not found" repo.id=6 repo.name=robot_test2 repo.namespace=gitadmin_created_private_org stage.id=593 stage.name=default stage.number=1 thread=2
time="2019-11-05T10:14:56Z" level=debug msg="request stage from remote server" thread=2
time="2019-11-05T10:14:56Z" level=trace msg="http: context canceled"
time="2019-11-05T10:14:56Z" level=debug msg="done listening for cancellations" build.id=604 build.number=3 repo.id=6 repo.name=robot_test2 repo.namespace=gitadmin_created_private_org stage.id=593 stage.name=default stage.number=1 thread=2

How can I debug this problem?

2 Likes

I’ve finally found the problem on the .drone.yml file had a syntax mistake this error at the end

pipeline: <-----------ERRONEOUS KEYWORD
  nofity:
  image: peloton/drone-google-chat

Could be interesting if the log give us referente to the file, something like that.

time="2019-11-05T10:14:55Z" level=error msg="cannot find pipeline resource on the .drone.yaml file at line 45`" build.id=604 build.number=3 error="resource not found" repo.id=6 repo.name=robot_test2 repo.namespace=gitadmin_created_private_org stage.id=593 stage.name=default stage.number=1 thread=2
1 Like

as an aside, you are using legacy 0.8 syntax with 1.0. you may want to consider upgrading to the 1.0 syntax

kind: pipeline
name: default

steps:
- name: notify
  image: peloton/drone-google-chat
  ...

you solved the problem?

Yes !! Thank you very much !!

My build just stop working and I spent few days trying to figure out what was going on… Please! Add some highlight to UI informing that you stopped to support 0.8 syntax!

it was a really painfull experience… :frowning:

Thank you @toni-moreno for sharing the solution!

0.8 syntax is supported in 1.x

we have helped companies upgrade hundreds of repositories from 0.8 to 1.x without having to change the majority of their configuration files.

the system detects an 0.8 yaml and then converts on-the-fly to the 1.0 syntax. You can audit the conversion code and unit tests here:

if you have found an edge case where the conversion logic is not working as expected we would ask that you post a full copy of your yaml so that it can be evaluated further.

1 Like

Hi @tiagodeliberali , my error, began when I mixed v1.x syntax with 0.8 syntax. And Only wish having more detailed info in the log when this happens

In my scenario, the message “default: resource not found” started between 2019-10-12 (last time I used drone and it worked fine) and 2019-11-01 (new commit that used drone and it was broken). I did not changed drone.yml in this commit.

Here is my timeline (you can check #239 and #240):
https://cloud.drone.io/tiagodeliberali/finpe

Here is the .drone.yml file at that moment:

Now, I moved the .drone.yml to 1.0 and it is working again!