Skip to content

feat: hub#18237 - Export/Import Automatic Dabtabase#11

Merged
luciocarvalhojr merged 5 commits intomainfrom
feat/hub#18237-export/import-automatic-database
Feb 10, 2026
Merged

feat: hub#18237 - Export/Import Automatic Dabtabase#11
luciocarvalhojr merged 5 commits intomainfrom
feat/hub#18237-export/import-automatic-database

Conversation

@luciocarvalhojr
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions setup to export a database dump via Ansible/SSM, store it as an artifact, and upload it to S3, exposed as a reusable workflow and a template entrypoint.

Changes:

  • Added a workflow template to trigger DB export/import on pushes to specific branches.
  • Added a reusable workflow (workflow_call) that runs the export, saves an artifact, then uploads to S3.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.

File Description
templates/database-export.yml Adds a template workflow that calls the shared copy-database reusable workflow with environment selection and AWS role secrets.
.github/workflows/copy-database.yml Implements the reusable workflow to export DB via Ansible, upload/download artifacts, and push the dump to S3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +13 to +17
secrets:
aws-oidc-role-arn:
required: true
tm-tmdt-aws-oidc-role-arn:
required: true
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The workflow declares workflow_call secrets aws-oidc-role-arn and tm-tmdt-aws-oidc-role-arn, but the job references different secret names (TM_CLIENT_AWS_OIDC_ROLE_ARN and aws-deploy-role-arn). This will fail at runtime because those secrets are not provided by workflow_call. Align all references to the declared secret names (or rename the declared secrets to match) and use those consistently for role-to-assume and any env vars.

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +81
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: db-dump
path: .
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The uploaded artifact path is ./dump/latest.sql.gz, but after download to path: . the file will typically be restored under ./dump/latest.sql.gz, not ./latest.sql.gz. As written, gzip -d latest.sql.gz and aws s3 cp latest.sql ... are likely to fail due to wrong paths. Either download into ./dump (or adjust the commands to reference dump/latest.sql.gz and dump/latest.sql) so the paths match.

Copilot uses AI. Check for mistakes.
retention-days: 1

Upload:
runs-on: ubuntu-latest
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

ubuntu-latest and the container tag :latest can change over time and introduce unexpected breakages. Prefer pinning to a specific runner image (if your org standard allows) and pinning the container image to an immutable digest (or at least a version tag) for more reproducible runs.

Copilot uses AI. Check for mistakes.
@luciocarvalhojr luciocarvalhojr merged commit 0082660 into main Feb 10, 2026
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants