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

Redis host port params #710

Closed
wants to merge 7 commits into from
Closed

Redis host port params #710

wants to merge 7 commits into from

Conversation

inuyasha82
Copy link
Contributor

@inuyasha82 inuyasha82 commented Mar 31, 2020

This should implement #694

How does it works:

now the redis scaler accept 2 new parameters: host and port in addition of the already existing.

If address is specified it use the address, otherwise it checks the host and port parameters, they must be difned both, otherwise an error will be returned.

If address and host and port are all specified, address will get priority.

I'll update the documentaton and create a PR soon.

Checklist

Fixes #694

@tomkerkhove
Copy link
Member

Thanks! Let me know when the PR is up for the docs.

Can you add some tests as well please?

@inuyasha82
Copy link
Contributor Author

Pr for documentation created kedacore/keda-docs#125

@inuyasha82
Copy link
Contributor Author

Tests added!

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

LGTM, one minor thing. Could you please add a test to check behaviour when address, host and port` are specified at the same time?

@inuyasha82
Copy link
Contributor Author

@zroubalik test added.

@zroubalik zroubalik self-requested a review April 1, 2020 15:06
@zroubalik
Copy link
Member

@inuyasha82 thanks, looking good! One thing left, could you please sing your commit? See the DCO check failed. https://github.com/kedacore/keda/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-signing-your-work

@inuyasha82
Copy link
Contributor Author

@zroubalik i tried to solve signoff the changes, but when i run the signoff command i'm getting a conflict errorr with the following error:

CONFLICT (content): Merge conflict in pkg/scalers/redis_scaler_test.go
error: Failed to merge in the changes.
Patch failed at 0009 Add test to scaler
hint: Use 'git am --show-current-patch' to see the failed patch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".

Of course i tried to fix the conflict following the instrructions, but everytime i try to continue the rebase it still complain about adding the file (step that i have done):

You must edit all merge conflicts and then
mark them as resolved using git add

I trried with and without committing the merge (that according to the instructions commit is not necessary.

Plus if i do git status:

You are currently rebasing branch 'redis-host-port-params' on 'b919a4d'.
  (all conflicts fixed: run "git rebase --continue")

but then git rebase --continue still complains...
Can you help me please?

@zroubalik
Copy link
Member

sometimes it could be tricky, especially if you are performing merge during your work and not rebase.

I'd recommend you to checkout your branch again, squash all your commits into one and sing this commit, squashing: https://www.internalpointers.com/post/squash-commits-into-one-git

If you have further problems, you can ask me on #keda slack.

inuyasha82 and others added 7 commits April 2, 2020 10:16
* Add host/port parameter for redis scaler

* Remove debug print

* Use always address variable for getRedisListLength

Co-authored-by: Ivan Gualandri <ivangual@ie.ibm.com>
Signed-off-by: Ivan Gualandri <ivan.gualandri@gmail.com>
Signed-off-by: Michael Droessler <michael.droessler@cunamutual.com>
Signed-off-by: Ivan Gualandri <ivan.gualandri@gmail.com>
* Provide project governance

Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>

* Update sections

Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Ivan Gualandri <ivan.gualandri@gmail.com>
Signed-off-by: Ahmed ElSayed <ahmed@elsayed.io>
Signed-off-by: Ivan Gualandri <ivan.gualandri@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Ivan Gualandri <ivan.gualandri@gmail.com>
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
Signed-off-by: Ivan Gualandri <ivan.gualandri@gmail.com>
Signed-off-by: Ivan Gualandri <ivan.gualandri@gmail.com>
@inuyasha82
Copy link
Contributor Author

Ok probably better just to creaet a new branchand make a single commit and create a new PR, i see that this one has been completely messed up :)

@inuyasha82 inuyasha82 closed this Apr 2, 2020
SpiritZhou pushed a commit to SpiritZhou/keda that referenced this pull request Jul 18, 2023
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.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.

Allow providing separate host/port parameters for Redis scaler
5 participants