Skip to content

🐛 Bug Report: ClickHouse expiration days isn't configurable #9908

@michislava

Description

@michislava

📜 Description

We wanted to reduce the number of LOG_EXPIRATION_DAYS_NUMBER to 30. So we passed it as an env var in the deployment of our api and worker pod.

But we got the following error in both pods:

[Nest] 1  - 01/13/2026, 1:46:09 PM     LOG [EnterpriseProvider] Using noop SendWebhookMessage provider
================================
 Invalid environment variables:
    LOG_EXPIRATION_DAYS_NUMBER: Invalid bool input: "30"
================================
 Exiting with error code 1

So it seems that this value isn't configurable since it is bool.

Here in v.3.11.0 we see that when an exception is thrown, a warning log is displayed and it again falls back to 100 days:

} catch (error) {
      this.logger.warn(
        { error: error instanceof Error ? error.message : 'Unknown error' },
        'Failed to fetch log expiration days from LaunchDarkly, falling back to 100 days'
      );

return addDays(new Date(), 100);

Can we make this env var: LOG_EXPIRATION_DAYS_NUMBER configurable?

👟 Reproduction steps

Try to pass this env var name: LOG_EXPIRATION_DAYS_NUMBER to override default settings.

👍 Expected behavior

    - name: LOG_EXPIRATION_DAYS_NUMBER
      value: "30"

This to work correctly and we override the 100 days expiration with 30 days.

👎 Actual Behavior with Screenshots

}
[Nest] 1  - 01/13/2026, 1:46:09 PM     LOG [EnterpriseProvider] Using noop SendWebhookMessage provider
================================
 Invalid environment variables:
    LOG_EXPIRATION_DAYS_NUMBER: Invalid bool input: "30"
================================
 Exiting with error code 1

This isn't configurable.

Novu version

v.3.11.0

npm version

No response

node version

No response

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions