Skip to content

Fix for inflection when your absolute filepath happens to match v[0-9]#1618

Merged
therve merged 1 commit intoDataDog:masterfrom
ienders:nix-inflection-fix
Nov 8, 2023
Merged

Fix for inflection when your absolute filepath happens to match v[0-9]#1618
therve merged 1 commit intoDataDog:masterfrom
ienders:nix-inflection-fix

Conversation

@ienders
Copy link
Copy Markdown
Contributor

@ienders ienders commented Nov 7, 2023

What does this PR do?

Fix for inflection when your absolute filepath happens to match v[0-9] in the parent structure. This can happen on nix.

For example, with a filepath of:

/nix/store/xdav9lnh1idxynnqayfr3dclm4i2dmq3-ruby3.2.2-datadog_api_client-2.10.0/lib/ruby/gems/3.2.0/gems/datadog_api_client-2.10.0/lib/datadog_api_client/v1/api/authentication_api.rb

You'll attempt to inflect AuthenticationAPI as AuthenticationApi, as we attempt to lookup an override of "v9.authentication_api", which does not exist.

(Look closely: xdav9lnh1idxynnqayfr3dclm4i2dmq3) has v9 in it.

Review checklist

Please check relevant items below:

  • 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.
  • Or, this PR relies on API schema changes and this is a Draft PR to include tests for that new functionality.

    • Note: CI shouldn't be run on this Draft PR, as its expected to fail without the corresponding schema changes.

in the parent structure. This can happen on nix.

For example, with a filepath of:

 /nix/store/xdav9lnh1idxynnqayfr3dclm4i2dmq3-ruby3.2.2-datadog_api_client-2.10.0/lib/ruby/gems/3.2.0/gems/datadog_api_client-2.10.0/lib/datadog_api_client/v1/api/authentication_api.rb

You'll attempt to inflect AuthenticationAPI as AuthenticationApi, as we attempt to
lookup an override of "v9.authentication_api", which does not exist.

(Look closely: `xdav9lnh1idxynnqayfr3dclm4i2dmq3`) has `v9` in it.
@ienders ienders requested a review from a team as a code owner November 7, 2023 20:21
@therve
Copy link
Copy Markdown
Contributor

therve commented Nov 8, 2023

Thanks a lot for your fix!

@therve therve merged commit b13e6dd into DataDog:master Nov 8, 2023
github-actions bot pushed a commit that referenced this pull request Nov 8, 2023
…9]` (#1618)

in the parent structure. This can happen on nix.

For example, with a filepath of:

 /nix/store/xdav9lnh1idxynnqayfr3dclm4i2dmq3-ruby3.2.2-datadog_api_client-2.10.0/lib/ruby/gems/3.2.0/gems/datadog_api_client-2.10.0/lib/datadog_api_client/v1/api/authentication_api.rb

You'll attempt to inflect AuthenticationAPI as AuthenticationApi, as we attempt to
lookup an override of "v9.authentication_api", which does not exist.

(Look closely: `xdav9lnh1idxynnqayfr3dclm4i2dmq3`) has `v9` in it. b13e6dd
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.

2 participants