mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-21 22:32:41 +01:00
No description
5d8457a07e
Summary: Fixes T13435. If you move Phabricator or copy data from one environment to another, the repository URI index currently still references the old URI, since it writes the URI as a plain string. This may make "arc which" and similar workflows have difficulty identifying repositories. Instead, store the "phabricator.base-uri" domain and the "diffusion.ssh-host" domain as tokens, so lookups continue to work correctly even after these values change. Test Plan: - Added unit tests to cover the normalization. - Ran migration, ran daemons, inspected `repository_uriindex` table, saw a mixture of sensible tokens (for local domains) and static domains (like "github.com"). - Ran this thing: ``` $ echo '{"remoteURIs": ["ssh://git@local.phacility.com/diffusion/P"]}' | ./bin/conduit call --method repository.query --trace --input - Reading input from stdin... >>> [2] (+0) <conduit> repository.query() >>> [3] (+3) <connect> local_repository <<< [3] (+3) <connect> 555 us >>> [4] (+5) <query> SELECT `r`.* FROM `repository` `r` LEFT JOIN `local_repository`.`repository_uriindex` uri ON r.phid = uri.repositoryPHID WHERE (uri.repositoryURI IN ('<base-uri>/diffusion/P')) GROUP BY `r`.phid ORDER BY `r`.`id` DESC LIMIT 101 <<< [4] (+5) <query> 596 us <<< [2] (+6) <conduit> 6,108 us { "result": [ { "id": "1", "name": "Phabricator", "phid": "PHID-REPO-2psrynlauicce7d3q7g2", "callsign": "P", "monogram": "rP", "vcs": "git", "uri": "http://local.phacility.com/source/phabricator/", "remoteURI": "https://github.com/phacility/phabricator.git", "description": "asdf", "isActive": true, "isHosted": false, "isImporting": false, "encoding": "UTF-8", "staging": { "supported": true, "prefix": "phabricator", "uri": null } } ] } ``` Note the `WHERE` clause in the query normalizes the URI into "<base-uri>", and the lookup succeeds. Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13435 Differential Revision: https://secure.phabricator.com/D20872 |
||
---|---|---|
bin | ||
conf | ||
externals | ||
resources | ||
scripts | ||
src | ||
support | ||
webroot | ||
.arcconfig | ||
.arclint | ||
.arcunit | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
NOTICE | ||
README.md |
Phabricator is a collection of web applications which help software companies build better software.
Phabricator includes applications for:
- reviewing and auditing source code;
- hosting and browsing repositories;
- tracking bugs;
- managing projects;
- conversing with team members;
- assembling a party to venture forth;
- writing stuff down and reading it later;
- hiding stuff from coworkers; and
- also some other things.
You can learn more about the project (and find links to documentation and resources) at Phabricator.org
Phabricator is developed and maintained by Phacility.
SUPPORT RESOURCES
For resources on filing bugs, requesting features, reporting security issues, and getting other kinds of support, see Support Resources.
NO PULL REQUESTS!
We do not accept pull requests through GitHub. If you would like to contribute code, please read our Contributor's Guide.
LICENSE
Phabricator is released under the Apache 2.0 license except as otherwise noted.