Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Added call to event service after reload#151

Merged
christiemolloy merged 3 commits intopatternfly:masterfrom
gsoria:gs_call_event_service
Jan 29, 2020
Merged

Added call to event service after reload#151
christiemolloy merged 3 commits intopatternfly:masterfrom
gsoria:gs_call_event_service

Conversation

@gsoria
Copy link
Copy Markdown
Contributor

@gsoria gsoria commented Nov 4, 2019

We've added a new service that listens to events defined in the scenario and allows us to override the default behavior of the platform.

For the HTML scenarios In the gulpfile.js we've added a new task callEventService that is executed after reload task and notifies to katacoda when it is the appropriate time to hiding the progress bar.
Basically this is a POST request that follows this pattern:

curl -X POST https://environment-events.katacoda.com -d "socket=$1&message=message"

The socket parameter can be retrieved from the file /tmp/socket available in the environment.

This functionality is available in beta for now.

Signed-off-by: Gabriela S. Soria <soria.gaby@gmail.com>
@christiemolloy
Copy link
Copy Markdown
Member

Hi @gsoria , thank you so much for working on this! I've been testing the new functionality here: https://www.beta.katacoda.com/patternfly/courses/charts/area-chart

It works really well for every step except for the initial step.

Step 3, no. 1 : When I open app.js, it should(used to) render "Welcome to PatternFly" but now it won't do that unless I hit the reload button (which was not that intuitive).

Step 3, no.2: This loads without having to hit the reload button, however takes about 30sec-1min

Every step after this loads the changes fast, and I don't need to hit the reload button :)

@dgutride was seeing the same thing. I'm wondering if you're also seeing it?

@gsoria
Copy link
Copy Markdown
Contributor Author

gsoria commented Dec 6, 2019

Hi @christiemolloy @dgutride, sorry for the delay.

I was debugging the issue mentioned about the initial step, and I noticed that only happens in beta. I'll keep investigating the cause.

I updated the PR, with the current changes in master.

I've tested the changes with this scenario:
https://www.katacoda.com/v1wpig/courses/html-css/building-blocks

Please note that this PR contains the changes only for the scenarios that use pf-express.tar.gz so, the scenarios that should use to test this change are the scenarios under html-css/*

For the scenarios that use pf-react-express.tar.gz a similar change that I made in gulpfile.js to call the event service (callEventService function) is needed for pf-react-express.tar.gz.

Also, I add to this PR the loading of the file index.html at the start of the scenario, I think is more correct and helps to understand the correspondence between the editor and the iframe below.

Please test this change and let me know what do you think.
Thanks :)

@christiemolloy
Copy link
Copy Markdown
Member

@gsoria tested and this looks great!

Do I just need to update the actions and asyncFiles for the other modules?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants