core icon indicating copy to clipboard operation
core copied to clipboard

Download database not working in latest version

Open wezell opened this issue 1 year ago • 1 comments

Parent Issue

We need to be able to dump the database from the backend of dotCMS

Problem Statement

Our pg_dump version is not working in our cloud environments

Steps to Reproduce

Go to the demo site or master and try to use the download database functionality

Acceptance Criteria

We need a postman test that tests both this and the download assets.

dotCMS Version

latest

Proposed Objective

Technical User Experience

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

wezell avatar Feb 07 '24 17:02 wezell

@wezell we already have postman tests for both downloading assets and db dump but the db dump one was ignored because it was one of the ones working locally and failing on GHA. Sounds like the moment to include it back.

Collections are:

  • Maintenance Resource - Donwload Assets
  • Maintenance Resource - Download DB Dump The exclusion happens in exclude DB Dump -> Test tab -> postman.setNextRequest("invalidateSession"). That last piece of code needs to be removed to include it again.

dsilvam avatar Feb 08 '24 15:02 dsilvam

Passed internal QA

  • Tested on Docker: [dotcms:master_c088f59]

Video

https://github.com/dotCMS/core/assets/72418962/6c98d875-e6b7-4424-a9e9-0b65b33aac56

rjvelazco avatar Mar 01 '24 17:03 rjvelazco

Approved: Tested on master_9587235, Docker, macOS 13.0, FF v121.0.1

josemejias11 avatar Mar 05 '24 14:03 josemejias11

This is not working in the latest master - the downloaded file is empty

wezell avatar Mar 05 '24 19:03 wezell

Failed: Tested on master_ed06491, Docker, macOS 13.0, FF v121.0.1 Screenshot 2024-03-05 at 1 31 04 PM

josemejias11 avatar Mar 05 '24 19:03 josemejias11

Server has a different version.

pgdump < server version it failed. Only work in Postgres 15

@wezell is working in a fix we'll be testing.

fmontes avatar Mar 05 '24 20:03 fmontes

The following ticket is part of the fix as well: https://github.com/dotCMS/core/issues/27871 , which includes pg_dump from the pg-base Dockerfile to the java-base Dockerfile, thus eliminating the need for the pg-base image and simplify our process.

We're working on re-generating the base image so that the changes get picked up.

jcastro-dotcms avatar Mar 20 '24 13:03 jcastro-dotcms

I believe #28134 "remove pg base docker image" will fully resolve this.

Tests good on master qa Screenshot 2024-04-04 at 8 53 43 AM

yolabingo avatar Apr 04 '24 14:04 yolabingo

INTERNAL QA: PASSED

After getting over some issues related to the new naming convention for Docker Image tags, @yolabingo and I were able to confirm that you can generate the database dump from the dotCMS backend without issues now. For QA, keep in mind that this issue was never reproducible in a local environment as it relied on a specific setup that needed to be supported.

jcastro-dotcms avatar Apr 15 '24 21:04 jcastro-dotcms

The existing Maintenance_Resource-Download_DB_Dump.json Postman test verifies the behavior of this feature as much as possible.

jcastro-dotcms avatar Apr 16 '24 21:04 jcastro-dotcms

Fixed, tested on master // Docker // FF

bryanboza avatar Apr 17 '24 16:04 bryanboza