Skip to content
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

Issue with checkboxes (v2) #50

Open
skhalaf21 opened this issue Nov 2, 2022 · 8 comments
Open

Issue with checkboxes (v2) #50

skhalaf21 opened this issue Nov 2, 2022 · 8 comments

Comments

@skhalaf21
Copy link

skhalaf21 commented Nov 2, 2022

So we know that v3 had some changes around parsing checkboxes (now parsed as arrays), which is nice. Thank you!
However, we have been using v2 for quite some time without any issues. We explicitly specify v2 to make sure new updates don't get automatically promoted without testing.
However, we noticed that although we use v2, the action parses checkboxes the new way, which caused our code to fail until we adjusted it to handle the new output format. We started to see this issue (i.e. checkboxes parsed as arrays) exactly 7 days ago (10/26/22). All forms submitted before that date with same code worked fine and checkboxes appear to be parsed the old way. Again, despite the confusion this has caused and the time it took us to get to the the bottom of the issue (the error message is so unhelpful) we got the issue fixed for the time being by updating the code to expect arrays (although we still use v2). However, we are so curious to know how would this update possibly affect older versions. (v2 in our case)

Usage:

- uses: stefanbuck/github-issue-parser@v2

Error message:

System error: SyntaxError: Unexpected token u in JSON at position 0<

@stefanbuck
Copy link
Owner

Thank you so much for flagging this. This is absolutely my fault and I feel really sorry for the update experience you had. The original PR which introduced the new checkbox parsing was open for quite some time. By the time v3 was ready I mostly focused on the breaking change introduced by #42. Original v3 was a breaking change, but later we saw an opportunity to make this backwards compatible #46 (comment) Therefore I republished v3 as v2.0.6 without noticing the other breaking change regarding checkbox parsing. I'm going to update the release notes of 2.0.6 to reflect this issue.

@skhalaf21
Copy link
Author

Thank you @stefanbuck for confirming it. Now it makes sense at least ;)
And again, thanks for this awesome custom action!

@skhalaf21 skhalaf21 reopened this Dec 5, 2022
@skhalaf21
Copy link
Author

skhalaf21 commented Dec 5, 2022

@stefanbuck .. it seems that this issue is back again due to a recent code change you committed to v3. Today, I noticed that all checkboxes are broken (checked value is always returned as null) causing issue form processing problems. checkboxes now appear to be returned as string (the older way) rather than indexed arrays. I suspect the same thing happened again and some of your recent code changes have been committed to V3. Can you please advise?

Sam

@skhalaf21
Copy link
Author

skhalaf21 commented Dec 8, 2022

@stefanbuck , any update on this please?

@stefanbuck
Copy link
Owner

Thanks for your patience . I'm busy with other commitments right now. So are you saying v3 is using an older version of the checkbox parsing again? Are you using the tag or a git sha? I'll try to find some time over the weekend to look into this more closely.

@skhalaf21
Copy link
Author

Hi @stefanbuck and thanks for following up. Yes, I use @V3 tag and it used to work fine with parsing checkboxes the new way (i.e. as arrays), but it stopped working this Monday and when debugging I found that it is parsing checkboxes the old way. So I basically had to remove the indexes from the code and it worked. I think I have also tested with v2 and it also parsed checkbooks the old way. My plan is that after v3 gets fixes, I may just import & download the action all together to ensure that this does not happen again.
Thanks again for your help!

@stefanbuck
Copy link
Owner

There was indeed a change in the v3 branch six days ago caused by a version bump of Jest (which is odd). However the actual dist file contains the new parsing. Also when I use v3 it parses the checkboxes as expected see https://github.com/stefanbuck/github-issue-parser-test/actions/runs/3666211324/jobs/6197784597#step:6:7 Is the repo in question public by any chance?

@skhalaf21
Copy link
Author

No it is private. I am positive that v3 stopped working last week and looking at the logs the checkboxes parsing code returned nulls (multiple forms, multiple checkboxes, all same behavior). once we removed [0] from parsing code (all checkboxes are single value checkboxes), it worked fine. I will try to re-test and provide some evidence. Thanks for following up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants