Skip to content

Deployment and other DX improvements #192

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

Merged
merged 71 commits into from
May 6, 2025
Merged

Deployment and other DX improvements #192

merged 71 commits into from
May 6, 2025

Conversation

noise64
Copy link
Contributor

@noise64 noise64 commented Apr 9, 2025

Resolves

Resolves #91
Resolves #94
Resolves #163

Manifest:

  • HTTP API definitions and HTTP API deployments are now part of the manifest

Deployment:

  • HTTP API definitions and HTTP API deployments can be deployed using the app deploy, api deploy, api definition deploy, api deployment deploy commands; the more specific deploy comands also select their dependencies for deployments: e.g. deploying a specific site will also deploy the required components and definitions
  • added diffing between server and manifest entites for components, API defs and API deployments
  • the diffing creates a unified / normalized representation which is also shown as unified diff when changes are detected
  • for file changes (component and IFS) the CLI will calculate hashes, and use diffing on those; the server side files are downloaded during this, but the hashes are cached
  • updating non-draft API definitions uses an interactive version editing, which is also saved to the manifest files
  • API deployment deletions (removing definitions from it) are handled with interactive confirm question
  • all the above is intended to be mostly naïve for now, and expected to be changed as we go forward with atomic deployments in later releases
  • redeploy arguments got generalized, using --redeploy-all (-r) or --redeploy-http-api will temporarily undeploy APIs from sites, so version bumps can be avoided during local development

Interactive improvements (non-deployment ones)

  • Added command golem component add-dependency for defining component dependencies, when the command is called without arguments it enters an iteractive wizard for creating the dependency
  • app new and component new now has an interactive mode, where languages and templates can be selected

Other improvements and fixes

  • a new hook is introduced to detect non-running local server, and can auto-start it for the session interactively: we probably want to modify this to only show a warn for how to start the server in general, but for REPL use case i would leave it on, let's clean this up in the next PR
  • worker invoke now uses a lenient parse for strings and char WAVE arguments: if a string char does not start with " or a char argument does not start with ' then it is wrapped into those, in other words: no need for double escaping in shells
  • decreased the size for sqlite pools, which could resulted in "file open" errors with common setting while using golem server run
  • IFS archive handler
    • added HTTP status handling for remote files: non-succesful payloads are not uploaded anymore
    • fixed copying in-memory payloads after download
    • extracted "file processor", so the same traverse can be used for hashing and for zipping
  • added a local serve task for app manifest JSON schema in the Makefile.toml that aims to help with testing schema completetions in IDEs locally
  • TaskResultMarker rework:
    • identity and inputs are separated now, which fixes some up-to-date check issues in general (e.g. changing dependency types)
    • the result marker now can be used as a "hash cache", which was used for the deployment diffing
  • added "app yaml edit" modul for helping with non-destructive app manifest editing
  • many error message fixes and improvements, e.g.:
    • support for highlight rib parse errors
    • better format for manifest valudation errors
    • show available options for manifest "foreign key" validation errors (with fuzzy matching)
    • new hint errors that show the clap help after custom messages (e.g. for failed interactive sessions)
  • bump required minimum python version to 3.12

Some screenshots

App new

note: component new behaves the same

image image

Add component dependency

image

Deployment diffs

image

Error messages

image image

Interactive (re)deployment

image image image

@noise64 noise64 changed the title Api defintion and deployment in app manifest API defintion and deployment in app manifest Apr 15, 2025
@noise64 noise64 changed the title API defintion and deployment in app manifest Deployment and other DX improvements May 4, 2025
@noise64 noise64 marked this pull request as ready for review May 4, 2025 13:29
@vigoo vigoo self-requested a review May 5, 2025 09:15
@noise64 noise64 enabled auto-merge (squash) May 6, 2025 09:08
@noise64 noise64 disabled auto-merge May 6, 2025 09:14
@noise64 noise64 enabled auto-merge (squash) May 6, 2025 10:52
@noise64 noise64 merged commit 35d6241 into main May 6, 2025
4 checks passed
@noise64 noise64 deleted the api-def-app-manifest branch May 6, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants