Skip to content

Refactor Azure blob scaler#7371

Merged
zroubalik merged 1 commit intokedacore:mainfrom
rickbrouwer:azure_blob
Jan 28, 2026
Merged

Refactor Azure blob scaler#7371
zroubalik merged 1 commit intokedacore:mainfrom
rickbrouwer:azure_blob

Conversation

@rickbrouwer
Copy link
Member

@rickbrouwer rickbrouwer commented Jan 7, 2026

Refactor the scaler to match the new metadata guidelines.

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Tests have been added
  • Ensure make generate-scalers-schema has been run to update any outdated generated files
  • A PR is opened to update the documentation on (repo) (if applicable)
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Relates to #5797

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Thank you for your contribution! 🙏

Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected.

While you are waiting, make sure to:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient.

Learn more about our contribution guide.

@keda-automation keda-automation requested a review from a team January 7, 2026 17:06
@snyk-io
Copy link

snyk-io bot commented Jan 7, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@rickbrouwer
Copy link
Member Author

rickbrouwer commented Jan 7, 2026

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

@rickbrouwer
Copy link
Member Author

rickbrouwer commented Jan 7, 2026

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

Copy link
Contributor

@dttung2905 dttung2905 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I think this scaler is one of the last scaler left to be refactored

Just need a little fix for the CI though and we are good

curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /home/runner/go/bin v2.7.1
golangci/golangci-lint info checking GitHub for tag 'v2.7.1'
golangci/golangci-lint info found version: 2.7.1 for v2.7.1/linux/amd64
golangci/golangci-lint info installed /home/runner/go/bin/golangci-lint
golangci-lint run
pkg/scalers/azure_blob_scaler.go:78:3: assignOp: replace `m.BlobPrefix = m.BlobPrefix + m.BlobDelimiter` with `m.BlobPrefix += m.BlobDelimiter` (gocritic)
		m.BlobPrefix = m.BlobPrefix + m.BlobDelimiter
		^
1 issues:
* gocritic: 1
make: *** [Makefile:163: golangci] Error 1

Signed-off-by: Rick Brouwer <rickbrouwer@gmail.com>
@rickbrouwer
Copy link
Member Author

rickbrouwer commented Jan 9, 2026

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

@rickbrouwer
Copy link
Member Author

rickbrouwer commented Jan 10, 2026

Thanks for the PR. I think this scaler is one of the last scaler left to be refactored

Thanks @dttung2905 !

I've moved the GetAzureBlobListLength code (and also refactored that) from pkg/scalers/azure/azure_blob.go to pkg/scalers/azure_blob_scaler.go.
I don't know if you're okay with this, but since I don't think it's shared code, I'd rather keep it with the scaler itself.

Could you double-check this PR?

@rickbrouwer rickbrouwer marked this pull request as ready for review January 10, 2026 08:25
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

nice job!

@rickbrouwer rickbrouwer added the Awaiting/2nd-approval This PR needs one more approval review label Jan 21, 2026
@zroubalik zroubalik removed the Awaiting/2nd-approval This PR needs one more approval review label Jan 28, 2026
@zroubalik zroubalik merged commit f6579da into kedacore:main Jan 28, 2026
26 checks passed
@rickbrouwer rickbrouwer deleted the azure_blob branch January 28, 2026 12:24
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Feb 13, 2026
Signed-off-by: Rick Brouwer <rickbrouwer@gmail.com>
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.

4 participants