Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup autogenerated server vars #268

Merged
merged 31 commits into from
Nov 2, 2023

Conversation

rockycodes
Copy link
Contributor

@rockycodes rockycodes commented Oct 30, 2023

This PR removes variables that are generated/referenced by server variable auto-generation now and are no longer needed. It also removes a method (overwrite_checkout_file) that was used to rollout server var auto-generation and is no longer needed.

I mostly focused on removing vars from the shared files and AWS since those are our active deployments, but I also removed some vars from Azure that are clearly no longer needed.

The variables removed in this PR are listed in this doc and grouped by the reason it is safe to remove them. There are 54 of them (!!). I erred on the side of caution when deciding what to remove, but I am not familiar with all of these variables and would appreciate a second eye.

Testing:
New deployments: I ran bin/setup with the changes on this branch and confirmed it deployed successfully and basic functionality worked.

Existing deployments: I ran bin/setup using the code on main then bin/deploy using the code on this branch and confirmed deployment was successful and nothing obvious broke or changed. I compared the admin settings panel pages and made sure all values were consistent. The only difference is the ESRI_FIND_ADDRESS_CANDIDATES_URL which previously defaulted to a value set in the deploy system, but will now be blank unless set in the config file.

After this is merged, I'll test deploying it on staging to ensure login functionality isn't affected.

Closes: civiform/civiform#5249

@rockycodes rockycodes marked this pull request as ready for review November 1, 2023 16:46
@rockycodes rockycodes requested review from nb1701 and bion November 1, 2023 16:46
@rockycodes rockycodes changed the title Rockycodes/cleanup autogenerated vars Cleanup autogenerated server vars Nov 1, 2023
Copy link
Contributor

@bion bion left a comment

Choose a reason for hiding this comment

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

Thank you!!! This has been a long time coming, great to see it finally happen.

It looks like there are a few vars that could also be removed from here? https://github.com/civiform/cloud-deploy-infra/blob/main/cloud/aws/templates/aws_oidc/variable_definitions.json#L44

@rockycodes
Copy link
Contributor Author

Thank you!!! This has been a long time coming, great to see it finally happen.

It looks like there are a few vars that could also be removed from here? https://github.com/civiform/cloud-deploy-infra/blob/main/cloud/aws/templates/aws_oidc/variable_definitions.json#L44

@bion what vars in particular? I'm removing the line you linked to here

Copy link
Contributor

@nb1701 nb1701 left a comment

Choose a reason for hiding this comment

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

Looks good! I wonder if some of those marked as "used elsewhere" could be refactored later, e.g. AWS_SES_SENDER is really SENDER_EMAIL_ADDRESS, can we just use AWS_SES_SENDER everywhere instead of SENDER_EMAIL_ADDRESS? But definitely not needed for this one.

@rockycodes
Copy link
Contributor Author

Looks good! I wonder if some of those marked as "used elsewhere" could be refactored later, e.g. AWS_SES_SENDER is really SENDER_EMAIL_ADDRESS, can we just use AWS_SES_SENDER everywhere instead of SENDER_EMAIL_ADDRESS? But definitely not needed for this one.

Good idea, I can make an issue to follow up with that.

@rockycodes rockycodes merged commit 01dba6c into main Nov 2, 2023
@rockycodes rockycodes deleted the rockycodes/cleanup-autogenerated-vars branch November 2, 2023 20:05
rockycodes added a commit that referenced this pull request Nov 3, 2023
@rockycodes rockycodes restored the rockycodes/cleanup-autogenerated-vars branch November 7, 2023 21:09
@rockycodes rockycodes deleted the rockycodes/cleanup-autogenerated-vars branch November 7, 2023 21:57
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.

Cleanup - delete references to vars in cloud-deploy-infra that are now being autogenerated
3 participants