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

Buildbots fail when new files are added #81224

jaraco opened this issue May 25, 2019 · 4 comments

Buildbots fail when new files are added #81224

jaraco opened this issue May 25, 2019 · 4 comments
3.8 tests Tests in the Lib/test dir


Copy link

jaraco commented May 25, 2019

BPO 37043
Nosy @warsaw, @jaraco, @zware

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-05-25.13:14:10.565>
labels = ['3.8', 'tests']
title = 'Buildbots fail when new files are added'
updated_at = <Date 2021-12-31.03:37:01.108>
user = '' fields:

activity = <Date 2021-12-31.03:37:01.108>
actor = 'jaraco'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Tests']
creation = <Date 2019-05-25.13:14:10.565>
creator = 'jaraco'
dependencies = []
files = []
hgrepos = []
issue_num = 37043
keywords = []
message_count = 4.0
messages = ['343478', '343482', '343487', '409403']
nosy_count = 3.0
nosy_names = ['barry', 'jaraco', 'zach.ware']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = ''
versions = ['Python 3.8']

Copy link
Member Author

jaraco commented May 25, 2019

As reported here, I submitted a pull request that passed all tests locally and in CI, but when accepted, build bots started to fail as a result of new files having been added to the project. It seems it's necessary in to duplicate the git manifest to declare those directories... but only for buildbot builds. I don't fully understand why that is the case, but it would be nicer if there were protections from this footgun, especially since this issue may manifest several times in the same PR.

I can think of some ways to prevent this undesirable behavior:

  • Include buildbot builds in the GitHub merge request checks.
  • Add a GitHub bot that checks merge requests that create directories and alert the review of directories created if doesn't include changes reflecting those directories.
  • Remove the reliance on a separate directory listing in

@jaraco jaraco added 3.8 tests Tests in the Lib/test dir labels May 25, 2019
Copy link
Member Author

jaraco commented May 25, 2019

In #57774, @yan12125 provides this reference to the buildbot code that copies the code and thus imposes the requirement to declare source directories.

Copy link

zware commented May 25, 2019

The issue here is not with buildbots, but with installation on POSIX platforms. We do now have a couple of buildbots that install Python to a local location before running the tests, which is what flushes this out (see; they simply run make install before running the tests).

Adding these buildbots as pre-merge CI is not currently an option due to security implications (I don't want unreviewed code running on my home network). I have plans to eventually allow certain builders to be run pre-merge iff the awaiting merge label is present on the PR, but I haven't had time to work on that yet.

It might be possible to adjust one of the Travis builds to install before running tests, but that leaves some other tests un-run, which just relocates the problem.

Removing reliance on an explicit listing of directories sounds nice, but does open up the possibility of installing more than expected if run from a dirty checkout.

What about adding a "new directories added to" check to Tools/scripts/

Copy link
Member Author

jaraco commented Dec 31, 2021

I encountered this issue again today in bpo-46118.

I started looking into creating the patchcheck, but I realize it may be a little tricky to detect the introduction of a new folder, because git diff doesn't actually report new folders, and my initial research indicates it's far from straightforward.

I thought maybe git diff --dirstat might help, but it doesn't. It reports 100% different for a new file in a new folder and same for a new file in an existing folder.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3.8 tests Tests in the Lib/test dir
None yet

No branches or pull requests

2 participants