Status: To Do
Fix Version/s: None
When a config is persisted it may include many irrelevant import statements. There are at least 3 different pieces of code that output import statements to the config, and some of them should either be disabled or moderated.
I have attached a horrid example that includes nearly 100 imports, including at least one private library, which is not safe. None of the initial imports is required (other than the first one, used for type checking).
This Jenkins log shows a failure whose exact cause is unknown, but it was triggered by the excessive imports:
Here are links from Kian-Tat Lim to various bits of code that write import statements when saving a config, and he reports that there is also a third place where imports are written. The first one is probably responsible for writing out the unwanted configs in question:
I suggest that only the minimal imports be written out, perhaps only those that were seen in any config override file.