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

Unable to parse Coveralls build data #626

Closed
hernanmd opened this issue Jan 22, 2024 · 11 comments · Fixed by #630
Closed

Unable to parse Coveralls build data #626

hernanmd opened this issue Jan 22, 2024 · 11 comments · Fixed by #630

Comments

@hernanmd
Copy link
Contributor

I get this error after cloning the repository and running

g clone https://github.com/hpi-swa/smalltalkCI.git
smalltalkCI/bin/smalltalkci --headful -v smalltalkCI/.smalltalk.ston

Selected Pharo64-12
The image opens, some checks are run, then I select "Proceed" in the confirm dialog and the testing begins.

Error:

...
Testing project...
Running suite "Pharo64-12" with 19 tests.
...............................F..Running suite "Stdout-testReportSuccess" with 1 tests.
.....Finished running suite: Stdout-testReportSuccess
FRunning suite "Stdout-testReportFailure" with 1 tests.
F.FFEF..Finished running suite: Stdout-testReportFailure
FRunning suite "XML-testReportFailure" with 1 tests.
.FFFFE..Finished running suite: XML-testReportFailure
.Running suite "XML-testReportSuccess" with 1 tests.
Project 'SomeNonExistingProject' not registered (loaded)
.......FF..FF....Finished running suite: XML-testReportSuccess
FRunning suite "Pharo64-12" with 1 tests.
....F.Project 'SomeNonExistingProject' not registered (loaded)
...FF...F..Finished running suite: Pharo64-12
FRunning suite "Pharo64-12" with 1 tests.
.F.FF..Project 'SomeNonExistingProject' not registered (loaded)
......F...Finished running suite: Pharo64-12
F.F.....F.F....Project 'SomeNonExistingProject' not registered (loaded)
...F.F....Finished running suite: Pharo64-12

Unable to parse Coveralls build data from /Users/mvs/hernan/images/smalltalkCI/_builds/2024_01_22_20_05_20/coveralls_build_data.json:
STONReaderError: At character 81: ', expected'

This is a smalltalkCI internal error. If the problem persists, please open an issue at https://github.com/hpi-swa/smalltalkCI/issues/new .

To inspect this error, open the image in the "/Users/hernan/images/smalltalkCI/_builds/2024_01_22_19_57_43/TravisCI.image" directory.

Then I inspected the JSON file and the contents seems corrupted:

{
  
  "git": {
    "branch": "unknown",
    "head": {
      "author_email": ""

�[1m�[33mError with status code 128:�[0m
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "author_name": ""

�[1m�[33mError with status code 128:�[0m
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "committer_email": ""

�[1m�[33mError with status code 128:�[0m
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "committer_name": ""

�[1m�[33mError with status code 128:�[0m
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "id": ""

�[1m�[33mError with status code 128:�[0m
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "message": ""

�[1m�[33mError with status code 128:�[0m
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh
    },
    "remotes": [
      {
        "url": "unknown",
        "name": "origin"
      }
    ]
  }
}
@theseion
Copy link
Collaborator

Thanks. Pharo 12 is breaking all the time atm, because they're changing a lot of things.

@theseion
Copy link
Collaborator

Why don't you use the run.sh script???

Anyhow, I cannot reproduce your issue. What I've noticed, however, is that you're using an old version of Pharo64-12. This is the development version, so you should choose Pharo64-alpha.

@hernanmd
Copy link
Contributor Author

hernanmd commented Feb 8, 2024

Why don't you use the run.sh script???

There is a message in every CI run in GitHub suggesting to use smalltalkci, so I never heard of run.sh:

Screenshot 2024-02-08 at 13 14 21

Anyhow, I cannot reproduce your issue. What I've noticed, however, is that you're using an old version of Pharo64-12. This is the development version, so you should choose Pharo64-alpha.

Thanks. Pretty much same issue above :)

I'll check again and let you know.

@theseion
Copy link
Collaborator

theseion commented Feb 8, 2024

Oh, I see :)

./run.sh -s Pharo64-alpha --headfull /pah/to/.smalltalk.ston

@theseion
Copy link
Collaborator

theseion commented Feb 8, 2024

Ok, so your issue has nothing to do with Pharo but with your shell environment. The script is trying to run the equivalent of this:

git --no-pager log -1 --pretty=format:"%ae" | jq -Rs .

Could you run that for me? In your case I expect it to exit with 128.

@hernanmd
Copy link
Contributor Author

hernanmd commented Feb 9, 2024

Ok, so your issue has nothing to do with Pharo but with your shell environment. The script is trying to run the equivalent of this:

git --no-pager log -1 --pretty=format:"%ae" | jq -Rs .

Could you run that for me? In your case I expect it to exit with 128.

git --no-pager log -1 --pretty=format:"%ae" | jq -Rs .
Found existing alias for "git". You should use: "g"
"[email protected]"

FYI my environment:

== uname =====================================================
Darwin lses-MacBook-Pro.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64

== shell =====================================================
zsh 5.9 (x86_64-apple-darwin22.0)

== git =====================================================
git version 2.43.0

== wget =====================================================
GNU Wget 1.21.3 built on darwin20.6.0.

-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
+ntlm +opie -psl +ssl/openssl

Wgetrc:
    /usr/local/etc/wgetrc (system)
Locale:
    /usr/local/Cellar/wget/1.21.3/share/locale
Compile:
    clang -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc"
    -DLOCALEDIR="/usr/local/Cellar/wget/1.21.3/share/locale" -I.
    -I../lib -I../lib -I/usr/local/opt/[email protected]/include
    -I/usr/local/Cellar/libidn2/2.3.2/include -DNDEBUG -g -O2
Link:
    clang -I/usr/local/Cellar/libidn2/2.3.2/include -DNDEBUG -g -O2
    -L/usr/local/Cellar/libidn2/2.3.2/lib -lidn2
    -L/usr/local/opt/[email protected]/lib -lssl -lcrypto -ldl -lz
    ../lib/libgnu.a -liconv -lintl -Wl,-framework -Wl,CoreFoundation
    -lunistring

Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic <[email protected]>.
Please send bug reports and questions to <[email protected]>.

== curl =====================================================
curl 8.1.2 (x86_64-apple-darwin22.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
Release-Date: 2023-05-30
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets

== openssl =====================================================
OpenSSL 3.2.0 23 Nov 2023 (Library: OpenSSL 3.2.0 23 Nov 2023)

== jq =====================================================
jq-1.7.1

== env ==========================================================
DYLD_LIBRARY_PATH is unset

@theseion
Copy link
Collaborator

theseion commented Feb 9, 2024

Ok, that looks like it works. Could you run smalltalkCI/bin/smalltalkci --headful -v smalltalkCI/.smalltalk.ston again? You should see verbose script output like this:

Preparing folders...
+ is_dir /Users/cthulu/dev/git/smalltalkCI/_cache
+ local dir=/Users/cthulu/dev/git/smalltalkCI/_cache
+ [[ -d /Users/cthulu/dev/git/smalltalkCI/_cache ]]
+ is_dir /Users/cthulu/dev/git/smalltalkCI/_builds
+ local dir=/Users/cthulu/dev/git/smalltalkCI/_builds
+ [[ -d /Users/cthulu/dev/git/smalltalkCI/_builds ]]
+ is_dir /Users/cthulu/dev/git/smalltalkCI/_builds/2024_02_09_17_41_32
+ local dir=/Users/cthulu/dev/git/smalltalkCI/_builds/2024_02_09_17_41_32
+ [[ -d /Users/cthulu/dev/git/smalltalkCI/_builds/2024_02_09_17_41_32 ]]
+ mkdir /Users/cthulu/dev/git/smalltalkCI/_builds/2024_02_09_17_41_32
+ export_coveralls_data
+ local branch_name=unknown
+ local flag_name=
+ local optional_values=
+ local parallel=
+ local repo_token=
+ local service_job_id=
+ local service_job_number=
+ local service_number=
+ local service_name=
+ local service_pull_request=
+ local url=unknown
+ grep -q '#coverage' /Users/cthulu/dev/git/smalltalkCI/.smalltalk.ston
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ is_travis_build
+ [[ '' = \t\r\u\e ]]
+ is_appveyor_build
+ [[ '' = \T\r\u\e ]]
+ is_gitlabci_build
+ [[ '' = \t\r\u\e ]]
+ is_github_build
+ [[ '' = \t\r\u\e ]]
+ for key in '${COVERALLS_OPTIONAL_KEYS}'
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ for key in '${COVERALLS_OPTIONAL_KEYS}'
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ for key in '${COVERALLS_OPTIONAL_KEYS}'
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ for key in '${COVERALLS_OPTIONAL_KEYS}'
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ for key in '${COVERALLS_OPTIONAL_KEYS}'
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ for key in '${COVERALLS_OPTIONAL_KEYS}'
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ for key in '${COVERALLS_OPTIONAL_KEYS}'
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ for key in '${COVERALLS_OPTIONAL_KEYS}'
+ is_not_empty ''
+ local var=
+ [[ -n '' ]]
+ ensure_jq_binary
+ is_empty ''
+ local var=
+ [[ -z '' ]]
+ program_exists jq
+ command -v jq
+ jq_binary=jq
+ return 0
+ cat
++ git_log %ae
++ local format_value=%ae
++ local output
+++ git --no-pager log -1 --pretty=format:%ae
+++ jq -Rs .
++ echo '"[email protected]"'
++ git_log %aN
++ local format_value=%aN
++ local output
+++ git --no-pager log -1 --pretty=format:%aN
+++ jq -Rs .
++ echo '"Some Name"'
++ git_log %ce
++ local format_value=%ce
++ local output
+++ git --no-pager log -1 --pretty=format:%ce
+++ jq -Rs .
++ echo '"[email protected]"'
++ git_log %cN
++ local format_value=%cN
++ local output
+++ git --no-pager log -1 --pretty=format:%cN
+++ jq -Rs .
++ echo '"GitHub"'
++ git_log %H
++ local format_value=%H
++ local output
+++ git --no-pager log -1 --pretty=format:%H
+++ jq -Rs .
++ echo '"6a8c18cd59536b6f94a41c2725264e5d809b8a4d"'
++ git_log %s
++ local format_value=%s
++ local output
+++ git --no-pager log -1 --pretty=format:%s
+++ jq -Rs .
++ echo '"Merge pull request #625 from jbrichau/fix-issue-623"'

@hernanmd
Copy link
Contributor Author

hernanmd commented Feb 9, 2024

Sure, here is the log:

smalltalkCI.log

theseion added a commit to theseion/smalltalkCI that referenced this issue Feb 9, 2024
In order to use `git` commands for generating the Coveralls report, the
script needs to `cd` to `SMALLTALK_CI_HOME` first.

Fixes hpi-swa#626
@theseion
Copy link
Collaborator

theseion commented Feb 9, 2024

🤣 You're not running that command inside the repository directory, that's why the git commands fail.

@theseion
Copy link
Collaborator

theseion commented Feb 9, 2024

I've opened a PR that fixes the issue.

theseion added a commit to theseion/smalltalkCI that referenced this issue Feb 9, 2024
In order to use `git` commands for generating the Coveralls report, the
script needs to `cd` to `SMALLTALK_CI_HOME` first.

Fixes hpi-swa#626
@hernanmd
Copy link
Contributor Author

🤣 You're not running that command inside the repository directory, that's why the git commands fail.

Thanks, didn't knew that I had to cd to a specific directory to execute the script.
I'll check your PR

fniephaus pushed a commit that referenced this issue Feb 12, 2024
In order to use `git` commands for generating the Coveralls report, the
script needs to `cd` to `SMALLTALK_CI_HOME` first.

Fixes #626
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

Successfully merging a pull request may close this issue.

2 participants