Troubleshooting#
The following table contains solutions to commonly encountered symptoms, in the form of “things that you’ll need to remember to do when you change X or do Y”.
When I do this ... | ... remember to do that | Why? |
---|---|---|
Make changes to the function build pipeline:
|
Rebuild whichever thing you're using to deploy the function (nuctl / dashboard) | As long as function builds are done locally (note there's a future plan to move function build to a builder service!) - we need the builder we're working with to be aware of any change in logic. If we're deploying with nuctl, it calls platform.BuildFunction |
Make changes that will affect the deployed, running function (or Nuclio's processor binary inside the function container), e.g.:
|
Rebuild the appropriate processor image depending on the runtime of the function you're testing with (might need to rebuild processor-py , for instance)
|
The processor binary (and in the case of function spec changes, also the deploying tool) both need to be aware of changes to functionconfig structure.In addition, any change to processor code or runtime-specific code will need to run inside the function container - since function builds will use the existing nuclio/processor image to start from (if there is one built). For it to not be out-of-date, we must rebuild it for the processor binary to include our changes |
Make platform-level changes that also affect kubernetes platform logic:
(assuming you're also testing with a Kubernetes cluster - which you should be doing!) |
(if you're deploying with nuctl and made changes to kube platform) - rebuild nuctl too |
The controller is the entity that runs inside the Kubernetes cluster and reacts to changes made to Nuclio's CRDs - if new logic was added you need its newest version to run in the cluster. If the changes affect the deployer too (i.e. new flag which is passed to the kube platform), it also needs to be rebuilt. |
Use go test locally |
Give it a package, not a single test file:go test -v ./pkg/package/... -p 1 (not: go test -v pkg/package/something_test.go ) |
Go test only accepts package names, not individual test files. You may have build errors if you only give it a test file. |