Merge ~paelzer/git-ubuntu:no-default-push-from-edge into git-ubuntu:master

Proposed by Christian Ehrhardt 
Status: Rejected
Rejected by: Christian Ehrhardt 
Proposed branch: ~paelzer/git-ubuntu:no-default-push-from-edge
Merge into: git-ubuntu:master
Diff against target: 24 lines (+5/-1)
1 file modified
gitubuntu/importer.py (+5/-1)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  Disapprove
Server Team CI bot continuous-integration Approve
Review via email: mp+333950@code.launchpad.net

Description of the change

As outlined in (LP: #1733278) I think I ran into an issue by accidental importing from edge.
We could avoid so with a solution as suggested in this MP which can be removed on the "release" of the new structure later on.

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:9f2bda8de5042be21415a2a72382a40f17b3a397
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/213/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    SUCCESS: Integration Tests
    IN_PROGRESS: Declarative: Post Actions

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

review: Approve (continuous-integration)
Revision history for this message
Nish Aravamudan (nacc) wrote :

I don't think this is the right approach. Instead, unfortunately for now,
if you (or Scott) do a manual import, please check with Robin or I as to
what to use. The importer code is changing right now enough that the
bastion is running from beta and probably most users should until we do a
stable release update.

My IRC messages were more that importing is a "sensitive" operation and
there rarely is a reason to do it urgently. Perhaps we can simply import
the team LP ids to my bastion and then when you do need to run it manually
you are sure to be using the same snap as the importer loop.

On Nov 20, 2017 13:17, "ChristianEhrhardt" <email address hidden>
wrote:

ChristianEhrhardt has proposed merging
~paelzer/usd-importer:no-default-push-from-edge
into usd-importer:master.

Requested reviews:
  Ubuntu Server Dev import team (usd-import-team)
Related bugs:
  Bug #1733278 in usd-importer: "disable push by default if from edge (as
long as we need it from stable)"
  https://bugs.launchpad.net/usd-importer/+bug/1733278

For more details, see:
https://code.launchpad.net/~paelzer/usd-importer/+git/usd-
importer/+merge/333950

As outlined in (LP: #1733278) I think I ran into an issue by accidental
importing from edge.
We could avoid so with a solution as suggested in this MP which can be
removed on the "release" of the new structure later on.
--
Your team Ubuntu Server Dev import team is requested to review the proposed
merge of ~paelzer/usd-importer:no-default-push-from-edge into
usd-importer:master.

diff --git a/gitubuntu/importer.py b/gitubuntu/importer.py
index 2063f83..48ffe6b 100644
--- a/gitubuntu/importer.py
+++ b/gitubuntu/importer.py
@@ -1498,6 +1498,10 @@ def parse_args(subparsers=None,
base_subparsers=None):
                              '--no-push')
     parser.add_argument('--no-push', action='store_true',
                         help='Do not push to the remote')
+ parser.add_argument('--push-from-edge', action='store_true',
+ help='Needs to be set on imports from git or edge
snap '
+ 'to push to the remote, implies --no-push if
not'
+ ' set')
     parser.add_argument('--no-clean', action='store_true',
                         help='Do not clean the temporary directory')
     parser.add_argument('-d', '--directory', type=str,
@@ -1537,7 +1541,7 @@ def cli_main(args):
         user = None
     # --active-series-only/--no-fetch to a tmpdir/--skip-orig
     # implies --no-push
- no_push = (
+ no_push = (not args.push_from_edge) or (
         args.no_push or
         (args.no_fetch and not directory) or
         args.active_series_only or

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I'd be good with having access to the de-facto "as it should be" environment on the bastion as well.
To be honest - I don't want to do it wrong, I just need a way to do it right :-)

So I'll reject this MP and post on the bug that me and smoser get acces to solve "the bug".

review: Disapprove

Unmerged commits

9f2bda8... by Christian Ehrhardt 

avoid accidential import from master (LP: #1733278)

Since we change the format currently imports are not meant to be done
from git master or edge channel snap.
To avoid doing those by mistake add an argument that needs to be added
to froce it.

Since this does not move into the stable snap nothing will change for
"valid" imports. But on git/edge this will prevent accidential imports.

On the day we declare the new code to be complete and do the world
reimport we shall revert this patch.

Signed-off-by: Christian Ehrhardt <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/gitubuntu/importer.py b/gitubuntu/importer.py
2index 2063f83..48ffe6b 100644
3--- a/gitubuntu/importer.py
4+++ b/gitubuntu/importer.py
5@@ -1498,6 +1498,10 @@ def parse_args(subparsers=None, base_subparsers=None):
6 '--no-push')
7 parser.add_argument('--no-push', action='store_true',
8 help='Do not push to the remote')
9+ parser.add_argument('--push-from-edge', action='store_true',
10+ help='Needs to be set on imports from git or edge snap '
11+ 'to push to the remote, implies --no-push if not'
12+ ' set')
13 parser.add_argument('--no-clean', action='store_true',
14 help='Do not clean the temporary directory')
15 parser.add_argument('-d', '--directory', type=str,
16@@ -1537,7 +1541,7 @@ def cli_main(args):
17 user = None
18 # --active-series-only/--no-fetch to a tmpdir/--skip-orig
19 # implies --no-push
20- no_push = (
21+ no_push = (not args.push_from_edge) or (
22 args.no_push or
23 (args.no_fetch and not directory) or
24 args.active_series_only or

Subscribers

People subscribed via source and target branches