Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkfallbackvalid #6407

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Checkfallbackvalid #6407

wants to merge 13 commits into from

Conversation

ctccxxd
Copy link

@ctccxxd ctccxxd commented Dec 7, 2024

Revise some annotations and fix fallback check, originally,
1, Annotations above function is not well
2, Fallback check does not take effect
3, validate the case fallback with cpu/memory

Checklist

related issue
#6355

@ctccxxd ctccxxd requested a review from a team as a code owner December 7, 2024 15:39
@ctccxxd
Copy link
Author

ctccxxd commented Dec 7, 2024

Friendly ping @wozniakjan @JorTurFer I have follow your idea to validate the case fallback with cpu/memory, hope your review, much thanks.

Signed-off-by: Shane <[email protected]>
@ctccxxd ctccxxd force-pushed the checkfallbackvalid branch from 5dc6f23 to c52d955 Compare December 7, 2024 16:17
Signed-off-by: Shane <[email protected]>
@ctccxxd ctccxxd force-pushed the checkfallbackvalid branch from aed658d to dc2477e Compare December 8, 2024 10:01
@JorTurFer
Copy link
Member

JorTurFer commented Dec 15, 2024

/run-e2e internal
Update: You can check the progress here

@ctccxxd
Copy link
Author

ctccxxd commented Dec 17, 2024

Here e2e test failed , but I can't see the detail and what happened. Please have a look at this , thank you. @JorTurFer @zroubalik

@JorTurFer
Copy link
Member

JorTurFer commented Dec 22, 2024

/run-e2e internal
Update: You can check the progress here

@ctccxxd
Copy link
Author

ctccxxd commented Dec 23, 2024

Here e2e test failed again, but I still can't see the detail and what happened. Please have a look at this , thank you. @JorTurFer @zroubalik

@SpiritZhou
Copy link
Contributor

@ctccxxd Here is the error.

2024-12-22T16:11:46.8675696Z tests/internals/fallback/fallback_test.go has failed after "three" attempts 
2024-12-22T16:11:46.8676438Z attempt number "one"
2024-12-22T16:11:46.8676879Z === RUN   TestFallback
2024-12-22T16:11:46.8677397Z     fallback_test.go:***: --- setting up ---
2024-12-22T16:11:46.8677980Z     helper.go:***47: deleting namespace fallback-test-ns
2024-12-22T16:11:46.8678585Z     helper.go:***0***: waiting for namespace fallback-test-ns deletion
2024-12-22T16:11:46.8679143Z     helper.go:***4: Creating namespace - fallback-test-ns
2024-12-22T16:11:46.8679686Z     helper.go:54***: Applying template: secretTemplate
2024-12-22T16:11:46.8680524Z     helper.go:54***: Applying template: metricsServerDeploymentTemplate
2024-12-22T16:11:46.8681079Z     helper.go:54***: Applying template: serviceTemplate
2024-12-22T16:11:46.8681691Z     helper.go:54***: Applying template: triggerAuthenticationTemplate
2024-12-22T16:11:46.8682255Z     helper.go:54***: Applying template: deploymentTemplate
2024-12-22T16:11:46.8682826Z     helper.go:54***: Applying template: scaledObjectTemplate
2024-12-22T16:11:46.8683264Z     helper.go:555: 
2024-12-22T16:11:46.8683838Z         	Error Trace:	/__w/keda/keda/tests/helper/helper.go:555
2024-12-22T16:11:46.8684378Z         	            				/__w/keda/keda/tests/helper/helper.go:584
2024-12-22T16:11:46.8684913Z         	            				/__w/keda/keda/tests/helper/helper.go:656
2024-12-22T16:11:46.8685555Z         	            				/__w/keda/keda/tests/internals/fallback/fallback_test.go:***4
2024-12-22T16:11:46.8686053Z         	Error:      	Received unexpected error:
2024-12-22T16:11:46.8687656Z         	            	Error from server (Forbidden): error when creating "/tmp/scaledObjectTemplate8475697***8": admission webhook "vscaledobject.kb.io" denied the request: MetricType=, but fallback can only be enabled for triggers with metric of type AverageValue
2024-12-22T16:11:46.8688403Z         	Test:       	TestFallback
2024-12-22T16:11:46.8690192Z         	Messages:   	cannot apply file - Error from server (Forbidden): error when creating "/tmp/scaledObjectTemplate8475697***8": admission webhook "vscaledobject.kb.io" denied the request: MetricType=, but fallback can only be enabled for triggers with metric of type AverageValue

Signed-off-by: Shane <[email protected]>
@ctccxxd
Copy link
Author

ctccxxd commented Dec 23, 2024

@ctccxxd Here is the error.

2024-12-22T16:11:46.8675696Z tests/internals/fallback/fallback_test.go has failed after "three" attempts 
2024-12-22T16:11:46.8676438Z attempt number "one"
2024-12-22T16:11:46.8676879Z === RUN   TestFallback
2024-12-22T16:11:46.8677397Z     fallback_test.go:***: --- setting up ---
2024-12-22T16:11:46.8677980Z     helper.go:***47: deleting namespace fallback-test-ns
2024-12-22T16:11:46.8678585Z     helper.go:***0***: waiting for namespace fallback-test-ns deletion
2024-12-22T16:11:46.8679143Z     helper.go:***4: Creating namespace - fallback-test-ns
2024-12-22T16:11:46.8679686Z     helper.go:54***: Applying template: secretTemplate
2024-12-22T16:11:46.8680524Z     helper.go:54***: Applying template: metricsServerDeploymentTemplate
2024-12-22T16:11:46.8681079Z     helper.go:54***: Applying template: serviceTemplate
2024-12-22T16:11:46.8681691Z     helper.go:54***: Applying template: triggerAuthenticationTemplate
2024-12-22T16:11:46.8682255Z     helper.go:54***: Applying template: deploymentTemplate
2024-12-22T16:11:46.8682826Z     helper.go:54***: Applying template: scaledObjectTemplate
2024-12-22T16:11:46.8683264Z     helper.go:555: 
2024-12-22T16:11:46.8683838Z         	Error Trace:	/__w/keda/keda/tests/helper/helper.go:555
2024-12-22T16:11:46.8684378Z         	            				/__w/keda/keda/tests/helper/helper.go:584
2024-12-22T16:11:46.8684913Z         	            				/__w/keda/keda/tests/helper/helper.go:656
2024-12-22T16:11:46.8685555Z         	            				/__w/keda/keda/tests/internals/fallback/fallback_test.go:***4
2024-12-22T16:11:46.8686053Z         	Error:      	Received unexpected error:
2024-12-22T16:11:46.8687656Z         	            	Error from server (Forbidden): error when creating "/tmp/scaledObjectTemplate8475697***8": admission webhook "vscaledobject.kb.io" denied the request: MetricType=, but fallback can only be enabled for triggers with metric of type AverageValue
2024-12-22T16:11:46.8688403Z         	Test:       	TestFallback
2024-12-22T16:11:46.8690192Z         	Messages:   	cannot apply file - Error from server (Forbidden): error when creating "/tmp/scaledObjectTemplate8475697***8": admission webhook "vscaledobject.kb.io" denied the request: MetricType=, but fallback can only be enabled for triggers with metric of type AverageValue

@SpiritZhou @JorTurFer I have fix this case, please run e2e again and check to approve, much thanks.

@ctccxxd
Copy link
Author

ctccxxd commented Dec 23, 2024

@ctccxxd Here is the error.

2024-12-22T16:11:46.8675696Z tests/internals/fallback/fallback_test.go has failed after "three" attempts 
2024-12-22T16:11:46.8676438Z attempt number "one"
2024-12-22T16:11:46.8676879Z === RUN   TestFallback
2024-12-22T16:11:46.8677397Z     fallback_test.go:***: --- setting up ---
2024-12-22T16:11:46.8677980Z     helper.go:***47: deleting namespace fallback-test-ns
2024-12-22T16:11:46.8678585Z     helper.go:***0***: waiting for namespace fallback-test-ns deletion
2024-12-22T16:11:46.8679143Z     helper.go:***4: Creating namespace - fallback-test-ns
2024-12-22T16:11:46.8679686Z     helper.go:54***: Applying template: secretTemplate
2024-12-22T16:11:46.8680524Z     helper.go:54***: Applying template: metricsServerDeploymentTemplate
2024-12-22T16:11:46.8681079Z     helper.go:54***: Applying template: serviceTemplate
2024-12-22T16:11:46.8681691Z     helper.go:54***: Applying template: triggerAuthenticationTemplate
2024-12-22T16:11:46.8682255Z     helper.go:54***: Applying template: deploymentTemplate
2024-12-22T16:11:46.8682826Z     helper.go:54***: Applying template: scaledObjectTemplate
2024-12-22T16:11:46.8683264Z     helper.go:555: 
2024-12-22T16:11:46.8683838Z         	Error Trace:	/__w/keda/keda/tests/helper/helper.go:555
2024-12-22T16:11:46.8684378Z         	            				/__w/keda/keda/tests/helper/helper.go:584
2024-12-22T16:11:46.8684913Z         	            				/__w/keda/keda/tests/helper/helper.go:656
2024-12-22T16:11:46.8685555Z         	            				/__w/keda/keda/tests/internals/fallback/fallback_test.go:***4
2024-12-22T16:11:46.8686053Z         	Error:      	Received unexpected error:
2024-12-22T16:11:46.8687656Z         	            	Error from server (Forbidden): error when creating "/tmp/scaledObjectTemplate8475697***8": admission webhook "vscaledobject.kb.io" denied the request: MetricType=, but fallback can only be enabled for triggers with metric of type AverageValue
2024-12-22T16:11:46.8688403Z         	Test:       	TestFallback
2024-12-22T16:11:46.8690192Z         	Messages:   	cannot apply file - Error from server (Forbidden): error when creating "/tmp/scaledObjectTemplate8475697***8": admission webhook "vscaledobject.kb.io" denied the request: MetricType=, but fallback can only be enabled for triggers with metric of type AverageValue

@SpiritZhou @JorTurFer I have fixed this case, please run e2e again and check to approve, much thanks. Only depend on #6434 fix.

@JorTurFer
Copy link
Member

JorTurFer commented Dec 23, 2024

/run-e2e internal
Update: You can check the progress here

@SpiritZhou
Copy link
Contributor

@ctccxxd caling_modifiers_test test case also has the same error.

@ctccxxd
Copy link
Author

ctccxxd commented Dec 24, 2024

@ctccxxd caling_modifiers_test test case also has the same error.

xPassed tests:
Execution of tests/internals/scaled_job_validation/scaled_job_validation_test.go, has passed after "one" attempts
Execution of tests/internals/trigger_authentication_validation/trigger_authentication_validation_test.go, has passed after "one" attempts
Execution of tests/internals/status_update/status_update_test.go, has passed after "one" attempts
Execution of tests/internals/scaled_object_validation/scaled_object_validation_test.go, has passed after "one" attempts
Execution of tests/internals/restore_original/restore_original_test.go, has passed after "one" attempts
Execution of tests/internals/idle_replicas/idle_replicas_test.go, has passed after "one" attempts
Execution of tests/internals/min_replica_sj/min_replica_sj_test.go, has passed after "one" attempts
Execution of tests/internals/custom_hpa_name/custom_hpa_name_test.go, has passed after "one" attempts
Execution of tests/internals/scaling_strategies/eager_scaling_strategy_test.go, has passed after "one" attempts
Execution of tests/internals/value_metric_type/value_metric_type_test.go, has passed after "one" attempts
Execution of tests/internals/global_custom_ca/global_custom_ca_test.go, has passed after "one" attempts
Execution of tests/internals/subresource_scale/subresource_scale_test.go, has passed after "one" attempts
Execution of tests/internals/eventemitter/azureeventgridtopic/azureeventgridtopic_test.go, has passed after "three" attempts
Execution of tests/internals/events/events_test.go, has passed after "one" attempts
Execution of tests/internals/update_ta/update_ta_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scaledobject/pause_scaledobject_test.go, has passed after "one" attempts
Execution of tests/internals/replica_update_so/replica_update_so_test.go, has passed after "one" attempts
Execution of tests/internals/initial_delay_cooldownperiod/initial_delay_cooldownperiod_test.go, has passed after "one" attempts
Execution of tests/internals/trigger_update_so/trigger_update_so_test.go, has passed after "one" attempts
Execution of tests/internals/cache_metrics/cache_metrics_test.go, has passed after "one" attempts
Execution of tests/internals/cloudevent_source/cloudevent_source_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scaledjob/pause_scaledjob_test.go, has passed after "one" attempts
Execution of tests/internals/fallback/fallback_test.go, has passed after "one" attempts
Execution of tests/internals/polling_cooldown_so/polling_cooldown_so_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scaledobject_explicitly/pause_scaledobject_explicitly_test.go, has passed after "one" attempts
Failed tests:
Execution of tests/internals/scaling_modifiers/scaling_modifiers_test.go, has failed after "three" attempts

@SpiritZhou @JorTurFer scaling_modifiers_test.go error has been fixed, and help me to run e2e test again, and other 25 tests are all ok, thank you

@SpiritZhou
Copy link
Contributor

SpiritZhou commented Dec 24, 2024

/run-e2e internal
Update: You can check the progress here

@ctccxxd
Copy link
Author

ctccxxd commented Dec 24, 2024

/run-e2e internal Update: You can check the progress here

Failed tests:
Execution of tests/internals/eventemitter/azureeventgridtopic/azureeventgridtopic_test.go, has failed after "three" attempts
make: *** [Makefile:09: ee-test] Error ***

@JorTurFer Here come this error, seems not related to my PR, and my other PR #6350 also encounter this error, related discuss #6350 (comment). Hope you have a look at this. Much thanks.

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.

3 participants