Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Error message given when indentation in configuration file is incorrect is difficult to understand #17

Closed
charleskorn opened this issue Sep 21, 2018 · 1 comment

Comments

@charleskorn
Copy link
Collaborator

charleskorn commented Sep 21, 2018

If you have a configuration file with incorrect indentation, such as:

tasks:
  run:
    description: Run the application
      prerequisites: # This line shouldn't be indented, it should be at the same level as 'description'
      - setup
    run:
      container: build-env
      command: yarn start

then you get an error message like this:

/home/user/Repositories/project/batect.yml (line 27, column 18): mapping values are not allowed here
in 'reader', line 28, column 20:
          prerequisites:
                       ^
 
Caused by: com.fasterxml.jackson.databind.JsonMappingException: mapping values are not allowed here
in 'reader', line 28, column 20:
          prerequisites:
                       ^
 
at [Source: (sun.nio.ch.ChannelInputStream); line: 28, column: 20]
at [Source: (sun.nio.ch.ChannelInputStream); line: 27, column: 18] (through reference chain: batect.config.io.ConfigurationFile["tasks"])

...which is not very clear at all. It would be better if it led the user to what the real issue is.

@charleskorn
Copy link
Collaborator Author

This should be fixed with 99c45a7.

charleskorn pushed a commit that referenced this issue Nov 29, 2020
…tbrains.kotlin-kotlin-gradle-plugin-1.4.20

Bump kotlin-gradle-plugin from 1.4.10 to 1.4.20 in /buildSrc
charleskorn added a commit that referenced this issue Dec 23, 2020
…ith an image that uses a non-default syntax.

The output previously looked something like (note output for #3 and #4):

#1 [internal] load remote build context
#1 DONE

#2 copy /context /
#2 DONE

#3 resolve image config for docker.io/docker/dockerfile:1.1-experimental
#3 ...

#4 docker-image://docker.io/docker/dockerfile:1.1-experimental@sha256:de85b2f3a3e8a2f7fe48e8e84a65f6fdd5cd5183afa6412fff9caa6871649c44
#4 ...

#5 [internal] load metadata for docker.io/library/ruby:2.7.2
#5 DONE

#6 [ 1/12] FROM docker.io/library/ruby:2.7.2
#6 DONE

#7 [ 2/12] RUN mkdir -p /tools
#7 CACHED

#8 [ 3/12] COPY health-check.sh /tools
#8 CACHED

#9 [ 4/12] RUN mkdir -p /app
#9 CACHED

#10 [ 5/12] COPY app/Gemfile app/Gemfile.lock /app/
#10 CACHED

#11 [ 6/12] WORKDIR /app
#11 CACHED

#12 [ 7/12] RUN bundle config set deployment true
#12 CACHED

#13 [ 8/12] RUN bundle config set without development
#13 CACHED

#14 [ 9/12] RUN bundle install
#14 CACHED

#15 [10/12] COPY app/config.ru /app
#15 CACHED

#16 [11/12] COPY app/bin /app/bin
#16 CACHED

#17 [12/12] COPY app/lib /app/lib
#17 ...

#3 resolve image config for docker.io/docker/dockerfile:1.1-experimental
#3 DONE

#4 docker-image://docker.io/docker/dockerfile:1.1-experimental@sha256:de85b2f3a3e8a2f7fe48e8e84a65f6fdd5cd5183afa6412fff9caa6871649c44
#4 CACHED

#17 [12/12] COPY app/lib /app/lib
#17 CACHED

#18 exporting to image
#18 exporting layers: done
#18 writing image sha256:ace2572ab366a9153b23ccc0667cc6163a32a3cbb96bfef237a25c68005699a6: done
#18 naming to docker.io/library/batect-sample-ruby-international-transfers-service: done
#18 DONE
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant