Skip to content

Conversation

daemitus
Copy link
Contributor

@daemitus daemitus commented Oct 2, 2024

I migrated work to 0.11.8, and any secret refs were removed in the state after apply.

During testing, it looked like responses either came in the format of
{"k1": "v1", ...} or {"k1": {"type": "string", "value": "v2"}, ...}. Any time a secretRef was seen, it was inside the latter format. Apparently they can also show up in the former. This fixes the oversight, unit test didn't catch it :(

Copy link
Member

@tobio tobio left a comment

Choose a reason for hiding this comment

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

Can we add some unit tests around these two functions to capture both these formats?

@daemitus
Copy link
Contributor Author

daemitus commented Oct 2, 2024

can do

@daemitus
Copy link
Contributor Author

daemitus commented Oct 3, 2024

I'm not even sure if all these test combinations will even show up, but they pass :D Even found an undesirable edge case that pops up with imports/0.11.8 migrations and unknown secrets.

Copy link
Member

@tobio tobio left a comment

Choose a reason for hiding this comment

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

Thanks for following up with this :)

@tobio tobio merged commit c878dd8 into elastic:main Oct 3, 2024
20 checks passed
tobio added a commit that referenced this pull request Oct 3, 2024
* origin/main:
  fix package policy secrets (#821)
  chore(deps): update codecov/codecov-action digest to b9fd7d1 (#815)
  Bump release memory
  Switch to golang 1.23.2 in release
  Bump release memory
  Prepare release v0.11.8 (#810)
  Add key_id as an explicit attribute (#789)
  standalone-output resource (#811)
  Add URL support to data_view field_formats (#812)
  migrate fleet integration_policy to framework, fix secret churn (#797)
  Allow mappings to be unknown to support mappings defined in index templates (#803)
@daemitus daemitus deleted the packagepolicyfix branch October 3, 2024 14:34
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