Skip to content

Add USERFLOW_TOKEN to secrets.yml, localsettings.py#6870

Merged
kaapstorm merged 4 commits into
masterfrom
nh/userflow
May 13, 2026
Merged

Add USERFLOW_TOKEN to secrets.yml, localsettings.py#6870
kaapstorm merged 4 commits into
masterfrom
nh/userflow

Conversation

@kaapstorm
Copy link
Copy Markdown
Contributor

@kaapstorm kaapstorm commented May 6, 2026

Adds USERFLOW_TOKEN to localsettings.py for staging Userflow. Value pulled from localsettings_private.

Environments Affected

This is intended for Staging (but obviously an empty value will be in localsettings.py in all environments).

Jira: SAAS-19721

- name: TRANSIFEX_API_TOKEN
legacy_namespace: localsettings_private
- name: USERFLOW_TOKEN
legacy_namespace: localsettings_private
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should this be "secrets"? Or can I leave it out?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it never existed, I hope it can be left out. @dannyroberts can you confirm?

Possibly relevant/helpful: #4122 and linked discussions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think you're right @millerdev -- I'm sure @dannyroberts would not have named it legacy namespace if it wasn't legacy. I've dropped it in 1cbf91e and opened a tiny documentation PR #6874 to clarify.

Copy link
Copy Markdown
Contributor

@millerdev millerdev left a comment

Choose a reason for hiding this comment

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

The test failure looks related.

PREVIEWER_RE = r'^(.*@dimagi\.com|.*@valuelabs\.in)$'
GMAPS_API_KEY = '{{ GMAPS_API_KEY }}'
MAPBOX_ACCESS_TOKEN = '{{ MAPBOX_ACCESS_TOKEN }}'
USERFLOW_TOKEN = '{{ USERFLOW_TOKEN }}'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is USERFLOW_TOKEN guaranteed not to contain single quote (') characters? Or maybe they should be escaped (does Ansible provide a way to call str.__repr__)?

I realize this is following the same pattern used by other secrets and variables, which do nothing special. Feel free to ignore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

USERFLOW_TOKEN matches /^[a-z0-9_]$/

STRIPE_PUBLIC_KEY: "{{ localsettings_private.STRIPE_PUBLIC_KEY | default(None) }}"
SUMOLOGIC_URL: "{{ localsettings_private.SUMOLOGIC_URL | default(None) }}"
TRANSIFEX_API_TOKEN: "{{ localsettings_private.TRANSIFEX_API_TOKEN | default(None) }}"
USERFLOW_TOKEN: "{{ USERFLOW_TOKEN | default('') }}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly, is USERFLOW_TOKEN guaranteed not to contain double quote (") characters?

@kaapstorm
Copy link
Copy Markdown
Contributor Author

Test failure was interesting. 76dfa0a follows it up, and commit ad8b30e in PR #6874 corrects the documentation I added.

@kaapstorm kaapstorm merged commit 9b02ae1 into master May 13, 2026
8 checks passed
@kaapstorm kaapstorm deleted the nh/userflow branch May 13, 2026 14: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.

2 participants