Page MenuHomePhabricator

[buildbot] Disallow non ABC members from summoning builds with a docker configuration
ClosedPublic

Authored by Fabien on Apr 11 2023, 09:45.

Details

Summary

This restricts the access to website previews to ABC members only. This policy might be relaxed in the future.

Depends on D13661.

Test Plan
./contrib/teamcity/build-configurations.py check-buildbot

Diff Detail

Repository
rABC Bitcoin ABC
Branch
bot_no_docker
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23193
Build 46005: Build Diffcheck-buildbot
Build 46004: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Apr 11 2023, 09:45

Failed tests logs:

====== test_endpoint_triggerCI.EndpointTriggerCITestCase.test_triggerCI_some_build_queued ======
test_endpoint_triggerCI.py:319 (EndpointTriggerCITestCase.test_triggerCI_some_build_queued)
self = <test.test_endpoint_triggerCI.EndpointTriggerCITestCase testMethod=test_triggerCI_some_build_queued>

    def test_triggerCI_some_build_queued(self):
        def assert_teamcity_queued_builds(comments, queued_builds):
            # Default user is an ABC member in set_transaction_return_value
            self.set_transaction_return_value(comments)
            response = self.call_endpoint()
            expected_calls = [
                call(
                    "BitcoinABC_BitcoinAbcStaging",
                    f"refs/tags/phabricator/diff/{self.diff_id}",
                    properties=[{
                        'name': 'env.ABC_BUILD_NAME',
                        'value': build_id,
                    }]
                )
                for build_id in queued_builds
            ]
            self.teamcity.trigger_build.assert_has_calls(
                expected_calls, any_order=True)
            self.assertEqual(response.status_code, 200)
    
        # ABC user, 1 comment targeting the bot with 1 build
>       assert_teamcity_queued_builds(
            [
                "@bot build-1",
            ],
            [
                "build-1",
            ],
            PHID_user=""
        )
E       TypeError: assert_teamcity_queued_builds() got an unexpected keyword argument 'PHID_user'

test_endpoint_triggerCI.py:341: TypeError

Each failure log is accessible here:
test_endpoint_triggerCI.EndpointTriggerCITestCase.test_triggerCI_some_build_queued

Fabien planned changes to this revision.Apr 11 2023, 11:56

Fix submitting with an unsaved file

This revision is now accepted and ready to land.Apr 11 2023, 17:59