Summary
The environment integration tests (envs and envs/dir) are intermittently failing due to Gitea post-receive hook 500 errors. This causes Flipt to not see newly pushed flags/namespaces, resulting in "not found" errors in the test assertions.
Symptoms
- Gitea logs show repeated
500 Internal Server Error responses for POST /api/internal/hook/post-receive/root/features
- Tests fail with errors like:
rpc error: code = NotFound desc = flag "default/test" not found
rpc error: code = NotFound desc = namespace "alternative" not found
- Failures occur in
TestAPI/env_"production" for both namespace_"default" and namespace_"alternative" subtests
- Failure location:
build/testing/integration/environments/api_test.go:200
Observed across branches
feat/aws-secrets-manager (multiple runs)
rd/v2/grpc-bump
This is not related to any specific feature change — it's a test infrastructure issue.
Possible fixes
- Add retry/polling logic when waiting for Gitea post-receive hooks to complete before asserting on flag/namespace existence
- Increase wait time or add explicit sync check after git push operations in the test setup
- Investigate why Gitea's post-receive hook intermittently returns 500
Summary
The environment integration tests (
envsandenvs/dir) are intermittently failing due to Gitea post-receive hook 500 errors. This causes Flipt to not see newly pushed flags/namespaces, resulting in "not found" errors in the test assertions.Symptoms
500 Internal Server Errorresponses forPOST /api/internal/hook/post-receive/root/featuresrpc error: code = NotFound desc = flag "default/test" not foundrpc error: code = NotFound desc = namespace "alternative" not foundTestAPI/env_"production"for bothnamespace_"default"andnamespace_"alternative"subtestsbuild/testing/integration/environments/api_test.go:200Observed across branches
feat/aws-secrets-manager(multiple runs)rd/v2/grpc-bumpThis is not related to any specific feature change — it's a test infrastructure issue.
Possible fixes