Skip to content

Unable to build latest version from a tag #10735

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

Closed
davfsa opened this issue Sep 13, 2023 · 3 comments · Fixed by #10738
Closed

Unable to build latest version from a tag #10735

davfsa opened this issue Sep 13, 2023 · 3 comments · Fixed by #10738
Labels
Needed: design decision A core team decision is required

Comments

@davfsa
Copy link

davfsa commented Sep 13, 2023

Details

Expected Result

Documentation is properly built, as it used to be the case.

I unfortunately haven't made a release in months, so I only noticed this recently. I could not find any git commits that could be linked to this apart from maybe this code, but this definitely used to work

Actual Result

Unable to build latest from a tag, as it fails at checkout

@stsewd
Copy link
Member

stsewd commented Sep 13, 2023

ha! Looks like we always expect latest to be a branch (even the option is called "Default branch"), but we aren't enforcing it

versions_choices = self.instance.versions(manager=INTERNAL).filter(
machine=False).values_list('verbose_name', flat=True)
self.fields['default_branch'].widget = forms.Select(
choices=[default_choice] + list(
zip(versions_choices, versions_choices)
),
)

We are given users the option to select a tag!

This was working previously because we were treating tags and branches kind of the same, but we aren't doing that anymore.

Not sure about the fix here, probably more users were relying on us allowing latest to be a tag...

@stsewd stsewd added the Needed: design decision A core team decision is required label Sep 13, 2023
@stsewd
Copy link
Member

stsewd commented Sep 14, 2023

I'll check tomorrow if this can be fixed, so our code accepts both, tags and branches as latest.

stsewd added a commit that referenced this issue Sep 14, 2023
We were kind of always expecting latest (machine created)
to be a branch (the field is even named `default_branch`!).

But we were allowing both branches and tags to be the default
version (latest).

https://github.com/readthedocs/readthedocs.org/blob/53e21bb3ee8a5fce0194eb5481fd81ac87d3d1fa/readthedocs/projects/forms.py#L272-L279

Closes #10735
stsewd added a commit that referenced this issue Sep 19, 2023
* Versions: allow latest to be a tag

We were kind of always expecting latest (machine created)
to be a branch (the field is even named `default_branch`!).

But we were allowing both branches and tags to be the default
version (latest).

https://github.com/readthedocs/readthedocs.org/blob/53e21bb3ee8a5fce0194eb5481fd81ac87d3d1fa/readthedocs/projects/forms.py#L272-L279

Closes #10735

* Update docstring

* Create methods

* Fix docstring
@stsewd
Copy link
Member

stsewd commented Sep 26, 2023

The fix was released today, latest can now point to a tag again.

https://readthedocs.org/projects/hikari-py/builds/22038735/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants