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

Help finding where cibuildwheel is modifying git managed files #189

Closed
djhoese opened this issue Nov 5, 2019 · 5 comments
Closed

Help finding where cibuildwheel is modifying git managed files #189

djhoese opened this issue Nov 5, 2019 · 5 comments

Comments

@djhoese
Copy link

djhoese commented Nov 5, 2019

I'm using cibuildwheel with the Vispy project (https://github.com/vispy/vispy/). In previous releases we had hardcoded the version number in our setup.py but have since migrated to using setuptools-scm (https://pypi.org/project/setuptools-scm/) to automatically generate the version number from the previous tag. So if the current git state matches a git tag, then that git tag is used as the version number. If there are local uncommited changes or we are commits ahead of the last tag then the version becomes something like 0.6.3.dev0+abcdef.d20191104 where abcdef is the current commit hash.

I'm working on our first release since this migration and am running in to an issue where cibuildwheel seems to be modifying one of vispy's git-managed files just before building a wheel. This causes the version for the package to become like the longer version example above and then fails to upload to PyPI since it is an invalid version number.

I'm trying to track down what cibuildwheel might be modifying but am not finding anything obvious yet. Putting a git status in my BEFORE_BUILD shows that we are in a detached head state but no git-managed files are modified (the output directory is created). Any other ideas?

@djhoese
Copy link
Author

djhoese commented Nov 5, 2019

I should note this happens in all environments (OSX, Windows, Linux).

@YannickJadoul
Copy link
Member

@djhoese Do you have a run of the CI? Or is there some simple way we can try this ourselves?

What about running with CIBW_TEST_COMMAND="git status"?

@djhoese
Copy link
Author

djhoese commented Nov 5, 2019

Sorry to make all this noise. I walked through some things last night and I think this is not cibuildwheel's fault and was just hoping for a simple answer (ex. "oh yeah cibuildwheel modifies your setup.py").

For anyone else running in to something like this, the Vispy project has a jupyter widget that it builds as part of the setup.py process. It uses npm to do this (as is standard with building a custom jupyter widgets) and results in some new javascript files that get bundled with the sdist/wheel distribution of the Vispy package. The problem is (not completely confirmed yet), that npm will update the git-committed package-lock.json file with the newest versions of javascript dependencies. This causes the local git repository directory to become "dirty" which causes setuptools_scm to produce a different version number. Since the package-lock.json file could change depending on npm version or new javascript dependency releases, this isn't easy to make consistent across platforms.

My next attempt at a solution will be to add something to the setup.py an extra environment variable option to reset the git repository after the javascript widget has been built. I will also be talking with the jupyter widget people to see if I'm doing anything non-standard (like committing this package-lock.json file).

@djhoese djhoese closed this as completed Nov 5, 2019
@djhoese
Copy link
Author

djhoese commented Nov 5, 2019

Last update: turns out it was the package-lock.json being updated inside setup.py. Untracking the file for my application was the simplest work around.

@YannickJadoul
Copy link
Member

Ah, good you found it. And even better to know cibuildwheel is not to blame ;-)
Thanks for the nice writeup and explanation; if others run into this, it's clear why, now

achals added a commit to achals/feast that referenced this issue Jun 28, 2022
Signed-off-by: Achal Shah <achals@gmail.com>

This fixes a problem similar to pypa/cibuildwheel#189 (comment).

Running `go mod tidy` was updating `go.mod` and `go.sum`, which was causeing cibuildwheel to produce dirty builds. This comamnd isn't really even needed, so nixing it.
feast-ci-bot pushed a commit to feast-dev/feast that referenced this issue Jun 28, 2022
Signed-off-by: Achal Shah <achals@gmail.com>

This fixes a problem similar to pypa/cibuildwheel#189 (comment).

Running `go mod tidy` was updating `go.mod` and `go.sum`, which was causeing cibuildwheel to produce dirty builds. This comamnd isn't really even needed, so nixing it.
kevjumba pushed a commit to feast-dev/feast that referenced this issue Jun 29, 2022
# [0.22.0](v0.21.0...v0.22.0) (2022-06-29)

### Bug Fixes

