-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add suspended annotations #4131
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1c96c00
Add suspended-by and suspended-comment annotations
ranatrk 0a7a7c1
Check for error returned
ranatrk 84fc7bb
Add check when no annotations already exist when updating suspend ann…
ranatrk 940eb35
Add check suspended annotations existance in suspend tests
ranatrk 657c655
Add principal check in suspend tests WIP
ranatrk 3f0e2b8
Check for hardcoded principal id instead of principal from context in…
ranatrk f037d76
Cleanup variable names and return statements in suspend
ranatrk 06b20b5
make proto
ranatrk b2ce979
Add proto-linux in makefile
ranatrk ee8b17f
Use name instead of name.String in suspend tests error messages
ranatrk 5a87adf
Cleanup suspend test
ranatrk b96b93c
Update logger info with principal and cluster in suspend
ranatrk 72848f0
Remove unused params in suspend test
ranatrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1672,6 +1672,9 @@ | |
}, | ||
"suspend": { | ||
"type": "boolean" | ||
}, | ||
"comment": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of things here...
weave-gitops/core/server/suspend.go
Lines 15 to 19 in 35231b8
We could reuse the principal from the first call in the second?
Also, we could include the "principalID" in the
log.Info
so that the user who does it is logged out?We could also include the name and namespace, and maybe even Kind of the resource, so that the logs would be searchable.
"Who unlocked the GitRepository test/test"?
Bonus points for including the Cluster name :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name,namespace, and kind are already included . I'll add the principal to the logs 👍
weave-gitops/core/server/suspend.go
Lines 44 to 49 in 35231b8