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(flags): Update instructions for remote config settings #28705

Merged
merged 10 commits into from
Feb 14, 2025

Conversation

haacked
Copy link
Contributor

@haacked haacked commented Feb 14, 2025

Problem

The instructions for unencrypted remote config settings is incorrect.

The code to retrieve remote config settings is the same whether or not the payload is encrypted.

This commit updates the instructions to reflect that.

Changes

Unencrypted instructions:

Screenshot 2025-02-13 at 7 49 37 PM
Screenshot 2025-02-13 at 7 49 51 PM
Screenshot 2025-02-13 at 7 49 57 PM
Screenshot 2025-02-13 at 7 50 04 PM
Screenshot 2025-02-13 at 7 50 11 PM

Encrypted instructions:

The code is the same, but there's an extra line explaining how the decryption works.

Screenshot 2025-02-13 at 7 51 00 PM
Screenshot 2025-02-13 at 7 51 07 PM
Screenshot 2025-02-13 at 7 51 14 PM
Screenshot 2025-02-13 at 7 51 19 PM
Screenshot 2025-02-13 at 7 51 28 PM

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Manually

The code to retrieve remote config settings is
the same whether or not the paylod is encrypted.

This commit updates the instructions to reflect
that.
@haacked
Copy link
Contributor Author

haacked commented Feb 14, 2025

Pushed a fix for Ruby.

Screenshot 2025-02-13 at 7 56 40 PM
Screenshot 2025-02-13 at 7 57 27 PM

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR updates the feature flag instructions to ensure consistent handling of remote configuration settings across SDKs, regardless of payload encryption status.

  • Renamed ENCRYPTED_PAYLOAD_LIBRARIES to REMOTE_CONFIGURATION_LIBRARIES in /frontend/src/scenes/feature-flags/FeatureFlagCodeOptions.tsx for better clarity
  • Added new remoteConfiguration and encryptedPayload props to snippets in /frontend/src/scenes/feature-flags/FeatureFlagSnippets.tsx
  • Added clear messaging about payload decryption handling in code examples
  • Updated library selection logic in /frontend/src/scenes/feature-flags/FeatureFlagInstructions.tsx to be based on remote configuration status
  • Standardized remote configuration API endpoint handling across server-side SDKs

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Feb 14, 2025

Size Change: 0 B

Total Size: 1.21 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.21 MB

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

4 snapshot changes in total. 0 added, 4 modified, 0 deleted:

  • chromium: 0 added, 4 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

nice work!

@haacked haacked enabled auto-merge (squash) February 14, 2025 16:39
Copy link
Contributor

@havenbarnes havenbarnes left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks for updating

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@haacked haacked merged commit 9d84135 into master Feb 14, 2025
104 checks passed
@haacked haacked deleted the haacked/fix-remote-config-instructions branch February 14, 2025 18:52
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.

4 participants