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

fix: Resolve debug URL uses flag id #79

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions confidence/confidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def _setup_logger(self, logger: logging.Logger) -> None:
def _handle_evaluation_result(
self,
result: ResolveResult,
flag_id: str,
flag_key: str,
value_type: Type[FieldType],
default_value: FieldType,
Expand All @@ -178,7 +179,7 @@ def _handle_evaluation_result(
) -> FlagResolutionDetails[Any]:
urlEncodedJsonContext = requests.utils.quote(json.dumps(context))
self.logger.debug(
f"See resolves for '{flag_key}' in Confidence: https://app.confidence.spotify.com/flags/resolver-test?client-key={self._client_secret}&flag=flags/{flag_key}&context={urlEncodedJsonContext}" # noqa: E501
f"See resolves for '{flag_id}' in Confidence: https://app.confidence.spotify.com/flags/resolver-test?client-key={self._client_secret}&flag=flags/{flag_id}&context={urlEncodedJsonContext}" # noqa: E501
)

if result.variant is None or len(str(result.value)) == 0:
Expand Down Expand Up @@ -218,7 +219,7 @@ def _evaluate(
value_path = None
result = self._resolve(FlagName(flag_id), context)
return self._handle_evaluation_result(
result, flag_key, value_type, default_value, value_path, context
result, flag_id, flag_key, value_type, default_value, value_path, context
)

async def _evaluate_async(
Expand All @@ -235,7 +236,7 @@ async def _evaluate_async(
value_path = None
result = await self._resolve_async(FlagName(flag_id), context)
return self._handle_evaluation_result(
result, flag_key, value_type, default_value, value_path, context
result, flag_id, flag_key, value_type, default_value, value_path, context
)

# type-arg: ignore
Expand Down
Loading