Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve log keys order #267

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

oshirohugo
Copy link

@oshirohugo oshirohugo commented Jul 31, 2023

This pull request aims to preserve the log keys' order provided by the plugin.

Currently, the host unmarshalls the logs emitted by the plugin into a map and uses its keys to create an output that is passed to the host logger. However, the order of the map keys is non-deterministic, resulting in a non-deterministic keys order passed to the host logger.

To address this issue, this pull request extracts the keys in an ordered manner and adds unit tests to ensure that the produced output preserves the order.

This PR solves #266

@hashicorp-cla
Copy link

hashicorp-cla commented Jul 31, 2023

CLA assistant check
All committers have signed the CLA.

@oshirohugo
Copy link
Author

@fairclothjm would you take a look at this one at you availability? :D

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