* Add columns for user metadata in the tables ([#2760](#2760)) ([269055e](269055e))
* Add project columns in the SQL Registry ([#2784](#2784)) ([336fdd1](336fdd1))
* Add S3FS dependency (which Dask depends on for S3 files) ([#2701](#2701)) ([5d6fa94](5d6fa94))
* Bugfixes for how registry is loaded ([#2768](#2768)) ([ecb8b2a](ecb8b2a))
* Conversion of null timestamp from proto to python ([#2814](#2814)) ([cb23648](cb23648))
* Correct feature statuses during feature logging test ([#2709](#2709)) ([cebf609](cebf609))
* Correctly generate projects-list.json when calling feast ui and using postgres as a source ([#2845](#2845)) ([bee8076](bee8076))
* Dynamodb drops missing entities when batching ([#2802](#2802)) ([a2e9209](a2e9209))
* Enable faulthandler and disable flaky tests ([#2815](#2815)) ([4934d84](4934d84))
* Explicitly translate errors when instantiating the go fs  ([#2842](#2842)) ([7a2c4cd](7a2c4cd))
* Fix broken roadmap links ([#2690](#2690)) ([b3ba8aa](b3ba8aa))
* Fix bugs in applying stream feature view and retrieving online features  ([#2754](#2754)) ([d024e5e](d024e5e))
* Fix Feast UI failure with new way of specifying entities ([#2773](#2773)) ([0d1ac01](0d1ac01))
* Fix feature view __getitem__ for feature services ([#2769](#2769)) ([88cc47d](88cc47d))
* Fix issue when user specifies a port for feast ui  ([#2692](#2692)) ([1c621fe](1c621fe))
* Fix macos wheel version for 310 and also checkout edited go files ([#2890](#2890)) ([bdf170f](bdf170f))
* Fix on demand feature view crash from inference when it uses df.apply ([#2713](#2713)) ([c5539fd](c5539fd))
* Fix SparkKafkaProcessor `query_timeout` parameter ([#2789](#2789)) ([a8d282d](a8d282d))
* Fix workflow syntax error ([#2869](#2869)) ([fae45a1](fae45a1))
* Fixed custom S3 endpoint read fail ([#2786](#2786)) ([6fec431](6fec431))
* Go install gopy instead using go mod tidy ([#2863](#2863)) ([2f2b519](2f2b519))
* Hydrate infra object in the sql registry proto() method  ([#2782](#2782)) ([452dcd3](452dcd3))
* Implement apply_materialization and infra methods in sql registry ([#2775](#2775)) ([4ed107c](4ed107c))
* Minor refactor to format exception message ([#2764](#2764)) ([da763c6](da763c6))
* Prefer installing gopy from feast's fork as opposed to upstream ([#2839](#2839)) ([34c997d](34c997d))
* Python server is not correctly starting in integration tests ([#2706](#2706)) ([7583a0b](7583a0b))
* Random port allocation for python server in tests ([#2710](#2710)) ([dee8090](dee8090))
* Refactor test to reuse LocalRegistryFile ([#2763](#2763)) ([4339c0a](4339c0a))
* Revert "chore(release): release 0.22.0" ([#2852](#2852)) ([e6a4636](e6a4636))
* Stop running go mod tidy in setup.py ([#2877](#2877)) ([676ecbb](676ecbb)), closes [/github.com/pypa/cibuildwheel/issues/189#issuecomment-549933912](https://github.com//github.com/pypa/cibuildwheel/issues/189/issues/issuecomment-549933912)
* Support push sources in stream feature views ([#2704](#2704)) ([0d60eaa](0d60eaa))
* Sync publish and build_wheels workflow to fix verify wheel error. ([#2871](#2871)) ([b0f050a](b0f050a))
* Update roadmap with stream feature view rfc ([#2824](#2824)) ([fc8f890](fc8f890))
* Update udf tests and add base functions to streaming fcos and fix some nonetype errors ([#2776](#2776)) ([331a214](331a214))

### Features

* Add feast repo-upgrade for automated repo upgrades ([#2733](#2733)) ([a3304d4](a3304d4))
* Add file write_to_offline_store functionality ([#2808](#2808)) ([c0e2ad7](c0e2ad7))
* Add http endpoint to the Go feature server ([#2658](#2658)) ([3347a57](3347a57))
* Add simple TLS support in Go RedisOnlineStore ([#2860](#2860)) ([521488d](521488d))
* Add StreamProcessor and SparkKafkaProcessor as contrib ([#2777](#2777)) ([83ab682](83ab682))
* Added Spark support for Delta and Avro ([#2757](#2757)) ([7d16516](7d16516))
* CLI interface for validation of logged features ([#2718](#2718)) ([c8b11b3](c8b11b3))
* Enable stream feature view materialization ([#2798](#2798)) ([a06700d](a06700d))
* Enable stream feature view materialization ([#2807](#2807)) ([7d57724](7d57724))
* Implement `offline_write_batch` for BigQuery and Snowflake ([#2840](#2840)) ([97444e4](97444e4))
* Offline push endpoint for pushing to offline stores ([#2837](#2837)) ([a88cd30](a88cd30))
* Push to Redshift batch source offline store directly ([#2819](#2819)) ([5748a8b](5748a8b))
* Scaffold for unified push api ([#2796](#2796)) ([1bd0930](1bd0930))
* SQLAlchemy Registry Support ([#2734](#2734)) ([b3fe39c](b3fe39c))
* Stream Feature View FCOS ([#2750](#2750)) ([0cf3c92](0cf3c92))
* Update stream fcos to have watermark and sliding interval ([#2765](#2765)) ([3256952](3256952))
* Validating logged features via Python SDK ([#2640](#2640)) ([2874fc5](2874fc5))

### Reverts

* Revert "chore(release): release 0.22.0" (#2891) ([e5abf58](e5abf58)), closes [#2891](#2891)
* Revert "chore(release): release 0.22.0" (#2870) ([ffb0892](ffb0892)), closes [#2870](#2870)
* Revert "Create main.yml" (#2867) ([47922a4](47922a4)), closes [#2867](#2867)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants