lemon-oxygen-72498
01/24/2023, 7:54 PMbump plugin we have written is now having hiccups with messages of the form:
Filesystem changed during run: retryingBecause thein 500ms...Bump
bump task bumps version numbers in pyproject.toml files, the retry is causing multiple bumps to happen with one command. As in, we request bumping the patch number once, and 0.0.1 gets bumped to 0.0.3 or 0.0.4. It's not deterministic and I did not yet understand the trigger š¤·
My question is: would --no-watch-filesystem --no-pantsd be a quick workaround until I figure things correctly?wide-midnight-78598
01/24/2023, 7:55 PMwide-midnight-78598
01/24/2023, 7:55 PMlemon-oxygen-72498
01/24/2023, 7:57 PMpyproject.toml are part of the BUILD files infrastructure.lemon-oxygen-72498
01/24/2023, 7:57 PMlemon-oxygen-72498
01/24/2023, 7:57 PMlemon-oxygen-72498
01/24/2023, 7:59 PMā tree -L 1 libs/wsi | head -n 8
libs/wsi
āāā BUILD
āāā docker
āāā kaiko
āāā pyproject.toml
āāā README.md
āāā requirements.txt
āāā scripts
ā ./pants bump libs/wsi
20:58:47.27 [INFO] Initializing scheduler...
20:58:47.28 [WARN] DEPRECATED: Setting `Goal.environment_behavior=EnvironmentBehavior.UNMIGRATED` for `Goal` `bump` is scheduled to be removed in version 2.17.0.dev0.
custombump - custombump succeeded.
- (python) libs/wsi: 0.0.23 ā 0.0.24wide-midnight-78598
01/24/2023, 7:59 PMlemon-oxygen-72498
01/24/2023, 8:00 PMlemon-oxygen-72498
01/24/2023, 8:00 PMā ./pants bump libs/wsi
20:58:47.27 [INFO] Initializing scheduler...
20:58:47.28 [WARN] DEPRECATED: Setting `Goal.environment_behavior=EnvironmentBehavior.UNMIGRATED` for `Goal` `bump` is scheduled to be removed in version 2.17.0.dev0.
See <https://www.pantsbuild.org/v2.15/docs/plugin-upgrade-guide>
20:58:48.05 [INFO] Scheduler initialized.
20:58:48.15 [WARN] {}
20:58:48.15 [INFO] Completed: Bump pyproject.toml version - custombump - custombump succeeded.
- (python) libs/wsi: 0.0.23 ā 0.0.24
ā custombump succeeded.
20:58:48.15 [INFO] Filesystem changed during run: retrying `Bump` in 500ms...
20:58:48.65 [WARN] {}
20:58:48.65 [INFO] Completed: Bump pyproject.toml version - custombump - custombump succeeded.
- (python) libs/wsi: 0.0.24 ā 0.0.25
ā custombump succeeded.
20:58:48.66 [INFO] Filesystem changed during run: retrying `Bump` in 500ms...
20:58:49.16 [WARN] {}
20:58:49.16 [INFO] Completed: Bump pyproject.toml version - custombump - custombump succeeded.
- (python) libs/wsi: 0.0.25 ā 0.0.26
ā custombump succeeded.wide-midnight-78598
01/24/2023, 8:01 PMlemon-oxygen-72498
01/24/2023, 8:01 PMwide-midnight-78598
01/24/2023, 8:01 PMlemon-oxygen-72498
01/24/2023, 8:01 PM./pants bump libs/wsi libs/otherwide-midnight-78598
01/24/2023, 8:03 PMwide-midnight-78598
01/24/2023, 8:03 PMbump is a goal? Or an alias?lemon-oxygen-72498
01/24/2023, 8:04 PMbump is a goalwide-midnight-78598
01/24/2023, 8:07 PMbump as a fixer myself, and then just run pants fix :: or maybe use it as an alias, but I get not wanting to run it ALL the time.
Anyways, if that's the case, I would think this is expected. When you run a formatter or fixer, and the code it's monitoring changes (intentionally), I think there is always a re-run of that goal (don't quote me on that, I'd have to run something and fmt or fix on it - as I'm immune to a lot of these messages).
The weird part is that the bump goal seems to only update one patch version at a time, instead of to the latestwide-midnight-78598
01/24/2023, 8:09 PMlemon-oxygen-72498
01/24/2023, 8:10 PMbump plugin when upgrading from 2.14 to 2.15.wide-midnight-78598
01/24/2023, 8:10 PMlemon-oxygen-72498
01/24/2023, 8:10 PMlemon-oxygen-72498
01/24/2023, 8:10 PMwide-midnight-78598
01/24/2023, 8:10 PMlemon-oxygen-72498
01/24/2023, 8:12 PMbump plugin update is like this:wide-midnight-78598
01/24/2023, 8:14 PM15:13:45.57 [INFO] Initializing scheduler...
15:13:47.83 [INFO] Scheduler initialized.
15:13:48.86 [INFO] Filesystem changed during run: retrying `Fmt` in 500ms...
15:13:51.27 [INFO] Completed: Format with Black - black made no changes.
15:13:51.41 [INFO] Completed: Format with docformatter - docformatter made no changes.
15:13:51.60 [WARN] Completed: Format with isort - isort made changes.
src/python/pants/backend/cc/util_rules/compile.pylemon-oxygen-72498
01/24/2023, 8:17 PMtouch libs/wsi/various_files in a concurrent while sleep 0.01s loop, but I can't seem to trigger the retrial consistently š (but my bump task is quite fast, maybe too fast most of the time)wide-midnight-78598
01/24/2023, 8:20 PMwide-midnight-78598
01/24/2023, 8:29 PMlemon-oxygen-72498
01/24/2023, 8:30 PMwide-midnight-78598
01/24/2023, 8:32 PMbump being a "fix" goal plugin makes sense for your team?)bitter-ability-32190
01/24/2023, 8:34 PMlemon-oxygen-72498
01/24/2023, 8:40 PMbump goal.
So could I keep my bump goal by making it a "fix" one and still adhere to the kind of side effects that Pants goals are supposed to do?lemon-oxygen-72498
01/24/2023, 8:40 PMbump a Pants plugin or just do a plain old vanilla python script to do it)wide-midnight-78598
01/24/2023, 8:42 PMbump needs to run multiple times on the same data?lemon-oxygen-72498
01/25/2023, 8:34 AM./pants bump dir1 dir2 dir3
should bump the patch number of the pyproject.toml files in dir1 , dir2, and dir3. Of course you could pass dir1 multiple times, but that's not the intent.wide-midnight-78598
01/25/2023, 1:17 PMwsi by 0.0.1, filesystem change causes a re-run, then bumps by another 0.0.1, and again.
20:58:48.15 [INFO] Completed: Bump pyproject.toml version - custombump - custombump succeeded.
- (python) libs/wsi: 0.0.23 ā 0.0.24
ā custombump succeeded.
20:58:48.15 [INFO] Filesystem changed during run: retrying `Bump` in 500ms...
20:58:48.65 [WARN] {}
20:58:48.65 [INFO] Completed: Bump pyproject.toml version - custombump - custombump succeeded.
- (python) libs/wsi: 0.0.24 ā 0.0.25
ā custombump succeeded.
20:58:48.66 [INFO] Filesystem changed during run: retrying `Bump` in 500ms...
20:58:49.16 [WARN] {}
20:58:49.16 [INFO] Completed: Bump pyproject.toml version - custombump - custombump succeeded.
- (python) libs/wsi: 0.0.25 ā 0.0.26lemon-oxygen-72498
01/26/2023, 3:35 PM--no-watch-filesystem --no-pantsd did the trick though. In the long run, we won't use a Pants target for this anymore.