Skip to content

feat: add remote import s3 - #2357

Merged
nejch merged 2 commits into
python-gitlab:mainfrom
abhishekmsingh:main
Nov 2, 2022
Merged

feat: add remote import s3#2357
nejch merged 2 commits into
python-gitlab:mainfrom
abhishekmsingh:main

Conversation

@abhishekmsingh

Copy link
Copy Markdown
Contributor

Closes #2356

@abhishekmsingh

abhishekmsingh commented Nov 1, 2022

Copy link
Copy Markdown
Contributor Author

@max-wittig @nejch can you review this PR please? Pretty similar to #2348
There is again a bit of replicated code from import_project function. Can't find a way to refactor it because it is quite small and creating any common entity just feals like overkill. Let me know if anyone has a way to go over it, else I think this much replication might be tolerable.

@nejch nejch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great @abhiandthetruth thanks for the quick work again. Just a few quick notes :)

There is again a bit of replicated code from import_project function. Can't find a way to refactor it because it is quite small and creating any common entity just feals like overkill. Let me know if anyone has a way to go over it, else I think this much replication might be tolerable.

I agree, no need yet. We have plenty of other custom methods where this is an issue as well.

I think it would need a lot of rework but another decorator with required/optional payload attributes might make these methods more declarative instead of parsing args inside every method. Something like #1999 if we revive that at some point.

Comment thread gitlab/v4/objects/projects.py
Comment thread gitlab/v4/objects/projects.py Outdated
Comment thread tests/unit/objects/test_project_import_export.py
Comment thread tests/functional/api/test_import_export.py
@abhishekmsingh

Copy link
Copy Markdown
Contributor Author

@nejch implemented the suggested changes.

Comment thread tests/functional/api/test_import_export.py

@nejch nejch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot for this @abhiandthetruth, as you seem keen on contributing more later I added a small non-blocking note for a potential follow-up :) LGTM!

@nejch
nejch merged commit 892281e into python-gitlab:main Nov 2, 2022
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.

Add support from remote project import from S3

2 participants