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

[BUG] Cannot delete bad report instance created from bad report definition - makes UI for report instances unusable #955

Open
UnbiasedGoat opened this issue Jan 29, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@UnbiasedGoat
Copy link

UnbiasedGoat commented Jan 29, 2024

What is the bug?
One of our users created a report with the time range time format in the report definition creator set to a negative time which somehow was accepted

"format": {
"duration": "PT-720H",
"fileFormat": "Csv",
"limit": 10000
},
"trigger": {
"triggerType": "CronSchedule",
"schedule": {
"cron": {
"expression": "40 7 * * *",
"timezone": "Canada/Central"
}
}
},

This saved somehow and created a bad report definition but also bad report instances. I can update the report definition but cannot fix the bad report instances. While they are in a bad state the ui 500s on error on the reports or report definition call or both with

{
"statusCode": 500,
"error": "Internal Server Error",
"message": "[report_params.core_params.time_duration]: invalid time duration: PT-720H"
}

One can fix the report definition in the dev console by doing a put request but this is not possible for a report instance as they are not updatable.

How can one reproduce the bug?
Steps to reproduce the behavior:

I'm not 100% sure but I think if you enter something like -4 in the relative time range when creating a report definition then click out it will still set it to that value even though it has a red validation must be greater than 0 - you can't hit enter though, it stops you from that, but clicking sets some value for sure.

What is the expected behavior?
Would have expected it to not let us save and also to be able to fix the report instances which seems impossible - cannot overwrite the report instance or delete it (no method in api in /_opendistro/_reports/instance/{reportInstanceId}: ["GET","POST"]
) as POST is just for create new. Also cannot even delete the index it seems to have it re-generate - gives a no permissions error
"type": "security_exception",
"reason": "no permissions for [] and User.

Basically the UI for reports becomes unusable.

What is your host/environment?
AWS Managed Opensearch Service - 2.9.

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?

Are there any workarounds? I couldn't seem to find any. I tried to modify or delete the reports / index to no avail.

@UnbiasedGoat UnbiasedGoat added bug Something isn't working untriaged labels Jan 29, 2024
@UnbiasedGoat UnbiasedGoat changed the title [BUG] Cannot Delete Bad Report Instance created from Bad Report Definition - makes UI for report instances unusable [BUG] Cannot delete bad report instance created from bad report definition - makes UI for report instances unusable Jan 29, 2024
@UnbiasedGoat
Copy link
Author

Pretty sure the UI 400 error is addressed by opensearch-project/dashboards-reporting#284

@joshuali925
Copy link
Member

joshuali925 commented Feb 12, 2024

i vaguely remember that we wanted to keep report instances for audit purposes so they are not deletable or mutable on purpose. I think opensearch-project/dashboards-reporting#284 is probably a better fix for this

Before that fix gets released, in open source cluster they are deletable by superadmin (with the certs). For AWS you can reach their support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants