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

Update worker-deploy.yml #53

Merged

Conversation

Keyrxng
Copy link
Contributor

@Keyrxng Keyrxng commented Nov 5, 2024

@ubiquity-os-beta ubiquity-os-beta bot merged commit 551544d into ubiquity-os-marketplace:development Nov 21, 2024
2 checks passed
@gentlementlegen
Copy link
Member

@Keyrxng I just realized something in these PRs: it won't work to generate the link. Look at an example I tried that would work:
https://github.com/ubiquity-os-marketplace/command-query/pull/18/files#diff-7733aa903e17a9c146f50a2c0397966c6767a5af4a27fdd6c2105baab37c9429R36

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Nov 22, 2024

My implementation works without the need to add the worker name as seen in the QA for the PR that was closed

your-plugin-name is the default name that comes with plugin-template

gentlementlegen/ubiquity-os-kernel#1 (comment)

image


I pull the plugin name from the url of the worker itself within the fetch

  const workerUrl = new URL(inputs.ref).origin;
    let workerName;

    if (workerUrl.includes("localhost")) {
      workerName = "localhost";
    } else {
      workerName = `${workerUrl.split("//")[1].split(".")[0]}`;
    }

Is this what you meant, sorry, I think now maybe I misunderstand what you were pointing out.

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Nov 23, 2024

@gentlementlegen the task (ubiquity-os/plugin-sdk#34) was dropped from P3 to P1 which is why I focused on higher priority tasks but I think they have been pretty much more or less cleared or are in the process of.

Perhaps the task priority can be re-raised and I'll focus on it again?

Also regarding the callback builder PR that was closed, likewise if you could label the task I'd be happy to jump back into SDK work

@gentlementlegen
Copy link
Member

If that works to build the URL pointing to the Cloudflare Dashboard then I am fine with it. I just remembered that I had issues building the URL and I thought about it afterwards.

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Nov 25, 2024

If that works to build the URL pointing to the Cloudflare Dashboard then I am fine with it. I just remembered that I had issues building the URL and I thought about it afterwards.

Yeah that works just fine mate inputs.ref from the kernel is always going to be the worker URL and our deploy workflow uses the plugin name, so name extraction is simple so long as our deploy flow doesn't change.

Deploy injects ID, so it's available in the worker env when deployed but not locally but that's impossible anyway so I just name it localhost instead.

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.

2 participants