RhodeCode - issues: Issueshttps://issues.rhodecode.com/https://issues.rhodecode.com/favicon.ico?16960560042020-04-02T14:34:35ZRhodeCode - issues
Redmine RhodeCode CE/EE - Bug #5610 (Resolved): Files navigation looses the at=<name> markerhttps://issues.rhodecode.com/issues/56102020-04-02T14:34:35ZDaniel Ddaniel@rhodecode.com
<p>During investigation of <a class="issue tracker-1 status-3 priority-2 priority-default" title="Bug: SVN navigation to trunk fails (Resolved)" href="https://issues.rhodecode.com/issues/5599">#5599</a> we also discovered that the ?at= GET marker that indicates current reference we're browsing is getting lost when navigating via tree/files. We'd need to fix this to preserve that marker especially for SVN</p>
RhodeCode CE/EE - Support #5527 (New): API: expose human readable failure reasonhttps://issues.rhodecode.com/issues/55272019-01-30T17:43:29ZDaniel Ddaniel@rhodecode.com
<p>Currently API returns something like this:</p>
<pre><code>{
"result": {
"merge_ref": {
"name": "pr-merge",
"type": "book",
"commit_id": "xxxxx"
},
"merge_commit_id": "xxxxx", //(same value as the commit_id)
"executed": false,
"possible": true,
"failure_reason": 3
},
"id": "mergepr",
"error": null
}
</code></pre>
<p>"failure_reason": 3 is cryptic, we have a translation layer for that already, so we just need tp expose failure_reason_explanation and read it !</p>
RhodeCode CE/EE - Task #4289 (New): [ce, ee] clean up pygments lexer functions + handlinghttps://issues.rhodecode.com/issues/42892016-10-21T14:40:28ZDaniel Ddaniel@rhodecode.com
<p>Currently there are a few lexer functions that seem duplicated/incoherent with each other. This seems to be also tied with the rc extensions which can define custom lexers/file extension mappings in example-ext.py:</p>
<pre><code>
# =============================================================================
# END OF UTILITY FUNCTIONS HERE
# =============================================================================
# Additional mappings that are not present in the pygments lexers
# used for building stats
# format is {'ext':['Names']} eg. {'py':['Python']} note: there can be
# more than one name for extension
# NOTE: that this will override any mappings in LANGUAGES_EXTENSIONS_MAP
# build by pygments
EXTRA_MAPPINGS = {}
# additional lexer definitions for custom files it's overrides pygments lexers,
# and uses defined name of lexer to colorize the files. Format is {'ext':
# 'lexer_name'} List of lexers can be printed running:
# >> python -c "import pprint;from pygments import lexers;
# pprint.pprint([(x[0], x[1]) for x in lexers.get_all_lexers()]);"
EXTRA_LEXERS = {}
</code></pre>
<p>Then there are the functions get_custom_lexer and the FileNode attributes <code>filenode.lexer</code> which don't seem to follow the same logic - the filenode lexer for example seems to prefer a lexer matching the filename instead of a defined custom lexer.</p>
<p>We should use a common base for getting a lexer - one that first returns custom lexer mappings (so that for example .html can be mapped to mako).</p>
<p>Extending on this it could be possible to make the file extension => lexer mapping a per repository setting, exposed via the ui, which would give the best usability in terms of letting each repo specify which lexer to prefer ... again for example <code>.html => mako</code> </p>
RhodeCode CE/EE - Task #4288 (Resolved): [ce, ee] unify controllers that use diffshttps://issues.rhodecode.com/issues/42882016-10-19T08:19:57ZDaniel Ddaniel@rhodecode.com
<p>Currently diffs are being used in these controllers:</p>
<ol>
<li>files controller: eg <code>/repo/diff/somefile?diff1=commit1&diff2=commit2</code></li>
<li>compare controller: eg. <code>/repo/compare/tag@v4.2.1...tag@v4.2.0</code></li>
<li>changeset controller: eg. <code>/repo/changeset/7c7441cbf9af8c527310aac72fd8a67ea7dd908f</code></li>
<li>pullrequest controller: eg. <code>/repo/pull-request/332</code></li>
</ol>
<p>These controllers use about 80% duplicate code which can be moved to a common base</p>
<p>Also some controller have options such as increase/decrease context which are not implemented in other controllers.</p>
RhodeCode CE/EE - Bug #4268 (Resolved): [ee] default reviewers from changed lines is returning wr...https://issues.rhodecode.com/issues/42682016-10-06T14:18:07ZDaniel Ddaniel@rhodecode.com
<p>When getting default reviewers from authors of changed lines, not all the hunks are being processed, just the first one, meaning the changed lines are wrong (too low)</p>
RhodeCode CE/EE - Feature #4267 (Resolved): [ce, ee] jira tracker integration wildcard project ke...https://issues.rhodecode.com/issues/42672016-10-06T13:51:41ZDaniel Ddaniel@rhodecode.com
<p>From <a href="https://rhodecode.tenderapp.com/help/discussions/dedicated-support/409-jira-integration-in-441" class="external">https://rhodecode.tenderapp.com/help/discussions/dedicated-support/409-jira-integration-in-441</a></p>
<blockquote>
<p>We have just updated to 4.4.1 and I would like to test the JIRA integration (one of the features I've been wishing for for a long time!). I went to the overall admin settings and the integration tab. I then tried to create a new JIRA integration. I have entered all of the parameters except JIRA Project Key, but it won't let me save without including a JIRA project key.</p>
<p>I want to set up the JIRA integration to work globally. Each repository in RhodeCode may be related to more than one JIRA project and there are some JIRA projects that relate to multiple RhodeCode repositories.<br>
When a JIRA issue is referenced in a commit message it will be referenced by ID, for example "fixes AE-54". The first part of this is the project key (AE in this case) and the second is the ID within that project (54 in this case) - therefore there is no need for the JIRA integration to know in advance the project key as it will be within the commit message (the existing issue tracker integration looks for [A-Z][A-Z0-9_]+-\d+). If the project key is fixed, then this precludes a user working on embedded software from referencing hardware and software issues in commit messages (as we typically keep the hardware and software as separate JIRA projects).</p>
<p>Please can you help me with this configuration?</p>
</blockquote>
RhodeCode CE/EE - Bug #4256 (New): [ce, ee, ux] Source code highlight colors conflict with red/gr...https://issues.rhodecode.com/issues/42562016-10-03T05:00:14ZDaniel Ddaniel@rhodecode.com
<p>The CSS for pygments uses some green and red text which conflict with green/red blocks we use in diffs - have to change these to something else. </p>
RhodeCode CE/EE - Task #4246 (New): [ce, ee, vcs, git] add tests for annotated git tagshttps://issues.rhodecode.com/issues/42462016-09-27T15:46:51ZDaniel Ddaniel@rhodecode.com
<p>Need to add a test that makes sure annotated git tags are correctly dereferenced / peeled to the actual commit they point to.</p>
RhodeCode CE/EE - Feature #4232 (New): [ce, ee, pr, compare] redo diffs, support side by side dif...https://issues.rhodecode.com/issues/42322016-09-18T16:40:43ZDaniel Ddaniel@rhodecode.com
<p>One of the most requested features is side by side diffs for multiple files at the same time (eg. pull request & compare pages).</p>
<p>Currently we have side by side diffs implemented for a single files only using the javascript library mergely. This doesn't include inline comments and uses different syntax highlighting to the rest of Rhodecode. Copy paste of code also works differently between the pr page and the side/side view.</p>
<p>There is another javascript diff library: <a href="https://diff2html.xyz/demo" class="external">https://diff2html.xyz/demo</a>, which gives very good results, however integrating inline comments and context loading into this proved to be a lot of trouble, also the syntax highlighting doesn't support partial code blocks very well, eg:</p>
<pre><code>51 this is the end of a doc string
52 """
53 return True
</code></pre>
<p>will mark the <code>return True</code> part as a string.</p>
<p>Therefore the things we need in diffs are:</p>
<ul>
<li>Syntax highlighting based on the entire file, rather than the partial diff</li>
<li>Inline comments + all relevant functionality</li>
<li>Ajax file context loading (eg. click to load more lines of a file before/after the changed lines)</li>
<li>In the browser conversion between raw/unified/side diffs - using JS</li>
</ul>
<p>This will be exposed as a reusuable widget that can be used anywhere in Rhodecode, taking a diff reference as a sole argument.</p>
<p>The steps to create the diff are:</p>
<ol>
<li>Generate the diff chunks for each file</li>
<li>Get the old and new versions of the files, highlight using pygments</li>
<li>Use custom pygments renderer to generate the diff context:
<ol>
<li>Using the original highlighted file lines which will have proper syntax highlighting colors</li>
<li>Support both unified/sideside without modification</li>
<li>Use a table that is copypaste friendly</li>
<li>Add inline comments + functionality </li>
<li>Expose load more file lines context functionality markers</li>
</ol></li>
<li>Render this in the template</li>
<li>Apply javascript events lazily to avoid the overheads of adding events to every single element</li>
</ol>
<p>This will also require an endpoint to get the partial N-M lines context of a file @ revision via ajax</p>
RhodeCode CE/EE - Feature #4219 (Resolved): [ce, ee] Add mandatory reviewers for pull requestshttps://issues.rhodecode.com/issues/42192016-09-06T15:29:09ZDaniel Ddaniel@rhodecode.com
<p>Need to add an option to mark a reviewer of a pull request as 'mandatory' so that a pull request cannot be approved without their vote.</p>
RhodeCode CE/EE - Feature #4211 (Resolved): [ce, ee] increase webhook flexibilityhttps://issues.rhodecode.com/issues/42112016-08-31T19:08:17ZDaniel Ddaniel@rhodecode.com
<blockquote>
<p>How would I go about if I wanted the webhook being able to trigger a certain branch to build in Jenkins? I'm using Pipeline/Pipeline Multibranch, but regardles, it'd require something like:</p>
<p><a href="http://server/myjenkinsproject/job/" class="external">http://server/myjenkinsproject/job/</a>< BRANCHNAME >/build</p>
<p>Does Rhodecode provide any environment variables through the webhook setup in the UI that I could pass in for < BRANCHNAME > or is this something I'd have to hand code as an extension?</p>
</blockquote>
<p>This feature was requested in community-discussion.</p>
<p>From what I can tell, if we allow template variables in the url, which get interpolated with the event dict, we can get this functionality</p>
<p>eg. <code>http://server/{event['branch']}/build</code></p>
<p>The problem is (in this particular use case) that there can be multiple branches per push - which complicates matters, not sure how to get around this.</p>
RhodeCode CE/EE - Task #4197 (New): [ce, ee] get list of users with their permissions to a reposi...https://issues.rhodecode.com/issues/41972016-08-24T14:31:24ZDaniel Ddaniel@rhodecode.com
<p>Related to <a href="https://issues.rhodecode.com/issues/4150" class="external">https://issues.rhodecode.com/issues/4150</a></p>
<p>Need a way to get all users from a repository along with their permissions for that repo.</p>
<p>At the moment permissions are generated via a complex python object in rhodecode.lib.auth:AuthUser which calculates the tree for a single user, taking into account default user, repo settings (overriding globals or not), and usergroups.</p>
<p>Iterating over the entire list of users is much too slow, some preliminary benchmarks show that it will take 10seconds / 100users.</p>
<p>In order to do this quickly instead, we would have to generate permissions via sql - A simplish (not completely correct results) query shows it will take about 50ms on internal rhodecode db.</p>
<pre><code>
SELECT
users.username,
repositories.repo_name,
MIN(origin_sort || '-' || permission_name) as perm
FROM (
SELECT
'' as ug,
permissions.permission_name,
user_id,
repository_id,
'1-user' as origin_sort
FROM
repo_to_perm
JOIN
permissions ON
permissions.permission_id = repo_to_perm.permission_id
-- WHERE repository_id = 190
UNION ALL
SELECT
users_groups.users_group_name,
permissions.permission_name,
users_groups_members.user_id,
repository_id,
'2-usergroup-' || users_groups.users_group_name as origin_sort
FROM
users_group_repo_to_perm
JOIN
permissions ON
permissions.permission_id = users_group_repo_to_perm.permission_id
JOIN
users_groups_members
ON
users_groups_members.users_group_id = users_group_repo_to_perm.users_group_id
JOIN
users_groups
ON
users_group_repo_to_perm.users_group_id = users_groups.users_group_id
-- WHERE repository_id = 190
) tmp_user_and_usergroup_perms
JOIN users ON users.user_id = tmp_user_and_usergroup_perms.user_id
JOIN repositories ON repositories.repo_id = tmp_user_and_usergroup_perms.repository_id
GROUP BY users.username, repositories.repo_name
ORDER BY username, perm
;
</code></pre> RhodeCode CE/EE - Bug #4121 (Resolved): [ce, ee] server announcement has extra marginhttps://issues.rhodecode.com/issues/41212016-07-25T00:12:12ZDaniel Ddaniel@rhodecode.com
<p>Steps to reproduce:</p>
<ul>
<li>goto /_admin/settings/global</li>
<li>pick 'server announcement' in Custom Header Code</li>
<li>save</li>
<li>there white space at top of page before the announcement</li>
</ul>
<p>The announcement script injects an which has a 40px margin-top.</p>
<p>We could inline style="margin-top: 0" in the script code - or refactor .alert boxes to avoid having a defined margin.</p>
RhodeCode CE/EE - Task #4120 (New): [ce] replace get_repo_nodes apihttps://issues.rhodecode.com/issues/41202016-07-24T20:55:21ZDaniel Ddaniel@rhodecode.com
<p>The current get_repo_nodes api loads the entire repo in one go, for a large repo (gbs) this will result in an output at least the size of the repo, which can cause memory issues, currently issue #4114 adds a max_file_bytes to work around this issue for the full text search indexer but a more long term solution is required:</p>
<p>Splitting get_repo_nodes into 2 actions, one to get the nodes, another to get node data should solve this, also since getting node content one by one would be slow it would be a good idea to allow batch node retrieval.</p>
<p>The methods required would go along the lines of:</p>
<pre><code>get_repo_nodes(repo_name, version, node_paths)
=>[
{'path': '/README', 'size': 434},
{'path': '.gitconfig', 'size': 53},
{'path': '/some/file', 'size': 5223},
{'path': '/another/file', 'size': 6433}
]
get_node_content('somerepo', 'tip', ['/README', '/some/file']) => contents of those 2 files only
</code></pre> RhodeCode CE/EE - Bug #3950 (Resolved): [ce, ee] trying to merge pr against a deleted branch/book...https://issues.rhodecode.com/issues/39502016-05-20T12:35:41ZDaniel Ddaniel@rhodecode.com
<p>reproduce steps:</p>
<ul>
<li>create PR against a bookmark/branch</li>
<li>delete bookmark/branch in the target repository</li>
<li>try merge the PR or even just opening the PR page again</li>
</ul>
<p>reproduce steps:</p>
<ul>
<li>create a PR from a bookmark in a fork to the base repo</li>
<li>remove the bookmark in the fork</li>
<li>Observe: Message that an unknown exception occured</li>
<li>Expect: Understandable message that the source bookmark does not exist anymore. (compare missing source commits)</li>
</ul>
<p>ae report:<br>
<a href="https://internal-code.rhodecode.com/dan/rhodecode-enterprise-ce-dan/pull-request/2229" class="external">https://internal-code.rhodecode.com/dan/rhodecode-enterprise-ce-dan/pull-request/2229</a></p>