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

Add e2e test case for default scaling strategy #6419

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

Conversation

junekhan
Copy link
Contributor

Add e2e test case for default scaling strategy

Checklist

Fixes #6416

Relates to #

@junekhan junekhan requested a review from a team as a code owner December 12, 2024 09:49
password = fmt.Sprintf("%s-password", testName)
vhost = "/"
connectionString = fmt.Sprintf("amqp://%s:%s@rabbitmq.%s.svc.cluster.local/", user, password, rmqNamespace)
httpConnectionString = fmt.Sprintf("http://%s:%s@rabbitmq.%s.svc.cluster.local/", user, password, rmqNamespace)
Copy link

@semgrep-app semgrep-app bot Dec 12, 2024

Choose a reason for hiding this comment

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

Semgrep found a possible database connection string built with string concatenation. Check for proper encoding/escaping of components to prevent parse errors and injection vulnerabilities.

Ignore this finding from db-connection-string.

@junekhan
Copy link
Contributor Author

Please run the e2e test task! Thanks!

@chinery
Copy link

chinery commented Dec 12, 2024

@junekhan I see you've committed the test I sent you from this conversation
#6416 (comment)
can you not run the test locally?

I can send you the output if that saves having to create an entire PR just to run a test

@junekhan
Copy link
Contributor Author

junekhan commented Dec 12, 2024

@junekhan I see you've committed the test I sent you from this conversation
#6416 (comment)
can you not run the test locally?
I can send you the output if that saves having to create an entire PR just to run a test

Sorry, I don't have an environment to run this test. And I think it's nontrivial to add the test case, otherwise, there wouldn't have been any controversy. It can serve as evidence for people holding the same idea as you.

password = fmt.Sprintf("%s-password", testName)
vhost = "/"
connectionString = fmt.Sprintf("amqp://%s:%s@rabbitmq.%s.svc.cluster.local/", user, password, rmqNamespace)
httpConnectionString = fmt.Sprintf("http://%s:%s@rabbitmq.%s.svc.cluster.local/", user, password, rmqNamespace)
Copy link

Choose a reason for hiding this comment

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

Semgrep found a possible database connection string built with string concatenation. Check for proper encoding/escaping of components to prevent parse errors and injection vulnerabilities.

Ignore this finding from db-connection-string.

user = fmt.Sprintf("%s-user", testName)
password = fmt.Sprintf("%s-password", testName)
vhost = "/"
connectionString = fmt.Sprintf("amqp://%s:%s@rabbitmq.%s.svc.cluster.local/", user, password, rmqNamespace)
Copy link

Choose a reason for hiding this comment

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

Semgrep found a possible database connection string built with string concatenation. Check for proper encoding/escaping of components to prevent parse errors and injection vulnerabilities.

Ignore this finding from db-connection-string.

@chinery
Copy link

chinery commented Dec 12, 2024

@junekhan I see you've committed the test I sent you from this conversation
#6416 (comment)
can you not run the test locally?
I can send you the output if that saves having to create an entire PR just to run a test

Sorry, I don't have an environment to run this test. And I think it's nontrivial to add the test case, otherwise, there wouldn't have been any controversy. It can serve as evidence for people holding the same idea as you.

I created an environment to run the tests. Regardless, here is the output if you want to see.

I don't disagree that adding a test would be useful for the project, though I did not intend this one to cover all necessary test cases, just demonstrate your example. I suppose something is better than nothing. I am a little surprised you would commit someone else's code without checking, even if that code is just a reworking of existing code, that is what most of the tests are. But not a point I want to belabour.

Anyway, I assume you have not been able to run the tests I sent for eager either, so I've uploaded the output here.

@junekhan
Copy link
Contributor Author

junekhan commented Dec 12, 2024

I created an environment to run the tests. Regardless, here is the output if you want to see.
I don't disagree that adding a test would be useful for the project, though I did not intend this one to cover all necessary test cases, just demonstrate your example. I suppose something is better than nothing. I am a little surprised you would commit someone else's code without checking, even if that code is just a reworking of existing code, that is what most of the tests are. But not a point I want to belabour.
Anyway, I assume you have not been able to run the tests I sent for eager either, so I've uploaded the output here.

@chinery Apologies for not asking for your permission of the test snippet. If you agree it's much simpler for people to follow the test case and the outcome than to read lengthy passages and reason in mind, you can re-auther and create another pull request. I will immediately withdraw this PR.

@SpiritZhou
Copy link
Contributor

SpiritZhou commented Dec 19, 2024

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

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.

eager scaling strategy for ScaledJob does not work as documented (or intended?)
3 participants