Skip to content

Conversation

taurus-forever
Copy link
Contributor

@taurus-forever taurus-forever commented Jul 8, 2025

Issue

The snap user snap_daemon has been deprecated by SNAP team,
see: https://forum.snapcraft.io/t/system-usernames/13386
Also the newer charmed-postgresql snap is available with new parts there.

Solution

  • Bump snap revision to 197/198.
  • Use _daemon_ (UID:584792) instead of snap_daemon (UID:584788)
  • temporary disable upgrade tests due to snap user change.
    Tests will be re-enabled after releasing to edge, as we do not
    provide upgrade path for snap ownership changes.
    Upgrade path is unnecessary here, as it is a first stable release to PG16 charm.
  • Stop creating $SNAP_COMMON/data/db (unnecessary) + polishing
  • new snap adds postgresql-16-repack PG extention

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

Copy link

codecov bot commented Jul 8, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.29%. Comparing base (4d6ef0b) to head (270c2bb).
Report is 1 commits behind head on 16/edge.

Files with missing lines Patch % Lines
src/relations/async_replication.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           16/edge    #1024   +/-   ##
========================================
  Coverage    70.29%   70.29%           
========================================
  Files           16       16           
  Lines         3807     3807           
  Branches       545      545           
========================================
  Hits          2676     2676           
  Misses        1001     1001           
  Partials       130      130           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dragomirp dragomirp added the enhancement New feature, UI change, or workload upgrade label Jul 8, 2025
Reasoning:
 * Use _daemon_ (UID:584792) instead of snap_daemon (UID:584788)
   See: https://forum.snapcraft.io/t/system-usernames/13386
 * Stop creating $SNAP_COMMON/data/db (unnecessary) + polishing
 * add postgresql-16-repack
 * temporary disable upgrade tests due to snap user change
@taurus-forever taurus-forever changed the title [DPE-7691] Use _daemon_ (584792) via snap revision to amd64=193 [DPE-7691] Bump snap revision to 197/198 to use _daemon_ (584792) Jul 9, 2025
@taurus-forever taurus-forever marked this pull request as ready for review July 9, 2025 14:10
Comment on lines +1331 to +1333
subprocess.check_call(["mkdir", "-p", "/home/_daemon_"]) # noqa: S607
subprocess.check_call(["chown", "_daemon_:_daemon_", "/home/_daemon_"]) # noqa: S607
subprocess.check_call(["usermod", "-d", "/home/_daemon_", "_daemon_"]) # noqa: S607
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It smells a bit, and might be no longer necessary (AFAIK it was some snap workaround)... but let's test it AS IS for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's still needed, as long as we switch user to _daemon_.

Comment on lines +92 to +94
_check_call.assert_any_call(["mkdir", "-p", "/home/_daemon_"])
_check_call.assert_any_call(["chown", "_daemon_:_daemon_", "/home/_daemon_"])
_check_call.assert_any_call(["usermod", "-d", "/home/_daemon_", "_daemon_"])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above.

Comment on lines +8 to +10
systems:
- -ubuntu-24.04
- -ubuntu-24.04-arm
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will be reverted after merge and edge publishing.

@taurus-forever taurus-forever merged commit 94f31bd into 16/edge Jul 9, 2025
279 of 291 checks passed
@taurus-forever taurus-forever deleted the alutay/use_daemon_ branch July 9, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, UI change, or workload upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants