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

MR build not showing up via the API #9459

Open
chaen opened this issue Jul 29, 2022 · 3 comments
Open

MR build not showing up via the API #9459

chaen opened this issue Jul 29, 2022 · 3 comments
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@chaen
Copy link

chaen commented Jul 29, 2022

Details

I wanted to integrate the MR doc build with our private gitlab instance but read somewhere on the doc that this wasn't supported.
So my next idea was to pull the status of the build in order to have its status in our pipeline. However, I noticed that builds triggered for a MR are not listed when using the API, nor can we query their details.

I can see other builds and display their details, so I can exclude a token issue.

I could not find anything in the documentation that would explain that. Sorry if I missed it !

Expected Result

See the MR build (with an external ID) details like any other.

Actual Result

For example, for this specific build:

curl -H "Authorization: Token ${RTD_TOKEN}" https://readthedocs.org/api/v3/projects/mylhcbdirac/builds/17564876/
{"detail":"Not found."}
curl -H "Authorization: Token ${RTD_TOKEN}" "https://readthedocs.org/api/v3/projects/mylhcbdirac/builds/?commit=5c19238f6afd6af185d3f680391cf10efbe5a29d" 
{"count":0,"next":null,"previous":null,"results":[]}

I also noticed that the link of the External version is wrong (https://gitlab.com/None/None/merge_requests/8), but I suspect this is due to the fact that we use a private gitlab instance.

Many thanks !

@stsewd
Copy link
Member

stsewd commented Aug 1, 2022

So, yeah, looks like we are excluding builds and versions that are external (from PR previews)

queryset = Build.internal.all()

queryset = Version.internal.all()

I think it makes sense for the API to return those, if we do so, not sure if this would be a breaking change, since some people may be expecting internal versions only (specially for the versions/ endpoint).

@stsewd stsewd added Improvement Minor improvement to code Needed: design decision A core team decision is required labels Aug 1, 2022
@humitos
Copy link
Member

humitos commented Aug 2, 2022

I think it makes sense for the API to return those, if we do so, not sure if this would be a breaking change, since some people may be expecting internal versions only (specially for the versions/ endpoint).

IMO, It makes sense to return only the non-external versions by default. I'd say that we should add an expansion argument (if we don't have one already) to include the external versions in the response as well. Something like ?expand=externals

@chaen
Copy link
Author

chaen commented Aug 2, 2022

I am happy with a flag :-)

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

No branches or pull requests

3 participants