python / psf-salt

PSF infrastructure configuration
MIT License
111 stars 57 forks source link

pebble-source state failing #301

Closed cegerhardson closed 1 year ago

cegerhardson commented 1 year ago

When bringing up the salt-master locally, the pebble-source state git.latest function fails with this comment: Repository would be updated from 087582e to d5fa738, but there are uncommitted changes. Set 'force_reset' to True (or 'remote-changes') to force this update and discard these changes.

By defualt, git.lastest force_reset is set to false. By changing our configuration to use force_reset: remote-changes, we can instruct salt not to discard local changes if the repo is up-to-date with the remote repository.

cegerhardson commented 1 year ago

seems like this change also addresses issue #298

ewdurbin commented 1 year ago

This makes sense, it seems that when building this the go.mod file sees changes:

root@salt-master:/usr/local/src/pebble# git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   go.mod

no changes added to commit (use "git add" and/or "git commit -a")
root@salt-master:/usr/local/src/pebble# git diff
diff --git a/go.mod b/go.mod
index b4c9f8e..cd64485 100644
--- a/go.mod
+++ b/go.mod
@@ -10,7 +10,6 @@ require (
        github.com/google/go-cmp v0.5.6 // indirect
        github.com/stretchr/testify v1.7.0 // indirect
        golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
-       golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
        golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect
        golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
        golang.org/x/tools v0.1.10 // indirect

though I'm not sure why!

force resetting to upstream is fine though since this is a dev dependency.

ewdurbin commented 1 year ago

seems like this change also addresses issue #298

I think this is just because the salt-master state doesn't use module.run