Skip to content

feat: Add environment ID support for hooks. #81

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

Merged
merged 4 commits into from
Mar 20, 2025

Conversation

kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Mar 4, 2025

This PR pipes the support for the environment ID header from the event source, through the data sources, and into the data store, and then exposes it to the evaluation series hook context.

Each step can optionally support the environment ID/headers for compatibility.

This PR will be held for back-end support and testing.

@@ -84,7 +85,7 @@ internal DataSourceUpdatesImpl(
StateSince = DateTime.Now,
LastError = null
};
_status = new StateMonitor<DataSourceStatus, StateAndError>(initialStatus, MaybeUpdateStatus, _log);
_status = new StateMonitor<DataSourceStatus, StateAndError>(initialStatus, MaybeUpdateStatus, _log);
Copy link
Member Author

Choose a reason for hiding this comment

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

Just a whitespace change.

#region IDataSourceUpdatesHeaders methods
public bool InitWithHeaders(FullDataSet<ItemDescriptor> allData, IEnumerable<KeyValuePair<string, IEnumerable<string>>> headers)
{
ImmutableDictionary<DataKind, ImmutableDictionary<string, ItemDescriptor>> oldData = null;
Copy link
Member Author

Choose a reason for hiding this comment

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

Most of the method body is from the original init.

@kinyoklion kinyoklion marked this pull request as ready for review March 4, 2025 18:16
@kinyoklion kinyoklion requested a review from a team as a code owner March 4, 2025 18:16
Copy link
Contributor

@tanderson-ld tanderson-ld left a comment

Choose a reason for hiding this comment

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

Approved. Putting this in a comment to avoid accidental merge as the description says this is pending other work.

@kinyoklion kinyoklion merged commit 49149f2 into main Mar 20, 2025
14 checks passed
@kinyoklion kinyoklion deleted the rlamb/emsr-129/feat-environment-id-sdk branch March 20, 2025 23:06
kinyoklion pushed a commit that referenced this pull request Mar 21, 2025
🤖 I have created a release *beep* *boop*
---


##
[8.7.0](LaunchDarkly.ServerSdk-v8.6.0...LaunchDarkly.ServerSdk-v8.7.0)
(2025-03-20)


### Features

* Add environment ID support for hooks.
([#81](#81))
([49149f2](49149f2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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