Skip to content

K8s: Update KEDA core 2.17.1 and test env versions #2834

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

Merged
merged 1 commit into from
May 15, 2025
Merged

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented May 15, 2025

User description

Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Enhancement, Tests


Description

  • Updated KEDA core version to 2.17.1 and related tags.

  • Improved Selenium Grid metric name generation logic.

  • Upgraded Kubernetes, Helm, Docker, and Python versions in CI workflows.

  • Enhanced test environment matrix with newer versions.


Changes walkthrough 📝

Relevant files
Enhancement
Makefile
Bump KEDA core and related tags to 2.17.1                               

Makefile

  • Updated KEDA_CORE_VERSION to 2.17.1.
  • Updated KEDA_TAG_VERSION and KEDA_BASED_TAG to match new version.
  • +3/-3     
    selenium_grid_scaler.go
    Refactor Selenium Grid metric name generation logic           

    .keda/scalers/selenium_grid_scaler.go

  • Added buildSeleniumGridMetricName function for metric naming.
  • Refactored metric name generation in scaling logic to use new
    function.
  • +15/-1   
    Tests
    helm-chart-test.yml
    Refresh Helm chart test matrix with newer versions             

    .github/workflows/helm-chart-test.yml

  • Updated Kubernetes versions in test matrix.
  • Upgraded Helm, Docker, and Python versions for several test jobs.
  • +6/-6     
    k8s-scaling-test.yml
    Update k8s scaling test environment versions                         

    .github/workflows/k8s-scaling-test.yml

    • Updated Kubernetes, Helm, and Python versions in scaling test jobs.
    +4/-4     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Missing Validation

    The new buildSeleniumGridMetricName function doesn't handle the case where all browser parameters are empty, which could result in a metric name of just "selenium-grid" without any distinguishing characteristics.

    func buildSeleniumGridMetricName(meta *seleniumGridScalerMetadata) string {
    	nameParts := []string{"selenium-grid"}
    	if meta.BrowserName != "" {
    		nameParts = append(nameParts, meta.BrowserName)
    	}
    	if meta.BrowserVersion != "" {
    		nameParts = append(nameParts, meta.BrowserVersion)
    	}
    	if meta.PlatformName != "" {
    		nameParts = append(nameParts, meta.PlatformName)
    	}
    	return strings.Join(nameParts, "-")
    }

    Copy link

    qodo-merge-pro bot commented May 15, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Add nil pointer check

    The function doesn't handle the case where meta is nil, which could lead to a
    nil pointer dereference panic. Add a nil check at the beginning of the function
    to prevent potential runtime crashes.

    .keda/scalers/selenium_grid_scaler.go [212-224]

     func buildSeleniumGridMetricName(meta *seleniumGridScalerMetadata) string {
    +  if meta == nil {
    +    return "selenium-grid"
    +  }
       nameParts := []string{"selenium-grid"}
       if meta.BrowserName != "" {
         nameParts = append(nameParts, meta.BrowserName)
       }
       if meta.BrowserVersion != "" {
         nameParts = append(nameParts, meta.BrowserVersion)
       }
       if meta.PlatformName != "" {
         nameParts = append(nameParts, meta.PlatformName)
       }
       return strings.Join(nameParts, "-")
     }
    • Apply / Chat
    Suggestion importance[1-10]: 7

    __

    Why: Adding a nil check for the meta parameter in buildSeleniumGridMetricName prevents a potential nil pointer dereference, improving the function's robustness. While this is a good defensive programming practice, the actual likelihood of meta being nil depends on the broader codebase context, so the impact is moderate but not critical.

    Medium
    • Update

    @VietND96 VietND96 merged commit 33adea2 into trunk May 15, 2025
    27 checks passed
    @VietND96 VietND96 deleted the keda-2.17.1 branch May 15, 2025 20:07
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant