tarides / get-activity

collect activity and format as markdown for a journal
MIT License
0 stars 1 forks source link

get-activity.1.0.1 broken? #32

Closed jmid closed 7 months ago

jmid commented 7 months ago

After updating to okra.0.3.0 I could no longer use okra gen to produce my weekly this morning:

$ okra generate --week=12
okra: Failure("lib/contributions_json_response.ml.PullRequest.Review.contribution_of_yojson: list instead of atom for record expected")

This is with okra.0.3.0, okra-lib.0.3.0, get-activity-lib.1.0.1 on Linux.

Realizing that tarides/okra#184 most likely changed the interface of --week for okra gen I tried some variations - but without luck:

$ okra generate --weeks=12
okra: Failure("lib/contributions_json_response.ml.PullRequest.Review.contribution_of_yojson: list instead of atom for record expected")
$ okra generate -w 12
okra: Failure("lib/contributions_json_response.ml.PullRequest.Review.contribution_of_yojson: list instead of atom for record expected")
$ okra generate -w 12-12
okra: Failure("lib/contributions_json_response.ml.PullRequest.Review.contribution_of_yojson: list instead of atom for record expected")

Downgrading to okra.0.2.1 temporarily fixes the problem for me.

PS. If the interface of okra gen indeed changed with okra.0.3.0 the relevant section in the README needs updating to describe the new interface: https://github.com/tarides/okra?tab=readme-ov-file#engineer-report

kayceesrk commented 7 months ago

Does this need a test in the testsuite along with the fix?

gpetiot commented 7 months ago

@jmid I can generate your weekly with okra gen --week 12 --user jmid (btw same results with -w/--week/--weeks, and you don't need the --user option since it's for you). Maybe that's a ppx_yojson_conv issue, what is the version you are using? (and yojson?)

jmid commented 7 months ago
ppx_yojson_conv       v0.16.0      [@@deriving] plugin to generate Yojson conversion functions
ppx_yojson_conv_lib   v0.16.0      Runtime lib for ppx_yojson_conv
yojson                2.1.2        Yojson is an optimized parsing and printing library for the JSON format
gpetiot commented 7 months ago

Transfered the issue to get-activity

jmid commented 7 months ago

Thanks to @gpetiot we've managed to establish that this is a get-activity issue - I've thus updated the title accordingly:

$ get-activity
Failure("lib/contributions_json_response.ml.PullRequest.contribution_of_yojson: list instead of atom for record expected")

From our investigations, it looks like a client-side parsing problem. strace -f -e trace=read get-activity --last-week indicates that the client receives relevant content over the network, but fails during the parsing of it.

So far we have learned: