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

added .travis.yml #2

Merged
merged 1 commit into from Feb 7, 2015
Merged

added .travis.yml #2

merged 1 commit into from Feb 7, 2015

Conversation

junghans
Copy link

@junghans junghans commented Feb 4, 2015

No description provided.

- PORTAGE=2.2.15 CATEGORY=xfce-extra

before_script:
- sudo chmod 777 /etc/passwd /etc/group /etc /usr /usr/bin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whaaaat?!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just convenience as we have to modify stuff in these files/directories below, we could also prefix all commands with sudo though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that but 777?! How about a+rwX instead? Won't make stuff executable.

@mgorny
Copy link
Member

mgorny commented Feb 4, 2015

But in general, a great idea. Full repoman scan is something that should be done often before committing, but it's not because it's too heavy on resources. If we can outsource that to travis, I'd open pull requests to myself just to see the result :).

@junghans
Copy link
Author

junghans commented Feb 4, 2015

That is what I am doing for the science overlay ;-)

@mgorny
Copy link
Member

mgorny commented Feb 4, 2015

Hmm, does travis re-do all that preparation (portage install etc.) for every task or just once for host doing the work? I wonder if the performance could be improved if we passed a few categories at a time. Maybe even used some globbing to reduce the list :).

@prometheanfire
Copy link
Member

[a-de][dg-z]* type of thing :D

- cd /usr/portage

script:
- cd /usr/portage/${CATEGORY} && repoman full -d -v
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and i should have some doubt about using -d. It will kinda add errors for which most of developers don't check, so users will see earlier developer mistakes…

@mgorny
Copy link
Member

mgorny commented Feb 5, 2015

I'm going to fork this and experiment a bit.

@mrueg
Copy link

mrueg commented Feb 5, 2015

May I suggest using http://docs.travis-ci.com/user/pull-requests/ check for the changed directories in the pull request and just run repoman on these dirs? Then we should get quick results for pull-requests, for the main tree there's already autorepoman that does a great job.

@mgorny
Copy link
Member

mgorny commented Feb 5, 2015

@junghans, I'm going back to your initial approach. Having too many categories in one job severely increases the risk of timeout :).

@mrueg, Kinda the point is to check the whole tree. AutoRepoMan is post-factum. Like, I want to remove package X. I push it here so that travis checks for me if I break something :P.

@mrueg
Copy link

mrueg commented Feb 5, 2015

Well travis has a maximum run time of 1h, autorepoman (which is parallelized) checks take around 135min iirc. I'm not sure if you can run repoman on the whole tree in under 1h.
Additionally travis times out after 10 minutes with no output, that's what https://github.com/mrueg/repoman-travis/blob/master/spinner.sh is used for.

@junghans
Copy link
Author

junghans commented Feb 5, 2015

@mgorny, I also liked the per-category approach better as it allows to find error easier.

@mrueg, I worked around the no-output issue by adding -v to the repoman call.

@mgorny
Copy link
Member

mgorny commented Feb 5, 2015

Ok, I did some hacking and testing and here's my ultra-optimal version: https://github.com/mgorny/gentoo-portage-rsync-mirror/blob/travis/.travis.yml :P

Highlights:

  • uses pypy to be a little faster.
  • Runs 16 concurrent jobs, splitting categories from profiles/categories. This seems like a nice number with reasonable runtime per category and doesn't cause travis to get laggy because of number of tasks.
  • Uses git portage so we don't have to update the version in the future.

@mgorny
Copy link
Member

mgorny commented Feb 5, 2015

The test run is here; https://travis-ci.org/mgorny/gentoo-portage-rsync-mirror

@junghans
Copy link
Author

junghans commented Feb 5, 2015

Looks good, I took it!

before_script:
- sudo chmod a+rwX /etc/passwd /etc/group /etc /usr /usr/bin
- echo "portage:x:250:250:portage:/var/tmp/portage:/bin/false" >> /etc/passwd
- echo "portage::250:portage,travis" >> /etc/group
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% if these two lines are actually necessary!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

portage: 'portage' user or group missing.
         For the defaults, line 1 goes into passwd, and 2 into group.
         portage:x:250:250:portage:/var/tmp/portage:/bin/false
         portage::250:portage
*** WARNING ***  For security reasons, only system administrators should be
*** WARNING ***  allowed in the portage group.  Untrusted users or processes
*** WARNING ***  can potentially exploit the portage group for attacks such as
*** WARNING ***  local privilege escalation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So necessary, right? :P

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting the warning multiple times would be a bit annoying!

@junghans
Copy link
Author

junghans commented Feb 6, 2015

Just FYI, packages which make travis fail:

sys-apps/kudzu: SRC_URI.mirror
x11-libs/guile-gtk: SRC_URI.mirror
media-sound/muine: SRC_URI.mirror

Not bad at all!

@mgorny
Copy link
Member

mgorny commented Feb 7, 2015

SRC_URI.mirror should not be fatal. I'm going to fix this in a few minutes :).

But @junghans, do you consider this ready to merge? It's kinda a goal to avoid changing much in the git ;). In fact, we could commit .travis.yml to CVS instead… it is suitable for use with CVS checkout after all, isn't it?

@junghans
Copy link
Author

junghans commented Feb 7, 2015

I think so! I fixed media-sound/muine and x11-libs/guile-gtk. And sys-apps/kudzu will be removed in bug #537910.

@mrueg
Copy link

mrueg commented Feb 7, 2015

If you want to add something to the top-level in cvs, please discuss this on the mailing lists first.

@mgorny
Copy link
Member

mgorny commented Feb 7, 2015

I know, @mrueg. The lovely mailing list which will love the idea. Their precious inodes!

@mgorny
Copy link
Member

mgorny commented Feb 7, 2015

@swegener, can we get this cherry-picked into the git, please? :)

@junghans
Copy link
Author

junghans commented Feb 7, 2015

I did another rebase, now dev-vcs/git-cola has a bad dependency, because some old versions of dev-python/jsonpickle got dropped by @idella.

So I guess this testing is really useful ;-)

@swegener swegener merged commit 1eca896 into gentoo:master Feb 7, 2015
@junghans
Copy link
Author

junghans commented Feb 7, 2015

BTW, did somebody enable travis for this repo?

@mgorny
Copy link
Member

mgorny commented Feb 7, 2015

Ok, that's going to be harder. I need someone from masters to give me admin access to the repo since I revoked it from all developers :D.

@mgorny
Copy link
Member

mgorny commented Feb 7, 2015

Enabled now.

@mgorny
Copy link
Member

mgorny commented Feb 8, 2015

Ok, we have a problem. Travis doesn't handle the load. I've just noticed there were 8 tests queued, and I cancelled them to get fresh output :). However, it looks like we would use a way to avoid testing every push :).

@junghans
Copy link
Author

junghans commented Feb 8, 2015

@mgorny, is guess you could increase the number of concurrent builds in the travis settings.

@henrikhodne, is there a way to only have one build at the time and then skip to the latest commit?

@mgorny
Copy link
Member

mgorny commented Feb 9, 2015

That settings is already set to 0 = unlimited (I asked them). Looks like things are even worse today. I just canceled a lot of builds since it got stuck since ~12. Either travis is overloaded or they lowered out priority :).

@mgorny
Copy link
Member

mgorny commented Feb 11, 2015

I disabled checking pushes and left travis for pull requests. We can re-enable them for a while from time to time to get tree-wide check updated. However, we need to look for a more permanent solution.

For a start, Patrick has suggested that pcheck is doing tree-wide dependency checks well. We may look into using it. Maybe tree-wide pcheck + repoman full in changed directories.

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