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

[Vouchers] Error 500 (snail) when accessing /admin/enterprises/ENTERPRISE-NAME/edit (staging AU) #11319

Closed
drummer83 opened this issue Aug 2, 2023 · 8 comments
Labels
bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. bugsnag

Comments

@drummer83
Copy link
Contributor

drummer83 commented Aug 2, 2023

Description

I had the voucher feature toggle deactivated on staging AU and staged and tested some PRs. Then I activated the toggle again and wanted to test around vouchers. But I get an error 500 whenever I try to access /admin/enterprises/enterprise-name/edit for an enterprise which has vouchers set up.

Here is the Bugsnag: https://app.bugsnag.com/yaycode/openfoodnetwork-aus/errors/64ca2c328383730008cf63e2?filters[event.since]=30d&filters[error.status]=open&filters[app.release_stage]=staging

Expected Behavior

There should be no error 500.

Actual Behaviour

There is an error 500.

Steps to Reproduce

  1. On staging AU as super admin try to access https://staging.openfoodnetwork.org.au/admin/enterprises/konrad-testhub-staging-au/edit

Animated Gif/Screenshot

Workaround

Severity

Your Environment

  • Version used:
  • Browser name and version:
  • Operating System and version (desktop or mobile):

Possible Fix

@mkllnk
Copy link
Member

mkllnk commented Aug 3, 2023

This is a staging bug only. It comes from changing the database for vouchers and then deploying other code which doesn't have the newest vouchers code.

@drummer83
Copy link
Contributor Author

So can we close or how do we handle this?

@mkllnk
Copy link
Member

mkllnk commented Aug 3, 2023

Does it work again when staging the vouchers PR? Then it will resolve itself once that PR is merged.

Generally, we don't have a process to deal with breaking database migrations on staging. The best approach would be to restore a database backup after staging a pull request with migrations. But that would need some work on our deploy process.

@drummer83
Copy link
Contributor Author

Does it work again when staging the vouchers PR? Then it will resolve itself once that PR is merged.

Yes, it does (PR #10821). The problem is that before merging #10821 we need to test and merge #11117 - which is not possible due to this error 500.

I will try to test #11117 on a different server (UK) for now - no action needs to be taken.

@lin-d-hop lin-d-hop added the bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. label Aug 16, 2023
@abdellani abdellani self-assigned this Aug 16, 2023
@abdellani
Copy link
Member

Hi
is this issue still happening?

@RachL
Copy link
Contributor

RachL commented Aug 16, 2023

@abdellani yes I've reproduced it on staging FR. But maybe staging fr is not well up-to-date with master? I created a flat rate voucher. After that I wasn't able to go back to enterprise settings.bugsnag : https://app.bugsnag.com/open-food-france/coopcircuits/errors/64dbbe4f54dee50008ab9381?event_id=64dbbe4f00bec040079a0000&i=sk&m=nw

But I see now @mkllnk 's comment: maybe it's just a database pb?

@abdellani abdellani removed their assignment Aug 16, 2023
@abdellani
Copy link
Member

@RachL
Since #10821 is merged, I don't see a reason to have that problem.
Maybe the PR that you're testing needs to be rebased on the master branch.

Please let me know.

@RachL
Copy link
Contributor

RachL commented Aug 18, 2023

Ok indeed - I think I've staged the release successfully and this is fixed, closing 🎉

@RachL RachL closed this as completed Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. bugsnag
Projects
Archived in project
Development

No branches or pull requests

5 participants