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

Build: incompatible Mercurial versions from VCS setup than build commands #8995

Closed
ahal opened this issue Mar 3, 2022 · 17 comments · Fixed by #9042 or #9055
Closed

Build: incompatible Mercurial versions from VCS setup than build commands #8995

ahal opened this issue Mar 3, 2022 · 17 comments · Fixed by #9042 or #9055
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@ahal
Copy link

ahal commented Mar 3, 2022

Details

Expected Result

The builds should succeed :)

Actual Result

Builds fail as seen here. I don't believe anything changed on the repo side, this was working a week or two ago.

hg identify --id
abort: repository requires features unknown to this Mercurial: sparserevlog!
(see https://mercurial-scm.org/wiki/MissingRequirement for more information) 
@ahal ahal changed the title Builds failure: abort: repository requires features unknown to this Mercurial: sparserevlog! Build failure: abort: repository requires features unknown to this Mercurial: sparserevlog! Mar 3, 2022
@marmoute
Copy link

marmoute commented Mar 4, 2022

I only skimmed through the logs, but this is weird. It looks like the hg id call is suddently too old to be able to read the repository that just got cloned by that same hg.

So, might this is no longer the same hg and some of the virtualenv play in between downgraded it somehow ?

@ahal
Copy link
Author

ahal commented Mar 4, 2022

I don't have any insight into reathedocs infrastructure, though a co-worker pointed out a somewhat suspicious commit to Mercurial which would have been released a couple weeks before this started failing. But yeah, it's weird that the earlier hg commands aren't failing.

Edit: Apparently marmoute ruled out this commit in conversation with said co-worker. I'll leave this comment up just in case.

@marmoute
Copy link

marmoute commented Mar 4, 2022

The "suspicious commit" (and the related work in this area) only affects the "streaming clone" feature. Streaming clone does not seems to be involved in this build at all. So I would be surprised if these changes play any part in the current failures.

@mattip
Copy link

mattip commented Mar 5, 2022

We are seeing this on the PyPy doc builds as well. Is there a way to find all the projects that are using mercurial to find one that is succeeding?

@mattip
Copy link

mattip commented Mar 5, 2022

According to #8840 there are ~46 repos using mercurial. Are all their builds failing?

@humitos
Copy link
Member

humitos commented Mar 5, 2022

@ahal can you try using a Read the Docs config file with build.os (https://docs.readthedocs.io/en/stable/config-file/v2.html#build-os) declared as Ubuntu 20.04?

@humitos humitos added Accepted Accepted issue on our roadmap Bug A bug labels Mar 7, 2022
@humitos
Copy link
Member

humitos commented Mar 7, 2022

I guess the problem here is that we are using a newer version in the hg clone and then an old version for the second hg identify command. I think this issue was introduced in #8930 when we started using the ubuntu-20.04 for the VCS steps.

I think you will be able to fix this problem by using Ubuntu 20.04 in your config file as I suggested in my previous comment.

It would be good to find a way to tell Mercurial to clone the repository to make it compatible with older versions.

@humitos humitos changed the title Build failure: abort: repository requires features unknown to this Mercurial: sparserevlog! Build: incompatible Mercurial versions from VCS setup than build commands Mar 7, 2022
@marmoute
Copy link

marmoute commented Mar 7, 2022

You can use --config format.sparse-revlog=no when cloning (or update the config of the thing doing the clone).
This problem will arise in the future as we turn format variant on by default overtime. Maybe Mercurial need some generic flag to request clone compatible with version X

@ahal
Copy link
Author

ahal commented Mar 8, 2022

@ahal can you try using a Read the Docs config file with build.os (https://docs.readthedocs.io/en/stable/config-file/v2.html#build-os) declared as Ubuntu 20.04?

Thanks, this works around the issue for me.

humitos added a commit that referenced this issue Mar 28, 2022
We are using Ubuntu 20.04 LTS to perform the clone
step (`readthedocs/build:ubuntu-20.04`) which comes with Mercurial v5.3.1 and
install by default the `sparse-revlog` requirement.

However, if the build is using `readthedocs/build:latest`, which comes with
Mercurial v4.5.3 and does not contain that requirement it fails:

```
hg identify --id
abort: repository requires features unknown to this Mercurial: sparserevlog!
(see https://mercurial-scm.org/wiki/MissingRequirement for more information)
```

This commit disables that requirements to make the clone compatible with the
older version of Mercurial.

Closes #8995
humitos added a commit that referenced this issue Mar 29, 2022
We are using Ubuntu 20.04 LTS to perform the clone
step (`readthedocs/build:ubuntu-20.04`) which comes with Mercurial v5.3.1 and
install by default the `sparse-revlog` requirement.

However, if the build is using `readthedocs/build:latest`, which comes with
Mercurial v4.5.3 and does not contain that requirement it fails:

```
hg identify --id
abort: repository requires features unknown to this Mercurial: sparserevlog!
(see https://mercurial-scm.org/wiki/MissingRequirement for more information)
```

This commit disables that requirements to make the clone compatible with the
older version of Mercurial.

Closes #8995
@mattip
Copy link

mattip commented Mar 30, 2022

Something is wrong. I cannot build the PyPy docs https://readthedocs.org/projects/pypy/builds/ for the last day: the build fails to get hg id.

@humitos
Copy link
Member

humitos commented Mar 30, 2022

@mattip for some reason hg tags is returning Command exited abnormally. I was able to reproduce this error locally when building your project with my Read the Docs development instance, but I don't understand why it's happening yet. However, I'm not able to reproduce this by running the commands manually.

@mattip
Copy link

mattip commented Mar 30, 2022

Thanks for looking.

@marmoute
Copy link

Do you have any error or traceback? We could look at ?

@mattip
Copy link

mattip commented Mar 30, 2022

@marmoute if you mean me, I only have the information in the build log https://readthedocs.org/projects/pypy/builds/16514248/

@humitos
Copy link
Member

humitos commented Mar 30, 2022

I've already found the issue and opened a PR to fix it at #9055 --It's a Read the Docs' bug, not related with Mercurial itself.

@ericholscher
Copy link
Member

This is now deployed. Please let me know if this solves the issue.

@ericholscher
Copy link
Member

Looks like pypy is working properly: https://readthedocs.org/projects/pypy/builds/16518308/

ahal added a commit to taskcluster/taskgraph that referenced this issue Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
5 participants