-
Notifications
You must be signed in to change notification settings - Fork 27
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
Ent Modernization #80
Conversation
Ref("file"). | ||
Comment("Deployment Configurations that depend on this file."), | ||
} | ||
return []ent.Edge{} |
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.
Have the edges been removed here just since this PR is a clean slate or will we not being using edges in our models?
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.
Clean slate o7
ent.Schema | ||
} | ||
|
||
// Fields of the Tome. |
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.
Does this describe the tome only on disk or as it's being passed to an agent as well?
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.
Stores backend info, it will differ both from how it is stored on disk as well as from how it is passed to an agent (probably)
- github.com/kcarretto/realm/tavern/ent/implantserviceconfig | ||
- github.com/kcarretto/realm/tavern/ent/tag | ||
- github.com/kcarretto/realm/tavern/ent/target | ||
- github.com/kcarretto/realm/tavern/ent/user |
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.
Probably just my not understanding ent.go but do we need to include the tome scheme in here?
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 think it is now, but yeah you're right
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.
Looks good to me.
Couple questions mostly for my clarification on how ent works.
One request to delete instead of commenting code.
tavern/test_data.go
Outdated
@@ -4,24 +4,24 @@ import ( | |||
"context" | |||
|
|||
"github.com/kcarretto/realm/tavern/ent" | |||
"github.com/kcarretto/realm/tavern/ent/credential" | |||
// "github.com/kcarretto/realm/tavern/ent/credential" |
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 think we should delete this instead of commenting just to avoid dead code piling up.
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.
But I love dead code :(
Ent Modernization (#80) * It works? * inject ent client * Okay, looks like the mutations and such work * Updated docs <3 * Tests <3 * Added test for update user * Remove file mutations for now * Upgrade to go 1.19.3 * Minor app cleanup * Added tome entity * Added support for 'users' query * Added core ents * Enum for Tag * Implemented root query resolvers * Delete stuff :(
What type of PR is this?
/kind cleanup
/kind api-change
What this PR does / why we need it:
Updates us to use the latest and greatest entgo.io technology, and deletes a bunch of the old ents (since we will likely want to rewrite them with the new first party relay support in mind)
Which issue(s) this PR fixes:
Well I’m on mobile and didn’t write an issue, sorry team.