Skip to content

Conversation

@lunkwill42
Copy link
Member

Scope and purpose

Using the "latest" tag runs the risk of spontaneous upgrades during environment restarts. The data directory is persistent, but newer versions of PostgreSQL cannot use the data directory of an older version without some specific intervention to upgrade the data directory.

It's best to keep the upgrade behavior predictable; this does it by locking to a specific PostgreSQL version.

Additionally, this ensures the main devcontainer is provisioned with PostgreSQL client programs that match the selected PostgreSQL server version, so that programs like pg_dump will work correctly.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • Wrote the commit message so that the first line continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • Based this pull request on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If it's not obvious from a linked issue, described how to interact with NAV in order for a reviewer to observe the effects of this change first-hand (commands, URLs, UI interactions)
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

Using the "latest" tag runs the risk of spontaneous upgrades during
environment restarts.  The data directory is persistent, but newer
versions of PostgreSQL cannot use the data directory of an older version
without some specific intervention to upgrade the data directory.

It's best to keep the upgrade behavior predictable; this does it by
locking to a specific PostgreSQL version.

Additionally, this ensures the main devcontainer is provisioned with
PostgreSQL client programs that match the selected PostgreSQL server
version, so that programs like `pg_dump` will work correctly.
@lunkwill42 lunkwill42 requested a review from a team November 6, 2025 15:15
@lunkwill42 lunkwill42 self-assigned this Nov 6, 2025
@lunkwill42 lunkwill42 added the nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) label Nov 6, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Test results

    27 files      27 suites   45m 40s ⏱️
 2 665 tests  2 665 ✅ 0 💤 0 ❌
19 710 runs  19 710 ✅ 0 💤 0 ❌

Results for commit c6398aa.

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.81%. Comparing base (16d6419) to head (c6398aa).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3649      +/-   ##
==========================================
- Coverage   62.82%   62.81%   -0.02%     
==========================================
  Files         611      611              
  Lines       45125    45125              
  Branches       43       43              
==========================================
- Hits        28351    28344       -7     
- Misses      16764    16771       +7     
  Partials       10       10              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lunkwill42 lunkwill42 merged commit f7e0c84 into master Nov 10, 2025
19 of 20 checks passed
@lunkwill42 lunkwill42 deleted the chore/fix-postgresql-versioning-devcontainer branch November 10, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants