You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/08/10 05:40:59 UTC

[PR] test(computing-unit): cover the pod lookup, creation and deletion paths [texera]

aglinxinyuan opened a new pull request, #7511:
URL: https://github.com/apache/texera/pull/7511

   ### What changes were proposed in this PR?
   
   The spec covered the pure transforms and the namespace-wide wrappers and stopped. The single-pod
   half of the class — `getPodByName`, `podExists`, `getPodLimits`, `createPod`, `deletePod` and the
   pod URI — was untested, which is 42 of the file's 62 lines.
   
   None of it needs a cluster: the fabric8 client is already a constructor parameter, so the existing
   Mockito fixture extends to the rest of the fluent chain, with the pod that `createPod` builds
   captured and inspected rather than sent anywhere.
   
   Adds 8 tests. The three that matter:
   
   - **the guard that refuses to overwrite a live pod** — creating over a running unit would detach it
     from its owner;
   - **the `Option(...)` wrapper around the by-name lookup** — fabric8 returns `null` for an absent
     pod rather than throwing, so the wrapper is all that stands between a caller and an NPE;
   - **the shared-memory volume appearing only when a size is requested** — `/dev/shm` defaults to
     64 Mi, too small for the Python workers, and the volume must not appear when unrequested.
   
   Also covered: the pod URI's service and namespace segments, the first container's resource limits
   and the empty-map fallback, env values reaching the container as strings, and `deletePod` targeting
   the cuid's own pod.
   
   **Verified by mutation**, all reverted (production diff empty):
   
   | Mutation | Result |
   |---|---|
   | pod name loses the cuid suffix | red |
   | URI drops the namespace segment | red |
   | `getPodByName` no longer null-guards | red |
   | `createPod` overwrites an existing pod | red |
   | cpu limit written from the memory value | red |
   | pod hostname is not the pod name | red |
   | `deletePod` targets a fixed cuid | red |
   
   No production file is touched.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7510
   
   ### How was this PR tested?
   
   ```
   sbt "ComputingUnitManagingService/testOnly org.apache.texera.service.util.KubernetesClientSpec"
   ```
   
   ```
   [info] Total number of tests run: 16
   [info] Tests: succeeded 16, failed 0, canceled 0, ignored 0, pending 0
   ```
   
   8 new on top of the existing 8. `Test/scalafmtCheck` and `Test/scalafix --check` both pass.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(computing-unit): cover the pod lookup, creation and deletion paths [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #7511:
URL: https://github.com/apache/texera/pull/7511


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(computing-unit): cover the pod lookup, creation and deletion paths [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7511:
URL: https://github.com/apache/texera/pull/7511#issuecomment-5236338330

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@kunwp1`
     You can notify them by mentioning `@kunwp1` in a comment.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(computing-unit): cover the pod lookup, creation and deletion paths [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7511:
URL: https://github.com/apache/texera/pull/7511#issuecomment-5243458477

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7511?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 86.38%. Comparing base ([`a61e1ee`](https://app.codecov.io/gh/apache/texera/commit/a61e1ee4a8b08f196cf509171d6372f7ab5895b8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`987bad4`](https://app.codecov.io/gh/apache/texera/commit/987bad4471c9b79e14f1afb5ef7e9f52bdc8f450?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #7511      +/-   ##
   ============================================
   - Coverage     86.52%   86.38%   -0.14%     
     Complexity     4211     4211              
   ============================================
     Files          1169     1169              
     Lines         46754    46750       -4     
     Branches       5203     5203              
   ============================================
   - Hits          40455    40387      -68     
   - Misses         4577     4641      +64     
     Partials       1722     1722              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.87% <ø> (-2.14%)` | :arrow_down: | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.87% <ø> (ø)` | | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.72% <ø> (ø)` | | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.97% <ø> (ø)` | | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.05% <ø> (ø)` | | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.23% <ø> (ø)` | | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.89% <ø> (ø)` | | |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.56% <ø> (ø)` | | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/7511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `26.31% <ø> (ø)` | | Carriedforward from [42d08a3](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/7511?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org