Skip to content

fix: allow empty string in RC apply_error#7020

Merged
simon-id merged 3 commits into
mainfrom
simon-id-patch-1
May 27, 2026
Merged

fix: allow empty string in RC apply_error#7020
simon-id merged 3 commits into
mainfrom
simon-id-patch-1

Conversation

@simon-id
Copy link
Copy Markdown
Member

Motivation

According to RFC RCTE2 - Configuration apply status which defines the individual RC configs error states, the apply_error field explicitly consider empty string to be a nominal case:

MUST contain an associated error message if apply_state is ERROR.
MUST NOT be set OR empty string if apply_state is anything else.

Changes

Allow apply_error to be either unset or empty string to be considered nominal.

@github-actions
Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/remote_config/test_remote_configuration.py                        @DataDog/remote-config @DataDog/system-tests-core

@datadog-prod-us1-6
Copy link
Copy Markdown

datadog-prod-us1-6 Bot commented May 26, 2026

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b809c9c | Docs | Datadog PR Page | Give us feedback!

Comment thread tests/remote_config/test_remote_configuration.py Outdated
Comment thread tests/remote_config/test_remote_configuration.py Outdated
@simon-id simon-id marked this pull request as ready for review May 26, 2026 14:58
@simon-id simon-id requested review from a team as code owners May 26, 2026 14:58
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b809c9cc39

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +37 to +38
error = state.get("apply_error", "") # Allow unset or empty string
if error != "":
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reject empty apply_error when apply_state is ERROR

This change allows any config_state with apply_error == "" to pass, but the RFC contract (also quoted in this commit message) only permits empty/unset apply_error when apply_state is not ERROR. In test_no_error, a payload like {apply_state: "ERROR", apply_error: ""} will now be treated as success, so a real remote-config application failure can be missed by the test suite. Please gate the empty-string allowance on apply_state and still fail when the state is ERROR.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the value is present, and is null, is it valid ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not explicitely specified, we can add it to the list of other libraries start failing tests because of it

MUST contain an associated error message if apply_state is ERROR.
MUST NOT be set OR empty string if apply_state is anything else.

@simon-id simon-id merged commit e778cd7 into main May 27, 2026
831 of 833 checks passed
@simon-id simon-id deleted the simon-id-patch-1 branch May 27, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants