-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: azure deployment #217
feat: azure deployment #217
Conversation
src/adapters/cloudflare-worker.ts
Outdated
@@ -0,0 +1,3 @@ | |||
import { app } from "../kernel"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { app } from "../kernel"; | |
export { app } from "../kernel"; |
Can't you just do that
# Conflicts: # bun.lockb # src/proxy.ts # tests/dispatch.test.ts # tests/main.test.ts
@whilefoo rfc |
This would be really interesting if we had load balancing, although implementation would be tricky if we have to manually check for output from every plugin before posting a new comment or taking an action. I assume you mean we would have both deployments live but we would have to manually switch which responds to events from the GitHub App? |
Yes we should change the webhook url within the GitHub App so it targets one or the other. |
|
||
deploy: | ||
runs-on: windows-latest | ||
needs: build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be run after update-environment
? I was recently using Azure App Service and when I changed env I had to restart the app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both steps restart the app, so it doesn't matter much. The best way would be to combine the two steps, the command line can handle upload + local.storage.settings upload but the GitHub Action does not support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub Action does not support it.
That seems unlikely because its a fully capable ubuntu box.
@gentlementlegen On
Do you get the same errors? |
Anything yarn related should 1. be removed from the project and 2. if there are still problems then it must be your environment. Everything should be using bun here. |
I tested deleting all the node modules and the lockb, |
This was smth my local env related, after removing the |
Glad it works. Once merge, I will have to set all the secrets for deployment in the repo as well. |
tsup.config.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tsx
only runs code, it cannot build, as far as I know.
package.json
Outdated
@@ -32,7 +32,13 @@ | |||
"jest:test": "jest --coverage", | |||
"plugin:hello-world": "tsx tests/__mocks__/hello-world-plugin.ts", | |||
"setup-kv": "bun --env-file=.dev.vars scripts/setup-kv-namespace.ts", | |||
"setup": "tsx ./scripts/setup.ts" | |||
"setup": "tsx ./scripts/setup.ts", | |||
"start:azure": "run-p proxy build:watch start", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the formatting correct or is it a render bug in my GitHub iOS client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the space is a tab most likely, I will fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think run-s might make more sense, to run in series instead of parallel? I suggest that because build generally should complete before starting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's true but since we are watching the code to rebuild on save, I think it makes more sense to run in parallel otherwise saving won't reload the code.
.funcignore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the ignore file for Azure: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/service-packaging-ignore-files?tabs=nodejs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we releasing packages for Azure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's what Azure will pack to serve on the endpoint, files listed here won't be included in the build.
Relates to #195
Resolves ubiquity/.github#111
List of changes
This introduces a pipeline and setup to deploy the Kernel on Azure. The testing endpoint is at https://ubiquity-os.azurewebsites.net/
This can be a good backup if we see that Cloudflare fails again (it is back to stable at this time somehow). The two deployments and instances can coexist, and Azure is pay as you go so if we don't use it it doesn't matter much.
New features
What should be done
QA
Meniole/text-conversation-rewards#31 (comment)