Skip to content

fix(flagship_flag): remove extraneous flag_key, use key as canoical identifier instead - #7308

Open
repository wants to merge 1 commit into
cloudflare:mainfrom
repository:lngo/fix-flag-key
Open

fix(flagship_flag): remove extraneous flag_key, use key as canoical identifier instead#7308
repository wants to merge 1 commit into
cloudflare:mainfrom
repository:lngo/fix-flag-key

Conversation

@repository

Copy link
Copy Markdown
Member

currently, creation of flagship_flag resources will use the key attribute, and the API would return key in the response body. the provider will store the Key with whatever was returned, but left the FlagKey value in the state empty.

when the provider then tries to refresh state or perform any updates, via the /accounts/{account_id}/flagship/apps/{app_id}/flags/{flag_key} endpoint, the underlying SDK will reject it as the provider attempts to pass an empty FlagKey value

these two values refer to the same identifier for flagship flags, but have different naming for the request/response body vs. the path parameter variants

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

  • get rid of the flag_key attributes on the flagship_flag resource/data source
  • migrate states with the old flag_key attribute to schema 501 with key instead
  • use data.Key.ValueString() in place of data.FlagKey.ValueString() in all SDK clals

Acceptance test run results

  • I have added or updated acceptance tests for my changes
  • I have run acceptance tests for my changes and included the results below

Steps to run acceptance tests

N/A

Test output

N/A

Additional context & links

https://jira.cfdata.org/browse/APIX-1389
#7178

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.

1 participant