chore(nimbus): generate targeting configs JSON for integration tests#14815
Merged
jaredlockhart merged 2 commits intomainfrom Mar 5, 2026
Merged
chore(nimbus): generate targeting configs JSON for integration tests#14815jaredlockhart merged 2 commits intomainfrom
jaredlockhart merged 2 commits intomainfrom
Conversation
Because * The integration tests use GraphQL to fetch targeting configs for test parametrization at collection time * The GraphQL API is being removed, so we need to decouple this dependency * Targeting configs are pure Python constants in targeting/constants.py and don't need a running server or DB to read This commit * Adds a generate_targeting_configs management command that exports all NimbusTargetingConfig instances to a JSON file at tests/integration/nimbus/fixtures/targeting_configs.json * Hooks the command into the refresh_db Makefile target so it runs during integration test setup * Updates load_targeting_configs() in the integration test helpers to read from the JSON file instead of calling the GraphQL API * Adds the generated JSON to .gitignore (build artifact) * Adds a unit test for the management command Fixes #14814 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…helpers Because * The TARGETING_CONFIGS_PATH used parents[2] which resolves to integration/ instead of nimbus/ * This caused FileNotFoundError in CI when load_targeting_configs() tried to read from the wrong path This commit * Changes parents[2] to parents[1] so the path correctly resolves to tests/integration/nimbus/fixtures/targeting_configs.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
yashikakhurana
approved these changes
Mar 5, 2026
Contributor
yashikakhurana
left a comment
There was a problem hiding this comment.
one step more closer to get rid of GraphQL, Thank you @jaredlockhart
This was referenced Mar 5, 2026
jaredlockhart
added a commit
that referenced
this pull request
Mar 11, 2026
Because * The Nimbus UI was fully migrated to Django form views (HTMX) * Integration tests were decoupled from GraphQL in PRs #14815 and #14842 * The GraphQL API at /api/v5/graphql is no longer used by any client * Removing it reduces maintenance burden, dependencies, and attack surface This commit * Deletes the GraphQL schema, queries, mutations, types, and inputs * Deletes the GrapheneExceptionMiddleware * Removes graphene-django and graphene-file-upload from dependencies * Removes GRAPHENE settings and graphql_url context processor * Removes the /api/v5/graphql URL route (CSV, YAML, FML endpoints preserved) * Removes GQL-only serializers (NimbusExperimentSerializer, CloneSerializer, and their mixins/validators) while keeping Review, CSV, YAML, and FML serializers * Removes unused with_owner_features() queryset method from models * Deletes all graphene type stubs (typings/graphene*) * Deletes GQL mutation, query, and serializer test files * Adds test coverage for TargetingMultipleKintoCollectionsError exception paths * Net removal: ~12,800 lines across 107 files Fixes #14890 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 11, 2026
Because * The Nimbus UI was fully migrated to Django form views (HTMX) * Integration tests were decoupled from GraphQL in PRs #14815 and #14842 * The GraphQL API at `/api/v5/graphql` is no longer used by any client * Removing it reduces maintenance burden, dependencies, and attack surface This commit * Deletes the GraphQL schema, queries, mutations, types, and inputs * Deletes the `GrapheneExceptionMiddleware` * Removes `graphene-django` and `graphene-file-upload` from dependencies * Removes `GRAPHENE` settings and `graphql_url` context processor * Removes the `/api/v5/graphql` URL route (CSV, YAML, FML endpoints preserved) * Removes GQL-only serializers (`NimbusExperimentSerializer`, `CloneSerializer`, and their mixins/validators) while keeping Review, CSV, YAML, and FML serializers * Removes unused `with_owner_features()` queryset method from models * Deletes all graphene type stubs (`typings/graphene*`) * Deletes GQL mutation, query, and serializer test files * Adds test coverage for `TargetingMultipleKintoCollectionsError` exception paths * Net removal: ~12,800 lines across 107 files Fixes #14890 --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
parametrization at collection time
targeting/constants.pyand don't need a running server or DB to read
This commit
generate_targeting_configsmanagement command that exports allNimbusTargetingConfiginstances to a JSON file attests/integration/nimbus/fixtures/targeting_configs.jsonrefresh_dbMakefile target so it runsduring integration test setup
load_targeting_configs()in the integration test helpers toread from the JSON file instead of calling the GraphQL API
.gitignore(build artifact)Fixes #14814