importing an empty CFConfig property should create an empty property struct

Description

The approach he's used and people are used to, { "resourceProviders": {} } would clear that setting and use defaults for everything else,

This already works nicely with our deploy approach (aka configImport / merge), except it simply removes the key altogether

but it would be better to set { "resourceProviders": {} } as an empty property, otherwise, if we move to falling back to defaults, on restart, or re-import via deploy, the directive to override the defaults is then lost

Environment

None

Attachments

2

Activity

Show:

Michael Offner 23 August 2024 at 16:05

ticket for improving the default behaviour

Michael Offner 23 August 2024 at 15:56
Edited

i get the impression we overcomplicate things here, we need to make it as simple as possible.

First, in a separate ticket, i have reduced the dependecy of Lucee on the cfconfig configuration, so it works always, that should be base behaviour. means Lucee always has default behaviour that works as expected even no configuration is done. in other words, the configuration should be optional.

Then there are 2 ways to update the config, you copy it to lucee-server/context then this is the full config, if you wanna update/extend the existing config you copy it to lucee-server/deploy, that’s it.

coming back to the resource provider example, when you don’t set a resource provider it does not exist, simple and easy. but coming back to the first rule, Lucee needs zip and file resource provider, so they are always set.

Zac Spitzer 24 July 2024 at 09:46

  1. what happen with new install on a empty structure provided

i would expect the normal default CFConfig.json if the config is {}

  1. what happen with a existing install on a empty structure provided

same as 1, actually aside from the file system, if the base config is empty, it’s effectively a new install?

  1. what happen with new install on a NOT empty structure provided

with resourceProviders : [] I would expect the normal default CFConfig.json, only different being that resourceProviders: is []

  1. what happen with a existing install on a NOT empty structure provided

same as 3

is there really a difference between new and existing? I don’t think so, a base CFConfig.json is the always configuration directive

Michael Offner 24 July 2024 at 09:33

still missing the expected behaviour between new and update. please break in 4 parts.

  1. what happen with new install on a empty structure provided

  2. what happen with a existing install on a empty structure provided

  3. what happen with new install on a NOT empty structure provided

  4. what happen with a existing install on a NOT empty structure provided


Zac Spitzer 24 July 2024 at 09:26

resource providers is just an example, which as it breaks the admin, seemed fairly demonstrative

sorry that was just me editing the example i was using (was using cacheProviders, which has a struct), oops.

with 6.1.1.51, importing a CFconfig with {} and then triggering lucee to write out the CFConfig.json, results in writing out a CFCONFig.json file without any resourceProviders

As a normal developer workflow, I imagine

  • starting with a sample cfconfig.json

  • running up lucee

  • tweaking via the admin UI

  • and then grabbing the .CFConfig.json to use in the future

[java] [script] resourceProviders missing in empty .CFConfig.json

tho in this example, maybe lucee skips a empty {} config?

here’s one with only an empty cacheProviders

 

Fixed

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 24 July 2024 at 06:44
Updated 23 August 2024 at 16:06
Resolved 23 August 2024 at 16:06