Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd test to check all repos in Homu's cfg.toml are valid #581
Comments
|
This can be tested locally using the |
|
It looks like we'd need the |
|
Hey @aneeshusa, I think I may give this a shot tonight. Also, mentioned it in #servo, but since I had a tough time grabbing the dependencies (at least on El Capitan) for the vagrant environment, I setup this cask. |
|
Great @rwaweber, ask if you have any questions. BTW, did you try installing Vagrant 1.8.1 from the Hashicorp releases or via an older Cask URL (at least, I think you can do |
Enumerates the inconsistencies between repositories configured in homu vs those configured in the servo github organization.
|
I've got a WIP here. A couple things:
Reminder for myself to look into the pagination part of the github API. In the current state, a |
|
Pagination is configured, though I ended up rate-limiting myself a couple times during testing. As a result, I implemented a check for a token variable to allow for authenticated requests. I could imagine that being rate-limited by the github api would be less than ideal @aneeshusa not sure what the best means of retrieving that could be, maybe yanking something from pillar? Is there a token thats available? I still need to spend some time thinking about the webhook bit as well. |
|
@aneeshusa Ping to reply to the previous question. |
|
Spent a bit of time investigating the webhook check, and the earlier assumptions are correct that it would be necessary to issue an auth token with elevated access. Also, poking around some of the configurations, I noticed that there's a line in the |
|
We determined that a Get request to each repo url was sufficient and ultimately didn't warrant an access token. |
|
Yep, this can be closed for now. We can open another issue for the bonus points task at another time if that becomes necessary. |
This will prevent typos in repo names as well as issues like #580.
Files:
tests/sls/homu/valid_repos.pyThe test should read the deployed
cfg.tomlfile for Homu (should be at/home/servo/homu/cfg.toml) using thetomlPython library. Each subkey under therepokey of the configuration should be queried for existence on GitHub as a valid repo.Bonus points if you query the GitHub API for the webhooks of each repo to check that an appropriate webhook is set up (see https://github.com/servo/servo/wiki/Adding-a-repo-to-Homu), although I think this might require an new access token with permissions we don't necessarily want to provide.