You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "weizhouapache (via GitHub)" <gi...@apache.org> on 2026/07/13 19:56:22 UTC

[PR] debian: ignore pycompile errors [cloudstack]

weizhouapache opened a new pull request, #13602:
URL: https://github.com/apache/cloudstack/pull/13602

   ### Description
   
   This PR...
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ******************************************************************************* -->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ******************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] Build/CI
   - [ ] Test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4963496522

   @blueorangutan test matrix


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4967203624

   @blueorangutan test ubuntu22 kvm-ubuntu22


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian/ubuntu: ignore pycompile errors [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4968082376

   merging this, I will run smoke tests with other PRs (see #12198)
   
   thanks @vishesh92 providing the fix, and @harikrishna-patnala @sureshanaparti for the review


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#discussion_r3576919822


##########
debian/cloudstack-common.postinst:
##########
@@ -22,11 +22,11 @@ CLOUDUTILS_DIR="/usr/share/pyshared/"
 DIST_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
 
 if which pycompile >/dev/null 2>&1; then
-    pycompile -p cloudstack-common
+    pycompile -p cloudstack-common || echo "Warning: pycompile failed for cloudstack-common" >&2
 fi

Review Comment:
   Using `which` in maintainer scripts is not POSIX and can be missing in minimal environments; prefer `command -v` (a shell builtin). Since the `pycompile` check is duplicated, you can also collapse both blocks into a single `if` and run both `pycompile` commands inside it.



-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4966660106

   @blueorangutan package


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4962120597

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  no SystemVM templates. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian/ubuntu: ignore pycompile errors [cloudstack]

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


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#discussion_r3573739299


##########
debian/cloudstack-common.postinst:
##########
@@ -22,11 +22,11 @@ CLOUDUTILS_DIR="/usr/share/pyshared/"
 DIST_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
 
 if which pycompile >/dev/null 2>&1; then
-    pycompile -p cloudstack-common
+    pycompile -p cloudstack-common || true

Review Comment:
   `|| true` suppresses all `pycompile` failures silently, which can hide real packaging/install problems and make troubleshooting difficult. If the intent is to keep installation going, at least emit a warning to stderr when compilation fails.



##########
debian/cloudstack-common.postinst:
##########
@@ -22,11 +22,11 @@ CLOUDUTILS_DIR="/usr/share/pyshared/"
 DIST_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
 
 if which pycompile >/dev/null 2>&1; then
-    pycompile -p cloudstack-common
+    pycompile -p cloudstack-common || true
 fi
 
 if which pycompile >/dev/null 2>&1; then
-    pycompile -p cloudstack-common /usr/share/cloudstack-common
+    pycompile -p cloudstack-common /usr/share/cloudstack-common || true

Review Comment:
   This ignores `pycompile` errors without any diagnostic output. If `pycompile` is flaky on some Debian/Python combinations, consider keeping the non-fatal behavior but logging a warning so failures are visible in dpkg logs.



-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4966320702

   @blueorangutan test ubuntu22 kvm-ubuntu22


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#discussion_r3576864615


##########
debian/cloudstack-common.postinst:
##########
@@ -22,11 +22,11 @@ CLOUDUTILS_DIR="/usr/share/pyshared/"
 DIST_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
 
 if which pycompile >/dev/null 2>&1; then

Review Comment:
   Using `which` in a `/bin/sh` maintainer script is not POSIX and can fail if `which` isn’t installed, causing the postinst to abort under `set -e`. Prefer `command -v` for a reliable check.



##########
debian/cloudstack-common.postinst:
##########
@@ -22,11 +22,11 @@ CLOUDUTILS_DIR="/usr/share/pyshared/"
 DIST_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
 
 if which pycompile >/dev/null 2>&1; then
-    pycompile -p cloudstack-common
+    pycompile -p cloudstack-common || echo "Warning: pycompile failed for cloudstack-common" >&2
 fi
 
 if which pycompile >/dev/null 2>&1; then
-    pycompile -p cloudstack-common /usr/share/cloudstack-common
+    pycompile -p cloudstack-common /usr/share/cloudstack-common || true
 fi

Review Comment:
   This `pycompile` invocation ignores failures silently (`|| true`). Since the intent is to proceed on failure, it should still emit a warning to stderr (like the previous block) to aid diagnosing packaging issues while keeping the install non-fatal. Also prefer `command -v` over `which` here for POSIX compatibility.



-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4962183639

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13602?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 3.41%. Comparing base ([`d2a3bd1`](https://app.codecov.io/gh/apache/cloudstack/commit/d2a3bd1aa78a516f47d5cf683bbb1327a121a4b8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ef503a8`](https://app.codecov.io/gh/apache/cloudstack/commit/ef503a8df55352e8a68a2673c0264490392947ba?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   > :exclamation:  There is a different number of reports uploaded between BASE (d2a3bd1) and HEAD (ef503a8). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (d2a3bd1) | HEAD (ef503a8) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               main   #13602       +/-   ##
   =============================================
   - Coverage     19.50%    3.41%   -16.09%     
   =============================================
     Files          6303      486     -5817     
     Lines        569288    41774   -527514     
     Branches      69792     7899    -61893     
   =============================================
   - Hits         111029     1428   -109601     
   + Misses       446108    40148   -405960     
   + Partials      12151      198    -11953     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13602/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/13602/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.41% <ø> (ø)` | |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/13602/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [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#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cloudstack/pull/13602?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>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#discussion_r3577034969


##########
debian/cloudstack-common.postinst:
##########
@@ -19,14 +19,17 @@
 
 set -e
 CLOUDUTILS_DIR="/usr/share/pyshared/"
-DIST_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
 
-if which pycompile >/dev/null 2>&1; then
-    pycompile -p cloudstack-common
+# distutils was removed in Python 3.12 (Ubuntu 24.04); the Debian/Ubuntu-patched
+# sysconfig 'deb_system' scheme gives the same /usr/lib/python3/dist-packages path.
+DIST_DIR=$(python3 -c "import sysconfig; print(sysconfig.get_path('platlib', 'deb_system'))")
+
+if command -v py3compile >/dev/null 2>&1; then
+    py3compile -p cloudstack-common 2>/dev/null || echo "Warning: py3compile failed for cloudstack-common" >&2
 fi
 
-if which pycompile >/dev/null 2>&1; then
-    pycompile -p cloudstack-common /usr/share/cloudstack-common
+if command -v py3compile >/dev/null 2>&1; then

Review Comment:
   The `py3compile` presence check is duplicated, and stderr is discarded (`2>/dev/null`), which makes the emitted warning less actionable (the underlying error output is lost). Consider a single `if` block and keep `py3compile` output while still ignoring its exit status.



-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4962103198

   @blueorangutan package


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4963502449

   @weizhouapache a [SL] Trillian-Jenkins matrix job (EL8 mgmt + EL8 KVM, Ubuntu22 mgmt + Ubuntu22 KVM, EL8 mgmt + VMware 7.0u3, EL9 mgmt + XCP-ng 8.2 ) has been kicked to run smoke tests


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4966336115

   @weizhouapache a [SL] Trillian-Jenkins test job (ubuntu22 mgmt + kvm-ubuntu22) has been kicked to run smoke tests


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4966665317

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  no SystemVM templates. I'll keep you posted as I make progress.


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4967216516

   @weizhouapache a [SL] Trillian-Jenkins test job (ubuntu22 mgmt + kvm-ubuntu22) has been kicked to run smoke tests


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4962542584

   Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18555


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4963850115

   <b>[SF] Trillian Build Failed (tid-16555)<b/>


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4967090674

   Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18560


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] debian: ignore pycompile errors [cloudstack]

Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on PR #13602:
URL: https://github.com/apache/cloudstack/pull/13602#issuecomment-4966660188

   @blueorangutan package


-- 
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: commits-unsubscribe@cloudstack.apache.org

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