Skip to content

Conversation

@daniel-trinh
Copy link
Contributor

@daniel-trinh daniel-trinh commented Oct 17, 2025

What does this PR do?

Fixes the Ruby code formatter to correctly handle hash keys containing special characters (e.g., periods, dashes, spaces) by using hash rocket syntax (=>) instead of symbol syntax.

Problem:
The formatter was generating invalid Ruby syntax for keys with special characters like "ocsf.activity_name":

# Before (invalid syntax):
{ ocsf.activity_name: 'Other' }

Solution:
Added validation to check if a key is a valid Ruby symbol. Keys with special characters now use hash rocket syntax:

# After (valid syntax):
{ "ocsf.activity_name" => 'Other' }

Valid identifiers (alphanumeric and underscores only) continue to use symbol syntax:

{ normal_key: 'value' }

Additional Notes

  • Added Ruby tests to verify correct behavior for both valid and invalid identifiers
  • No schema changes required

Review checklist

  • This PR includes all newly recorded cassettes for any modified tests.
  • This PR does not rely on API client schema changes.
    • The CI should be fully passing.

@daniel-trinh daniel-trinh marked this pull request as ready for review October 17, 2025 23:32
@daniel-trinh daniel-trinh requested review from a team as code owners October 17, 2025 23:32
@daniel-trinh
Copy link
Contributor Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Oct 21, 2025

View all feedbacks in Devflow UI.

2025-10-21 14:15:31 UTC ℹ️ Start processing command /merge


2025-10-21 14:15:41 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-10-21 16:47:40 UTC ⚠️ MergeQueue: This merge request was unqueued

daniel.trinh@datadoghq.com unqueued this merge request

@daniel-trinh
Copy link
Contributor Author

/remove

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Oct 21, 2025

View all feedbacks in Devflow UI.

2025-10-21 16:47:34 UTC ℹ️ Start processing command /remove


2025-10-21 16:47:37 UTC ℹ️ Devflow: /remove

@daniel-trinh
Copy link
Contributor Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Oct 21, 2025

View all feedbacks in Devflow UI.

2025-10-21 16:47:50 UTC ℹ️ Start processing command /merge


2025-10-21 16:47:56 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-10-21 20:48:08 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

@jack-edmonds-dd
Copy link
Contributor

Confirmed in Slack that this shouldn't affect the existing generated code.

@jack-edmonds-dd jack-edmonds-dd merged commit c222047 into master Oct 22, 2025
57 of 60 checks passed
@jack-edmonds-dd jack-edmonds-dd deleted the daniel.trinh/fix_formatter-dotted-keys branch October 22, 2025 20:56
github-actions bot pushed a commit that referenced this pull request Oct 22, 2025
github-actions bot pushed a commit to ConnectionMaster/datadog-api-client-ruby that referenced this pull request Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants