Skip to content

Concurrent charm generation for 42 charms #1041

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

bfollington
Copy link
Contributor

@bfollington bfollington commented Apr 15, 2025

Also fixed README.

headless: HEADLESS,
});

const scenarioPage = await scenarioBrowser.newPage();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned about using multiple tabs for this step - as folks like @ellyxir has already seen timeouts for login / browser flows - due to slowness of access / machine

concurrent generations (happening in deno) seems great - my concern is only browser chonkyness (techinical term)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The less a browser is used here, the better; maybe can get away with only using a browser for the final rendering/screenshots

@@ -220,7 +279,11 @@ async function processCommand(
}

function addErrorListeners() {
Copy link
Contributor

@anotherjesse anotherjesse Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be deleted - as we now use the function that sends the target page

// FIXME(ja): can we navigate without causing a page reload?
await page.goto(new URL(`/${name}/${id}`, toolshedUrl).toString());
addErrorListeners();
await targetPage.goto(new URL(`/${name}/${id}`, toolshedUrl).toString());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we can fix this? clicking on the space name, then clicking on the charm id - rather than refreshing every single time

we could probably reduce the timeout below

perhaps also we could have iframe emit "loaded" event ? something like "common-iframe-ready" when the inner iframe is done loading (perhaps you and @jsantell can chat about this?)

with both of these the 5 second sleep can go away!

(although we would probably need to rework the error listener work - to not re-add but empty it out after fininshed loading /space)

Copy link
Collaborator

@jsantell jsantell Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<common-iframe-sandbox> emits a "load" event, but does not bubble outside of shadow DOM, though could change. Loading of the iframe document may not necessarily be "loaded" from the perspective of all content in the iframe being initialized as well. May still have race conditions between "no visual representation" (listen to load event) and "load event fired"

Any exposed API here should be on common-iframe rather than common-iframe-sandbox, I think we repropagate some events already there e.g. error/fixit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants