Project

General

Profile

Feature #21061

Update the build/add_module_version API

Added by Vito Di Benedetto 7 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
10/08/2018
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:
Experiment:
-
Stakeholders:
Duration:

Description

The build/add_module_version API is used to provide a link to the user repository revision.
This API uses the attributes:
module
repourl
gitrevision
gitdescription

In the current implementation it looks like the link provided in the checkout dashboard is built from
repourl
by appending "?rev="
This works well for redmine repositories, but not for other repositories like GitHub.

In the API update I propose to use 'repourl' as it is, the CI scripts will take care to provide the complete URL.

We can have this tested for GenieCI instance as they are using GitHub for their repositories.

History

#1 Updated by Vladimir Podstavkov 7 months ago

  • Status changed from Assigned to Work in progress
  • Estimated time set to 4.00 h

#2 Updated by Vito Di Benedetto 5 months ago

  • Target version changed from v2_0_0_RC to v1_8_0_RC

#3 Updated by Vladimir Podstavkov 3 months ago

  • Status changed from Work in progress to Under Discussion
  • Tracker changed from Task to Feature
  • Experiment - added

Hey Vito,

It is not quite clear how to adapt this proposed model. Before, the module registered with the name and the repo URL in one table and then the module version registered in another table referring to the first one. This actually happened in one call to 'add_module_version' function. The link for the concrete module version was generated using the module URL and the version number combining them with '...?rev=....' parameter.
From your description it looks like we need to merge those two tables in one storing the whole URL for the module version every time you send it. Then we would use the full URL to generate the link to the repo no matter if this is Redmine or Github.

Does it sound right?

#4 Updated by Vito Di Benedetto 3 months ago

Hi Vladimir,
I missed some details in this ticket description.

I think we can keep using the two tables, one with the repo URL and the other one with the module version as it is now.
I'll provide the repo URL and the module version as separate attributes as I'm doing now.
The difference will be that when the web app code combines those two information, it should not combine them using "?rev=".
For redmine repositories the "?rev=" part will be provided as part of the repo URL.

Do you think this can work?

#5 Updated by Vladimir Podstavkov 3 months ago

Oh! I see... I didn't look at it from this perspective! Sure, this will work and it will require the minimal changes in the code. And how it will look like for GitHub? Should I just join two parts together to build the full URL for the version?

Thank you Vito!

#6 Updated by Vito Di Benedetto 3 months ago

Vladimir Podstavkov wrote:

Oh! I see... I didn't look at it from this perspective! Sure, this will work and it will require the minimal changes in the code. And how it will look like for GitHub? Should I just join two parts together to build the full URL for the version?

Vladimir, that's correct for GitHub.

#7 Updated by Vladimir Podstavkov 3 months ago

  • % Done changed from 0 to 90
  • Status changed from Under Discussion to Work in progress

#8 Updated by Vladimir Podstavkov 3 months ago

  • % Done changed from 90 to 100
  • Status changed from Work in progress to Resolved

#9 Updated by Vito Di Benedetto 3 months ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF