Skip to content

ALTER SETTINGS CONSTANT writes value but Mendix runtime does not pick it up #129

@engalar

Description

@engalar

Problem

ALTER SETTINGS CONSTANT reports success but the value is not actually available to the Mendix runtime. When the app starts, the constant remains empty.

Reproduction

./mxcli -p CarrefourAgent.mpr -c "ALTER SETTINGS CONSTANT 'AWSAuthentication.AccessKey' VALUE 'AKIAX...' IN CONFIGURATION 'Default'"
# Output: Updated constant 'AWSAuthentication.AccessKey' = 'AKIAX...' in configuration 'Default'

./mxcli -p CarrefourAgent.mpr -c "ALTER SETTINGS CONSTANT 'AWSAuthentication.SecretAccessKey' VALUE '...' IN CONFIGURATION 'Default'"
# Output: Updated constant 'AWSAuthentication.SecretAccessKey' = '...' in configuration 'Default'

Both commands report success. However, when the app is started from Studio Pro, the Bedrock connector page shows:

Required environment variables have not been filled. Please add values for

  • AWSAuthentication.AccessKey
  • AWSAuthentication.SecretAccessKey

The values had to be manually configured in Studio Pro for them to take effect.

Expected behavior

After ALTER SETTINGS CONSTANT ... IN CONFIGURATION 'Default' succeeds, the value should be persisted in a way that the Mendix runtime reads it on startup.

Possible cause

Studio Pro stores constant overrides in a location that mxcli may not be writing to (e.g., project-settings.user.json, or inside the MPR's internal configuration structure). mxcli may be writing to a different layer that gets overridden or ignored.

Environment

  • mxcli: 0.1.0
  • Mendix: 11.6.4
  • Launch method: Studio Pro (Run Locally)
  • OS: Windows 11

Copied from engalar#46

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions