Size constraint on YAML file? Error "yaml: missing kind attribute"


I’m having trouble running a pipeline that’s generated with starlark.
If necessary, I can share the pipeline in its entirety, but I’ll keep it short for now.

The pipeline does pretty much this:

packages = ['a', 'b', 'c', ... 'zzzz' ]

def main(ctx):
  return {
    'kind': 'pipeline',
    'type': 'kubernetes',
    'name': 'default',
    'steps': [ build(i) for i in ctx.input.packages ]

def build(package):
  return {
    'name': 'build-%s' % package,
    'image': 'arch-builder:master',
    'commands': [
      do_build %s
      ''' % package

It works as it should - as long as there are only a few items in the packages array. Having ~65 items present, drone refuses to start a build, it yields a parse error on the YAML file:

{"commit":"5179c75b0e98677fcb5229213775e62496446774","error":"yaml: missing kind attribute","event":"push","level":"warning","msg":"trigger: cannot parse yaml","ref":"refs/heads/master","repo":"Arch/aur-builds","time":"2022-09-17T22:30:33Z"}

If I use the drone client to generate a .drone.yml, everything seems fine. drone lint doesn’t complain, yamllint neither - apart from line lengths. The resulting file has about 76K.

I’m stumped what’s the issue here, the message above is the only thing that’s present in the logs connected to this, with trace logging enabled.

Drone version: drone/drone:2.12.1

Hi @fuero ,You can use a generic yaml validation tool to see you have written a yaml file that cannot be parsed: .

As mentioned, I’ve verified the YAML file I generated with drone starlark with yamllint and drone lint - both parse it without error.

Hello @fuero

You could certainly have found a bug. Can you give us the file size in bytes if the converted yaml when you start to see this behavior? Thanks

I checked file sizes in bytes from 2 build attempts:

24521 - working
74718 - not working.

@jimsheldon any updates on this?

@fuero let me check around and get back to you.


Having the exact same problem :pray:

Can you please submit a bug via Issues · harness/drone · GitHub? If you can provide steps to reproduce the bug that would be very helpful.


What kind of information I didn’t already give are you expecting there?

I don’t want to open a bug on your behalf. The developers might have more questions and there might be more discussion, it would be wrong for me to be the author of the report.

Ok, thanks for the clarification. I’ll do that then tomorrow.


Opening an issue on github gives me this info text:

Bugs or Issues? Please create a new topic in our Discourse forum.

So perhaps its best to move this thread to the appropriate section of this forum?

@fuero did it work for you later? can you send me the screenshot?


@Shruthikini no, it still doesn’t work. I’m using drone 2.14.0 now.

I’ve opened another thread in the Bugs section about this.