Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Fix repoUrl generating wrong path, following links when it shouldn't #30

Closed
autumnfound opened this issue Dec 9, 2020 · 8 comments
Closed

Comments

@autumnfound
Copy link
Contributor

Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=569607

When generating the repoUrl using the filepath, symlinks are being followed causing bad project URLs to be generated. New solution should be more robust when dealing with symlinks to retain functionality.

@mbarbero
Copy link
Member

IMO, we should not look for the path of the repo on disk. We should just get the current repo name (e.g. ajdt/org.eclipse.ajdt or statet/org.eclipse.statet-commons) as this is what is eventually used to generate the urls of the repo:

I guess you'll have to first update the logic in https://github.com/EclipseFdn/git-eca-rest-api

autumnfound added a commit to autumnfound/gerrit-cla-plugin that referenced this issue Dec 10, 2020
…clipseFdn#30

Replace file path check to use project name key. This will be used along
with the string '.git' to match project definitions.

Signed-off-by: Martin Lowe <martin.lowe@eclipse-foundation.org>
@autumnfound
Copy link
Contributor Author

I've made 2 changes to affect this update, one here(#33) and one at EclipseFdn/git-eca-rest-api#42. These changes together will send statet/org.eclipse.statet-commons, and be able to read this change on the API side. To achieve this, projects will have .git removed from repo URLs for Gerrit repos (if present) to normalize the URLs. This depends on project repos being named in a way that matches the repo URL.

i.e, for ajdt/org.eclipse.ajdt, the expected repoURL is /gitroot/ajdt/org.eclipse.ajdt

autumnfound added a commit that referenced this issue Dec 10, 2020


Replace file path check to use project name key. This will be used along
with the string '.git' to match project definitions.

Signed-off-by: Martin Lowe <martin.lowe@eclipse-foundation.org>
@jonahgraham
Copy link

The recently updated change pushed out yesterday is causing problems - see my email on cross-project. The problem may be down to simrel's special status?

@jonahgraham
Copy link

PS. Not just simrel that is failing for me, the CDT website also is not calling me a committer.

$ git push origin HEAD:refs/for/master
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 8 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 898 bytes | 898.00 KiB/s, done.
Total 7 (delta 5), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (5/5)
remote: Processing changes: refs: 1, done    
remote: commit 1d252fc: ----------
remote: commit 1d252fc: Reviewing commit: 1d252fcc
remote: commit 1d252fc: Authored by: Jonah Graham <jonah@kichwacoders.com>
remote: commit 1d252fc: 
remote: commit 1d252fc: Reviewing commit: 1d252fcce2614b283d8b84e65c7063b5f189b1ce
remote: commit 1d252fc: Authored by: Jonah Graham <jonah@kichwacoders.com>
remote: commit 1d252fc: The author is not a committer on the project.
remote: commit 1d252fc: The author has a current Eclipse Contributor Agreement (ECA) on file.
remote: commit 1d252fc: The author has not signed-off on the contribution.
remote: If there are multiple commits, please ensure that each commit is signed-off.
remote: commit 1d252fc: 
remote: commit 1d252fc: Please see http://wiki.eclipse.org/ECA
To ssh://git.eclipse.org:29418/www.eclipse.org/cdt
 ! [remote rejected] HEAD -> refs/for/master (commit 1d252fc: The contributor must sign-off on the contribution.)
error: failed to push some refs to 'ssh://git.eclipse.org:29418/www.eclipse.org/cdt'

@autumnfound
Copy link
Contributor Author

Committer status is reserved for projects that are tracked as a repo connected to a project. Typically the websites for projects are maintained as a part of the project, but are not directly tied. This is why there is no committer status for the CDT site at least. I talked with @chrisguindon earlier and he had mentioned that SimRel is in a similar boat, and would require sign offs.

@autumnfound
Copy link
Contributor Author

This was fixed a couple of days ago, but wasn't closed, closing now.

@jonahgraham
Copy link

I don't know where I am supposed to make such comments - so as this is now closed I have continued in https://bugs.eclipse.org/bugs/show_bug.cgi?id=569703#c21

@chrisguindon
Copy link
Member

+1 We are using https://bugs.eclipse.org/bugs/show_bug.cgi?id=569703#c21 to capture feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants