Merge ~jelmer/launchpad:public-https into launchpad:master

Proposed by Jelmer Vernooij
Status: Needs review
Proposed branch: ~jelmer/launchpad:public-https
Merge into: launchpad:master
Diff against target: 76 lines (+9/-10)
4 files modified
lib/lp/code/interfaces/branch.py (+2/-2)
lib/lp/code/interfaces/codehosting.py (+1/-1)
lib/lp/code/model/branch.py (+2/-2)
lib/lp/code/tests/test_branch.py (+4/-5)
Reviewer Review Type Date Requested Status
Launchpad code reviewers Pending
Review via email: mp+435608@code.qastaging.launchpad.net

Commit message

Add https as a supported scheme for public branches

Description of the change

Add https as a supported scheme for public branches

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Could you please re-trigger CI? There seems to be some lxd issue, which - fingers-crossed - is temporary.

Revision history for this message
Colin Watson (cjwatson) wrote :

Hmm, is this a good idea right now? Compare:

  $ brz branch http://bazaar.launchpad.net/~brz/brz/trunk brz
  # works

  $ brz branch https://bazaar.launchpad.net/~brz/brz/trunk brz
  https://bazaar.launchpad.net/~brz/brz/trunk/ is permanently redirected to https://bazaar.launchpad.net/~brz/brz/trunk/changes/
  brz: ERROR: Unexpected HTTP status 500 for https://bazaar.launchpad.net/~brz/brz/trunk/changes/info/refs?service=git-upload-pack: Unable to handle http code: Internal Server Error

I'm not quite sure whose problem that is - do you know if it's yours or ours? (When I curl those two URLs, I seem to get a similar redirect in each case, which suggests a Breezy bug, but I'm not sure.)

Revision history for this message
Jelmer Vernooij (jelmer) wrote (last edit ):

Maybe a bit of both..

I think it's a launchpad (loggerhead?) issue that the 500 is served - it should be a 404. Although it's triggered by breezy trying to fetch a URL which should not exist (it tries to see if there is a working tree).

E.g. trying to retrieve https://bazaar.launchpad.net/~brz/brz/trunk/changes/info results in a 500

The https URL also seems to redirect to http under the hood .

Revision history for this message
Colin Watson (cjwatson) wrote :

True, but the http:// version of that also 500s, so why does this only cause a failure to branch for https://?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

> True, but the http:// version of that also 500s, so why does this only cause a
> failure to branch for https://?

We seem to be unable to find a bzr branch there, so fall back to probing for a git repository - which leads to the 500.

Confusingly https://code.launchpad.net/brz (as opposed to https://code.launchpad.net/~brz/brz/trunk), which is what I originally tested before I submitted this MR, works fine.

Also of note:

$ curl https://code.launchpad.net/~brz/brz/trunk/.bzr/branch/location
http://bazaar.launchpad.net/~brz/brz/trunk

Revision history for this message
Guruprasad (lgp171188) wrote :

On lunar, a command like 'bzr branch lp:lptools' has been failing with an error like 'brz: ERROR: Not a branch: "git+ssh://<email address hidden>/lptools": Repository 'lptools' not found..'. I have reported a bug for it - https://bugs.launchpad.net/ubuntu/+source/breezy/+bug/2023998. Colin mentioned that it could be related to https://bugs.launchpad.net/launchpad/+bug/2002568 and https://code.launchpad.net/~jelmer/launchpad/+git/launchpad/+merge/435608.

Revision history for this message
Colin Watson (cjwatson) wrote (last edit ):

There was a recent thread on ubuntu-devel pointing out why `lp:` fails and providing a workaround (`lp+bzr:`), so that part may not be LP's fault: https://lists.ubuntu.com/archives/ubuntu-devel/2023-June/042619.html

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

to status/vote changes: