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

Allow consistency check to run offline (in CI) #409

Open
gforcada opened this issue Nov 23, 2023 · 3 comments
Open

Allow consistency check to run offline (in CI) #409

gforcada opened this issue Nov 23, 2023 · 3 comments
Milestone

Comments

@gforcada
Copy link
Contributor

batou is extra nice that one does not have to blindly run batou deploy XX and pray that all works out 🙏🏾

Instead one has the -P to predict and -c to check the consistency of an environment 💫

It would be great that one could run ./batou deploy -c XX on a CI environment, so that, at least a minimal check that the changes on a PR are more or less valid.

It would not be 100% accurate as the secrets would not be loaded, and most probably the connection to the servers either, but as a minimal safety net to ensure that at least the models are consistent would be nice 😄

@zagy zagy added this to the batou 2.6 milestone Apr 26, 2024
@elikoga
Copy link
Member

elikoga commented Aug 13, 2024

What should be the semantics of running the consistency check offline? Currently, we are executing the consistency check by executing the configure methods of the components on the target systems. According to batou's declarative nature, this should be fine to run on any other host, but since access to host systems is currently given, some components or deployments might not be able to run the consistency check on the local environment.

@gforcada
Copy link
Contributor Author

Uh, sorry, I missed this notification.

Oh, I see, about running configure on the target system... As said on the issue title, my wish would be to be able to run the consistency check in CI, mostly to notice if a new commit/PR breaks an environment.

This way, you get early feedback, even before deploying to a test environment.

Now that I think of, the secrets file would also be problematic...

Ideally, as you say about batou's declarative nature, running it on GitHub/GitLab CI environment should possible, right?

If a fake host system would be possible, that would be a first step towards this idea of mine.

@zagy
Copy link
Member

zagy commented Dec 21, 2024

There is a bug: the local mode still tries to provision the dev VMs.

#  ./batou deploy -cL dev  
batou/2.6.0a1 (cpython 3.10.16-final0, Darwin 24.2.0 arm64)
==================================================================================================== Preparing ====================================================================================================
main: Loading environment `dev`...
main: Verifying repository ...
main: Loading secrets ...
============================================================================================= Provisioning hosts ... ==============================================================================================
4ae753fe: Provisioning with `default` provisioner.
    Including environments/dev/provision.sh
    Including environments/dev/provision.nix
=================================================================================== Connecting hosts and configuring model ... ====================================================================================
4ae753fe: Connecting via local (1/1)

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

No branches or pull requests

3 participants