camptocamp / c2cgeoportal

c2cgeoportal application
http://geomapfish.org
Other
64 stars 46 forks source link

[tilecloud_chain] Cannot find required key 'connection' #2648

Closed rbovard closed 7 years ago

rbovard commented 7 years ago

For commiters:

GitHub project URL: https://github.com/camptocamp/nyon_c2cgeoportal/

Infrastructure description URL:

Host:

GeoMapFish version: 2.1.0.rc4

Running command: make -f instance_v2.mk upgrade4

Result:

.build/venv/bin/c2ctool upgrade  instance_v2.mk --step 4
make[1]: Entering directory ''
.build/venv/bin/c2c-template --vars vars_nyon.yaml --engine mako --files tilegeneration/config.yaml.mako
msgfmt -o nyon/locale/fr/LC_MESSAGES/nyon-server.mo nyon/locale/fr/LC_MESSAGES/nyon-server.po
touch --no-create nyon/locale/fr/LC_MESSAGES/nyon-server.mo
.build/venv/bin/generate_controller --generate-mapcache-config
ERROR:tilecloud_chain:__init__:The config file 'tilegeneration/config.yaml' in invalid.
 - /layers/tr_plan_ouvrage_raster/geoms/0: Cannot find required key 'connection'.
CONST_Makefile:1148: recipe for target 'apache/mapcache.xml' failed
make[1]: *** [apache/mapcache.xml] Error 1
make[1]: Leaving directory ''
Traceback (most recent call last):
  File ".build/venv/bin/c2ctool", line 11, in <module>
    sys.exit(main())
  File "/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/c2ctool.py", line 98, in main
    c2ctool.upgrade()
  File "/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/c2ctool.py", line 222, in upgrade
    self.step4()
  File "/.build/venv/local/lib/python2.7/site-packages/c2cgeoportal/scripts/c2ctool.py", line 442, in step4
    check_call(["make", "-f", self.options.file, "build"])
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'instance_v2.mk', 'build']' returned non-zero exit status 2
CONST_Makefile:1256: recipe for target 'upgrade4' failed
make: *** [upgrade4] Error 1

If no direct error, result and expected result:

My config:

    tr_plan_ouvrage_raster:
        <<: *layer
        layers: tr_plan_ouvrage_raster
        bbox: [500046, 128565, 508458, 144826]
        min_resolution_seed: 0.05
        meta_buffer: 0
        connection: ${mapserver_connection}
        geoms:
            -   sql: geom FROM tr.tr_plan_ouvrage_raster_emprise
                min_resolution: 0.05
                max_resolution: 0.5
sbrunner commented 7 years ago

The connectionshould be moved in the geoms =>:

    tr_plan_ouvrage_raster:
        <<: *layer
        layers: tr_plan_ouvrage_raster
        bbox: [500046, 128565, 508458, 144826]
        min_resolution_seed: 0.05
        meta_buffer: 0
        geoms:
            -   connection: ${mapserver_connection}
                sql: geom FROM tr.tr_plan_ouvrage_raster_emprise
                min_resolution: 0.05
                max_resolution: 0.5