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

pebble-source state failing #301

Merged
merged 1 commit into from
Jan 31, 2023
Merged

pebble-source state failing #301

merged 1 commit into from
Jan 31, 2023

Conversation

cegerhardson
Copy link
Contributor

@cegerhardson cegerhardson commented Jan 27, 2023

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.

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
Copy link
Contributor Author

seems like this change also addresses issue #298

@ewdurbin
Copy link
Member

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 ewdurbin merged commit 345c86a into main Jan 31, 2023
@ewdurbin ewdurbin deleted the allow_gitlatest_update branch January 31, 2023 15:12
@ewdurbin
Copy link
Member

seems like this change also addresses issue #298

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

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.

2 participants