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

warm up cache does not work #18933

Closed
1 task
kachely opened this issue Feb 24, 2022 · 16 comments · Fixed by #21076
Closed
1 task

warm up cache does not work #18933

kachely opened this issue Feb 24, 2022 · 16 comments · Fixed by #21076
Labels
#bug:cant-reproduce Bugs that cannot be reproduced #bug Bug report

Comments

@kachely
Copy link

kachely commented Feb 24, 2022

A clear and concise description of what the bug is.

How to reproduce the bug

  1. Start celery
  2. Start beat
  3. Start flask
  4. There is a request from cache_warmup, but data is not be cached.

Expected results

request will be send by this order: /explore/xxx -> /explore_json/xxx or /api/v1/data/xxx

Actual results

request will be sent by this order: /explore/xxx -> break.

Screenshots

I actually setup a cookie in the request to login in with a warmup user. If I do not add this cookie, it will be redirect to login page.
image
here is the code I used in warm_up

Environment

(please complete the following information):

  • browser type and version:
  • superset version: superset version
  • python version: python --version
  • node.js version: node -v
  • any feature flags active:

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [Y ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • [Y ] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@kachely kachely added the #bug Bug report label Feb 24, 2022
@srinify
Copy link
Contributor

srinify commented Feb 24, 2022

Hey @kachely this is a start but a bit more context would be useful to the community:

  • What version of Superset are you using and how are you deploying it?
  • What errors / screenshots / etc can you provide and share?

@zhaoyongjie zhaoyongjie added validation:required A committer should validate the issue #bug:cant-reproduce Bugs that cannot be reproduced and removed validation:required A committer should validate the issue labels Feb 25, 2022
@zhaoyongjie
Copy link
Member

Hi @kachely, I can't reproduce on the latest master. warm-up cache works well in my local.

warm-cache.mov

@kachely
Copy link
Author

kachely commented Mar 1, 2022

Hi @zhaoyongjie , I believe we do not use "warm_up_cache" api in the latest master in celery.
We use explore api to refresh
image
Please correct me if I am wrong.

@kachely
Copy link
Author

kachely commented Mar 1, 2022

Hi @srinify , please see my responses below.

  • What version of Superset are you using and how are you deploying it?
    We do not use the latest version. But we have merged the code of latest master on celery part.
    We start celery instance to call the refresh api.
  • What errors / screenshots / etc can you provide and share?
    /explore api in celery does not work for us. But /warm_up_cache does not support "pie".

@zhaoyongjie
Copy link
Member

zhaoyongjie commented Mar 1, 2022

Hi @kachely, Could you point out which URL do you use for cache "warm up"?

@kachely
Copy link
Author

kachely commented Mar 2, 2022

Hi @kachely, Could you point out which URL do you use for cache "warm up"?

I use the url in get_rul function. It returns /superset/explore/?form_data={}.

@stale
Copy link

stale bot commented May 1, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label May 1, 2022
@musicmuthu
Copy link

still the issue not solved

@stale stale bot removed the inactive Inactive for >= 30 days label Jun 1, 2022
@musicmuthu
Copy link

musicmuthu commented Jun 2, 2022

#.pinned #bug #pinned

@atticoos
Copy link
Contributor

atticoos commented Jun 4, 2022

@zhaoyongjie in your video, it appears you are sharing the same web session as the authenticated user.

The problem is that the celery worker is an unauthorized agent, and gets a 302 redirect to login. eg
image

@atticoos
Copy link
Contributor

atticoos commented Jun 4, 2022

@kachely would you mind sharing your patches for authorizing the cache worker? I've been stuck with this for days, and #9597 has been dead for 2 years.

@rgarrigue
Copy link

A workaround would be nice to share, we're having performance issues, a functional warm up could help

@vnaidu-wish
Copy link

Any updates on this.
Seems like even the superset/warm_up_cache/?slice_id=XXX does not work for many charts.
i.e. echarts_area / echarts_timeseries_line

@atticoos
Copy link
Contributor

atticoos commented Jun 8, 2022

I got a workaround working locally on my fork, f57fab7, discussed here #9597 (comment)

But I haven't successfully built an image yet, as I am running into unrelated issues with node building the frontend

@ensky
Copy link
Contributor

ensky commented Jun 15, 2022

@ajwhite I sent a PR to address this issue, which is working in my environment.

@rgarrigue
Copy link

Anyone can push this PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug:cant-reproduce Bugs that cannot be reproduced #bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants