Why does Travis fail?

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
Post Reply
User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Why does Travis fail?

Post by Ger »

https://travis-ci.org/phpbb/phpbb/jobs/340383829

I've made a simple PR adding 3 simple lines to an event (3 of them comment). The Travis test fails here:
0.51s$ sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git remote set-branches --add origin $TRAVIS_BRANCH && git fetch && git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA; fi"
+[ 1 = 1 -a 5123 != false ]
+git remote set-branches --add origin master
+git fetch
+git-tools/commit-msg-hook-range.sh origin/master..e2058192b0296ce78073640965930c40ef5f69a7
Inspecting commit message of commit 7508fccb02f14422d18b901fd6baf0a5dbc74608
Unexpected EOF encountered
Aborting commit.
The command "sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git remote set-branches --add origin $TRAVIS_BRANCH && git fetch && git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA; fi"" exited with 1.
It seems to come down to the unexpected EOF. Is that something I triggered or is there a bug in the testing procedure?
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

CHItA
Development Team
Development Team
Posts: 169
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: Why does Travis fail?

Post by CHItA »

It failed because your merge commit doesn't follow the commit message format.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: Why does Travis fail?

Post by Ger »

Than can you please explain me how to fix this commit message?

I've made an error indeed while creating the commit but fixed it within a minute or so.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

CHItA
Development Team
Development Team
Posts: 169
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: Why does Travis fail?

Post by CHItA »

It depends which git client you use, the search term i would suggest is "Squash commits". I use the command line, so if you issue git commands from your console, then you want to rebase with the -i switch, and then just write an f for your second commit, and it will be merged into the first one. You could also ammend the commit message, as the error is in your last commit message. After that, you will have to "force push" your branch, and you should be done.

Alternatively you could just copy your files, delete your branch, recreate it, and force push it again (the backup is a good idea anyway, if you haven't done it yet). Here are some examples for the command line commands.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: Why does Travis fail?

Post by Ger »

Well, I've just done it through the Github browser interface.

I've closed my original PR and deleted my fork. Now I've recreated the change and did another PR. Fingers crossed... :P
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: Why does Travis fail?

Post by Ger »

Urgh....
Travis fails again on the commit line that's greater than 80 characters long:
[ticket/15547] Add file object to event core.avatar_driver_upload_move_file_before
Jup, 83 characters. The event name and ticket identifier are 58 characters... so I have to stuff any relevant info in 22 characters...

Why, WHY??? do you have to make things so frustrating??? Every time I try to contribute something it's an agony to get it accepted just because of all this..., * just prevent censor_text() to mute me

Let's go again. I'll find some God to talk to, maybe it'll help.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: Why does Travis fail?

Post by Ger »

Well, Marc helped me trough IRC. I did exactly as he told me to do and Travis still fails.
Marc wrote:I think the error you're getting now might be caused by the web interface itself. no worries, I'll fix it
So I guess there's some work on the testing procedure... Anyway, thanks Marc.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

User avatar
akbarhashmi
Registered User
Posts: 13
Joined: Tue Feb 13, 2018 11:56 am

Re: Why does Travis fail?

Post by akbarhashmi »

I got both your errors before finally getting it https://github.com/phpbb/phpbb/pull/5128
Make sure to follow the correct structure of the commit message

The complete instructions are given here clearly https://area51.phpbb.com/docs/dev/development/git.html

In summary:

1) follow this format

[<branch>] <summary>

<description> (optional)

<ticket1>
<ticketn>

2) leave a space between summary and description and ticket
3) ticket format : PHPBB3-XXXX

User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 185
Joined: Thu Sep 09, 2010 11:36 am
Location: Munich, Germany

Re: Why does Travis fail?

Post by Marc »

I'd also like to point out that the 79 characters per line limit is actually something that stems from Git itself. In addition to that, the EOF issue you're having seems to be caused by Github's web interface. I haven't used it that much yet but this seems like it sometimes uses CRLF (Windows line endings) instead of just LF (unix line endings) in commit messages. If there is a switch for this somewhere on Github's web interface you should try switching that to Unix line endings. Otherwise I think the only solution will be to use a proper git client that will allow you to set this line ending.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: Why does Travis fail?

Post by Ger »

I usually don't have issues when I work from with Netbeans to do work-related stuff with Git and exceed the 79 characters. But we host Git ourselves and don't use Github, so maybe that's different.
Also I'm still a bit struggling with the concept of needing to fork phpBB to my own profile, make changes, commit them and then do a PR. We simply branch off from master or any other tag, commit, push and than our lead dev merges. I understand that our methods doesn't suit phpBB's needs but sometimes I find this quite a PITA (as you ma have noticed :P )


Anyway, I saw it merged now. Kudos for the efforts.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

Post Reply