Skip to content

Conversation

@adskyiproger
Copy link
Contributor

@adskyiproger adskyiproger commented Oct 29, 2025

Note

Currently, we do not run e2e tests as a check on opencrvs-countryconfig-repo PRs. Please ensure your PR doesn't break any e2e tests.

One method for doing this is to open a PR with these changes to opencrvs-farajaland as well, and see if the PR check passes there.

Description

Goal of this PR is to allow users choose if they wish to go with Encrypted file system or not

Testing

Answer no choosen

Disk size question was not asked:
image

Encryption key was not stored into Github:
image

Disk size was not stored into GitHub:
image

Answer yes choosen

Disk size question was asked:
image

Variable was created:
image

image image

Re-run script when both encryption key and disk size are setup

image

Encryption key passed from Environment variables

image image

Checklist

  • I have linked the correct Github issue under "Development"
  • I have tested the changes locally, and written appropriate tests
  • I have tested beyond the happy path (e.g. edge cases, failure paths)
  • I have updated the changelog with this change (if applicable)
  • I have updated the GitHub issue status accordingly

@github-actions

This comment has been minimized.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Important Files Changed

File Analysis

Filename Score Overview
infrastructure/environments/setup-environment.ts 3/5 Makes disk encryption optional but breaks mandatory variable check in Ansible playbook (encrypted_disk_size always required)

1 file reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +980 to +993
if (!encryption_key_defined) {
const answers_enable_encryption = await prompts(
[
{
name: 'enableEncryption',
type: 'confirm' as const,
message: 'Do you want to enable disk encryption?',
scope: 'ENVIRONMENT' as const,
initial: Boolean(process.env.ENABLE_ENCRYPTION)
}
].map(questionToPrompt)
)
enableEncryption = answers_enable_encryption.enableEncryption
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: If ENCRYPTION_KEY already exists, enableEncryption stays true but the user is never asked about disk space. This means encryption mode is inferred from the existence of ENCRYPTION_KEY rather than being explicitly controlled. Consider checking for both ENCRYPTION_KEY and DISK_SPACE to determine if encryption was previously enabled, or prompt the user for clarity.

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@adskyiproger adskyiproger merged commit ef2d952 into develop Nov 3, 2025
2 checks passed
@adskyiproger adskyiproger deleted the ocrvs-10896 branch November 3, 2025 09:09
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.

3 participants