prepare-upload fails too silently
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-ubuntu |
Fix Released
|
Undecided
|
Robie Basak |
Bug Description
Feel free to ignore this if we redesign push-for-upload away as part of "prepare-upload", but if not then this is an issue.
If it fails, it doesn't fail obviously enough.
Example - I was in a detached head which it can't use the name thereof.
$ dpkg-buildpackage -S -nc -d $(git ubuntu push-for-upload)
Traceback (most recent call last):
File "/snap/
load_
File "/snap/
sys.
File "/snap/
print(main(
File "/snap/
assert not repo.raw_
AssertionError
dpkg-buildpackage: info: source package postfix
dpkg-buildpackage: info: source version 3.5.6-1ubuntu
The problem is that the .changes are all fine, just missing the entries.
I'd ask that in the error-case we add like "--please --fail --me --as --I --aborted" which then breaks dpkg-buildpackage and helps to not be missed.
TBH I didn't see it in the console as it scrolls out so fast, only that I still control the created .changes file made me look for it.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Athos Ribeiro: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 206 lines (+98/-21)2 files modifiedgitubuntu/prepare_upload.py (+42/-17)
gitubuntu/prepare_upload_test.py (+56/-4)
- Athos Ribeiro (community): Approve
- Server Team CI bot: Approve (continuous-integration)
- git-ubuntu developers: Pending requested
-
Diff: 19208 lines (+18908/-0) (has conflicts)50 files modifieddoc/README.md (+117/-0)
doc/SPECIFICATION (+167/-0)
doc/release-process.md (+264/-0)
gitubuntu/changelog_date_overrides.txt (+19/-0)
gitubuntu/changelog_tests/maintainer_name_inner_space (+8/-0)
gitubuntu/changelog_tests/maintainer_name_leading_space (+8/-0)
gitubuntu/changelog_tests/maintainer_name_trailing_space (+8/-0)
gitubuntu/changelog_tests/test_date_1 (+8/-0)
gitubuntu/changelog_tests/test_date_2 (+8/-0)
gitubuntu/changelog_tests/test_distribution (+8/-0)
gitubuntu/changelog_tests/test_distribution_source_1 (+8/-0)
gitubuntu/changelog_tests/test_distribution_source_2 (+8/-0)
gitubuntu/changelog_tests/test_distribution_source_3 (+8/-0)
gitubuntu/changelog_tests/test_distribution_source_4 (+8/-0)
gitubuntu/changelog_tests/test_maintainer_1 (+8/-0)
gitubuntu/changelog_tests/test_maintainer_2 (+8/-0)
gitubuntu/changelog_tests/test_maintainer_3 (+8/-0)
gitubuntu/changelog_tests/test_versions_1 (+8/-0)
gitubuntu/changelog_tests/test_versions_2 (+14/-0)
gitubuntu/changelog_tests/test_versions_3 (+26/-0)
gitubuntu/clone.py (+178/-0)
gitubuntu/git_repository.py (+3026/-0)
gitubuntu/git_repository_test.py (+1191/-0)
gitubuntu/importer.py (+2703/-0)
gitubuntu/importer_service.py (+916/-0)
gitubuntu/importer_service_broker.py (+178/-0)
gitubuntu/importer_service_poller.py (+239/-0)
gitubuntu/importer_service_poller_test.py (+66/-0)
gitubuntu/importer_service_worker.py (+311/-0)
gitubuntu/importer_test.py (+2288/-0)
gitubuntu/prepare_upload.py (+215/-0)
gitubuntu/prepare_upload_test.py (+268/-0)
gitubuntu/repo_builder.py (+450/-0)
gitubuntu/scriptutils.py (+226/-0)
gitubuntu/source-package-allowlist.txt (+2881/-0)
gitubuntu/source-package-denylist.txt (+56/-0)
gitubuntu/source_builder.py (+344/-0)
gitubuntu/source_information.py (+785/-0)
gitubuntu/source_information_test.py (+503/-0)
gitubuntu/submit.py (+252/-0)
man/man1/git-ubuntu-clone.1 (+68/-0)
man/man1/git-ubuntu-export-orig.1 (+63/-0)
man/man1/git-ubuntu-import.1 (+224/-0)
man/man1/git-ubuntu-merge.1 (+134/-0)
man/man1/git-ubuntu-queue.1 (+96/-0)
man/man1/git-ubuntu-remote.1 (+86/-0)
man/man1/git-ubuntu-submit.1 (+97/-0)
man/man1/git-ubuntu-tag.1 (+88/-0)
man/man1/git-ubuntu.1 (+217/-0)
setup.py (+40/-0)
tags: | added: prepare-upload |
summary: |
- push-for-upload fails too silently + prepare-upload fails too silently |
Changed in usd-importer: | |
assignee: | nobody → Robie Basak (racb) |
status: | New → In Progress |
Changed in git-ubuntu: | |
status: | In Progress → Fix Committed |
This situation appears to also arise when running the command on a branch that needs a force-push (e.g. after applying changes from an MP review). And Robie's proposed solution sounds like it will address this use case as well.
Example output:
merges- jammy+22. 04:~/pkg/ Apache2/ merge-v2. 4.52-1/ apache2- gu$ debuild -S -sa -uc -us $(git ubuntu prepare-upload args) launchpad. net/~bryce/ ubuntu/ +source/ apache2 4.52-1- jammy -> merge-v2. 4.52-1- jammy (non-fast-forward) /~bryce/ ubuntu/ +source/ apache2' merge-v2. 4.52-1- jammy:refs/ heads/merge- v2.4.52- 1-jammy
To ssh://git.
! [rejected] merge-v2.
error: failed to push some refs to 'ssh://<email address hidden>
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
02/04/2022 18:30:35 - ERROR:Command exited 1: git push bryce refs/heads/
02/04/2022 18:30:35 - ERROR:stdout: [Not captured]
02/04/2022 18:30:35 - ERROR:stderr: [Not captured]
Traceback (most recent call last): git-ubuntu/ 773/usr/ bin/git- ubuntu" , line 11, in <module> entry_point( 'gitubuntu= =1.0', 'console_scripts', 'git-ubuntu')() git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ __main_ _.py", line 270, in main exit(args. func(args) ) git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ prepare_ upload. py", line 170, in cli_printargs git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ prepare_ upload. py", line 125, in push git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ git_repository. py", line 1802, in git_run git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ git_repository. py", line 267, in git_run git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ run.py" , line 87, in run git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ run.py" , line 64, in run git-ubuntu/ 773/usr/ lib/python3. 8/subprocess. py", line 516, in run ror(retcode, process.args, CalledProcessEr ror: Command '['git', 'push', 'bryce', 'refs/heads/ merge-v2. 4.52-1- jammy:refs/ heads/merge- v2.4.52- 1-jammy' ]' returned non-zero exit status 1. 2.4.52. orig.tar. gz
File "/snap/
load_
File "/snap/
sys.
File "/snap/
headers = push(
File "/snap/
repo.git_run(
File "/snap/
return git_run(
File "/snap/
return run(['git'] + list(args), env=env, **kwargs)
File "/snap/
raise e
File "/snap/
cp = subprocess.run(
File "/snap/
raise CalledProcessEr
subprocess.
dpkg-buildpackage -us -uc -ui -i -I.bzr -I.svn -I.git -S -sa
dpkg-buildpackage: info: source package apache2
dpkg-buildpackage: info: source version 2.4.52-1ubuntu1
dpkg-buildpackage: info: source distribution jammy
dpkg-buildpackage: info: source changed by Bryce Harrington <email address hidden>
dpkg-source -i -I.bzr -I.svn -I.git --before-build .
fakeroot debian/rules clean
dh clean
dh_clean
dpkg-source -i -I.bzr -I.svn -I.git -b .
dpkg-source: warning: upstream signing key but no upstream tarball signature
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building apache2 using existing ./apache2_
dpkg-source: info: using patch list from debi...