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

fix Sets the requests equals to limits. #57

Merged
merged 2 commits into from
Aug 7, 2024
Merged

fix Sets the requests equals to limits. #57

merged 2 commits into from
Aug 7, 2024

Conversation

lvarin
Copy link
Contributor

@lvarin lvarin commented Aug 7, 2024

Summary by Sourcery

Set CPU limits in Kubernetes container resources to match CPU requests and update tests to verify this behavior.

Bug Fixes:

  • Ensure that CPU limits are set in the Kubernetes container resources to match the CPU requests.

Tests:

  • Add test assertions to verify that CPU limits are correctly set in the Kubernetes container resources.

Copy link

sourcery-ai bot commented Aug 7, 2024

Reviewer's Guide by Sourcery

This pull request adds functionality to set CPU limits in the Kubernetes container resources. Tests have been updated to verify that the CPU limits are correctly set to 4 for all executors. Additionally, a JSON comparison test has been commented out.

File-Level Changes

Files Changes
src/test/java/uk/ac/ebi/tsc/tesk/k8s/convert/TesKubernetesConverterTest.java
src/test/resources/fromTesToK8s/taskmaster_param.json
Updated tests to include checks for CPU limits in the container resources.
src/main/java/uk/ac/ebi/tsc/tesk/k8s/convert/TesKubernetesConverter.java Implemented setting of CPU limits in the Kubernetes container resources.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@lvarin lvarin changed the title fix Sets the requests equals to limits. not worth merging fix Sets the requests equals to limits. Aug 7, 2024
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @lvarin - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Could you provide more context on the motivation behind this change? The PR title suggests uncertainty about its value.
  • Consider keeping or updating the commented-out test case to maintain test coverage.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -256,7 +257,7 @@ public void fromTesTaskToK8sConfigMap() throws IOException {

taskMasterInputJson.extractingJsonPathNumberValue("resources.disk_gb").isEqualTo(100.0);

taskMasterInputJson.isEqualToJson(new ClassPathResource("fromTesToK8s/taskmaster_param.json"), JSONCompareMode.NON_EXTENSIBLE);
//taskMasterInputJson.isEqualToJson(new ClassPathResource("fromTesToK8s/taskmaster_param.json"), JSONCompareMode.NON_EXTENSIBLE);
Copy link

Choose a reason for hiding this comment

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

question (testing): Consider re-enabling JSON comparison test

The commented-out JSON comparison test could provide a comprehensive check to ensure the entire JSON structure is as expected. Consider re-enabling it or providing a reason for its removal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link

Choose a reason for hiding this comment

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

Thank you for re-enabling the JSON comparison test, @lvarin. This will help ensure that the entire JSON structure is validated comprehensively. If you encounter any issues with this test or need further assistance, feel free to reach out. Great job!

@lvarin lvarin requested a review from trispera August 7, 2024 12:23
@trispera trispera merged commit 12754b8 into master Aug 7, 2024
1 check passed
@trispera trispera deleted the fix-for-rahti branch August 7, 2024 12:30
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.

2 participants