Conversation
|
I have retargeted this branch to the new v1 branch. Going forward from today (I just created it this morning), check if the issue is in the v1 milestone and if it is, create your feature branch based on the v1 branch so that you don't end up with merge conflicts because v1 and main are going to diverge quickly. 👍 |
carolynvs
left a comment
There was a problem hiding this comment.
Looking good! I just have some small questions.
|
|
||
| } | ||
|
|
||
| func getMaintainerByName(source *[]bundle.Maintainer, name string) (*bundle.Maintainer, error) { |
There was a problem hiding this comment.
- Can you help me understand why
sourceis a pointer here? - Also why is the returned maintainer entry a pointer?
There was a problem hiding this comment.
Pointer makes no sense for source as the slice is passed by ref anyways.
For the return value, my intention was to prevent returning a new copy.
There was a problem hiding this comment.
Since it is a small struct (3 strings) and doesn't make use of any pointer semantics (it doesn't modify its own data), the convention in Go is to usually pass back a copy anyway. The data will be allocated on the stack (instead of the heap) and the memory recovered without having to rely on garbage collection.
It's not a huge deal but it does help avoid nil pointer concerns and is easier to work with than pointers.
6786c7d to
0783fc5
Compare
|
There is one more change to make in this PR. If you remember from the PR checklist one of the items is the schema. We have a jsonschema document for the porter.yaml. It lets us validate the porter.yaml contents and also give people autocomplete when they use editors like VS Code. We need to update the jsonschema to include the new maintainers section. I wasn't sure if you are familiar with jsonschema so here is what the change would look like: carolynvs@236e88a#diff-79f56eb4547c3a381285d1f26793b2cbd2e3d540e8783654511a91b4332eafd5 I have just added a magefile target that makes it easier to change the porter schema and fix the resulting tests that fail. Either rebase or merge the latest of main into your branch, and then you can then run |
0783fc5 to
9aa37d1
Compare
|
had to update my for to get the new target for |
|
Don't worry about DCO bot messages for commits that aren't yours. It was actually one of my PRs that merged funny, it only took the title and didn't keep the commit message with the signoff. I can always verify manually and mark the PR as signed. 👍 |
|
Oops, when I asked you to rebase I said the wrong branch to rebase against. It should have been v1, which is why you are now seeing extra commits in your pull request. Sorry about that! Here's how to fix it:
|
|
If you run into trouble with the rebase, I'm happy to fix up the PR for you so that we can merge it. |
Signed-off-by: Thorsten Hans <thorsten.hans@gmail.com>
Signed-off-by: Thorsten Hans <thorsten.hans@gmail.com>
Signed-off-by: Thorsten Hans <thorsten.hans@gmail.com>
Signed-off-by: Thorsten Hans <thorsten.hans@gmail.com>
Signed-off-by: Thorsten Hans <thorsten.hans@gmail.com>
Signed-off-by: Thorsten Hans <thorsten.hans@gmail.com>
Signed-off-by: Thorsten Hans <thorsten.hans@gmail.com>
9aa37d1 to
264c1cc
Compare
|
there we go |
What does this change
This PR adds support for specifying maintainers in porter.yml.
Generated CNAB
bundle.jsonwill contain specified maintainers.Both - maintainers and the nested fields - are optional.
What issue does it fix
Closes #1559
Notes for the reviewer
Had to update the simple manifest digest in
pkg/cnab/config-adapter/stamp_test.go.