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

Remove calculateRequestOrder Function and fix bug #19685

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

DevMrRober
Copy link

@DevMrRober DevMrRober commented Sep 26, 2024

Summary

This PR removes the calculateRequestOrder function. The previous function was deemed unnecessary due to its redundant logic and lack of unique functionality.

Changes made

  • Removed function

  • Removed call to calculateRequestOrder function, which calculated the order of requests based on operationGroupingOrder and requestsSize.

  • Updated request creation logic:

    • Changed request creation logic to use requests.size() as the key in requests.putIfAbsent(), ensuring that each new request is added with a unique identifier based on the current size of the request map.

Reason for change

  • The original implementation included unnecessary complexity that generated a bug that only generated 2 operations if they were on the same path.

Tests

  • All existing tests have been run to ensure that no functionality has been affected by this change.
  • Requests are added correctly without being removed, and existing functionality remains intact.

Related issue

Reviewers

  • Please review the changes and provide feedback on the removal of the feature.

Translated with DeepL.com (free version)

rmarqmo added 2 commits September 26, 2024 11:25
This PR removes the calculateRequestOrder function from the codebase and addresses the bug described in issue OpenAPITools#19110. After a thorough review, it was determined that the function was unnecessary due to its redundant logic and lack of unique functionality.
@wing328
Copy link
Member

wing328 commented Sep 27, 2024

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@wing328
Copy link
Member

wing328 commented Sep 27, 2024

cc @mostafa

@wing328 wing328 added Client: k6 Enhancement: Code Cleanup General refactoring, removal of deprecated things, commenting, etc. Issue: Bug labels Sep 27, 2024
DevMrRober and others added 5 commits September 27, 2024 08:17
This PR removes the calculateRequestOrder function from the codebase and addresses the bug described in issue OpenAPITools#19110. After a thorough review, it was determined that the function was unnecessary due to its redundant logic and lack of unique functionality.
@DevMrRober
Copy link
Author

Sorry, I made a mistake the first time, it should be right now.

Copy link
Contributor

@mostafa mostafa left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client: k6 Enhancement: Code Cleanup General refactoring, removal of deprecated things, commenting, etc. Issue: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants