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

Convert azcagit to use Jobs instead of Apps #57

Merged
merged 20 commits into from
Aug 23, 2023
Merged

Conversation

simongottschlag
Copy link
Member

@simongottschlag simongottschlag commented Jul 21, 2023

This PR will convert azcagit from using a plain App that's up and running all the time and switch over to using a Job that runs on a cron schedule. This forces a couple of other changes as well.

Changes:

  • dapr doesn't work anymore, triggering will be handled by the Job type 'Event'
  • Since dapr isn't used anymore, a Basic service bus and a queue can be used
  • Two subcommands are introduced, reconcile and trigger
  • The reconcile subcommand will do what azcagit did before on a schedule, but once
  • The Job running the reconcile subcommand will now be called azcagit-reconcile
  • Cache for Apps, Jobs, Notifications and Revision will now be stored in CosmosDB (serverless)
  • Secret cache is still local, but will only do one lookup per reconcile and deduplicate between apps and jobs

The trigger subcommand will do a few new things:

  • It will run as a separate Job and triggered by messages landing on the service bus queue
  • When it runs, it will complete the message(s) and then force azcagit-reconcile to run

TODO:

  • Use blob storage for AppCache and JobCache
  • Come up with something smart around SecretCache (shouldn't store secrets on blob storage)
  • Use blob storage together with go-git to store the cloned repository
  • Figure out how to handle previous notification event
  • Figure out how to handle git lastRevision
  • Should all CosmosDB caches use the same client?

@simongottschlag simongottschlag marked this pull request as ready for review August 23, 2023 07:44
@simongottschlag simongottschlag merged commit 6987f76 into main Aug 23, 2023
7 checks passed
@simongottschlag simongottschlag deleted the run-as-job branch August 23, 2023 08:47
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.

None yet

1 participant