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

Gracefully handle lack of CLA for Gerrit user #22

Open
ModeSevenIndustrialSolutions opened this issue Oct 21, 2024 · 1 comment
Open

Comments

@ModeSevenIndustrialSolutions
Copy link
Contributor

ModeSevenIndustrialSolutions commented Oct 21, 2024

Hmmmm, this is perhaps expected with our Gerrit setup:

2024-10-21 15:33:29.899501 Running: git config --get gitreview.username
2024-10-21 15:33:29.900999 ... gitreview.username = onap.gh2gerrit
No remote set, testing ssh://onap.gh2gerrit@gerrit.onap.org:29418/portal-ng/bff
2024-10-21 15:33:29.901009 Running: git push --dry-run ssh://onap.gh2gerrit@gerrit.onap.org:29418/portal-ng/bff --all
ssh://onap.gh2gerrit@gerrit.onap.org:29418/portal-ng/bff did not work. Description: fatal: No Contributor Agreement on file for user ONAP github2gerrit <releng+onap.gh2gerrit@linuxfoundation.org> (id=8473)https://gerrit.onap.org/r/settings#Agreements
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Could not connect to gerrit.
Enter your gerrit username: We don't know where your gerrit is. Please manually create a remote
named 'gerrit' and try again.
    _main()
  File "/opt/hostedtoolcache/Python/3.11.10/x[64](https://github.com/onap/portal-ng-bff/actions/runs/11443571090/job/31836520780#step:13:65)/lib/python3.11/site-packages/git_review/cmd.py", line 1722, in _main
    check_remote(branch, remote, config['scheme'],
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/git_review/cmd.py", line 891, in check_remote
    add_remote(scheme, hostname, port, project, remote, usepushurl)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/git_review/cmd.py", line 472, in add_remote
    username = input("Enter your gerrit username: ")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
EOFError: EOF when reading a line

However, it doesn't look like we're handling the error gracefully.
We should probably put a fix in place.

This was captured from the workflow run here

@ModeSevenIndustrialSolutions
Copy link
Contributor Author

May not be necessary with the correct group settings... checking...

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

No branches or pull requests

1 participant