Repository navigation
replace FS by RootFS - #3882
replace FS by RootFS#3882
Conversation
|
Nice -- CI is failing because I forgot to update the code and the Go linter is catching that: |
c95d2c7 to
ce12d93
Compare
There was a problem hiding this comment.
Let the bike shed commence.
I wasn't sure whether this should be rootfs, rootFs or rootFS.
This becomes Rootfs() and WithRootfs() in Go which is not ideal.
Which one works best in GraphQL and respective languages, @helderco @slumbering?
(note: if we were to call this rootFs, it would be converted as rootFS by Go codegen)
There was a problem hiding this comment.
In Python both rootfs and root_fs feel natural. I'm partial to rootfs but I see what you mean in Go.
There was a problem hiding this comment.
rootfs (graphql) ->Rootfs() (Go) -> rootfs (Python) -> ?? (Node)
That's my vote, I think it's pretty typical to write "rootfs"/"Rootfs" as a single word rather than emphasizing that "FS" is a acronym. Also just slightly easier to type.
Not a strong opinion though, either is fine with me.
There was a problem hiding this comment.
For typescript, based on: https://www.typescriptlang.org/tsconfig#watch-watchFile
I would say it would be either rootfs or rootFs.
I would prefer rootfs, but I'll let @slumbering have the last word :)
There was a problem hiding this comment.
We are using camelCase mostly. So I would go for:
rootfs (graphql) ->Rootfs() (Go) -> rootfs (Python) -> rootFs (so rootFS) (Node)
ce12d93 to
0df0195
Compare
This comment was marked as resolved.
This comment was marked as resolved.
0df0195 to
a0af444
Compare
|
@aluzzardi It's easy enough to add the deprecation notice but I have an issue with the reference documentation. In Sphinx a version is required. I may use a simple warning instead. |
13b0e8e to
ae49436
Compare
There was a problem hiding this comment.
Just noticed an issue... Since the reason references a GraphQL name, when you codegen as is you don't get it through the proper naming conventions for the SDK.
There was a problem hiding this comment.
Yeah, I noticed that as well when doing this.
I was thinking having a somewhat "wrong" name is better than not suggesting an alternative at all. And instead of picking the name in a given SDK, I just picked the GraphQL field name. WDYT?
Alternatively, we could structure this e.g. Replaced by @withRootfs and have codegen resolve the symbol
There was a problem hiding this comment.
Implemented the suggestion above in the last commit -- @helderco thoughts?
There was a problem hiding this comment.
I like that it enables me to format and turn it into a link, but I'm wondering about the playground. If you go to the GraphQL API directly the @ will look alien there.
Not too alien I think? Maybe `field` would look more natural?
Maybe if we have a set of formatted strings: Replaced by . and any others that we may need. So an SDK regex could match against Replaced by withRootfs. and extract the field from that pattern.
Not sure I fully understand this. What would we write as the reason in GraphQL and how would we know which field it is?
There was a problem hiding this comment.
Changed this to
Replaced by `withRootFs`
Looks just fine in raw GraphQL
There was a problem hiding this comment.
Not sure I fully understand this. What would we write as the reason in GraphQL and how would we know which field it is?
In GraphQL it would be just Replaced by withRootfs. Then in the SDKs you would match by the whole phrase like Replaced by (.*). instead of just the subject.
Anyway, I'm good with the backticks, I'm going to update Python now quickly so you don't get blocked on it.
There was a problem hiding this comment.
Oh, I see!
Well, I assumed this could be more dynamic. For instance, we're about to deprecate Host().Workdir(). Depreciation reason could be:
Use `directory` with `path` set to . instead.
There was a problem hiding this comment.
To be able to cross-reference in python it's simpler to assume backticks only for other methods:
Use `directory` with path set to '.' instead.
In another object:
Use `Container.directory` instead.
ae49436 to
fe00d9b
Compare
Signed-off-by: Andrea Luzzardi <[email protected]>
Signed-off-by: Andrea Luzzardi <[email protected]>
Signed-off-by: Helder Correia <[email protected]> Signed-off-by: Andrea Luzzardi <[email protected]>
fe00d9b to
b9ecaa4
Compare
Signed-off-by: Andrea Luzzardi <[email protected]>
a78fcbc to
99fa2ce
Compare
aluzzardi
left a comment
There was a problem hiding this comment.
Added support for NodeJS
There was a problem hiding this comment.
@dolanor Please take a look! Is this the correct pattern?
There was a problem hiding this comment.
It would be.
Question is, what if there is no description but it is deprecated? Then we would generate nothing.
I guess we would need something like that:
| {{- if .Description -}} | |
| {{- if or .Description .DeprecationReason -}} |
There was a problem hiding this comment.
@slumbering Is this the correct way to do this in TS?
There was a problem hiding this comment.
After investigating, yes it seems to be that format.
sipsma
left a comment
There was a problem hiding this comment.
Go parts of the changes and the naming of the api lgtm!
Signed-off-by: Andrea Luzzardi <[email protected]>
9018302 to
19441d6
Compare
|
About to merge this @helderco Can you make the /cc @kpenfound @jpadams @vikram-dagger FYI of the change |
dolanor
left a comment
There was a problem hiding this comment.
small comments after the fact.
Maybe the one on the comment generation should be fixed or we might not generate deprecation notice in case there is no description in the first place
There was a problem hiding this comment.
After investigating, yes it seems to be that format.
There was a problem hiding this comment.
For typescript, based on: https://www.typescriptlang.org/tsconfig#watch-watchFile
I would say it would be either rootfs or rootFs.
I would prefer rootfs, but I'll let @slumbering have the last word :)
There was a problem hiding this comment.
It would be.
Question is, what if there is no description but it is deprecated? Then we would generate nothing.
I guess we would need something like that:
| {{- if .Description -}} | |
| {{- if or .Description .DeprecationReason -}} |

@deprecatedGraphQL directive in the API@deprecatedfields in the Go SDK codegenfs->rootfsandwithFS->withRootfsfs/withFSfields@helderco @slumbering @dolanor: The same
@deprecatedsupport needs to be added to Python and NodeJS as well. We're going to have a bunch like this.