-
Notifications
You must be signed in to change notification settings - Fork 44
move projects images to projects tag #872
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
Hey, so this is what I was asking about here: I think I still have this question - what makes the cut on where tags go? |
ohhh is it like, related to "roles"? like, "people in the project can manage images", rather than specifying "this endpoint talks about images"? |
Actually, this doesn't make much sense to me, because |
Honestly I don't have a perscriptive formula yet i figure we will once we try a few things and what works and what doesn't . But I can tell you how I am using them. So tags are how the clients are generated so: Go (https://pkg.go.dev/github.com/oxidecomputer/oxide.go) becomes client.VPCs.get() // get a vpc where VPC is the main tag
// OR
client.Instances.listDisks() // where instances in the main tag but we are listing the disks on an instance Rust (https://docs.rs/crate/oxide-api/0.1.0-rc.31) is similar client.vpcs().get()
// OR
client.instances().list_disks() then for the CLI I am using it for generating only the CRUD commands (list, create, edit, delete, etc) so I pass a macro the tag: https://github.com/oxidecomputer/cli/blob/main/src/cmd_disk.rs#L17 Now anything outside the root CRUD is manual. in that okay so... lastly the tags determine how the docs are generated see the side bar and sections here: https://docs.oxide.computer/api So you can keep that all in mind and that's what I'm trying to do and playing with what is nice and what sucks given that's how all the generation works. Hope that's helps |
honestly i was debating between this under projects or some sort of new tag for global images. |
since for example instances arent under projects but also instances dont also have a global counterpart ya know |
now im almost leaning towards the new tag for global images would make generating the cli a lot nicer too |
the other thing we could do (cc @ahl) if we have over used tags we could do a string extension to determine various things, obviously none of the generation is set in stone and could easily be changed to read from a different string |
If I'm understanding correctly, it seems like the thing we want to be able to differentiate is the "global" vs "non-global" aspect? This PR, as implemented, does the following:
This format doesn't seem that consistent to me - examples (2) and (3) are both project-scoped, but are tagged differently (one refers to the resource, the other refers to the scope). Examples (1) and (3) are both tagged with the name of the resource, but one is global, and the other is project-scoped.
vs
That being said, all of this seems contingent on where that |
yeah for that we could do then an extension on the openapi spec to denote it basically but yes that would work to let me know one is one and one is the other which would be very helpful none of the other resources have this global counterpart so its really only something that matters now, to your questions of desks versus this |
I guess roles will also be both so its worth splitting it out versus me just hard coding some custom logic into everything for images |
lets see what adam thinks too, idk if dropshot should define this extension scope of if dropshot can arbitrarily create extensions on the fly that might be a better route |
The other thing is we programatically know the scope based on the path right, like anything under /projects etc, so I could code this in like 5 other repos to calculate the scope or we could calculate it at the generation of the spec, regardless it would never have to be manually written if that makes sense which avoids errors |
I think I'm with Sean — it doesn't feel consistent to me to have the project-scoped images be under the |
coool will update, maybe ill call it like "images:global" so I can parse it |
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Signed-off-by: Jess Frazelle <github@jessfraz.com>
okay well, if I change it to
which makes me think there's some special character check somewhere? cc @ahl |
that line if you are wondering is just it running |
yeah theres a special character check: |
OH this is me being a dumbass abort |
Signed-off-by: Jess Frazelle <github@jessfraz.com>
da9a4b3
to
7329825
Compare
okay good to go now |
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 - I like this version!
Changes since the last update: - lib: use correct MAXCPU value in CPUID specializer (#876) - phd: wait for source to resume before asking to migrate again (#874) - phd: add smoke test for VCR replacement (#872) - lib: implement reference TSC enlightenment (#856) - Update package deps for GHSAs - Wire up viona for illumos#17032 - mock-server: add single-step API (#869) - propolis-server should not crash when failing to start a VM (#866) - propolis-cli: check for duplicate spec keys when parsing toml (#865) - various new 1.85 clippy lints (#864) - mock: attempt realistic state transitions (#860) - lib: tidy up overlay page migration & reduce memory usage (#861) - server: add state machine docs (#862) - DTrace script to inspect VM exit reasons (#859) - lib: add better management of Hyper-V overlay pages (#851) - lib: emulate Hyper-V enlightenment stack (#849)
Sorry about this after generating some stuff I think its better like this :)