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
Intro to open source with knative blog series p3 #5949
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Leo6Leo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for knative ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Nice start @Leo6Leo !
Just a couple changes needed for clarity/better rendering and then we should be good to go here!
Now that we know what APIs are (generally, and in the context of Knative), we are ready to explore how we can make changes to them. When we want to update an API there are two, maybe three steps that you need to take. | ||
Update the struct for the object. In our case, we want to update the SampleSource struct. In Knative, these are often found in pkg/apis/<groupname>/<version>/<resourcename>_types.go. Looking at this struct, we can see that there is a structure to it that all resources generally follow: | ||
|
||
![](/blog/images/getting-started-blog-series/post3/005.png) |
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 there any way to make this image shorter? It is VERY large on the rendered site
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.
Also, we should give some kind of context to this image in the text. It feels very out of place when reading - you are expecting to see a block of code, and then for some reason you see a large image of a file directory, and it is unclear what the relation is of this image to the code block below
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 picture here is to showcase mentioned above.
these are often found in pkg/apis///_types.go.
What I could try to do is cut the image and only show the file name part, and use markdown to limit the image size, and that should make it more clear and nice looking on the rendered website.
WDYT? @Cali0707
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.
Whatever you think is best, maybe we could also not use an image but just mention the file path in the actual text? I don't feel like this image is currently providing a lot of value
Co-authored-by: Calum Murray <[email protected]>
## How can we change an API? | ||
|
||
![](/blog/images/getting-started-blog-series/post3/004.png) | ||
Now that we know what APIs are (generally, and in the context of Knative), we are ready to explore how we can make changes to them. When we want to update an API there are two, maybe three steps that you need to take. |
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.
make it either 2 steps or 3 steps and not both. Let's remove the ambiguity. :)
|
||
![](/blog/images/getting-started-blog-series/post3/004.png) | ||
Now that we know what APIs are (generally, and in the context of Knative), we are ready to explore how we can make changes to them. When we want to update an API there are two, maybe three steps that you need to take. | ||
Update the struct for the object. In our case, we want to update the SampleSource struct. In Knative, these are often found in `pkg/apis/<groupname>/<version>/<resourcename>_types.go`. Looking at this struct, we can see that there is a structure to it that all resources generally follow: |
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.
While reading it seems Update the struct is the first step. I would start this as a new para and also it is hard to follow where one step ended and second began.
|
||
``` | ||
|
||
All we added was the MessageTemplate string to the spec. Note the JSON tag - this is very important! Without a JSON tag, this field will not be read out of a JSON object when the controller receives info about it from the API Server, and the value will not be written to the JSON we send back to the API Server, so it would not be stored in etcd. |
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.
this spec should Spec
.
Great start and left some comments. |
@nainaz that's a great point, we should probably improve the conclusion a bit The idea is that readers would then continue to the future blog posts we are working on and make the rest of the required changes there. But, I can see how that could be unclear or leave someone unsatisfied reading the current post. |
Making it more clear would be helpful.
I probably missed the last piece of the blog. I still think adding what
would this "change" ultimately accomplish would be better
Thank you,
-N
…On Wed, 15 May 2024 at 10:13, Calum Murray ***@***.***> wrote:
Maybe that was the intention of the blog post but to me it felt that it
ended abruptly. I didn't "see" any result or output.
@nainaz <https://github.com/nainaz> that's a great point, we should
probably improve the conclusion a bit
The idea is that readers would then continue to the future blog posts we
are working on and make the rest of the required changes there. But, I can
see how that could be unclear or leave someone unsatisfied reading the
current post.
—
Reply to this email directly, view it on GitHub
<#5949 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AISZCFAB7NEDST5CMMJD4SLZCNURNAVCNFSM6AAAAABGY3RKO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJSGY3DMMBVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This PR contains a draft of the first post in the blog series we proposed recently to make it easier for new contributors to contribute code. The proposal can be seen here
Proposed Changes