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

Python release for 5.29.0 has indent problem #19430

Closed
thatch opened this issue Nov 27, 2024 · 30 comments
Closed

Python release for 5.29.0 has indent problem #19430

thatch opened this issue Nov 27, 2024 · 30 comments

Comments

@thatch
Copy link

thatch commented Nov 27, 2024

If you run python -m compileall on any of the wheels for the latest release ~40 minutes ago, it will fail with:

Compiling 'google/protobuf/service.py'...
*** Sorry: IndentationError: unindent does not match any outer indentation level (service.py, line 78)

I can confirm there appears to be a missing space, but I don't see that file (under that name or contents) checked in.

@shaod2 shaod2 added the 29.x label Nov 27, 2024
@piotlinski
Copy link

Confirming that, it seems to be visible on the 29.x branch:

raise NotImplementedError

@ejona86
Copy link
Contributor

ejona86 commented Nov 27, 2024

That file has been deleted on main, but it is in the 29.x branch.

@ElisaRMA
Copy link

Just FYI, still faced this issue today when importing some packages. The version installed was the 5.29.0. Reverting to the previous version solved the problem :)

[..]/google/protobuf/service.py:78 raise NotImplementedError ^ IndentationError: unindent does not match any outer indentation level

@SebKleiner
Copy link

Hi, I still face this issue while installing 5.29.0

@miguelgfierro
Copy link

miguelgfierro commented Dec 1, 2024

Confirming as well, it's breaking all our tests: recommenders-team/recommenders#2191

Crazy idea: it would be nice to test your library before making a release.

@miguelgfierro
Copy link

@anandolee @ejona86 you need to yank 5.29.0 https://pypi.org/project/protobuf/5.29.0/

@dionhaefner
Copy link

lmao @ the fact that this is still live 5 days later

$ pip install protobuf
$ python -c "import google.protobuf.service"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/dion/.virtualenvs/tempenv-2d0a294330027/lib/python3.10/site-packages/google/protobuf/service.py", line 78
    raise NotImplementedError
                             ^
IndentationError: unindent does not match any outer indentation level

@zhangskz
Copy link
Member

zhangskz commented Dec 2, 2024

This should be patched in v29.1 ~tomorrow. We are not planning on yanking v29.0 currently, since the issue is isolated to a long-deprecated API slated for removal. For now, we recommend not picking up v29.0 yet if you need compileall or if using the service.py (or ideally moving off of that since it'll be removed soon in v30.x).

Unfortunately the culprit change also removed the test that also would have caught it, as a side-effect of our removal of this API internally. We will consider adding tests with compileall to avoid similar test coverage problems in the future.

@miguelgfierro
Copy link

We are not planning on yanking v29.0 currently, since the issue is isolated to a long-deprecated API slated for removal.

@zhangskz It's not a matter whether the issue is deprecated or not, nobody can use that version in Python. That's the exact reason why it should be yanked. Is this serious?

@zhangskz
Copy link
Member

zhangskz commented Dec 2, 2024

This should only impact users importing the deprecated service.py (or usingcompileall) which should be relatively rare. We believe this shouldn't warrant a yank since most users should be able to use v29.0 successfully, where a yank may be disruptive as well.

I see in recommenders-team/recommenders#2191 that your project is indeed importing service.py. Apologies for the breakage, but would it suffice to simply pin to v28.x for now in the interim?

@nikhil-pandey
Copy link

Saw this issue with couple of projects using azure + mlflow

@miguelgfierro
Copy link

miguelgfierro commented Dec 3, 2024

@zhangskz Recommenders doesn't have a dependency on protobuf, AzureML has. Basically, everybody doing machine learning with Microsoft products will have this error. I'm sure many other libraries will break, like mlflow.

I admire Google and Google engineers, but this is not the right way to operate. If you don't yank the release, you are hiding a major error, and everybody with a dependency in protobuf will get an error. In this end, this hurts your reputation as engineers and the reputation of Google.

Look, I've been coding for 20 years, and all of us have made mistakes. When I make a mistake, I fix it, I own the mistake and move on. I've been in your shoes many times, and I understand it's not nice to yank a release. But doing it fortifies your library.

I hope you do the right thing.

@jkoessle
Copy link

jkoessle commented Dec 3, 2024

Saw this issue with couple of projects using azure + mlflow

Same for us. Its not possible to use 5.29.0 and mlflow in our ML pipelines.

@KrystianOcado
Copy link

This should only impact users importing the deprecated service.py (or usingcompileall) which should be relatively rare. We believe this shouldn't warrant a yank since most users should be able to use v29.0 successfully, where a yank may be disruptive as well.

I see in recommenders-team/recommenders#2191 that your project is indeed importing service.py. Apologies for the breakage, but would it suffice to simply pin to v28.x for now in the interim?

Hi @zhangskz !

You don't need to import "service.py" to experience this error. GCP Cloud Function compiles all the code when you deploy new function, so even if you don't use "service.py" you see this error. Please yank the broken version.

Thanks!

@luisangelico
Copy link

luisangelico commented Dec 3, 2024

Having this issue with Mlflow on Azure.
pip install protobuf==5.28.0 fixed it

@googleberg
Copy link
Member

googleberg commented Dec 3, 2024

Hello all,

I know that issues like this can be frustrating. No one likes to have their work blocked by a breakage. Sorry about that.

It is also important to recognize that not every user's use case is the same as yours. As @zhangskz points out, while a yank might seem like an obvious solution, there are other users that may have already latched onto other working parts of 29.0 and yanking may break them.

When formulating your replies, keep in mind that protobuf has a Code of Conduct. We do want feedback and suggestions but we also expect civility and mutual respect.

We will be releasing a patch that resolves this issue shortly.
We will be adding additional release testing to ensure that even deprecated functionality like service.py is not broken in future releases.

Thank you for your patience.

@imatiach-msft
Copy link

+1 seeing this as well, this is breaking everything for me - great to see some familiar faces here 👋

@eltoder
Copy link

eltoder commented Dec 3, 2024

@zhangskz running compileall is not at all rare. It is a standard step when deploying your code.

@dionhaefner
Copy link

image

@d8ahazard
Copy link

Hello all,

I know that issues like this can be frustrating. No one likes to have their work blocked by a breakage. Sorry about that.

It is also important to recognize that not every user's use case is the same as yours. As @zhangskz points out, while a yank might seem like an obvious solution, there are other users that may have already latched onto other working parts of 29.0 and yanking may break them.

When formulating your replies, keep in mind that protobuf has a Code of Conduct. We do want feedback and suggestions but we also expect civility and mutual respect.

We will be releasing a patch that resolves this issue shortly. We will be adding additional release testing to ensure that even deprecated functionality like service.py is not broken in future releases.

Thank you for your patience.

Respectfully, you guys need to move NOW.

Why is the broken package still published, and why have you not release a fix?

Considering how many other packages use protobuf, this should have been addressed last week when it was reported...not "maybe some time today.".

@pberenyi
Copy link

pberenyi commented Dec 4, 2024

Maybe you want to add something like python -m compileall -q . into your release verification process?

@karpikpl
Copy link

karpikpl commented Dec 4, 2024

Looks like 5.29.1 was released

@jorenham
Copy link

jorenham commented Dec 4, 2024

Looks like 5.29.1 was released

It's not yet on PyPI:
https://pypi.org/project/protobuf/

@jorenham
Copy link

jorenham commented Dec 4, 2024

I would suggest yanking the 5.29.0 PyPI release.

@jorenham
Copy link

jorenham commented Dec 4, 2024

Respectfully, you guys need to move NOW.

I strongly agree. This causes major disruptions in a many CI/CD pipelines.
Do not underestimate the damage you are causing by ignoring this.

@ericsalo
Copy link
Member

ericsalo commented Dec 4, 2024 via email

@jorenham
Copy link

jorenham commented Dec 4, 2024

Protobuf 5.29.1 is on PyPI now:
https://pypi.org/project/protobuf/

@jorenham
Copy link

jorenham commented Dec 4, 2024

And Protobbuf 5.29.0 has indeed been yanked:
https://pypi.org/project/protobuf/5.29.0/

Thanks @ericsalo

@miguelgfierro
Copy link

Thanks for yanking @ericsalo @zhangskz @googleberg
Respect 👏👏👏

@thatch
Copy link
Author

thatch commented Dec 4, 2024

Closing as fixed version is out. Thanks for addressing, protobuf team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests