Merge ~racb/git-ubuntu:prepare-upload-adjustments into git-ubuntu:master

Proposed by Robie Basak
Status: Superseded
Proposed branch: ~racb/git-ubuntu:prepare-upload-adjustments
Merge into: git-ubuntu:master
Diff against target: 19208 lines (+18908/-0) (has conflicts)
50 files modified
doc/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)
Conflict in doc/README.md
Conflict in doc/SPECIFICATION
Conflict in doc/release-process.md
Conflict in gitubuntu/changelog_date_overrides.txt
Conflict in gitubuntu/changelog_tests/maintainer_name_inner_space
Conflict in gitubuntu/changelog_tests/maintainer_name_leading_space
Conflict in gitubuntu/changelog_tests/maintainer_name_trailing_space
Conflict in gitubuntu/changelog_tests/test_date_1
Conflict in gitubuntu/changelog_tests/test_date_2
Conflict in gitubuntu/changelog_tests/test_distribution
Conflict in gitubuntu/changelog_tests/test_distribution_source_1
Conflict in gitubuntu/changelog_tests/test_distribution_source_2
Conflict in gitubuntu/changelog_tests/test_distribution_source_3
Conflict in gitubuntu/changelog_tests/test_distribution_source_4
Conflict in gitubuntu/changelog_tests/test_maintainer_1
Conflict in gitubuntu/changelog_tests/test_maintainer_2
Conflict in gitubuntu/changelog_tests/test_maintainer_3
Conflict in gitubuntu/changelog_tests/test_versions_1
Conflict in gitubuntu/changelog_tests/test_versions_2
Conflict in gitubuntu/changelog_tests/test_versions_3
Conflict in gitubuntu/clone.py
Conflict in gitubuntu/git_repository.py
Conflict in gitubuntu/git_repository_test.py
Conflict in gitubuntu/importer.py
Conflict in gitubuntu/importer_service.py
Conflict in gitubuntu/importer_service_broker.py
Conflict in gitubuntu/importer_service_poller.py
Conflict in gitubuntu/importer_service_poller_test.py
Conflict in gitubuntu/importer_service_worker.py
Conflict in gitubuntu/importer_test.py
Conflict in gitubuntu/prepare_upload.py
Conflict in gitubuntu/prepare_upload_test.py
Conflict in gitubuntu/repo_builder.py
Conflict in gitubuntu/scriptutils.py
Conflict in gitubuntu/source-package-allowlist.txt
Conflict in gitubuntu/source-package-blacklist.txt
Conflict in gitubuntu/source-package-denylist.txt
Conflict in gitubuntu/source-package-whitelist.txt
Conflict in gitubuntu/source_builder.py
Conflict in gitubuntu/source_information.py
Conflict in gitubuntu/source_information_test.py
Conflict in gitubuntu/submit.py
Conflict in man/man1/git-ubuntu-clone.1
Conflict in man/man1/git-ubuntu-export-orig.1
Conflict in man/man1/git-ubuntu-import.1
Conflict in man/man1/git-ubuntu-merge.1
Conflict in man/man1/git-ubuntu-queue.1
Conflict in man/man1/git-ubuntu-remote.1
Conflict in man/man1/git-ubuntu-submit.1
Conflict in man/man1/git-ubuntu-tag.1
Conflict in man/man1/git-ubuntu.1
Conflict in setup.py
Reviewer Review Type Date Requested Status
Athos Ribeiro (community) Approve
Server Team CI bot continuous-integration Approve
git-ubuntu developers Pending
Review via email: mp+413881@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2023-05-25.

Commit message

Make Jenkins happy

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:7f25e4872b2d134925d3c6768be7ece34e24f112
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/63/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    SUCCESS: VM Reset
    SUCCESS: Unit Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/63//rebuild

review: Approve (continuous-integration)
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

LGTM!

At first I wondered if it would be a good idea to verify the contents of the "headers" dict in "cli_printargs", but then I realized it is already being done in "push" (even though that is being done through calls to "assert" and therefore we do rely on __debug__ being set to True).

review: Approve
Revision history for this message
Robie Basak (racb) wrote :

> At first I wondered if it would be a good idea to verify the contents of the "headers" dict in "cli_printargs", but then I realized it is already being done in "push"

Right - it's more tedious to test from something closer to the CLI interface, so I tend to test the inner bits more directly.

> (even though that is being done through calls to "assert" and therefore we do rely on __debug__ being set to True).

I'm not sure we're on the same page here. What I mean above is that I'm testing the contents of the "headers" dict in prepare_upload_test.py using tests that test the behaviour of the prepare_upload.py::push(). assert statements from there are the usual pattern for pytest-based test suites and test suites are expected to always run with asserts enabled.

There are separate assert statements in the code itself in prepare_upload.py::push(), but these are there to state (and runtime verify when asserts are enabled) invariants that would help fail earlier and more helpfully if there is a bug somewhere. But I intend to test every actual case from the test suite in prepare_upload_test.py. If there's something you spotted that you think isn't being tested from there, I'd like to add it!

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

> I'm not sure we're on the same page here. What I mean above is that I'm testing the contents of the "headers" dict in prepare_upload_test.py using tests that test the behaviour of the prepare_upload.py::push(). assert statements from there are the usual pattern for pytest-based test suites and test suites are expected to always run with asserts enabled.

I was referring to the assert calls in `gitubuntu/prepare_upload.py`, as you mentioned later in your reply. I was just wondering why they are not explicitly raising exceptions instead. The comments in that file do justify them though:

> # However, we don't know of any actual case when this might happen, so
  # these are assertions rather than fully UX-compliant error paths.

> If there's something you spotted that you think isn't being tested from there, I'd like to add it!

The only thing that came to mind was the regular expression to parse the git URL. Although it is based on the one present in `https://git.launchpad.net/launchpad/tree/lib/lp/app/validators/name.py`, it is slightly different since it allows the username to start with one of the allowed special characters. Parametrizing that test to include other valid username examples could prevent mistakes in future changes to that regex. However, this looks simple enough and perhaps the effort is just not worth here.

This LGTM :)

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches