Skip to content

chore(nimbus): generate targeting configs JSON for integration tests#14815

Merged
jaredlockhart merged 2 commits intomainfrom
14814
Mar 5, 2026
Merged

chore(nimbus): generate targeting configs JSON for integration tests#14815
jaredlockhart merged 2 commits intomainfrom
14814

Conversation

@jaredlockhart
Copy link
Collaborator

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

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>
@jaredlockhart jaredlockhart enabled auto-merge March 4, 2026 22:31
Copy link
Contributor

@yashikakhurana yashikakhurana left a comment

Choose a reason for hiding this comment

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

one step more closer to get rid of GraphQL, Thank you @jaredlockhart

@jaredlockhart jaredlockhart added this pull request to the merge queue Mar 5, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 5, 2026
@jaredlockhart jaredlockhart added this pull request to the merge queue Mar 5, 2026
Merged via the queue into main with commit d87d75b Mar 5, 2026
18 checks passed
@jaredlockhart jaredlockhart deleted the 14814 branch March 5, 2026 19:17
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>
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.

Replace GraphQL targeting config lookups in integration tests with generated JSON

2 participants