Re: [Launchpad-reviewers] [Merge] ~cjwatson/launchpad:db-private-distributions into launchpad:db-devel
Review: Approve db (Contention is impossible in cold patches, since all other DB connections are terminated beforehand. The issue with cold patches is just plain speed, which is indeed fine here. But it has to be a cold patch since most forms of `ALTER TABLE` take an `ACCESS EXCLUSIVE` lock on the involved table, which blocks even reads.) Diff comments: > diff --git a/database/schema/patch-2210-41-0.sql > b/database/schema/patch-2210-41-0.sql > new file mode 100644 > index 000..d0d84a5 > --- /dev/null > +++ b/database/schema/patch-2210-41-0.sql > @@ -0,0 +1,34 @@ > +-- Copyright 2022 Canonical Ltd. This software is licensed under the > +-- GNU Affero General Public License version 3 (see the file LICENSE). > + > +SET client_min_messages=ERROR; > + > +ALTER TABLE Distribution > +ADD COLUMN branch_sharing_policy integer DEFAULT 1 NOT NULL, > +ADD COLUMN bug_sharing_policy integer DEFAULT 1 NOT NULL, > +ADD COLUMN specification_sharing_policy integer DEFAULT 1 NOT NULL, > +ADD COLUMN information_type integer DEFAULT 1 NOT NULL, > +ADD COLUMN access_policies integer[], > +ADD CONSTRAINT distribution__valid_information_type CHECK ( > +information_type = ANY(ARRAY[1, 5, 6])); > + > +COMMENT ON COLUMN Distribution.branch_sharing_policy IS 'Sharing policy for > this distribution''s branches.'; > +COMMENT ON COLUMN Distribution.bug_sharing_policy IS 'Sharing policy for > this distribution''s bugs.'; > +COMMENT ON COLUMN Distribution.specification_sharing_policy IS 'Sharing > policy for this distribution''s specifications.'; > +COMMENT ON COLUMN Distribution.information_type IS 'Enum describing what > type of information is stored, such as type of private or security related > data, and used to determine how to apply an access policy.'; > +COMMENT ON COLUMN Distribution.access_policies IS 'Cache of AccessPolicy.ids > that convey launchpad.LimitedView.'; > + > +ALTER TABLE CommercialSubscription > +ADD COLUMN distribution integer REFERENCES distribution, > +ALTER COLUMN product DROP NOT NULL, > +ADD CONSTRAINT one_pillar CHECK (null_count(ARRAY[product, > distribution]) = 1); > + > +DROP INDEX commercialsubscription__product__idx; > +CREATE INDEX commercialsubscription__product__idx > +ON CommercialSubscription (product) WHERE product IS NOT NULL; > +CREATE INDEX commercialsubscription__distribution__idx > +ON CommercialSubscription (distribution) WHERE distribution IS NOT NULL; commercialsubscription(product) is unique today, though the DB doesn't enforce it. Maybe we want to fix that here. > + > +COMMENT ON COLUMN CommercialSubscription.distribution IS 'The distribution > this subscription enables.'; > + > +INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 41, 0); -- https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/415113 Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:db-private-distributions into launchpad:db-devel. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~jugmac00/launchpad-buildd:publish-documentation-on-rtd into launchpad-buildd:master
Documentation was split from the original "README" file. Apart from a couple of typo fixes, only one section was added on how to create a changelog entry. -- https://code.launchpad.net/~jugmac00/launchpad-buildd/+git/launchpad-buildd/+merge/415217 Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad-buildd:publish-documentation-on-rtd into launchpad-buildd:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~jugmac00/launchpad-buildd:publish-documentation-on-rtd into launchpad-buildd:master
Jürgen Gmach has proposed merging ~jugmac00/launchpad-buildd:publish-documentation-on-rtd into launchpad-buildd:master. Commit message: Publish documentation on Read the Docs Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~jugmac00/launchpad-buildd/+git/launchpad-buildd/+merge/415217 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad-buildd:publish-documentation-on-rtd into launchpad-buildd:master. diff --git a/.gitignore b/.gitignore index cd48f47..ef4c204 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ debian/tmp debian/*.debhelper.log debian/*.debhelper debian/*.substvars +.tox/ +docs/_build/ diff --git a/README b/README deleted file mode 100644 index f8b0407..000 --- a/README +++ /dev/null @@ -1,78 +0,0 @@ - -launchpad-buildd - - -This project is the build daemon used by Launchpad's package-building -infrastructure. - -It is licensed under the GNU Affero General Public Licence, version 3 (see the -file LICENCE) except for some files originating elsewhere, which are marked -with the licence that applies. - -See https://dev.launchpad.net/ for more context. - - - -In order to build the package you need dpkg-dev and fakeroot - -To build the package do: - -debian/rules package -dpkg-buildpackage -rfakeroot -b - -It will "fail" because the package built in the "wrong" place. Don't -worry about that. - -To clean up, do: - -fakeroot debian/rules clean -rm launchpad-buildd*deb -rm ../launchpad-buildd*changes - - -Developing - - -First of all, it is recommended that you create a lxc container, since the -following steps will make changes in your system. And since some build types -will only work with virtualized containers, creating a lxc vm is the best way -to go. You can create a container with the following command: - -lxc launch --vm ubuntu:18.04 lp-builddev - -Note that you may want to have a profile to share the source code with the -container before running the above command. - -Then, inside the container, install the necessary dependencies: - -sudo apt-get update -cat system-dependencies.txt | sudo xargs apt-get install -y - -This should be enough for you to be able to run `make check`, which runs the -test suite both in python2 and python3. - -More information on how to integrate it with Launchpad can be found here: -https://dev.launchpad.net/Soyuz/HowToDevelopWithBuildd - -Now, happy coding. - - -Production deployment notes -*** - -In Launchpad's production build farm, launchpad-buildd is deployed via base -virtual machine images constructed by taking standard Ubuntu cloud images -and installing launchpad-buildd in them from -https://launchpad.net/~canonical-is-sa/+archive/ubuntu/buildd. This is done -by -https://code.launchpad.net/~canonical-sysadmins/canonical-is-charms/launchpad-buildd-image-modifier -(currently private, sorry). - -At present (November 2020), most of these base VM images are built from -Ubuntu bionic, and launchpad-buildd runs on Python 3. However, it's -necessary to support the powerpc architecture until at least April 2021 (end -of standard maintenance for xenial), and the powerpc base images need to -stay on xenial since that architecture is no longer supported by bionic; -furthermore, the version of Twisted in xenial has some bugs that break -launchpad-buildd when running on Python 3. As a result, launchpad-buildd -must run on both Python 2 and 3 for the time being. diff --git a/README.rst b/README.rst new file mode 100644 index 000..8cadaf3 --- /dev/null +++ b/README.rst @@ -0,0 +1,15 @@ + +launchpad-buildd + + +This project is the build daemon used by Launchpad's package-building +infrastructure. + +It is licensed under the GNU Affero General Public Licence, version 3 (see the +file LICENCE) except for some files originating elsewhere, which are marked +with the licence that applies. + +See https://dev.launchpad.net/ for more context. + +The documentation is available at +https://launchpad-buildd.readthedocs.io/en/latest/ diff --git a/docs/building.rst b/docs/building.rst new file mode 100644 index 000..4893bb8 --- /dev/null +++ b/docs/building.rst @@ -0,0 +1,22 @@ +Building the project + + +In order to build the package you need ``dpkg-dev`` and ``fakeroot``. + +To build the package, do: + +.. code:: bash + +debian/rules package +dpkg-buildpackage -rfakeroot -b + +It will "fail" because the package built in the "wrong" place. +Don't worry about that. + +To clean up, do: + +.. code:: bash + +fakeroot debian/rules clean +rm launchpad-buildd*deb +rm ../launchpad-buildd*changes diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 000..049f6df --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,65 @@ +# Configuration file for the Sphinx
[Launchpad-reviewers] [Merge] ~cjwatson/launchpad:refactor-sharingservice-tests into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:refactor-sharingservice-tests into launchpad:master. Commit message: Refactor sharing service tests to test both pillar types Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/415213 Much of the sharing service works equally well on both projects and distributions, and most of the remaining divergence will go away once private distributions are implemented. However, its tests were quite inconsistent in whether they tested the behaviour for projects, distributions, or both, even for code intended to work on either. Run all the tests in this file for both project and distribution scenarios, skipping some that currently won't work (e.g. because they rely on sharing policies or commercial subscriptions). When we start supporting private distributions we can stop skipping most of these tests, which will be much less error-prone than having to copy and paste many of them to test behaviour for private distributions. -- Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:refactor-sharingservice-tests into launchpad:master. diff --git a/lib/lp/registry/services/tests/test_sharingservice.py b/lib/lp/registry/services/tests/test_sharingservice.py index 858dfd3..e7444fe 100644 --- a/lib/lp/registry/services/tests/test_sharingservice.py +++ b/lib/lp/registry/services/tests/test_sharingservice.py @@ -4,6 +4,10 @@ from lazr.restful.interfaces import IWebBrowserOriginatingRequest from lazr.restful.utils import get_current_web_service_request import six +from testscenarios import ( +load_tests_apply_scenarios, +WithScenarios, +) from testtools.matchers import LessThan import transaction from zope.component import getUtility @@ -36,8 +40,14 @@ from lp.registry.interfaces.accesspolicy import ( IAccessPolicyGrantSource, IAccessPolicySource, ) +from lp.registry.interfaces.distribution import IDistribution +from lp.registry.interfaces.distributionsourcepackage import ( +IDistributionSourcePackage, +) from lp.registry.interfaces.person import TeamMembershipPolicy +from lp.registry.interfaces.product import IProduct from lp.registry.interfaces.role import IPersonRoles +from lp.registry.interfaces.sourcepackage import ISourcePackage from lp.registry.services.sharingservice import SharingService from lp.services.job.tests import block_on_job from lp.services.webapp.interaction import ANONYMOUS @@ -62,7 +72,70 @@ from lp.testing.matchers import HasQueryCount from lp.testing.pages import LaunchpadWebServiceCaller -class TestSharingService(TestCaseWithFactory, OCIConfigHelperMixin): +class PillarScenariosMixin(WithScenarios): +"""Scenarios for testing against different pillar types.""" + +scenarios = [ +("project", { +"pillar_factory_name": "makeProduct", +"get_shared_pillars_name": "getSharedProjects", +}), +("distribution", { +"pillar_factory_name": "makeDistribution", +"get_shared_pillars_name": "getSharedDistributions", +}), +] + +def _skipUnlessProduct(self): +if self.pillar_factory_name != "makeProduct": +self.skipTest("Only relevant for Product.") + +def _makePillar(self, **kwargs): +if ("bug_sharing_policy" in kwargs or +"branch_sharing_policy" in kwargs or +"specification_sharing_policy" in kwargs or +"information_type" in kwargs): +self._skipUnlessProduct() +return getattr(self.factory, self.pillar_factory_name)(**kwargs) + +def _makeBranch(self, pillar, **kwargs): +kwargs = dict(kwargs) +if IProduct.providedBy(pillar): +kwargs["product"] = pillar +elif IDistribution.providedBy(pillar): +distroseries = self.factory.makeDistroSeries(distribution=pillar) +sourcepackage = self.factory.makeSourcePackage( +distroseries=distroseries) +kwargs["sourcepackage"] = sourcepackage +else: +raise AssertionError("Unknown pillar: %r" % pillar) +return self.factory.makeBranch(**kwargs) + +def _makeGitRepository(self, pillar, **kwargs): +kwargs = dict(kwargs) +if IProduct.providedBy(pillar): +kwargs["target"] = pillar +elif IDistribution.providedBy(pillar): +dsp = self.factory.makeDistributionSourcePackage( +distribution=pillar) +kwargs["target"] = dsp +else: +raise AssertionError("Unknown pillar: %r" % pillar) +return self.factory.makeGitRepository(**kwargs) + +def _makeSpecification(self, pillar, **kwargs): +kwargs = dict(kwargs) +if IProduct.providedBy(pillar): +kwargs["product"] = pillar +elif
[Launchpad-reviewers] [Merge] ~cjwatson/launchpad:bq-properly-clear-builder into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:bq-properly-clear-builder into launchpad:master. Commit message: Properly clear builder from BuildQueue.reset Requested reviews: Launchpad code reviewers (launchpad-reviewers) Related bugs: Bug #1960132 in Launchpad itself: "Assertion failed: self.builder == builder" https://bugs.launchpad.net/launchpad/+bug/1960132 For more details, see: https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/415207 Following https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/414070, the `builder` attribute of build farm jobs is now set while the build is in progress (and indeed this commit sets it slightly earlier as well, from `BuildQueue.markAsBuilding`, mainly to maximize the chance of discovering problems in tests). This has various advantages. However, `BuildQueue.reset` can be called when a builder fails, upon which the job is likely to be dispatched to a different builder. It cleared `BuildQueue.builder` as part of resetting the build queue entry, but not the corresponding attributes of the `BuildFarmJob` or the specific build, which caused an assertion failure later on. Repair this by clearing those attributes too. -- Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:bq-properly-clear-builder into launchpad:master. diff --git a/lib/lp/buildmaster/doc/buildqueue.txt b/lib/lp/buildmaster/doc/buildqueue.txt index e9bb146..6d6cbe3 100644 --- a/lib/lp/buildmaster/doc/buildqueue.txt +++ b/lib/lp/buildmaster/doc/buildqueue.txt @@ -132,6 +132,8 @@ to another build. The score value of the job is preserved. None >>> print(job.logtail) None +>>> print(build.builder) +None >>> print(build.status.name) NEEDSBUILD >>> print(job.lastscore) diff --git a/lib/lp/buildmaster/interfaces/buildfarmjob.py b/lib/lp/buildmaster/interfaces/buildfarmjob.py index cb5b2f7..92fc062 100644 --- a/lib/lp/buildmaster/interfaces/buildfarmjob.py +++ b/lib/lp/buildmaster/interfaces/buildfarmjob.py @@ -277,6 +277,13 @@ class IBuildFarmJobView(Interface): title=_("Can be cancelled"), required=True, readonly=True, description=_("Whether this build record can be cancelled."))) +def clearBuilder(): +"""Clear this build record's builder. + +This is called by `BuildQueue.reset` as part of resetting jobs so +that they can be re-dispatched. +""" + class IBuildFarmJobEdit(Interface): """`IBuildFarmJob` methods that require launchpad.Edit.""" diff --git a/lib/lp/buildmaster/model/buildfarmjob.py b/lib/lp/buildmaster/model/buildfarmjob.py index 807854b..977c83e 100644 --- a/lib/lp/buildmaster/model/buildfarmjob.py +++ b/lib/lp/buildmaster/model/buildfarmjob.py @@ -304,12 +304,16 @@ class BuildFarmJobMixin: ] return self.status in cancellable_statuses +def clearBuilder(self): +"""See `IBuildFarmJob`.""" +self.build_farm_job.builder = self.builder = None + def resetBuild(self): """See `IBuildFarmJob`.""" self.build_farm_job.status = self.status = BuildStatus.NEEDSBUILD self.build_farm_job.date_finished = self.date_finished = None self.date_started = None -self.build_farm_job.builder = self.builder = None +self.clearBuilder() self.log = None self.upload_log = None self.dependencies = None diff --git a/lib/lp/buildmaster/model/buildqueue.py b/lib/lp/buildmaster/model/buildqueue.py index 1bc3b0d..ab531f3 100644 --- a/lib/lp/buildmaster/model/buildqueue.py +++ b/lib/lp/buildmaster/model/buildqueue.py @@ -188,7 +188,7 @@ class BuildQueue(StormBase): self.builder = builder self.status = BuildQueueStatus.RUNNING self.date_started = UTC_NOW -self.specific_build.updateStatus(BuildStatus.BUILDING) +self.specific_build.updateStatus(BuildStatus.BUILDING, builder=builder) if builder is not None: del get_property_cache(builder).currentjob @@ -212,6 +212,7 @@ class BuildQueue(StormBase): self.status = BuildQueueStatus.WAITING self.date_started = None self.logtail = None +self.specific_build.clearBuilder() self.specific_build.updateStatus(BuildStatus.NEEDSBUILD) if builder is not None: del get_property_cache(builder).currentjob diff --git a/lib/lp/buildmaster/tests/test_manager.py b/lib/lp/buildmaster/tests/test_manager.py index cf6f584..e5441ea 100644 --- a/lib/lp/buildmaster/tests/test_manager.py +++ b/lib/lp/buildmaster/tests/test_manager.py @@ -1360,6 +1360,7 @@ class TestFailureAssessments(TestCaseWithFactory): self.assertIn("Requeueing job %s" % self.build.build_cookie, log) self.assertIn("Dirtying builder %s" % self.builder.name, log) self.assertIs(None, self.builder.currentjob) +self.assertIs(None, self.build.builder)
[Launchpad-reviewers] [Merge] ~jugmac00/launchpad-buildd:adjust-to-updated-ci-runner-option into launchpad-buildd:master
Jürgen Gmach has proposed merging ~jugmac00/launchpad-buildd:adjust-to-updated-ci-runner-option into launchpad-buildd:master. Commit message: Adjust to updated CI runner option Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~jugmac00/launchpad-buildd/+git/launchpad-buildd/+merge/415201 Corresponding MP in lpcraft: https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/415195 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad-buildd:adjust-to-updated-ci-runner-option into launchpad-buildd:master. diff --git a/debian/changelog b/debian/changelog index b178963..b744c2c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +launchpad-buildd (207ubuntu1) UNRELEASED; urgency=medium + + * Adjust updated command line option for the CI runner. + + -- Jürgen Gmach Mon, 07 Feb 2022 15:17:09 + + launchpad-buildd (207) bionic; urgency=medium * Return results from individual CI jobs. diff --git a/lpbuildd/target/run_ci.py b/lpbuildd/target/run_ci.py index 1fb6b0f..0dac760 100644 --- a/lpbuildd/target/run_ci.py +++ b/lpbuildd/target/run_ci.py @@ -103,7 +103,7 @@ class RunCI(BuilderProxyOperationMixin, Operation): output_path = os.path.join("/build", "output", job_id) self.backend.run(["mkdir", "-p", output_path]) lpcraft_args = [ -"lpcraft", "-v", "run-one", "--output", output_path, +"lpcraft", "-v", "run-one", "--output-directory", output_path, self.args.job_name, str(self.args.job_index), ] tee_args = ["tee", "%s.log" % output_path] diff --git a/lpbuildd/target/tests/test_run_ci.py b/lpbuildd/target/tests/test_run_ci.py index aad9e54..9c6621e 100644 --- a/lpbuildd/target/tests/test_run_ci.py +++ b/lpbuildd/target/tests/test_run_ci.py @@ -313,7 +313,7 @@ class TestRunCI(TestCase): RanCommand(["mkdir", "-p", "/build/output/test:0"]), RanBuildCommand([ "/bin/bash", "-o", "pipefail", "-c", -"lpcraft -v run-one --output /build/output/test:0 test 0 2>&1 " +"lpcraft -v run-one --output-directory /build/output/test:0 test 0 2>&1 " # noqa: E501 "| tee /build/output/test:0.log", ], cwd="/build/tree"), ])) @@ -337,7 +337,7 @@ class TestRunCI(TestCase): RanCommand(["mkdir", "-p", "/build/output/test:0"]), RanBuildCommand([ "/bin/bash", "-o", "pipefail", "-c", -"lpcraft -v run-one --output /build/output/test:0 test 0 2>&1 " +"lpcraft -v run-one --output-directory /build/output/test:0 test 0 2>&1 " # noqa: E501 "| tee /build/output/test:0.log", ], cwd="/build/tree", **env), ])) ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~jugmac00/lpcraft:rename-output-option into lpcraft:main
Jürgen Gmach has proposed merging ~jugmac00/lpcraft:rename-output-option into lpcraft:main. Commit message: Improve output handling via CLI option Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/415195 This change should also be reflected in buildd - though, thanks to argparse magic, buildd will work with the renamed option as is, see https://docs.python.org/3/library/argparse.html#argument-abbreviations-prefix-matching -- Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/lpcraft:rename-output-option into lpcraft:main. diff --git a/README.rst b/README.rst index aa700b3..14a00b4 100644 --- a/README.rst +++ b/README.rst @@ -23,5 +23,5 @@ more complete and stable, it will be made available from the snap store.) You can run ``lpcraft`` from a directory containing ``.launchpad.yaml``, although it won't do very much useful yet. -To save the output from a job, use ``lpcraft run --output +To save the output from a job, use ``lpcraft run --output-directory /path/to/output/directory``. diff --git a/docs/index.rst b/docs/index.rst index 84bdd04..b8cfbab 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -35,7 +35,7 @@ Example configuration output: paths: [output] -$ lpcraft run --output out +$ lpcraft run --output-directory out Running the job $ cat out/test/focal/amd64/files/output hello world diff --git a/lpcraft/commands/run.py b/lpcraft/commands/run.py index bc0b7da..91fa7a1 100644 --- a/lpcraft/commands/run.py +++ b/lpcraft/commands/run.py @@ -282,7 +282,10 @@ def run(args: Namespace) -> int: raise CommandError(f"No job definition for {job_name!r}") for job in jobs: _run_job( -job_name, job, provider, getattr(args, "output", None) +job_name, +job, +provider, +getattr(args, "output_directory", None), ) except CommandError as e: if len(stage) == 1: diff --git a/lpcraft/commands/tests/test_run.py b/lpcraft/commands/tests/test_run.py index 80998fc..4fae0e0 100644 --- a/lpcraft/commands/tests/test_run.py +++ b/lpcraft/commands/tests/test_run.py @@ -722,8 +722,9 @@ class TestRun(RunBaseTestCase): Path(".launchpad.yaml").write_text(config) Path("test_1.0.tar.gz").write_bytes(b"") Path("test_1.0.whl").write_bytes(b"") - -result = self.run_command("run", "--output", str(target_path)) +result = self.run_command( +"run", "--output-directory", str(target_path) +) self.assertEqual(0, result.exit_code) job_output = target_path / "build" / "focal" / "amd64" @@ -782,7 +783,9 @@ class TestRun(RunBaseTestCase): ) Path(".launchpad.yaml").write_text(config) -result = self.run_command("run", "--output", str(target_path)) +result = self.run_command( +"run", "--output-directory", str(target_path) +) # The exact error message differs between Python 3.8 and 3.9, so # don't test it in detail, but make sure it includes the offending @@ -825,7 +828,9 @@ class TestRun(RunBaseTestCase): Path(".launchpad.yaml").write_text(config) Path("symlink.txt").symlink_to("../target.txt") -result = self.run_command("run", "--output", str(target_path)) +result = self.run_command( +"run", "--output-directory", str(target_path) +) # The exact error message differs between Python 3.8 and 3.9, so # don't test it in detail, but make sure it includes the offending @@ -871,7 +876,9 @@ class TestRun(RunBaseTestCase): Path(".launchpad.yaml").write_text(config) Path("test_1.0.whl").write_bytes(b"") -result = self.run_command("run", "--output", str(target_path)) +result = self.run_command( +"run", "--output-directory", str(target_path) +) self.assertThat( result, @@ -914,7 +921,9 @@ class TestRun(RunBaseTestCase): ) Path(".launchpad.yaml").write_text(config) -result = self.run_command("run", "--output", str(target_path)) +result = self.run_command( +"run", "--output-directory", str(target_path) +) self.assertEqual(0, result.exit_code) job_output = target_path / "build" / "focal" / "amd64" @@ -957,7 +966,9 @@ class TestRun(RunBaseTestCase): Path(".launchpad.yaml").write_text(config) Path("properties").write_text("version=0.1\n") -result = self.run_command("run", "--output", str(target_path)) +result = self.run_command( +"run", "--output-directory", str(target_path) +)
[Launchpad-reviewers] [Merge] ~lgp171188/launchpad:create-other-user-accounts-dev-env into launchpad:master
Guruprasad has proposed merging ~lgp171188/launchpad:create-other-user-accounts-dev-env into launchpad:master. Commit message: Document how to create new user accounts in the dev environment Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/415182 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:create-other-user-accounts-dev-env into launchpad:master. diff --git a/doc/faq.rst b/doc/faq.rst index 5890dd2..b169a90 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -43,6 +43,11 @@ Yes, you can browse the `source code ``git clone https://git.launchpad.net/launchpad`` to download the code without setting up a development environment. +How do I create additional user accounts? += +You can create a new account using the ``utilities/make-lp-user`` script and log +in to that account at ``https://launchpad.test``. + I have Launchpad running but mails are not sent... == diff --git a/doc/running.rst b/doc/running.rst index 304138d..8070bce 100644 --- a/doc/running.rst +++ b/doc/running.rst @@ -296,7 +296,8 @@ browser on a suitably configured remote computer. Accept the local self-signed certificate. You can log in as ``ad...@canonical.com`` without a password. (This is only for development convenience, and assumes that you trust machines that can route to your LXD containers; of course a production -deployment would need real authentication.) +deployment would need real authentication.). You can create additional +user accounts using the `utilities/make-lp-user` script. Accessing launchpad.test from a single host over SSH ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp