ACCESS-NRI / build-cd

Deployment configurations and workflows
1 stars 0 forks source link

Add explicit fields in the table for the GitHub url for the model components #112

Closed CodeGat closed 2 months ago

CodeGat commented 3 months ago

Currently, the frontend of the build provenance DB attempts to create the url of the version of the model components.

That doesn't work for model components that don't have a package name equal to the repository name (eg. um7 and um_v7).

Add in a field for the model component for the url. Update the json parsing logic required. @CodeGat to update the workflow to get the url via spack find to turn into JSON.

utkarshgupta95 commented 3 months ago

Should I generate the url for all the existing components using the same method as in frontend. Using component name and version?

CodeGat commented 3 months ago

We can't use the component name because that is actually the package name. For example, using the package name um7 to construct the URL would fail because the repository name is um_v7.

utkarshgupta95 commented 3 months ago

Does that issue arise in any of the existing components? If so, I can manually change the url for that specific component

aidanheerdegen commented 3 months ago

The initial problem was the ACCESS-ESM1.5 model, which we deleted so now I can't see it in the DB table view.

@utkarshgupta95 can you link to the code where the URL inference is done, for both the model and model components? That will help to see what the current situation is, where the information comes from and we can discuss how it needs to change. Thanks.

utkarshgupta95 commented 3 months ago

@aidanheerdegen For model we are using the release_url present in model table. For component the code is: https://github.com/ACCESS-NRI/experiment-metadb/blob/e72aa232d5547329944af33428e31d1385c257ae/frontend/src/app/release-provenance/page.js#L37

Basically its appending component name to https://github.com/ACCESS-NRI followed by /release/tags and then appending version

I was thinking that since this approach works for most of the component, I will use it to generate release_url for the existing components (for the new release_url column in component_build table) and manually enter the values in the DB table where this approach won't work.

aidanheerdegen commented 3 months ago

For model we are using the release_url present in model table

RIght. So it isn't a problem for ACCESS-ESM1.5 that the repo is ACCESS-ESM1.5 but the spack_package is access-esm1p5 because this is a model and that uses the release_url.

I was thinking that since this approach works for most of the component, I will use it to generate release_url for the existing components (for the new release_url column in component_build table) and manually enter the values in the DB table where this approach won't work.

Sounds reasonable.

utkarshgupta95 commented 3 months ago

I have updated the frontend to get url from release_url. Pls let me know if you need release url changed for any of the component