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

ci: send build log to paste.fedoraproject.org #370

Closed

Conversation

frasertweedale
Copy link
Contributor

@frasertweedale frasertweedale commented Jan 5, 2017

This commit is just to see if we can ship our build logs off travis
to a pastebin.

If we can, we can refine the approach to only ship logs when the build
broke, provide better output about where to find them, etc.

No longer experimental; ready for review.

@frasertweedale frasertweedale force-pushed the feature/ci-paste branch 3 times, most recently from ee45e13 to 699907b Compare January 5, 2017 04:01
@frasertweedale
Copy link
Contributor Author

OK, so we can ship a paste off but paste.fedoraproject.org does not like the file size (~1.8M).
In this case the HTTP response is 200 OK and the response body is the HTML frontpage. The
paste does not succeed.

Experimentally: a paste of < 512K succeeds, but a paste of ~1M fails.

Now, fpaste is happy enough accepting binary data, e.g. a gzipped file

curl https://paste.fedoraproject.org/520077/raw/ | zless

The downsides to doing that are:

1. Cannot view in browser
2. Inefficiency of percent-encoding (compressed data will inflate by ~2.5x for transfer)
    - base64url-encoding the compressed data will avoid percent-encoding and limit inflation to 1.33x

But the upside is of course that we can get these files off so developers can get at them, so I think we should do that.

@frasertweedale
Copy link
Contributor Author

Additional notes about paste.fedoraproject.org projects:

  • seems that only names consisting entirely of alpha chars work (thus ruling out freeipa-ci or similar)
  • pastes to a project namespace appear in both the project archive, and the main archive.
  • example command:
    curl -v https://paste.fedoraproject.org/~freeipa/ -H Expect: \
      -d api_submit=true \
      -d mode=json \
      -d paste_lang=text \
      -d paste_data=hello+world \
      -d paste_expire=300
  • paste can be accessed via top name space or project (or any other, too)

@frasertweedale
Copy link
Contributor Author

fedora-infra ticket for project name limitations: https://pagure.io/fedora-infrastructure/issue/5661

When the build fails, send the whole logfile to paste.fedora.org.
(because due to size constraints we currently have to tail the log
for the travis-ci transcript).

We send a gzipped file, because the raw log file exceeds the size
limit on paste.fedoraproject.org.

Due to percent-encoding of the data, the compressed file inflates by
~2.5x for transport.  If this ever becomes a problem,
base64url-encoding before transport will limit inflation to 1.33x.
@frasertweedale frasertweedale changed the title [EXPERIMENT] ci: send build log to paste.fedoraproject.org ci: send build log to paste.fedoraproject.org Jan 6, 2017
@frasertweedale
Copy link
Contributor Author

Note: a new fedora pastebin is forthcoming. Staging instance: https://modernpaste.stg.fedoraproject.org/

@martbab
Copy link
Contributor

martbab commented Jan 24, 2017

LGTM, it would be nice if you could temporarily sneak in some breaking commit so that we can see how the paste looks like.

@martbab martbab self-assigned this Jan 24, 2017
@frasertweedale
Copy link
Contributor Author

@martbab the paste looks like gobbledygook; it's gzipped.

We will see it in action soon enough :)

@frasertweedale
Copy link
Contributor Author

So... any blocker on merging this?

@martbab
Copy link
Contributor

martbab commented Feb 8, 2017

We were discussing yout PR with @HonzaCholasta yesterday and he suggested that we could pack the test runner log, HTTP and dirsrv logs and server installer log into an archive and upload it to https://transfer.sh/ a very lightweight file hosting site. What do you think?

@HonzaCholasta
Copy link
Contributor

Right, I suggested https://transfer.sh, because uploading a file there is as easy as:

curl --upload-file ./file https://transfer.sh/file

BTW I would not limit ourselves to the few logs @martbab suggested, but upload as much as possible: /var/log/ipa*, /var/log/httpd, /var/log/dirsrv, /var/log/pki/pki-tomcat, journalctl dump for all of our services, ...

@martbab
Copy link
Contributor

martbab commented Feb 8, 2017

@HonzaCholasta I have measured the size of the whole gzipp'ed /var/log directory from the CI run and it has around 6 megs. We may thus paste the whole archived directory there (including journal and stuff) and have all the bases covered. I am working on a POC patch and will see how it will turn out.

@frasertweedale
Copy link
Contributor Author

👍 sounds good. Take what's there and run with it :)

@HonzaCholasta
Copy link
Contributor

@martbab, I would rather not include irrelevant stuff, it's just noise.

@martbab
Copy link
Contributor

martbab commented Feb 8, 2017

@HonzaCholasta ok in that case I will archive: /var/log/httpd, /var/log/dirsrv/, /var/log/pki/pki-tomcat, ipaserver/client-install.log and a dump from systemd journal. Should be enough.

@frasertweedale
Copy link
Contributor Author

Superseded by #449 ; closing.

@MartinBasti MartinBasti added the rejected Pull Request has been rejected label Feb 9, 2017
@frasertweedale frasertweedale deleted the feature/ci-paste branch March 1, 2017 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejected Pull Request has been rejected
Projects
None yet
4 participants