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(experiments): provide required_scope for experiments API #23385

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

dmarticus
Copy link
Contributor

Problem

This user: https://posthoghelp.zendesk.com/agent/tickets/14932 had an issue where they weren't able to call one of our Public API endpoints. Turns out, we never enabled the appropriate required_scope for that endpoint, so it kept failing. I don't know of any reason why we shouldn't allow users to hit this endpoint, so I went with the approach of just enabling the experiments:* required_scope, but if we don't support these endpoints, I feel like we should call that out in our docs/not make them available. IMO this was just an oversight on our part when enabling our API token scopes.

In draft mode for now while I confirm that this is the correct approach. I should probably add some tests for this behavior as well, but I'm also not exactly sure where to put tests that encode this type of knowledge (i.e. which scopes should be enabled for which endpoint).

How did you test this code?

Manually tested all of these endpoints locally and they all worked as expected.

@dmarticus dmarticus requested a review from a team July 1, 2024 23:48
Copy link
Collaborator

@neilkakkar neilkakkar left a comment

Choose a reason for hiding this comment

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

I don't get the snapshot updates but otherwise lgtm!

@dmarticus dmarticus marked this pull request as ready for review July 2, 2024 15:41
@dmarticus dmarticus merged commit c7e8016 into master Jul 2, 2024
86 checks passed
@dmarticus dmarticus deleted the dylan/investigations branch July 2, 2024 15:41
zlwaterfield pushed a commit that referenced this pull request Jul 2, 2024
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
fuziontech added a commit that referenced this pull request Jul 2, 2024
* master:
  chore(data-warehouse): make sure exception is passed through at workflow step (#23409)
  feat: add a launch compound for posthog with local billing (#23410)
  chore: add backfill_personless_distinct_ids command (#23404)
  fix: add missing billing tests (#23408)
  Schema-Enforcer plugin not global (#23412)
  chore: Enable person batch exports only on supported destinations (#23354)
  fix: allow entering a custom value while property values load (#23405)
  perf: Materialize elements_chain (#23170)
  fix(experiments): provide `required_scope` for experiments API (#23385)
  feat(survey): Allow events to repeatedly activate surveys (#23238)
  chore: maybe this will stop them flapping (#23401)
  chore(data-warehouse): Added number formatting for source settings (#23221)
  fix(multi project flags): remove flag id from URL when switching projects (#23394)
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