-
Notifications
You must be signed in to change notification settings - Fork 304
Add a concept of a caveat TypeSet to allow overriding the types available to caveat processing #2315
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
Conversation
9f95073
to
765cc53
Compare
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.
I like the fact it's all piped through! But then it immediately reads to me as though there's a config struct
waiting to happen for the params to some of the NewX
functions, specifically in internal/dispatch/graph/graph.go
and internal/graph/lookupresources2.go
(and maybe internal/services/v1/schema.go
)
765cc53
to
a374913
Compare
a374913
to
51d11df
Compare
Almost certainly. Do you think we should do it now or as a followup? |
Might as well; easy enough to find the locations since it follows this diff |
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.
LGTM, pending removal of the zip and a question
pkg/cmd/server/pgserver.zip
Outdated
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.
Unintentional?
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.
Yep
// Freeze marks the TypeSet as frozen. A frozen TypeSet cannot be modified. | ||
func (ts *TypeSet) Freeze() { | ||
ts.isFrozen = true | ||
} |
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.
Is this a convention? Where does this actually prevent the TypeSet from being modified?
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.
Check below: it can't be used if not frozen
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.
Right, it can't be used, but nothing prevents me from touching a frozen typeset (unless I'm missing something)
51d11df
to
5bece73
Compare
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.
LGTM
available to caveat processing
5bece73
to
9c13cf7
Compare
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.
Boy howdy that's a lot of files. Fortunately, mostly signature-driven.
LGTM
No description provided.