tyk-operator icon indicating copy to clipboard operation
tyk-operator copied to clipboard

[TT 5449] Fix linking between SubGraph and ApiDefinition CRs

Open buraksekili opened this issue 3 years ago • 1 comments
trafficstars

Description

This PR

  • fixes the linking problem between SubGraph and ApiDefinition CRs. Previously, we were not updating SubGraph CR after breaking its relationship with a particular ApiDefitinition.
  • adds a new way to use Reconciler in integration tests. So, I wrapped e2e-framework's client with controller-runtime's client and used the controller-runtime client as the real one. With this approach, you will be able to run directly Reconcile function of a specific controller from now on.
  • adds some unit tests for processSubGraphExec method in the ApiDefinition controller.
  • adds e2e tests for ApiDefinition with subgraph graphql configuration.
  • adds a new field called TYK_VERSION to tyk-operator-conf in bootstrapping. e2e tests of GraphQL federation were failing on Tyk v3.2 because gql federation is not supported on Tyk v3.2. With this new secret field, we are able to identify running Tyk version on e2e tests and to skip particular test suites, like graphql federation, on certain Tyk versions.

Related Issue

TT 5449

Motivation and Context

Test Coverage For This Change

Screenshots (if appropriate)

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If PRing from your fork, don't come from your master!
  • [x] Make sure you are making a pull request against our master branch (left side). Also, it would be best if you started your change off our latest master.
  • [x] Make sure you are updating CHANGELOG.md based on your changes.
  • [ ] My change requires a change to the documentation.
    • [ ] If you've changed APIs, describe what needs to be updated in the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] If you've changed API models, please update CRDs.
    • [ ] make manifests
    • [ ] make helm
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.
  • [x] Check your code additions will not fail linting checks:
    • [x] gofmt -s -w .
    • [x] go vet ./...
    • [x] golangci-lint run

buraksekili avatar Oct 14 '22 06:10 buraksekili