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

Use GitLab for syncing upstream->downstream - gitlab_git_changes #71

Merged
merged 7 commits into from
Jun 29, 2023

Conversation

phracek
Copy link
Member

@phracek phracek commented Jan 18, 2023

This pull request allows using gitlab for
syncing upstream->downstream.

The rest of the function remains. Like
git clonedownstream uses dist-git.

This pull request covers 'git pullupstream', 'git show', and 'git push'.
The GitLab functionality is valid only for RHEL and RHCWT especially. CWT itself does not make sense for this.
The question is if 'gitlab.py' should be in CWT or should be moved to RHCWT, like 'bugzilla.py' or 'jira.py'

The calling is like this:

$ cwt -v 5 --config=rhel8.yaml:rhel8.6 --base <base_image> --do-image <image_name> git pullupstream --gitlab
$ cwt -v 5 --config=rhel8.yaml:rhel8.6 --base <base_image> --do-image <image_name> git show --gitlab
$ cwt -v 5 --config=rhel8.yaml:rhel8.6 --base <base_image> --do-image <image_name> git push --gitlab

Signed-off-by: Petr "Stone" Hracek [email protected]

@phracek phracek marked this pull request as draft January 18, 2023 10:17
@phracek phracek marked this pull request as ready for review January 25, 2023 12:45
@phracek phracek changed the title Use GitLab for syncing upstream->downstream. Use GitLab for syncing upstream->downstream #1 Jan 25, 2023
@phracek phracek mentioned this pull request Jan 25, 2023
3 tasks
@phracek phracek changed the title Use GitLab for syncing upstream->downstream #1 Use GitLab for syncing upstream->downstream - gitlab_git_changes Jan 25, 2023
@phracek phracek requested a review from pkubatrh January 26, 2023 09:09
@phracek
Copy link
Member Author

phracek commented Jan 26, 2023

/test

@phracek phracek force-pushed the support_gitlab branch 2 times, most recently from 2963e06 to f74b7e9 Compare January 26, 2023 12:25
@phracek
Copy link
Member Author

phracek commented Jan 26, 2023

/test

@pkubatrh pkubatrh self-assigned this Feb 7, 2023
@pkubatrh
Copy link
Member

pkubatrh commented Feb 7, 2023

Before I get into the details I have a suggestion - how about making the gitlab module an extension of the distgit module and only modifying what is necessary to change? I expect a lot of the functionality would stay the same (just with different server and APIs) or could be changed to be more configurable.

@phracek
Copy link
Member Author

phracek commented Feb 14, 2023

Before I get into the details I have a suggestion - how about making the gitlab module an extension of the distgit module and only modifying what is necessary to change? I expect a lot of the functionality would stay the same (just with different server and APIs) or could be changed to be more configurable.

Thanks for this comment.

I think more functions like _get_from, _set_from, update_dockerfile, etc. can go into the alone class.
Function like '_pull_upstream' can be moved into a separate class, even with static function as well.
This can be done as a separate pull request, so it is not complicated for review.

We can make GitLab module on the top of distgit module, but I would prefer to use dist-git module only for cloning downstream (dist-git), building, and GitLab module for operation with upstream -> downstream.

@phracek phracek force-pushed the support_gitlab branch 2 times, most recently from d221fd2 to 3d967ce Compare March 21, 2023 08:24
@phracek
Copy link
Member Author

phracek commented Mar 21, 2023

@pkubatrh Feel free to review it a bit.

@phracek
Copy link
Member Author

phracek commented Jun 7, 2023

The pull request can be reviewed. I would be glad for you feedback.
@pkubatrh @frenzymadness

/test

Copy link
Member

@frenzymadness frenzymadness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a first quick scan. I won't have time for that sooner than after devconf.

container_workflow_tool/distgit.py Outdated Show resolved Hide resolved
container_workflow_tool/gitlab.py Outdated Show resolved Hide resolved
This pull request allows using gitlab for
syncing upstream->downstream.

The rest of function remains. Like
git clonedownstream uses dist-git

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Jun 14, 2023

gitlab.py was moved to internal repository. There are some integrations like Slack, that are private.

/test

Copy link
Member

@frenzymadness frenzymadness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next round of review. I'm not a user of this tool so I might miss the big picture but I spot some potential improvements.

container_workflow_tool/distgit.py Show resolved Hide resolved
container_workflow_tool/git_operations.py Outdated Show resolved Hide resolved
container_workflow_tool/git_operations.py Outdated Show resolved Hide resolved
container_workflow_tool/main.py Outdated Show resolved Hide resolved
container_workflow_tool/main.py Outdated Show resolved Hide resolved
container_workflow_tool/main.py Outdated Show resolved Hide resolved
container_workflow_tool/utility.py Outdated Show resolved Hide resolved
container_workflow_tool/utility.py Outdated Show resolved Hide resolved
phracek and others added 3 commits June 21, 2023 08:44
Co-authored-by: Lumír 'Frenzy' Balhar <[email protected]>
Signed-off-by: Petr "Stone" Hracek <[email protected]>
Signed-off-by: Petr "Stone" Hracek <[email protected]>
There are no-compatible changes

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Jun 21, 2023

/test

@phracek
Copy link
Member Author

phracek commented Jun 26, 2023

/test

@phracek
Copy link
Member Author

phracek commented Jun 27, 2023

@pkubatrh @frenzymadness Hi folks, I have addressed all issues, If you have nothing against merging, I would like to merge it, so I can work on RHCWT.

Copy link
Member

@frenzymadness frenzymadness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good to go.

@phracek phracek merged commit 302971e into master Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants