Project

General

Profile

Actions

Bug #5513

open

Gist: GitHub flavoured markdown gist creation fails

Added by Arun Chandrasekaran over 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
12.11.2018
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

Actions #1

Updated by Arun Chandrasekaran over 5 years ago

For the first time gist creation:

[12/Nov/2018:09:31:04 -0800] GNCRN <21095>  10.0.0.40       rqt:0.017271 200 0 "GET:/_static/rhodecode/js/mode/xml/xml.js ver=813de38a" usr:- "https://10.4.130.21/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
2018-11-12 09:31:06.669 [21094] INFO  [rhodecode.lib.auth] user <AuthUser('id:2[arun] ip:10.0.0.40 auth:True')> authenticating with:RHODECODE_AUTH IS authenticated on func GistView:gist_create
2018-11-12 09:31:06.692 [21094] ERROR [rhodecode.apps.gist.views] Exception while trying to create a gist
Traceback (most recent call last):
  File "/opt/rhodecode/store/56kin2h8jbribv7wxd6a4gr6a3vj4f9h-python2.7-rhodecode-enterprise-ce-4.14.1/lib/python2.7/site-packages/rhodecode/apps/gist/views.py", line 185, in gist_create
    gist_acl_level=schema_data['gist_acl_level']
  File "/opt/rhodecode/store/56kin2h8jbribv7wxd6a4gr6a3vj4f9h-python2.7-rhodecode-enterprise-ce-4.14.1/lib/python2.7/site-packages/rhodecode/model/gist.py", line 149, in create
    use_global_config=True)
  File "/opt/rhodecode/store/56kin2h8jbribv7wxd6a4gr6a3vj4f9h-python2.7-rhodecode-enterprise-ce-4.14.1/lib/python2.7/site-packages/rhodecode/model/repo.py", line 860, in _create_filesystem_repo
    raise Exception('This path %s is a valid repository' % repo_path)
Exception: This path /home/arun/repos/.rc_gist_store/6 is a valid repository

For the second time gist creation with plain mode:

2018-11-12 09:31:17.872 [21093] INFO  [rhodecode.lib.auth] user <AuthUser('id:2[arun] ip:10.0.0.40 auth:True')> authenticating with:RHODECODE_AUTH IS authenticated on func GistView:gist_create
2018-11-12 09:31:17.893 [21093] ERROR [rhodecode.apps.gist.views] Exception while trying to create a gist
Traceback (most recent call last):
  File "/opt/rhodecode/store/56kin2h8jbribv7wxd6a4gr6a3vj4f9h-python2.7-rhodecode-enterprise-ce-4.14.1/lib/python2.7/site-packages/rhodecode/apps/gist/views.py", line 185, in gist_create
    gist_acl_level=schema_data['gist_acl_level']
  File "/opt/rhodecode/store/56kin2h8jbribv7wxd6a4gr6a3vj4f9h-python2.7-rhodecode-enterprise-ce-4.14.1/lib/python2.7/site-packages/rhodecode/model/gist.py", line 149, in create
    use_global_config=True)
  File "/opt/rhodecode/store/56kin2h8jbribv7wxd6a4gr6a3vj4f9h-python2.7-rhodecode-enterprise-ce-4.14.1/lib/python2.7/site-packages/rhodecode/model/repo.py", line 860, in _create_filesystem_repo
    raise Exception('This path %s is a valid repository' % repo_path)
Exception: This path /home/arun/repos/.rc_gist_store/6 is a valid repository
Actions #2

Updated by Daniel D over 5 years ago

  • Status changed from New to Resolved

This must the artifact from the previous installation or upgrade. It means before public gists were created inside the storage, and since DB sequence counter starts from 1 there are conflicts.

To fix this:

Remove all public gists from /home/arun/repos/.rc_gist_store/ (those with numbers)

Actions #3

Updated by Arun Chandrasekaran over 5 years ago

You are right. I can see the old artifacts from Kallithea. Let me try getting rid of these artifacts. However, why does this issue happen only with GitHub flavoured markdown?

[arun@rhodecode community-1]$ ls -l /home/arun/repos/.rc_gist_store/
total 0
drwxr-xr-x. 3 arun arun 16 Feb  2  2017 11
drwxr-xr-x. 3 arun arun 16 Feb  3  2017 12
drwxr-xr-x. 3 arun arun 16 May 26  2017 13
drwxr-xr-x. 3 arun arun 16 Sep 11  2017 14
drwxr-xr-x. 3 arun arun 16 May  9  2018 15
drwxr-xr-x. 3 arun arun 16 Jul  9 11:31 16
drwxr-xr-x. 3 arun arun 16 Jul 15 19:20 17
drwxr-xr-x. 3 arun arun 16 May 16  2016 2
drwxr-xr-x. 3 arun arun 16 Jul 23 09:35 20
drwxr-xr-x. 3 arun arun 16 May 17  2016 3
drwxr-xr-x. 3 arun arun 16 May 18  2016 4
drwxr-xr-x. 3 arun arun 16 Nov 11 00:35 5
drwxr-xr-x. 3 arun arun 16 May 26  2016 6
drwxr-xr-x. 3 arun arun 16 Jun 29  2016 7
drwxr-xr-x. 3 arun arun 16 Jul 25  2016 8
drwxr-xr-x. 3 arun arun 16 Oct  4  2016 9
drwxr-xr-x. 3 arun arun 16 Nov 11 00:28 DbWTXPplNUvuCjpmFDPq
drwxr-xr-x. 3 arun arun 16 Jul 18 12:39 FX5xskb6DarNQEGlXrfc
drwxr-xr-x. 3 arun arun 16 Nov 12 12:14 msWhzaNDpblMEnBAlTQv
drwxr-xr-x. 3 arun arun 16 Oct  2 23:05 PchEsbbAuzGpuMEG7Thk
drwxr-xr-x. 3 arun arun 16 Oct 25 16:48 snFyrqJkFs4BHQ2BL5zX
drwxr-xr-x. 3 arun arun 16 Nov 10 10:01 szLRKZQxaMfZWxqrWzTA
[arun@rhodecode community-1]$
Actions #4

Updated by Arun Chandrasekaran over 5 years ago

Thanks! I can confirm that addresses the issue.

However the GitHub markdown rendering is not good.

Rendering on GitHub

Rendering on RC

it looks like this.

Actions #5

Updated by Redmine Integration about 5 years ago

Commit d18fef6568c8 by Marcin Kuzminski marcin@rhodecode.com on default branch references this issue.
https://code.rhodecode.com/rhodecode-enterprise-ce/changeset/d18fef6568c81fc645c0505d6f0fa405e02071f2

Actions #6

Updated by Arun Chandrasekaran about 5 years ago

GitHub Flavoured Markdown rendering is still an issue. This results in wrong output.

- [ ] test1
- [x] test2

Actions #7

Updated by Marcin Kuzminski [CTO] about 5 years ago

  • Status changed from Resolved to In Progress

COnfirmed, looks like the sandboxer is to strict and removes "checked" attribute :(

We'll fix this in 4.16.1

Actions #8

Updated by Arun Chandrasekaran about 5 years ago

Just so I'm being clear, there are two issues with this rendering.

  1. bullets shall not appear in front of the checkbox
  2. checkbox not getting checked
Actions #9

Updated by Redmine Integration almost 5 years ago

pullrequest created by idlsoft (status: under_review).
https://code.rhodecode.com/rhodecode-enterprise-ce/pull-request/2298

Actions #10

Updated by Redmine Integration over 4 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF