grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.49k stars 288 forks source link

Permission issues #1448

Closed teodosii closed 1 year ago

teodosii commented 1 year ago

There are a few permission issues in oncall

  1. When you are viewer and you try to write resolution note to the alert group - button is active and when you click nothing happens. But in the network I see 403 Forbidden
  2. Go to Integration page, oprn Templates setting an you will see the notification error Forbidden 403 because /preview_template is failing in network
  3. In the Template setting ‘Reset Template’ button is active and when you click nothing happens
  4. In the Template setting (Setting tab) Save changes is also active and nothing happens after click
  5. At the Schedule page (ICAL type) Reload button gives an error too 403 Forbidden
paneda1998 commented 1 year ago

what we should do???? i have the same problem after upgrading to v32. this is very critical!!!

Matvey-Kuk commented 1 year ago

@paneda1998 options: 1) Contribute fix. 2) Roll back.

paneda1998 commented 1 year ago

thanks. we roll back to our previous version. I suggest that the last version you put on the site is the stable version so that I can update to that version safely. For example, it might be better to put stable version 31 or sth else on the main page of the project repo instead of version 32...

Matvey-Kuk commented 1 year ago

Here is a quick hint how to perform rollback assuming you want to roll from v1.1.32 to v1.0.0.

Unfortunately it's a bit tricky, but doable.

Open both source codes:

  1. Disable healthchecks so they won't kill engine pod & declare downtime & perform a DB backup.
  2. Go to engine pod's terminal.
  3. Now you need to iterate through all django apps, identify what's the migration you want to roll back to and roll back the db. For example, let's check "alerts" app: https://github.com/grafana/oncall/tree/v1.1.32/engine/apps/alerts/migrations and https://github.com/grafana/oncall/tree/v1.0.0/engine/apps/alerts/migrations. "0002_squashed_initial" is the last one in v1.0.0 so in order to migrate this app back to v1.0.0 you need to execute in the engine pod "python manage.py migrate alerts 0002_squashed_initial".
  4. Restart engine using container for v1.0.0.
  5. Enable healthchecks back & check if everything works.

Not sure if it's the most optimal way to rollback, but it should work.

paneda1998 commented 1 year ago

thanks i already roolback from v1.1.32 to v1.1.16

paneda1998 commented 1 year ago

hey Are the permission issues that were present in version 34 fixed in version 36? And if not, which is the latest stable version after 18 that I can update to? thanks

teodosii commented 1 year ago

For the listed issues there have been no changes pushed. Also they were not recently introduced into the app or so, these are a few (minor, I'd say) issues that @Ukochka found during a regression testing on another PR, therefore I don't see the point of rollback unless you can figure out which version doesn't have these, but I suspect all have the issues from above.

paneda1998 commented 1 year ago

thanks

teodosii commented 1 year ago

Closed (fixed by https://github.com/grafana/oncall/pull/1529)