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
Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots #63305
Comments
Background: we'd like to enable running 'make touch' on the bots before 'make -jN', to avoid problems with scripts that auto-generate code for the Python build (bootstrapping). pydev thread: https://mail.python.org/pipermail/python-dev/2013-September/128992.html A couple of issues are prerequisites:
Include/ast.h: Parser/Python.asdl Parser/asdl.py Parser/asdl_c.py The file Include/ast.h is not, in fact, auto-generated. But Include/Python-ast.h *is*, and it does not appear in this file.
|
.hgtouch fixed in ac19ff225280 (I specified the issue number incorrectly so this one wasn't notified). Curiously, $ touch Parser/asdl_c.py
$ make touch
hg --config extensions.touch=Tools/hg/hgtouch.py touch -v
Touching Include/Python-ast.h
Touching Python/Python-ast.c
$ make touch
hg --config extensions.touch=Tools/hg/hgtouch.py touch -v
Touching Python/Python-ast.c |
Ooh, I think that's because the "# try processing all rules in topological order" in do_touch doesn't actually topo-sort. |
The problem in this case is different, actually. It's the comparison: if o_time <= i_time:
# generated file is older, touch
need_touch = True In check_rule. The script is pretty quick so when it touches both Python-ast.h and .c they get the same stat time exactly. In the next run, then, this comparison succeeds and .c is touched again. I'm not sure what's the right way to go about this? Changing the comparison to < may theoretically miss cases in which the input was updated an epsilon after it auto-generated its output, and the change will go unnoticed. A different solution would be to introduce a micro-wait between each 'touch' to make sure that transitive dependencies don't need to be revisited in the future. |
I see two solutions, both involving to track the newest timestamp that needs to pass. The key issue is that hg touch should use the same comparison as make. So if make thinks that something need to be done, hg touch should touch the files. |
Here is a patch that backdates outputs 1s after their youngest input (and sleeps if necessary to avoid producing files in the future). With that, I get lap-le:3k loewis$ touch Parser/asdl_c.py ;date;make touch;date BTW, I think the Python-ast.c issue could be solved by just having Python-ast.c depend on the same inputs as Python-ast.h; the C file isn't actually depending on the H file. |
LGTM |
New changeset 477246839224 by Martin v. Löwis in branch '3.3': |
New changeset 86eff5c4e698 by Martin v. Löwis in branch '3.3': |
I have now updated the master.cfg to make buildbottouch a separate build step. |
With your fix, Thanks, I think the issue is resolved then. We should now be able to have modern Python code in scripts that generate code such as asdl[_c].py because bots and people will only old versions of Python don't ever need to run them. Should we add a note about this to the dev guide? |
"make touch" (or "hg touch") certainly should be mentioned. Details of the buildbot configuration need not. Publishing the buildbot configuration file might be useful, except that it also contains all the builder passwords, which should not be published. If that is done, it should be the "life" configuration file (rather than a static copy created now). It might be easiest to publish it through a symlink on buildbot.python.org. |
New changeset 56ed149e597a by Eli Bendersky in branch 'default': |
I've updated the devguide about As for the buildbot configuration, I agree we shouldn't document a static snapshot and also there's the passwords problem. I was talking to Antoine about this the other day, and maybe there's sense to create an "infrastructure" section in the devguide that will explain how to log into the buildbot server and look at the configuration. This should be enough for folks who really need to figure it out and is also safe w.r.t. getting out of date and exposing passwords. Also, IMHO bpo-15964 can be closed. |
IMHO it would make more sense to create a separate "infrastructure |
I'm not sure a separate document is right here because that's one more repository to have. The devguide already contains sections for somewhat more esoteric things like compiler internals guide, coverity scans. Besides, section 18 already has some material about the buildbots. But I don't feel strongly enough about this to argue :) |
Well, ideally the more esoteric things wouldn't really be there. |
On Tue, Oct 1, 2013 at 7:00 AM, Antoine Pitrou <report@bugs.python.org>wrote:
I still see the current situation better than the previous one, where this To put it differently, maintaining the devguide is kind-of a chore for devs
|
+nick,guido,benjamin: in case you're interested in the discussion that takes place in the most recent messages of this issue |
Documenting the pydotorg setup is a field of ongoing discussions. If you ask three people involved, you get three answers where this should be documented, with no chance for consensus. From an infrastructure point of view, it is up to the infrastructure head (i.e. Noah Kantrowitz) to rule on where this should be documented. I can see the python-dev view, to, although the documentation might be as short as "ask Noah". |
Where to document the infrastructure setup (including the buildbots) is up to Noah/infrastructure-sig, as the devguide just covers CPython development, while the PSF infrastructure team covers a lot more than that. A pointer from the devguide docs to the appropriate infrastructure docs would make sense, but it isn't the right home for the docs themselves. The interim solution I use is "ask on python-dev" or "ask on python-committers" :) |
Well, precisely, it's putting everything in a single collection that The devguide is primarily meant to ensure contributors don't get lost, |
I think this issue can be closed, since Martin's touch step runs on the bots successfully, and the ASDL dependencies in .hgtouch were fixed. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: