Giter VIP home page Giter VIP logo

Comments (11)

ibuziuk avatar ibuziuk commented on July 17, 2024 1

Adding devworkspace-operator label for initial investigation, however, it might completely unrelated to DWO

from che.

ibuziuk avatar ibuziuk commented on July 17, 2024

@amisevsk do you happen to have any ideas why deployment could be scaled down randomly?

from che.

amisevsk avatar amisevsk commented on July 17, 2024

I'm not sure the steps to reproduce is complete -- when I start a workspace from the provided devfile, the dashboard is not cloned and I don't see any commands (maybe a bug in the che-tasks-extension?). I cloned the che-dashboard repository and opened it in code but the devfile tasks failed to run at that point.

from che.

akurinnoy avatar akurinnoy commented on July 17, 2024

Hi @amisevsk ,

That's my fault, I missed some steps in the How to reproduce section. I've added missed steps, and hopefully, now it should work.

from che.

amisevsk avatar amisevsk commented on July 17, 2024

Hi @akurinnoy -- looks like your edits didn't get saved. The steps look the same as before to me :)

from che.

akurinnoy avatar akurinnoy commented on July 17, 2024

@amisevsk Finally I've updated the description, sorry for that :)

from che.

amisevsk avatar amisevsk commented on July 17, 2024

Thanks! I was able to reproduce the issue now (after running update dependencies as well, in case anyone runs into issues).

From the DWO logs, it is indeed updating the workspace deployment which is triggering a rollout (i.e. a new pod since the replicaset is updated). This seems to be due to something updating the DevWorkspace to have a new environment variable:

  		Name: \"CHE_DASHBOARD_URL\",
  		Value: strings.Join({
  			\"http\",
- 			\"://amisevsk-che-dashboard-local-server\",
+ 			\"s://che-dogfooding\",
  			\".<redacted>.com\",
  		}, \"\"),

which is coming from the che-code editor's DevWorkspaceTemplate.

@akurinnoy Is there a chance the dashboard, while running in dogfooding mode, is updating this DevWorkspaceTemplate to use its current dashboard URL?

from che.

akurinnoy avatar akurinnoy commented on July 17, 2024

@amisevsk let me check it.

from che.

akurinnoy avatar akurinnoy commented on July 17, 2024

Hi @amisevsk ,
I got two reloads in a row, and there were no requests that may update the DevWorkspaceTemplate...

from che.

amisevsk avatar amisevsk commented on July 17, 2024

I'll take another look.

from che.

amisevsk avatar amisevsk commented on July 17, 2024

I've tested it again on dogfooding and what I've found is that as soon as I load the dashboard in my browser, the URL for CHE_DASHBOARD_URL is updated with the current dashboard's URL (which is different in the running-within-a-workspace case).

Since DWO does not automatically trigger reconciles when DevWorkspaceTemplates are updated, this change is not initially noticed by the DevWorkspace Operator. However, when something does trigger a reconcile on the workspace, DWO will notice that the resolve workspace has a different CHE_DASHBOARD_URL and update the deployment, triggering a restart of the workspace. You can test this by manually triggering a reconcile by e.g. adding a nonsense annotation to the DevWorkspace:

oc annotate --overwrite dw $DEVWORKSPACE_NAME -n $DEVWORKSPACE_NAMESPACE "recon
cile=$(date +%s)"

(Run this in the workspace terminal)

To track changes to the CHE_DASHBOARD_URL env var, I used the following bash snippet:

while true; do
  date
  oc get dwt che-code-che-dashboard -o yaml | grep -A 1 CHE_DASHBOARD_URL
  sleep 1
done

while this is running, reload either the usual Che dashboard or the one running within your workspace to see the effect.

I'm still not sure where the env var is getting set, but it seems to be on first load of the dashboard page.

from che.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.