Skip to content

Conversation

huyuanfeng2018
Copy link
Contributor

What is the purpose of the change

Add Validator for Autoscler, Facilitates StandaloneAutoscaler to detect configuration anomalies in advance

Brief change log

  • Migrate the verification part of Autoscaler in DefaultAutoscalerValidator to the Autoscaler module
  • Verify the Autoscaler config separately in StandaloneAutoscaler. If there are illegal parameters, report them through events.

Verifying this change

This change added tests and can be verified as follows:

  • add StandaloneAutoscalerValidatorTest Used to verify parameter verification under standloneAutoscaler
  • The old test cases cover the test for Autoscaler parameter verification under the operator

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): ( no)
  • The public API, i.e., is any changes to the CustomResourceDescriptors: (no)
  • Core observer or reconciler logic that is regularly executed: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not documented)

@huyuanfeng2018 huyuanfeng2018 force-pushed the FLINK-37126 branch 2 times, most recently from 92a1be4 to 15982fd Compare January 20, 2025 07:29
@huyuanfeng2018 huyuanfeng2018 marked this pull request as draft January 20, 2025 07:29
@huyuanfeng2018 huyuanfeng2018 force-pushed the FLINK-37126 branch 2 times, most recently from 439229b to 85675ee Compare January 20, 2025 08:15
@huyuanfeng2018 huyuanfeng2018 force-pushed the FLINK-37126 branch 3 times, most recently from 24edc0d to bcbdf4c Compare February 6, 2025 09:37
@gyfora
Copy link
Contributor

gyfora commented Aug 21, 2025

Any update on this?

@huyuanfeng2018
Copy link
Contributor Author

Any update on this?

Thanks for @gyfora ping, it's been too long I forgot about this PR, I'll keep pushing forward

@huyuanfeng2018 huyuanfeng2018 marked this pull request as ready for review August 22, 2025 09:38
@huyuanfeng2018
Copy link
Contributor Author

@gyfora Could you help review this PR when you have time? Thank you very much ~

Copy link
Contributor

@gyfora gyfora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good, but I would remove the extra interface added

import static org.apache.flink.autoscaler.config.AutoScalerOptions.UTILIZATION_TARGET;

/** Default implementation of {@link AutoscalerValidator}. */
public class DefaultAutoscalerValidator implements AutoscalerValidator {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making this an interface with a default implementation, can we simply make this a regular class and just use it directly? AutoscalerValidator that contains the implementation. If later we want to make it pluggable then we can extract the interface but now this is just boilerplate

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.

2 participants