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

Fix release version in footer #2375

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Fix release version in footer #2375

merged 1 commit into from
Sep 25, 2023

Conversation

deborahchua
Copy link
Contributor

@deborahchua deborahchua commented Sep 25, 2023

This has been broken since we moved to EKS and the SHA is no longer provided.

We can use the SENTRY_RELEASE environment variable which is defined for every app and takes its value from the container image's tag.

Trello cards:
https://trello.com/c/uoKDUcbV/3182-fix-broken-version-footer-in-publishing-apps-2
https://trello.com/c/h19UQFNE/269-footerversion-not-set-in-govukadmintemplate

@floehopper floehopper self-requested a review September 25, 2023 13:20
Copy link
Contributor

@floehopper floehopper left a comment

Choose a reason for hiding this comment

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

Thanks so much for making this change.

If I'm following the code correctly, I think this means that there will be a slight change in behaviour in development (i.e. when SENTRY_RELEASE is not defined) - the footer will now display "Version: " instead of "Version: development". Was that an intentional change? If so, it would be good to explain that in the commit message / PR description.

An alternative implementation preserving the original behaviour would be something like:

<% content_for :footer_version, ENV.fetch("SENTRY_RELEASE", "development") %>

I'm happy to leave the above to your discretion, so I'm going to mark this as "Approved". Thanks, again!

@floehopper
Copy link
Contributor

For reference we are tracking this in https://trello.com/c/h19UQFNE

This has been broken since we moved to EKS and the SHA is no longer
provided.

We can use the [SENTRY_RELEASE](https://github.com/alphagov/govuk-helm-charts/blob/077117e7f40c096a958f9e0b853a2bd76cf43f26/charts/generic-govuk-app/templates/deployment.yaml#L92C1-L92C1) environment variable which is defined for every app and takes its value from
the container image's tag.

If for whatever reason the image tag is not defined it will display
`null`, which should make it clearer (instead of displaying `development`)
that this data is not being pulled in successfully.
@deborahchua
Copy link
Contributor Author

Thanks @floehopper ! Your suggestion is much better and clearer to the user if there is an issue obtaining the image tag - I've updated the code and commit message.

@deborahchua deborahchua merged commit f8ffc98 into main Sep 25, 2023
6 checks passed
@deborahchua deborahchua deleted the fix-footer-version branch September 25, 2023 14:22
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