Closed Bug 1307905 Opened 3 years ago Closed 3 years ago
Ignore irrelevant properties in stub generation
58 bytes, text/x-review-board-request
Originally posted by:linclark see https://github.com/devtools-html/gecko-dev/issues/257 When stubs are generated, the packet stubs will always have a different timestamp. For properties like these, we should make sure the incoming packet has the expected structure and then overwrite it with the existing stub's value so they don't have to change with each PR that adds a stub. - [ ] timestamp - [ ] actor ID
Lin, I got this working a first time, by going manually through the different properties and type of packets, but I thought it was not ideal. So I changed things in order to declare the irrelevant properties in a selector-like format. I'm not a hundred percent convinced by this over the first method I did, so I wonder what you think of this.
This generalized code seems kind of complex. I'm not sure what the more manual approach would look like, but I'm guessing it might be clearer. I'd probably lean towards the manual approach since we probably won't have to make too many additions, but I leave it up to your judgement.
> This generalized code seems kind of complex. I'm not sure what the more manual approach would look like, but I'm guessing it might be clearer. I'd probably lean towards the manual approach since we probably won't have to make too many additions, but I leave it up to your judgement. I agree with you. I revert back to the manual approach
Attachment #8805623 - Attachment is obsolete: true
Comment on attachment 8805919 [details] Bug 1307905 - Ignore irrelevant properties in stub generation; https://reviewboard.mozilla.org/r/89530/#review91230 I haven't tested it, but this looks good to me. The only thing I'd suggest is adding a comment before each block to describe what's getting cleaned. Thanks!
Attachment #8805919 - Flags: review?(lclark) → review+
Thanks for the review Lin ! I wanted bgrins to take it but he's not accepting review (probably hasn't switch back on when he came back), and I didn't saw him on IRC since Friday to tell him :)
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/342db7014f26 Ignore irrelevant properties in stub generation; r=linclark
You need to log in before you can comment on or make changes to this bug.