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

delete membership=0 in getProjectsByName #20153

Merged
merged 6 commits into from
Apr 5, 2024
Merged

Conversation

prima101112
Copy link
Contributor

@prima101112 prima101112 commented Mar 22, 2024

delete membership=0 in getProjectsByName but lets getProjects still using membership=1 for reserve if getProjectsByName not found any

Comprehensive Summary of your change

Issue being fixed

Fixes #20056

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

…sing membership=1 for reserve if getProjectsByName not found any

Signed-off-by: prima <prima101112@gmail.com>
@MinerYang MinerYang added the replication/adapters related to replication adapters label Mar 22, 2024
Copy link
Contributor

@stonezdj stonezdj left a comment

Choose a reason for hiding this comment

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

LGTM

@stonezdj
Copy link
Contributor

@prima101112 could you please give us the document link for it?

@chlins
Copy link
Member

chlins commented Mar 25, 2024

@lxShaDoWxl Kindly review this, thank you!

@prima101112
Copy link
Contributor Author

@prima101112 could you please give us the document link for it?

whats document, is this whay you mean https://docs.gitlab.com/ee/api/projects.html
from the issue just state that when using public gitlab it should not require the member of the project

please assist me if its missing something or need to be fixed

@lxShaDoWxl
Copy link
Contributor

you can also remove the "membership" here, only the search becomes more extensive. The disadvantage is only in performance

@prima101112
Copy link
Contributor Author

you can also remove the "membership" here, only the search becomes more extensive. The disadvantage is only in performance

I think yes we can remove the "membership" but adjusting the fallback mechanism is risky. Currently, if the repository is not found, the search extends to the entire GitLab instance. However, it would be more efficient to limit the search to projects where the user is a member. This way, the search would only include projects that the user has access to. so i will leave it like that. please advice

@prima101112
Copy link
Contributor Author

@lxShaDoWxl could we get approval for this

@Vad1mo Vad1mo enabled auto-merge (squash) April 5, 2024 14:52
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.35%. Comparing base (b7b8847) to head (a28da8b).
Report is 112 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #20153       +/-   ##
===========================================
- Coverage   67.56%   45.35%   -22.22%     
===========================================
  Files         991      244      -747     
  Lines      109181    13345    -95836     
  Branches     2719     2724        +5     
===========================================
- Hits        73768     6052    -67716     
+ Misses      31449     6991    -24458     
+ Partials     3964      302     -3662     
Flag Coverage Δ
unittests 45.35% <ø> (-22.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1235 files with indirect coverage changes

@Vad1mo Vad1mo merged commit 7b8a322 into goharbor:main Apr 5, 2024
10 of 12 checks passed
wy65701436 pushed a commit to wy65701436/harbor that referenced this pull request Apr 9, 2024
delete membership=0 in getProjectsByName but lets getProjects still using membership=1 for reserve if getProjectsByName not found any

Signed-off-by: prima <prima101112@gmail.com>
wy65701436 pushed a commit to wy65701436/harbor that referenced this pull request Apr 9, 2024
delete membership=0 in getProjectsByName but lets getProjects still using membership=1 for reserve if getProjectsByName not found any

Signed-off-by: prima <prima101112@gmail.com>
Signed-off-by: wang yan <wangyan@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
replication/adapters related to replication adapters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pull Replication from GitLab does not work if not member of source group
9 participants