Skip to content

Commit

Permalink
Remove setting env variable NUMAFLOW_CALLBACK_URL
Browse files Browse the repository at this point in the history
Signed-off-by: Sreekanth <[email protected]>
  • Loading branch information
BulkBeing committed Jan 31, 2025
1 parent 0c16343 commit 96a1883
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ test-coverage:

.PHONY: test-coverage-with-isb
test-coverage-with-isb:
go test -timeout 7m -covermode=atomic -coverprofile=test/profile.cov -tags=isb_redis $(shell go list ./... | grep -v /vendor/ | grep -v /numaflow/test/ | grep -v /pkg/client/ | grep -v /pkg/proto/ | grep -v /hack/)
go test -v -timeout 7m -covermode=atomic -coverprofile=test/profile.cov -tags=isb_redis $(shell go list ./... | grep -v /vendor/ | grep -v /numaflow/test/ | grep -v /pkg/client/ | grep -v /pkg/proto/ | grep -v /hack/)
go tool cover -func=test/profile.cov

.PHONY: test-code
Expand Down Expand Up @@ -135,7 +135,7 @@ endif
$(MAKE) restart-control-plane-components
cat test/manifests/e2e-api-pod.yaml | sed '[email protected]/numaproj/@$(IMAGE_NAMESPACE)/@' | sed 's/:latest/:$(VERSION)/' | kubectl -n numaflow-system apply -f -
go generate $(shell find ./test/$* -name '*.go')
go test -timeout 15m -count 1 --tags test -p 1 ./test/$*
go test -v -timeout 15m -count 1 --tags test -p 1 ./test/$*
$(MAKE) cleanup-e2e

image-restart:
Expand Down Expand Up @@ -164,7 +164,7 @@ Test%:
kubectl -n numaflow-system delete po e2e-api-pod --ignore-not-found=true
go generate $(shell find $(shell grep -rl $(*) ./test/*-e2e/*.go))
cat test/manifests/e2e-api-pod.yaml | sed '[email protected]/numaproj/@$(IMAGE_NAMESPACE)/@' | sed 's/:latest/:$(VERSION)/' | kubectl -n numaflow-system apply -f -
-go test -timeout 15m -count 1 --tags test -p 1 ./test/$(shell grep $(*) -R ./test | head -1 | awk -F\/ '{print $$3}' ) -run='.*/$*'
-go test -v -timeout 15m -count 1 --tags test -p 1 ./test/$(shell grep $(*) -R ./test | head -1 | awk -F\/ '{print $$3}' ) -run='.*/$*'
$(MAKE) cleanup-e2e

.PHONY: ui-build
Expand Down
5 changes: 1 addition & 4 deletions pkg/apis/numaflow/v1alpha1/vertex_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,7 @@ func (v Vertex) GetPodSpec(req GetVertexPodSpecReq) (*corev1.PodSpec, error) {
commonEnvVars := v.commonEnvs()
for _, vtx := range req.PipelineSpec.Vertices {
if vtx.IsASource() && vtx.Source.Serving != nil {
commonEnvVars = append(commonEnvVars,
corev1.EnvVar{Name: EnvCallbackEnabled, Value: "true"},
corev1.EnvVar{Name: EnvCallbackURL, Value: KeyMetaCallbackURL},
)
commonEnvVars = append(commonEnvVars, corev1.EnvVar{Name: EnvCallbackEnabled, Value: "true"})
}
}

Expand Down
7 changes: 3 additions & 4 deletions pkg/apis/numaflow/v1alpha1/vertex_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ func TestGetPodSpec(t *testing.T) {
assert.Contains(t, envNames, EnvVertexObject)
assert.Contains(t, envNames, EnvReplica)
assert.NotContains(t, envNames, EnvCallbackEnabled)
assert.NotContains(t, envNames, EnvCallbackURL)
assert.Contains(t, s.Containers[0].Args, "processor")
assert.Contains(t, s.Containers[0].Args, "--type="+string(VertexTypeSource))
assert.Equal(t, 1, len(s.InitContainers))
Expand All @@ -285,8 +284,8 @@ func TestGetPodSpec(t *testing.T) {
assert.Equal(t, "0", s.InitContainers[0].Resources.Limits.Memory().String())
})

// When the pipeline has a Serving source vertex, the Numaflow container of all vertices should get
// the environment variables `EnvCallbackEnabled` and `EnvCallbackURL`
// When the pipeline has a Serving source vertex, the Numaflow container of all vertices
// should have the environment variable `EnvCallbackEnabled` set to true
t.Run("test Serving source", func(t *testing.T) {
testObj := testVertex.DeepCopy()
testObj.Spec.Source = &Source{
Expand Down Expand Up @@ -363,7 +362,7 @@ func TestGetPodSpec(t *testing.T) {
}
assert.ElementsMatch(t, envNames, []string{
"test-env", EnvNamespace, EnvPod, EnvPipelineName, EnvVertexName, EnvVertexObject, EnvReplica,
EnvCallbackEnabled, EnvCallbackURL, EnvServingAuthToken, EnvServingObject, EnvServingMinPipelineSpec,
EnvCallbackEnabled, EnvServingAuthToken, EnvServingObject, EnvServingMinPipelineSpec,
EnvServingHostIP, EnvServingPort, EnvServingStoreTTL, EnvServingJetstreamStream,
})

Expand Down

0 comments on commit 96a1883

Please sign in to comment.