semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Allow override of Task git_branch

Open Omicron7 opened this issue 1 year ago • 3 comments

This adds an API option when running a Task to allow overriding the Git Branch used/cloned during the Task execution. This is useful for running Tasks using a development, or specific release branch of a repository.

test:be ran successfully. I was unable to run dredd tests, seemed likely due to newer nodejs version.

Implements #2277

Omicron7 avatar Aug 13 '24 17:08 Omicron7

let's allow null value for this column.

Null value more efficient for heavily used columns in large tables.

fiftin avatar Aug 18 '24 21:08 fiftin

@fiftin Updated to remove the not null constraint. I originally just copied the column from the project__repository table.

Omicron7 avatar Aug 19 '24 13:08 Omicron7

Hi @Omicron7 thank you!

I think we should add ability to choose branch in template too. Not just in task. It will be logically.

fiftin avatar Aug 22 '24 07:08 fiftin

@fiftin I've rebased on the latest develop and added the ability to override git_branch on a Project Template using the API. LocalJob will preference git_branch on the Task over the Template if both are set.

I'll need you to implement, or help if you'd like git_branch exposed on the front end for a Template.

Omicron7 avatar Sep 16 '24 19:09 Omicron7

dredd tests are passing locally for me using boltdb. Not sure why they are failing in GitHub Actions.

2024-09-17T15:48:55.213Z - debug: Gracefully terminating the hooks handler process
2024-09-17T15:48:55.213Z - debug: Wrapping up testing and waiting until all reporters are done
complete: 76 passing, 0 failing, 0 errors, 16 skipped, 92 total
complete: Tests took 8509ms

Omicron7 avatar Sep 17 '24 15:09 Omicron7

@fiftin This should be good to go. I realized the git_branch wasn't actually saving to the database, so I fixed that and as well as allowing null.

Omicron7 avatar Sep 18 '24 15:09 Omicron7

@fiftin I've rebased this on the latest develop and fixed the merge conflicts. Would it be possible to get this is the next release?

Omicron7 avatar Oct 07 '24 14:10 Omicron7

I am unsure how to fix the Codacy issues.

Omicron7 avatar Oct 07 '24 14:10 Omicron7

Hi @Omicron7 sorry for delay,

Codacy is not a problem. I reviewing your PR. Thank you.

fiftin avatar Oct 18 '24 09:10 fiftin

Thank you Brian! merged

fiftin avatar Oct 19 '24 15:10 fiftin