Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-1725

Exclude null values from BOM json output added in BIGTOP-1718

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 0.8.0
    • Fix Version/s: 1.0.0
    • Component/s: general
    • Labels:
      None

      Description

      BIGTOP-1718 added support for a new bom-json task that outputs the BOM in json format, but the original format would include all possible fields with nulls for missing fields. This patch removes all fields with null values in order to make the output cleaner.

      1. 0001-exclude-null-values-from-BOM-json-output.patch
        1 kB
        Jonathan Kelly
      2. BIGTOP-1725.patch
        1 kB
        Jonathan Kelly

        Issue Links

          Activity

          Hide
          jonathak Jonathan Kelly added a comment -

          Please see BIGTOP-1725.patch instead of the other attached file. This is my first attempt at submitting a patch, and I realized I had missed adding the JIRA id to the commit message.

          Show
          jonathak Jonathan Kelly added a comment - Please see BIGTOP-1725 .patch instead of the other attached file. This is my first attempt at submitting a patch, and I realized I had missed adding the JIRA id to the commit message.
          Hide
          cos Konstantin Boudnik added a comment -

          Thanks for the patch!

          Would it be more appropriate to put this functionality into BuildUtils instead of inlining it with the packaging build?
          Also, considering that you're only trying to make JSON output prettier perhaps it'd make sense to denull it output when JSON is prepared? Thoughts?

          Show
          cos Konstantin Boudnik added a comment - Thanks for the patch! Would it be more appropriate to put this functionality into BuildUtils instead of inlining it with the packaging build? Also, considering that you're only trying to make JSON output prettier perhaps it'd make sense to denull it output when JSON is prepared? Thoughts?
          Hide
          jonathak Jonathan Kelly added a comment -

          Thanks for the review. I will move it into BuildUtils. Sorry, I'm new to this project and didn't know where to put it. I'm not sure what you're asking in your second sentence though.

          Show
          jonathak Jonathan Kelly added a comment - Thanks for the review. I will move it into BuildUtils. Sorry, I'm new to this project and didn't know where to put it. I'm not sure what you're asking in your second sentence though.
          Hide
          cos Konstantin Boudnik added a comment -

          The second sentence is really about this: you're suggesting to remove the nulls directly in the list of the components. Which potentially has wide effect all across the package creation layer. What I am proposing is to only call this denull functionality right where it really affects the output - namely in the JSON formatting routine. Basically right here packages.gradle:105 - you can just add one more transformation to the collect call. Does it make sense?

          Show
          cos Konstantin Boudnik added a comment - The second sentence is really about this: you're suggesting to remove the nulls directly in the list of the components. Which potentially has wide effect all across the package creation layer. What I am proposing is to only call this denull functionality right where it really affects the output - namely in the JSON formatting routine. Basically right here packages.gradle:105 - you can just add one more transformation to the collect call. Does it make sense?
          Hide
          cos Konstantin Boudnik added a comment -

          Please consider addressing my comment or let's move it to the next release

          Show
          cos Konstantin Boudnik added a comment - Please consider addressing my comment or let's move it to the next release
          Hide
          evans_ye Evans Ye added a comment -

          Hi Jonathan Kelly, would you like to resume working on this recently or we just move this to 1.1.0?

          Show
          evans_ye Evans Ye added a comment - Hi Jonathan Kelly , would you like to resume working on this recently or we just move this to 1.1.0?
          Hide
          jonathak Jonathan Kelly added a comment -

          Ah, sorry for leaving this for so long. You know, I think I might just toss this patch. I added it on my first day on my current team, without really realizing how this would even be used. I had just heard from Rob (who wrote the patch for BIGTOP-1718) that he wasn't sure how to get rid of the extraneous null values in the output, so I figured out how to do it. But it seems like it's not even really that necessary because I don't think the JSON output will normally be read by humans. I think the idea was to make it easier to use the BOM programmatically, for example, when generating release notes.

          Show
          jonathak Jonathan Kelly added a comment - Ah, sorry for leaving this for so long. You know, I think I might just toss this patch. I added it on my first day on my current team, without really realizing how this would even be used. I had just heard from Rob (who wrote the patch for BIGTOP-1718 ) that he wasn't sure how to get rid of the extraneous null values in the output, so I figured out how to do it. But it seems like it's not even really that necessary because I don't think the JSON output will normally be read by humans. I think the idea was to make it easier to use the BOM programmatically, for example, when generating release notes.

            People

            • Assignee:
              jonathak Jonathan Kelly
              Reporter:
              jonathak Jonathan Kelly
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development