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

Allow override of Task and Template git_branch #2278

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Omicron7
Copy link

@Omicron7 Omicron7 commented Aug 13, 2024

This adds an API option when running a Task to allow overriding the Git Branch used/cloned during the Task execution. It also add the ability to override the Git Branch used by a Template when created with the API. This is useful for running Tasks using a development, or specific release branch of a repository.

Implements #2277

@fiftin
Copy link
Collaborator

fiftin commented Aug 18, 2024

let's allow null value for this column.

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

@Omicron7
Copy link
Author

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

@fiftin
Copy link
Collaborator

fiftin commented Aug 22, 2024

Hi @Omicron7 thank you!

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

@Omicron7
Copy link
Author

@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
Copy link
Author

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
Copy link
Author

@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 Omicron7 changed the title Allow override of Task git_branch Allow override of Task and Template git_branch Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants