bcgov / ckanext-bcgov

BC Data Catalogue source code, main ckan extension
http://catalogue.data.gov.bc.ca
GNU Affero General Public License v3.0
24 stars 23 forks source link

Unable to create BCGW Resources #513

Closed dkelsey closed 6 years ago

dkelsey commented 6 years ago

ENV

PROD,

TESTCASE

EXPECTED

ACTUAL

dkelsey commented 6 years ago

I looked in the logs and found that the code was calling the API in development.

OFI call exception | url: https://delivery.apps.gov.bc.ca/pub/dwds-ofi/secure/security/productAllowedByFeatureType/WHSE_BASEMAPPING.NRC_WATERBODIES_1M_SP | error: ('Connection aborted.', error(104, 'Connection reset by peer'))

I diagnosed this to the edc_pow.js

return {
    options: {
        env: 'delivery',
        pkg: {
            object_name: '',
            id: '',
            title: '',
            name: '',
        },
        secure_site: false,
        past_orders_nbr: '5',
        custom_aoi_url: 'http://maps.gov.bc.ca/ess/hm/aoi/',
        persist_config: true,
        use_pow_ui: true
    },

There are two parts to the solution.

  1. remove the line env: 'delivery',
  2. The module has a number of hardcoded urls that should be parameterized.