Skip to content

CI: select explicit influxdb version - #3862

Open
da-Kai wants to merge 2 commits into
OpenEMS:developfrom
da-Kai:ci/influxdb-version
Open

CI: select explicit influxdb version#3862
da-Kai wants to merge 2 commits into
OpenEMS:developfrom
da-Kai:ci/influxdb-version

Conversation

@da-Kai

@da-Kai da-Kai commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

like @sjjh pointed out, it is better to pin a specific InfluxDB version in the docker-compose examples.

Changes:

  • pinned InfluxDB version to 2.9-alpine
  • renamed the InfluxDB volume, so it will not clash with a potential future upgrade to v3
  • unify container names using lower-kebab-case

@da-Kai
da-Kai requested a review from sfeilmeier August 1, 2026 14:10
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3862      +/-   ##
=============================================
- Coverage      60.63%   55.39%   -5.23%     
- Complexity       105    18765   +18660     
=============================================
  Files           3496     3624     +128     
  Lines         153207   169392   +16185     
  Branches       11691    13986    +2295     
=============================================
+ Hits           92887    93824     +937     
- Misses         56824    71858   +15034     
- Partials        3496     3710     +214     
🚀 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.

@sjjh

sjjh commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

@da-Kai thx! If someone is using the old docker file, how does the upgrade path look like? Can one simply update the docker file, or are there any manual steps (renaming the volume, ensuring/up-/downgrading influxdb) needed?

@da-Kai

da-Kai commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

@da-Kai thx! If someone is using the old docker file, how does the upgrade path look like? Can one simply update the docker file, or are there any manual steps (renaming the volume, ensuring/up-/downgrading influxdb) needed?

There is an upgrade path:

  1. stop the compose docker compose down

  2. update the docker-compose.yml content to the new version

  3. start only the influxdb, so the new volume is created docker compose up openems-influxdb and then Ctrl+C stop it again

  4. copy over the volume contents using either of these methods:
    A) find your volumes docker volume ls and use a one-off container to copy the content over

    docker run --rm \
        -v backend_openems-influxdb:/old \
        -v backend_openems-influxdb2-data:/new \
        alpine sh -c "cp -av /old/. /new/"
    

    B) copy using the file system.

    sudo cp -av /var/lib/docker/volumes/backend_openems-influxdb/_data/. /var/lib/docker/volumes/backend_openems-influxdb2-data/_data/
    
  5. start docker compose again docker compose up -d

And it should work like before.

Note: For important data, always create backups before upgrading.

@sjjh

sjjh commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

@da-Kai I tried as you suggested (copying the volume as A)) and did not experience any error during the process. But something seems to not have worked. In the history tab, I now get an error message "error fetching data, try again later" instead of the graph.

Edit: I had a typo in the volume name of the cp command (and it did not complain).

@sjjh

sjjh commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

@da-Kai sry to bother you again. So I redid the whole process (using coyping B)). If I now open the UI, the content area of the history tab either stays completely empty or shows the "error fetching data, retry later" message. The UI shows green check marks, the log within the UI looks good. But something seems to not work...

@da-Kai

da-Kai commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@sjjh

Are all your containers running? Check with docker compose ps

Does your influxdb container log any errors? docker compose logs -n 200 openems-influxdb

The hostname also was openems_influxdb instead of openems-influxdb, so you may have to change settings in openems backend.

FYI: underscore is normally not supported in host-/domainnames according to RFC 1123

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