hpi-swa / smalltalkCI

Framework for testing Smalltalk projects with GitHub Actions, GitLab CI, Travis CI, AppVeyor, and others.
MIT License
94 stars 68 forks source link

Unable to parse Coveralls build data #626

Closed hernanmd closed 6 months ago

hernanmd commented 7 months ago

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": ""

Error with status code 128:
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "author_name": ""

Error with status code 128:
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "committer_email": ""

Error with status code 128:
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "committer_name": ""

Error with status code 128:
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "id": ""

Error with status code 128:
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh,
      "message": ""

Error with status code 128:
427 git_log /Users/hernan/images/smalltalkCI/helpers.sh
    },
    "remotes": [
      {
        "url": "unknown",
        "name": "origin"
      }
    ]
  }
}
theseion commented 7 months ago

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

theseion commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

Oh, I see :)

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

theseion commented 6 months ago

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 commented 6 months ago

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" "maxleske@gmail.com"

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/openssl@1.1/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/openssl@1.1/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 <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.

== 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 commented 6 months ago

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 '"code@example.com"'
++ 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 '"noreply@github.com"'
++ 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 commented 6 months ago

Sure, here is the log:

smalltalkCI.log

theseion commented 6 months ago

šŸ¤£ You're not running that command inside the repository directory, that's why the git commands fail.

theseion commented 6 months ago

I've opened a PR that fixes the issue.

hernanmd commented 6 months ago

šŸ¤£ 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