tektoncd / results

Long term storage of execution results.
Apache License 2.0
77 stars 73 forks source link

Add a Converter Job which converts v1beta1 run in db to v1 run #768

Closed khrm closed 4 weeks ago

khrm commented 2 months ago

This ensures that only v1 records are existing in the db instead of a mix of v1beta1 and v1

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

Release Notes

Converter to convert older records from v1beta1 Tekton object to v1 Tekton object. This is controlled by the following fields in API:
 CONVERTER_ENABLE: Whether to start converter or v1beta1 TaskRun/PipelineRun records to v1                                                                                                                                                                                               
CONVERTER_DB_LIMIT:     How many records to convert at a time in a transaction                                                                                                     |
tekton-robot commented 2 months ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/converter/main.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
khrm commented 2 months ago

I have removed the cronjob and added a flag to the API server to enable converter. https://github.com/tektoncd/results/compare/e70451083446c26c8eb0a8e98b1dda5310b126ae..2f931e13096492c7b4755c22875a6400b0239492

khrm commented 2 months ago

/test pull-tekton-results-build-tests

khrm commented 2 months ago

Strange. There's something weird going on. Somehow it's showing changes from main branch also.

tekton-robot commented 2 months ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/api/main.go 9.3% 9.0% -0.3
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/apis/v1alpha3/types.go 100.0% 0.0% -100.0
pkg/apis/v1alpha3/types.go Do not exist 100.0%
pkg/apis/v1alpha3/types.go Do not exist 0.0%
pkg/apis/v1alpha3/types.go Do not exist 100.0%
pkg/apis/v1alpha3/types.go Do not exist 0.0%
pkg/apis/v1alpha3/types.go Do not exist 100.0%
pkg/apis/v1alpha3/types.go Do not exist 0.0%
pkg/apis/v1alpha3/types.go Do not exist 100.0%
pkg/apis/v1alpha3/types.go Do not exist 0.0%
pkg/apis/v1alpha3/types.go Do not exist 100.0%
pkg/apis/v1alpha3/types.go Do not exist 0.0%
pkg/apis/v1alpha3/types.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
tekton-robot commented 2 months ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/api/main.go 9.3% 9.0% -0.3
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
khrm commented 2 months ago

/test pull-tekton-results-build-tests

tekton-robot commented 2 months ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/api/main.go 9.3% 9.0% -0.3
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
khrm commented 2 months ago

/test pull-tekton-results-build-tests

tekton-robot commented 2 months ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/api/main.go 9.3% 9.0% -0.3
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
khrm commented 2 months ago

@avinal Please look into this.

/cc @enarha @vdemeester

tekton-robot commented 2 months ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/api/main.go 9.3% 9.0% -0.3
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
khrm commented 1 month ago

/test pull-tekton-results-build-tests

khrm commented 1 month ago

/test pull-tekton-results-build-tests

tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/api/main.go 9.3% 9.0% -0.3
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
khrm commented 1 month ago

/test pull-tekton-results-build-tests

khrm commented 1 month ago

@vdemeester @enarha Can you please look into this PR?

tekton-robot commented 1 month ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/api/main.go 9.3% 9.0% -0.3
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
khrm commented 1 month ago

@enarha LGTM got removed due to rebase and error fix. Please review again.

tekton-robot commented 4 weeks ago

The following is the coverage report on the affected files. Say /test pull-tekton-results-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
cmd/api/main.go 9.3% 9.0% -0.3
pkg/api/server/config/config.go Do not exist 0.0%
pkg/api/server/config/config.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
pkg/converter/convert.go Do not exist 0.0%
enarha commented 4 weeks ago

/lgtm

enarha commented 4 weeks ago

/approve

tekton-robot commented 4 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enarha

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tektoncd/results/blob/main/OWNERS)~~ [enarha] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment