Re: Review Board Ticket #4699: Wrong filtering of opcodes for an interdiff

2018-06-06 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4699/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4699


Reply:

I posted review request with fix for filtering issue: 
https://reviews.reviewboard.org/r/1/
I commented out call to 'opcodes = self._apply_processors(opcodes) ' , ( so 
the processors.py file can be removed)
After receiving not filtered interdiff chunks, I created diff chunks, and 
compare changed lines in both chunks(diff and interdiff)
The Lines from interdiff, that do not exist in diff chunk, marked as 'equal'
The new code is much shorter and clear, and create correct results in all 
cases

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Review Board Ticket #4699: Wrong filtering of opcodes for an interdiff

2018-06-01 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4699/
--

New ticket #4699 by alexG
For Beanbag, Inc. > Review Board

Status: New
Tags: Priority:Medium, Type:Defect

File attachments:

 * src2.txt
   

 * rev1.txt
   

 * src1.txt
   

 * rev2.txt
   



--
Wrong filtering of opcodes for an interdiff
==

# What version are you running?
2.5.17, but the same issue in the latest RB

# What's the URL of the page containing the problem?


# What steps will reproduce the problem?
1. Original file 'src1'
2. 1-st user modify 'src1' in line 6: '-4.0.16' to '-4.0.17' and post this 
change to RB#1 (rev1)
3. 2-nd user modify 'src1' in line 5: '6.0.11' -> '6.0.12' and check in to 
repository (src2)
4. 1-st user update from repository, and revert modified file
5. 1-st user  modify 'src2' in line 6: '-4.0.16' to '-4.0.17' and post this 
change to RB (rev2)


# What is the expected output? What do you see instead?
in RB#1. inerdiff 2-3 show that line 5 changed
diff 2-1 and 3-1 show line 6 changed

Expected that interdiff will show white space only, and not mark line 5 as 
modified, because this change has been done by another user


# What operating system are you using? What browser?
windows, Ubuntu, Chrome, Firefox,..

# Please provide any additional information below.
In function 'filter_interdiff_opcodes', opcodes range: (4,5), the new_range and 
orig_range: (4,5) in the latest RB revision, and (4,9) in rev 2.5.17

I can provide other cases, where in similar situation, when different source 
versions in interdiff, the lines that really changed by the user, marked as 
equal

Please let me know what you think, and I will dig a code to solve this issue


--

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-03 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4693


Reply:

Thank you very much. We set this limit, but we still see slow loading for 
this file, even chunks taken from memcashed. Looks like it caused by network 
transfer time of this big file

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-03 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4693


Reply:

the Syntax highlighting threshold is set to 0

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-03 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4693


Reply:

I have another question-proposal: What if we do not load all chunks after 
page loaded, but load chunks for each one file after clicking file name on a 
list, and display only one file on a page. It will help user to easy see whole 
file list and select particular file, if there are 20+ files changed ( I see 
request with 260 files). Also if there are many big files, it will reduce long 
mouse scrolling. also it will eliminate the issue that we are discussing now

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-03 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4693


Reply:

I found that the problematic file 'File_name_AR9888v2.h', has 13649 lines, 
and has a change almost in every line ( it is an array of 218321 hex numbers)

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-03 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4693


Reply:

The log:

2018-05-01 18:25:49,020 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720833/ - root - Begin: Generating diff chunks for 
self.filediff id 720833 (File_name.h)
2018-05-01 18:25:49,138 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720833/ - root - End: Generating diff chunks for 
self.filediff id 720833 (File_name.h)
2018-05-01 18:25:49,139 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720833/ - root - Generating diff chunks for 
self.filediff id 720833 (File_name.h) took 0.118354 seconds
2018-05-01 18:25:49,259 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - Begin: Generating diff file info for 
diffset id 32493, filediff 720834
2018-05-01 18:25:49,261 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - End: Generating diff file info for 
diffset id 32493, filediff 720834
2018-05-01 18:25:49,261 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - Generating diff file info for 
diffset id 32493, filediff 720834 took 0.001912 seconds
2018-05-01 18:25:49,262 - DEBUG -  - djblets.cache.backend - Cache miss for 
key 
diffviewer/diff_file_fragment.html-1-2-720834-collapsed-highlighting-en-1516673975.
2018-05-01 18:25:49,262 - DEBUG -  - djblets.cache.backend - Cache miss for 
key diff-sidebyside-hl-720834-en.
2018-05-01 18:25:49,429 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - Begin: Patching file 
File_name_AR9888v2.h
2018-05-01 18:25:49,485 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - End: Patching file 
File_name_AR9888v2.h
2018-05-01 18:25:49,485 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - Patching file File_name_AR9888v2.h 
took 0.055174 seconds
2018-05-01 18:25:49,501 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - Begin: Generating diff chunks for 
self.filediff id 720834 (File_name_AR9888v2.h)
2018-05-01 18:25:54,865 - DEBUG -  - root - Begin: Generating diff file 
info for diffset id 28621, filediff 628965
2018-05-01 18:25:54,869 - DEBUG -  - root - End: Generating diff file info 
for diffset id 28621, filediff 628965
2018-05-01 18:25:54,870 - DEBUG -  - root - Generating diff file info for 
diffset id 28621, filediff 628965 took 0.003926 seconds
2018-05-01 18:25:55,082 - DEBUG -  - root - Begin: Generating diff file 
info for diffset id 28621, filediff 628965
2018-05-01 18:25:55,085 - DEBUG -  - root - End: Generating diff file info 
for diffset id 28621, filediff 628965
2018-05-01 18:25:55,085 - DEBUG -  - root - Generating diff file info for 
diffset id 28621, filediff 628965 took 0.003231 seconds
2018-05-01 18:25:56,031 - WARNING -  - root - Unable to store all filenames 
in the X-ReviewBoard-Diff-For headers when sending e-mail for review request 
117665: The header size exceeds the limit of 8192. Remaining headers have been 
omitted.
2018-05-01 18:25:56,139 - INFO -  - fortinet.email - reply email sent, time 
emailed:2018-05-01 18:25:56.139850+00:00, rqst_id:117665, review_id:84698, 
reply_id:93028, cc:cc_listI, to:zglei
2018-05-01 18:25:56,225 - DEBUG - None - kau - /r/119080/diff/ - root - 
Generating diff viewer page for filediff id 30058
2018-05-01 18:25:56,239 - DEBUG - None - kau - /r/119080/diff/ - root - 
Begin: Generating diff file info for diffset id 30058
2018-05-01 18:25:56,241 - DEBUG - None - kau - /r/119080/diff/ - root - 
End: Generating diff file info for diffset id 30058
2018-05-01 18:25:56,241 - DEBUG - None - kau - /r/119080/diff/ - root - 
Generating diff file info for diffset id 30058 took 0.001950 seconds
2018-05-01 18:25:56,244 - DEBUG - None - kau - /r/119080/diff/ - root - 
Done generating diff viewer page for filediff id 30058
2018-05-01 18:26:00,180 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - End: Generating diff chunks for 
self.filediff id 720834 (File_name_AR9888v2.h)
2018-05-01 18:26:00,180 - WARNING - None - zxqiu - 
/r/120588/diff/2/fragment/720834/ - root - Generating diff chunks for 
self.filediff id 720834 (File_name_AR9888v2.h) took 10.678755 seconds
2018-05-01 18:26:02,707 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720835/ - root - Begin: Generating diff file info for 
diffset id 32493, filediff 720835
2018-05-01 18:26:02,709 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720835/ - root - End: Generating diff file info for 
diffset id 32493, filediff 720835
2018-05-01 18:26:02,709 - DEBUG - None - zxqiu - 
/r/120588/diff/2/fragment/720835/ - root - Generating diff file info for 
diffset id 32493, filediff 720835 took 0.001829 

Re: Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-03 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4693


Reply:

The server spec is for VM. It is probably some other staff running on this 
machine

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-03 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4693


Reply:

Our ReviewBoard server is on VM, and have the following:
CPU: 8, Memory: 24GB,Hard Disk: 469GB
we will increase memcached from 1024MB to 4096MB.

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-03 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New update by alexG
For Beanbag, Inc. > Review Board > Ticket #4693


Reply:

In the log, I see WARNINGs like "Generating diff chunks for self.filediff 
id ... took 8.655728 seconds" or "Generating diff file info for interdiffset 
ids ... took 24.726037 seconds". 
But no warnings for "Fetching file ..". Usually, fetching takes 0.01-0.2 
sec. 
We will send you the specs for our ReviewBoard server, tomorrow.
Thank you very much for your help

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Review Board Ticket #4693: Long time loading diff chunks for interdiffs

2018-05-01 Thread Alexander Galperin
--
To reply, visit https://hellosplat.com/s/beanbag/tickets/4693/
--

New ticket #4693 by alexG
For Beanbag, Inc. > Review Board

Status: New
Tags: Priority:Medium, Type:Defect


--
Long time loading diff chunks for interdiffs
==

# What version are you running?
2.5.17

# What's the URL of the page containing the problem?
/r/\d+/diff/\d-\d/

# What steps will reproduce the problem?
1. Reviewrequest with 8 or more diff revisions with 30 or more files
If chunks are not in memcache, it will take about 1 min to load diff chunks 
fo 20 files (1 page). 

2. Move marker from 'orig' to 4. It will start downloading chunks for interdiff 
4-8. Then move other marker to 5 (because you want diff 4-5). The first 
marker will  move to 'orig'(or other position), and after 1 min will start 
downloading chunks for other interdiff, and it can never finish (evrything 
messed-up and you may need to type 4-5 in the link and  refresh page o get what 
you want)

3. When you want to expand changes, it again takes long time to load 20 files


# What is the expected output? What do you see instead?
1. for issue 1, suggest to calculate chunks at the beginng(when saving new diff 
in database) convert to json and save in the new table DIFF_CHUNKS with fields 
(requestID, diff1,diff2, filename, chunk). Need row for every interdiff 
combination. Than use the saved chunks to render them to the page. Downloading 
time will always be as it taken from memcache

2. for issue 2, suggest do not send request to server on every move of the 
marker, but to have refresh button for downloading new chunks

3. for issue 3, suggest to have expand button on every file-chunk html, and 
expand/collaps every file separately, using ajax request




# What operating system are you using? What browser?
Ubuntu 14, 16, any browser

# Please provide any additional information below.
If you agree for these 3 proposals, I can implement them


--

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot install extension after upgrading from 2.5.6.1 to 2.5.12 - lessc not found!

2017-06-13 Thread Alexander Galperin
Actually,adding pipeline_settings.PIPELINE_LESS_BINARY and 
pipeline_settings.PIPELINE_UGLIFYJS_BINARY to packaging.py is not nesessary.
Without these settings the default pipeline setting will be 
used,('/usr/bin/env lessc','/usr/bin/env uglifyjs') and it has less and 
uglify execs.
so the only need to remove these attributes from ReviewBoard settings.

On Tuesday, June 13, 2017 at 12:19:24 PM UTC-7, Alexander Galperin wrote:
>
> Thank you Christian,
> Definitely these 2 statements are needed. But it still did not worked
> I found that these values overwritten in a loop in the 
> packaging.py/_build_static_media(extention),because ReviewBoard settings, 
> has attributes PIPELINE_LESS_BINARY and  PIPELINE_UGLIFYJS_BINARY:
> from pipeline.conf import settings as pipeline_settings
>
> for key in six.iterkeys(pipeline_settings.__dict__):
> if hasattr(settings, key):
> setattr(pipeline_settings, key, getattr(settings, key))
>
> So, I 
> modified 
> /usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.12.dev0-py2.7.egg/reviewboard/settings.py,
>  
> by removing these 2 attributes, and it works now:
> # Static media setup
> from reviewboard.staticbundles import PIPELINE_CSS, PIPELINE_JS
>
> NODE_PATH = os.path.join(REVIEWBOARD_ROOT, '..', 'node_modules')
>
> # PIPELINE_LESS_BINARY = os.path.join(NODE_PATH, 'less', 'bin', 'lessc')
> # PIPELINE_UGLIFYJS_BINARY = os.path.join(NODE_PATH, 'uglifyjs', 'bin',
> #'uglifyjs')
>
>
>
> On Monday, June 12, 2017 at 6:13:39 PM UTC-7, Christian Hammond wrote:
>>
>> I think I see where the problem is. I'm confused as to why I'm not 
>> hitting the same failure case, but I honestly don't have a lot of time to 
>> dig into it right now.
>>
>> In install_pipeline_deps, try doing:
>>
>> pipeline_settings.LESS_BINARY = \
>> os.path.join(node_modules_dir, 'less', 'bin', 'lessc')
>> pipeline_settings.PIPELINE_LESS_BINARY = \
>> pipeline_settings.LESS_BINARY
>>
>> ...
>>
>> pipeline_settings.UGLIFYJS_BINARY = \
>> os.path.join(node_modules_dir, 'uglifyjs', 'bin', 
>> 'uglifyjs')
>> pipeline_settings.PIPELINE_UGLIFYJS_BINARY = \
>>     pipeline_settings.UGLIFYJS_BINARY
>>
>>
>> (Adding the second statement in each batch)
>>
>> See if that gets you any further.
>>
>> Christian
>>
>> On Mon, Jun 12, 2017 at 6:03 PM, Alexander Galperin <
>> galperin@gmail.com> wrote:
>>
>>> Set in packaging.py:
>>> # Collect and process all static media files.
>>>* print 'PIPELINE_LESS_BINARY1 = 
>>> {}'.format(pipeline_settings.LESS_BINARY)*
>>> *print 'PIPELINE_UGLIFYJS_BINARY1 = 
>>> {}'.format(pipeline_settings.UGLIFYJS_BINARY)*
>>> call_command('collectstatic', interactive=False, verbosity=2)
>>>
>>> Output is good:
>>> PIPELINE_LESS_BINARY1 = 
>>> /src2/rb-extension-pack/fortinet/build/node_modules/less/bin/lessc
>>> PIPELINE_UGLIFYJS_BINARY1 = 
>>> /src2/rb-extension-pack/fortinet/build/node_modules/uglifyjs/bin/uglifyjs
>>>
>>>
>>> On Monday, June 12, 2017 at 5:51:13 PM UTC-7, Alexander Galperin wrote:
>>>>
>>>> Set print 
>>>> in /usr/local/lib/python2.7/dist-packages/pipeline/compressors/uglifyjs.py:
>>>> class UglifyJSCompressor(SubProcessCompressor):
>>>> def compress_js(self, js):
>>>> *print 'PIPELINE_SETTING_UGLIFYJS_BINARY = 
>>>> {}'.format(settings.PIPELINE_UGLIFYJS_BINARY)*
>>>> command = '%s %s' % (settings.PIPELINE_UGLIFYJS_BINARY, 
>>>> settings.PIPELINE_UGLIFYJS_ARGUMENTS)
>>>> if self.verbose:
>>>> command += ' --verbose'
>>>> return self.execute_command(command, js)
>>>> output:
>>>> PIPELINE_SETTING_UGLIFYJS_BINARY = /usr/local/lib/python2.7/dist-
>>>> packages/ReviewBoard-2.5.12.dev0-py2.7.egg/reviewboard/../node_modules/
>>>> uglifyjs/bin/uglifyjs
>>>>  And it takes from 'settings', which probably is wrong
>>>>
>>>> I will try to stop in call_command
>>>>
>>>>
>>>> On Monday, June 12, 2017 at 5:37:29 PM UTC-7, Christian Hammond wrote:
>>>>>
>>>>> Can you also try placing debugging output right before the 
>>>>> "call_command('collectstatic', ...)" command in _build_static_media?
>

Re: Cannot install extension after upgrading from 2.5.6.1 to 2.5.12 - lessc not found!

2017-06-13 Thread Alexander Galperin
Thank you Christian,
Definitely these 2 statements are needed. But it still did not worked
I found that these values overwritten in a loop in the 
packaging.py/_build_static_media(extention),because ReviewBoard settings, 
has attributes PIPELINE_LESS_BINARY and  PIPELINE_UGLIFYJS_BINARY:
from pipeline.conf import settings as pipeline_settings

for key in six.iterkeys(pipeline_settings.__dict__):
if hasattr(settings, key):
setattr(pipeline_settings, key, getattr(settings, key))

So, I 
modified 
/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.12.dev0-py2.7.egg/reviewboard/settings.py,
 
by removing these 2 attributes, and it works now:
# Static media setup
from reviewboard.staticbundles import PIPELINE_CSS, PIPELINE_JS

NODE_PATH = os.path.join(REVIEWBOARD_ROOT, '..', 'node_modules')

# PIPELINE_LESS_BINARY = os.path.join(NODE_PATH, 'less', 'bin', 'lessc')
# PIPELINE_UGLIFYJS_BINARY = os.path.join(NODE_PATH, 'uglifyjs', 'bin',
#'uglifyjs')



On Monday, June 12, 2017 at 6:13:39 PM UTC-7, Christian Hammond wrote:
>
> I think I see where the problem is. I'm confused as to why I'm not hitting 
> the same failure case, but I honestly don't have a lot of time to dig into 
> it right now.
>
> In install_pipeline_deps, try doing:
>
> pipeline_settings.LESS_BINARY = \
> os.path.join(node_modules_dir, 'less', 'bin', 'lessc')
> pipeline_settings.PIPELINE_LESS_BINARY = \
> pipeline_settings.LESS_BINARY
>
> ...
>
> pipeline_settings.UGLIFYJS_BINARY = \
> os.path.join(node_modules_dir, 'uglifyjs', 'bin', 
> 'uglifyjs')
> pipeline_settings.PIPELINE_UGLIFYJS_BINARY = \
> pipeline_settings.UGLIFYJS_BINARY
>
>
> (Adding the second statement in each batch)
>
> See if that gets you any further.
>
> Christian
>
> On Mon, Jun 12, 2017 at 6:03 PM, Alexander Galperin <
> galperin@gmail.com > wrote:
>
>> Set in packaging.py:
>> # Collect and process all static media files.
>>* print 'PIPELINE_LESS_BINARY1 = 
>> {}'.format(pipeline_settings.LESS_BINARY)*
>> *print 'PIPELINE_UGLIFYJS_BINARY1 = 
>> {}'.format(pipeline_settings.UGLIFYJS_BINARY)*
>> call_command('collectstatic', interactive=False, verbosity=2)
>>
>> Output is good:
>> PIPELINE_LESS_BINARY1 = 
>> /src2/rb-extension-pack/fortinet/build/node_modules/less/bin/lessc
>> PIPELINE_UGLIFYJS_BINARY1 = 
>> /src2/rb-extension-pack/fortinet/build/node_modules/uglifyjs/bin/uglifyjs
>>
>>
>> On Monday, June 12, 2017 at 5:51:13 PM UTC-7, Alexander Galperin wrote:
>>>
>>> Set print 
>>> in /usr/local/lib/python2.7/dist-packages/pipeline/compressors/uglifyjs.py:
>>> class UglifyJSCompressor(SubProcessCompressor):
>>> def compress_js(self, js):
>>> *print 'PIPELINE_SETTING_UGLIFYJS_BINARY = 
>>> {}'.format(settings.PIPELINE_UGLIFYJS_BINARY)*
>>> command = '%s %s' % (settings.PIPELINE_UGLIFYJS_BINARY, settings
>>> .PIPELINE_UGLIFYJS_ARGUMENTS)
>>> if self.verbose:
>>> command += ' --verbose'
>>> return self.execute_command(command, js)
>>> output:
>>> PIPELINE_SETTING_UGLIFYJS_BINARY = /usr/local/lib/python2.7/dist-
>>> packages/ReviewBoard-2.5.12.dev0-py2.7.egg/reviewboard/../node_modules/
>>> uglifyjs/bin/uglifyjs
>>>  And it takes from 'settings', which probably is wrong
>>>
>>> I will try to stop in call_command
>>>
>>>
>>> On Monday, June 12, 2017 at 5:37:29 PM UTC-7, Christian Hammond wrote:
>>>>
>>>> Can you also try placing debugging output right before the 
>>>> "call_command('collectstatic', ...)" command in _build_static_media?
>>>>
>>>> Along with this, try printing `command` in pipeline/compilers/less.py 
>>>> (pipeline will be another module in site-packages somewhere, perhaps under 
>>>> a django-pipeline-* directory).
>>>>
>>>> Christian
>>>>
>>>> On Mon, Jun 12, 2017 at 5:22 PM, Alexander Galperin <
>>>> galperin@gmail.com> wrote:
>>>>
>>>>> I've put some print in packaging.py to help debugging. Here's what I 
>>>>> have changed:
>>>>>  def install_pipeline_deps(self, extension, css_bundles, js_bundles):
>>>>> ...
>>>>> ...
>>>>> with open(package_file, 'w') as fp:
>>>>> fp.write(json.dumps(
>>>>>  

Re: Cannot install extension after upgrading from 2.5.6.1 to 2.5.12 - lessc not found!

2017-06-12 Thread Alexander Galperin
Stop in /usr/local/lib/python2.7/dist-packages/pipeline/compilers/less.py:
 def compile_file(self, infile, outfile, outdated=False, force=False):
*print 'settings_PIPELINE_LESS_BINARY = 
{}'.format(settings.PIPELINE_LESS_BINARY)*
command = "%s %s %s %s" % (
settings.PIPELINE_LESS_BINARY,
settings.PIPELINE_LESS_ARGUMENTS,
infile,
outfile
)

Output:
settings_PIPELINE_LESS_BINARY = /usr/local/lib/python2.7/dist-packages/
ReviewBoard-2.5.12.dev0-py2.7.egg/reviewboard/../node_modules/less/bin/lessc
Again, it takes from 'settings'


On Monday, June 12, 2017 at 5:51:13 PM UTC-7, Alexander Galperin wrote:
>
> Set print 
> in /usr/local/lib/python2.7/dist-packages/pipeline/compressors/uglifyjs.py:
> class UglifyJSCompressor(SubProcessCompressor):
> def compress_js(self, js):
> *print 'PIPELINE_SETTING_UGLIFYJS_BINARY = 
> {}'.format(settings.PIPELINE_UGLIFYJS_BINARY)*
> command = '%s %s' % (settings.PIPELINE_UGLIFYJS_BINARY, settings.
> PIPELINE_UGLIFYJS_ARGUMENTS)
> if self.verbose:
> command += ' --verbose'
> return self.execute_command(command, js)
> output:
> PIPELINE_SETTING_UGLIFYJS_BINARY = /usr/local/lib/python2.7/dist-packages/
> ReviewBoard-2.5.12.dev0-py2.7.egg/reviewboard/../node_modules/uglifyjs/bin
> /uglifyjs
>  And it takes from 'settings', which probably is wrong
>
> I will try to stop in call_command
>
>
> On Monday, June 12, 2017 at 5:37:29 PM UTC-7, Christian Hammond wrote:
>>
>> Can you also try placing debugging output right before the 
>> "call_command('collectstatic', ...)" command in _build_static_media?
>>
>> Along with this, try printing `command` in pipeline/compilers/less.py 
>> (pipeline will be another module in site-packages somewhere, perhaps under 
>> a django-pipeline-* directory).
>>
>> Christian
>>
>> On Mon, Jun 12, 2017 at 5:22 PM, Alexander Galperin <
>> galperin@gmail.com> wrote:
>>
>>> I've put some print in packaging.py to help debugging. Here's what I 
>>> have changed:
>>>  def install_pipeline_deps(self, extension, css_bundles, js_bundles):
>>> ...
>>> ...
>>> with open(package_file, 'w') as fp:
>>> fp.write(json.dumps(
>>> {
>>> 'name': '%s-extension' % 
>>> os.path.basename(os.getcwd()),
>>> 'private': 'true',
>>> 'devDependencies': {},
>>> 'dependencies': dependencies,
>>> },
>>> indent=2))
>>>
>>> old_cwd = os.getcwd()
>>> os.chdir(build_dir)
>>> *print 'PIPELINE_LESS_BINARY = 
>>> {}'.format(pipeline_settings.LESS_BINARY)*
>>> *print 'PIPELINE_UGLIFYJS_BINARY = 
>>> {}'.format(pipeline_settings.UGLIFYJS_BINARY)*
>>> self.npm_install()
>>>
>>> And the output is:
>>> PIPELINE_LESS_BINARY = /src2/rb-extension-pack/fortinet/build/
>>> node_modules/less/bin/lessc
>>> PIPELINE_UGLIFYJS_BINARY = /src2/rb-extension-pack/fortinet/build/
>>> node_modules/uglifyjs/bin/uglifyjs
>>>
>>> Also build/node_modules.. created in extention directory, so the path is 
>>> correct at this point
>>>
>>> On Monday, June 12, 2017 at 5:17:15 PM UTC-7, Christian Hammond wrote:
>>>>
>>>> Hi Kevin,
>>>>
>>>> printing in settings.py won't tell you anything of value. Those are the 
>>>> correct locations at the time that settings.py loaded, but they're 
>>>> overridden during the packaging process. The locations mentioned in my 
>>>> previous e-mail are where that happens. Solving this will require 
>>>> narrowing 
>>>> down the locations where the path is correct and where it's incorrect in 
>>>> that process.
>>>>
>>>> Christian
>>>>
>>>> On Mon, Jun 12, 2017 at 2:49 PM, Kevin Yu <sams...@gmail.com> wrote:
>>>>
>>>>> Hi Christian,
>>>>>
>>>>> Thanks for trying out. I also did some debugging to see if I can find 
>>>>> any information. I added some print in the settings.py  
>>>>>
>>>>> PIPELINE_LESS_BINARY = os.path.join(NODE_PATH, 'less', 'bin', 'lessc')
>>>>> PIPELINE_UGLIFYJS_BINARY = os.path.join(NODE_PATH, 'uglifyjs', 'bin',
>>>>> 'uglifyjs')
>>>>> print 'PIPELI

Re: Cannot install extension after upgrading from 2.5.6.1 to 2.5.12 - lessc not found!

2017-06-12 Thread Alexander Galperin
Set in packaging.py:
# Collect and process all static media files.
   * print 'PIPELINE_LESS_BINARY1 = 
{}'.format(pipeline_settings.LESS_BINARY)*
*print 'PIPELINE_UGLIFYJS_BINARY1 = 
{}'.format(pipeline_settings.UGLIFYJS_BINARY)*
call_command('collectstatic', interactive=False, verbosity=2)

Output is good:
PIPELINE_LESS_BINARY1 = 
/src2/rb-extension-pack/fortinet/build/node_modules/less/bin/lessc
PIPELINE_UGLIFYJS_BINARY1 = 
/src2/rb-extension-pack/fortinet/build/node_modules/uglifyjs/bin/uglifyjs


On Monday, June 12, 2017 at 5:51:13 PM UTC-7, Alexander Galperin wrote:
>
> Set print 
> in /usr/local/lib/python2.7/dist-packages/pipeline/compressors/uglifyjs.py:
> class UglifyJSCompressor(SubProcessCompressor):
> def compress_js(self, js):
> *print 'PIPELINE_SETTING_UGLIFYJS_BINARY = 
> {}'.format(settings.PIPELINE_UGLIFYJS_BINARY)*
> command = '%s %s' % (settings.PIPELINE_UGLIFYJS_BINARY, settings.
> PIPELINE_UGLIFYJS_ARGUMENTS)
> if self.verbose:
> command += ' --verbose'
> return self.execute_command(command, js)
> output:
> PIPELINE_SETTING_UGLIFYJS_BINARY = /usr/local/lib/python2.7/dist-packages/
> ReviewBoard-2.5.12.dev0-py2.7.egg/reviewboard/../node_modules/uglifyjs/bin
> /uglifyjs
>  And it takes from 'settings', which probably is wrong
>
> I will try to stop in call_command
>
>
> On Monday, June 12, 2017 at 5:37:29 PM UTC-7, Christian Hammond wrote:
>>
>> Can you also try placing debugging output right before the 
>> "call_command('collectstatic', ...)" command in _build_static_media?
>>
>> Along with this, try printing `command` in pipeline/compilers/less.py 
>> (pipeline will be another module in site-packages somewhere, perhaps under 
>> a django-pipeline-* directory).
>>
>> Christian
>>
>> On Mon, Jun 12, 2017 at 5:22 PM, Alexander Galperin <
>> galperin@gmail.com> wrote:
>>
>>> I've put some print in packaging.py to help debugging. Here's what I 
>>> have changed:
>>>  def install_pipeline_deps(self, extension, css_bundles, js_bundles):
>>> ...
>>> ...
>>> with open(package_file, 'w') as fp:
>>> fp.write(json.dumps(
>>> {
>>> 'name': '%s-extension' % 
>>> os.path.basename(os.getcwd()),
>>> 'private': 'true',
>>> 'devDependencies': {},
>>> 'dependencies': dependencies,
>>> },
>>> indent=2))
>>>
>>> old_cwd = os.getcwd()
>>> os.chdir(build_dir)
>>> *print 'PIPELINE_LESS_BINARY = 
>>> {}'.format(pipeline_settings.LESS_BINARY)*
>>> *print 'PIPELINE_UGLIFYJS_BINARY = 
>>> {}'.format(pipeline_settings.UGLIFYJS_BINARY)*
>>> self.npm_install()
>>>
>>> And the output is:
>>> PIPELINE_LESS_BINARY = /src2/rb-extension-pack/fortinet/build/
>>> node_modules/less/bin/lessc
>>> PIPELINE_UGLIFYJS_BINARY = /src2/rb-extension-pack/fortinet/build/
>>> node_modules/uglifyjs/bin/uglifyjs
>>>
>>> Also build/node_modules.. created in extention directory, so the path is 
>>> correct at this point
>>>
>>> On Monday, June 12, 2017 at 5:17:15 PM UTC-7, Christian Hammond wrote:
>>>>
>>>> Hi Kevin,
>>>>
>>>> printing in settings.py won't tell you anything of value. Those are the 
>>>> correct locations at the time that settings.py loaded, but they're 
>>>> overridden during the packaging process. The locations mentioned in my 
>>>> previous e-mail are where that happens. Solving this will require 
>>>> narrowing 
>>>> down the locations where the path is correct and where it's incorrect in 
>>>> that process.
>>>>
>>>> Christian
>>>>
>>>> On Mon, Jun 12, 2017 at 2:49 PM, Kevin Yu <sams...@gmail.com> wrote:
>>>>
>>>>> Hi Christian,
>>>>>
>>>>> Thanks for trying out. I also did some debugging to see if I can find 
>>>>> any information. I added some print in the settings.py  
>>>>>
>>>>> PIPELINE_LESS_BINARY = os.path.join(NODE_PATH, 'less', 'bin', 'lessc')
>>>>> PIPELINE_UGLIFYJS_BINARY = os.path.join(NODE_PATH, 'uglifyjs', 'bin',
>>>>> 'uglifyjs')
>>>>> print 'PIPELINE_UGLIFYJS_BINARY = {}'.format(PIPELINE_UGLIFYJS_BINARY)

Re: Cannot install extension after upgrading from 2.5.6.1 to 2.5.12 - lessc not found!

2017-06-12 Thread Alexander Galperin
Set print 
in /usr/local/lib/python2.7/dist-packages/pipeline/compressors/uglifyjs.py:
class UglifyJSCompressor(SubProcessCompressor):
def compress_js(self, js):
*print 'PIPELINE_SETTING_UGLIFYJS_BINARY = 
{}'.format(settings.PIPELINE_UGLIFYJS_BINARY)*
command = '%s %s' % (settings.PIPELINE_UGLIFYJS_BINARY, settings.
PIPELINE_UGLIFYJS_ARGUMENTS)
if self.verbose:
command += ' --verbose'
return self.execute_command(command, js)
output:
PIPELINE_SETTING_UGLIFYJS_BINARY = /usr/local/lib/python2.7/dist-packages/
ReviewBoard-2.5.12.dev0-py2.7.egg/reviewboard/../node_modules/uglifyjs/bin/
uglifyjs
 And it takes from 'settings', which probably is wrong

I will try to stop in call_command


On Monday, June 12, 2017 at 5:37:29 PM UTC-7, Christian Hammond wrote:
>
> Can you also try placing debugging output right before the 
> "call_command('collectstatic', ...)" command in _build_static_media?
>
> Along with this, try printing `command` in pipeline/compilers/less.py 
> (pipeline will be another module in site-packages somewhere, perhaps under 
> a django-pipeline-* directory).
>
> Christian
>
> On Mon, Jun 12, 2017 at 5:22 PM, Alexander Galperin <
> galperin@gmail.com > wrote:
>
>> I've put some print in packaging.py to help debugging. Here's what I have 
>> changed:
>>  def install_pipeline_deps(self, extension, css_bundles, js_bundles):
>> ...
>> ...
>> with open(package_file, 'w') as fp:
>> fp.write(json.dumps(
>> {
>> 'name': '%s-extension' % 
>> os.path.basename(os.getcwd()),
>> 'private': 'true',
>> 'devDependencies': {},
>> 'dependencies': dependencies,
>> },
>> indent=2))
>>
>> old_cwd = os.getcwd()
>> os.chdir(build_dir)
>> *print 'PIPELINE_LESS_BINARY = 
>> {}'.format(pipeline_settings.LESS_BINARY)*
>> *print 'PIPELINE_UGLIFYJS_BINARY = 
>> {}'.format(pipeline_settings.UGLIFYJS_BINARY)*
>> self.npm_install()
>>
>> And the output is:
>> PIPELINE_LESS_BINARY = /src2/rb-extension-pack/fortinet/build/
>> node_modules/less/bin/lessc
>> PIPELINE_UGLIFYJS_BINARY = /src2/rb-extension-pack/fortinet/build/
>> node_modules/uglifyjs/bin/uglifyjs
>>
>> Also build/node_modules.. created in extention directory, so the path is 
>> correct at this point
>>
>> On Monday, June 12, 2017 at 5:17:15 PM UTC-7, Christian Hammond wrote:
>>>
>>> Hi Kevin,
>>>
>>> printing in settings.py won't tell you anything of value. Those are the 
>>> correct locations at the time that settings.py loaded, but they're 
>>> overridden during the packaging process. The locations mentioned in my 
>>> previous e-mail are where that happens. Solving this will require narrowing 
>>> down the locations where the path is correct and where it's incorrect in 
>>> that process.
>>>
>>> Christian
>>>
>>> On Mon, Jun 12, 2017 at 2:49 PM, Kevin Yu <sams...@gmail.com> wrote:
>>>
>>>> Hi Christian,
>>>>
>>>> Thanks for trying out. I also did some debugging to see if I can find 
>>>> any information. I added some print in the settings.py  
>>>>
>>>> PIPELINE_LESS_BINARY = os.path.join(NODE_PATH, 'less', 'bin', 'lessc')
>>>> PIPELINE_UGLIFYJS_BINARY = os.path.join(NODE_PATH, 'uglifyjs', 'bin',
>>>> 'uglifyjs')
>>>> print 'PIPELINE_UGLIFYJS_BINARY = {}'.format(PIPELINE_UGLIFYJS_BINARY)
>>>> print 'PIPELINE_LESS_BINARY = {}'.format(PIPELINE_LESS_BINARY)
>>>>
>>>>
>>>>
>>>> And this is what I see in the log:
>>>>
>>>> [Mon Jun 12 14:47:50.821618 2017] [:error] [pid 12918:tid 
>>>> 140227234481920] PIPELINE_UGLIFYJS_BINARY = 
>>>> /usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.12-py2.7.egg/reviewboard/../node_modules/uglifyjs/bin/uglifyjs
>>>> [Mon Jun 12 14:47:50.821692 2017] [:error] [pid 12918:tid 
>>>> 140227234481920] PIPELINE_LESS_BINARY = 
>>>> /usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.12-py2.7.egg/reviewboard/../node_modules/less/bin/lessc
>>>>
>>>>
>>>>
>>>> On Saturday, June 10, 2017 at 1:43:26 AM UTC-7, Christian Hammond wrote:
>>>>>
>>>>> Right. We override this though in djblets/extensions/packaging.py in 
>>>>> install_pipeline_d

Re: Cannot install extension after upgrading from 2.5.6.1 to 2.5.12 - lessc not found!

2017-06-12 Thread Alexander Galperin
def install_pipeline_deps(self, extension, css_bundles, js_bundles):
...
...
with open(package_file, 'w') as fp:
fp.write(json.dumps(
{
'name': '%s-extension' % os.path.basename(os.getcwd()),
'private': 'true',
'devDependencies': {},
'dependencies': dependencies,
},
indent=2))

old_cwd = os.getcwd()
os.chdir(build_dir)
*print 'PIPELINE_LESS_BINARY = 
{}'.format(pipeline_settings.LESS_BINARY)*
*print 'PIPELINE_UGLIFYJS_BINARY = 
{}'.format(pipeline_settings.UGLIFYJS_BINARY)*
self.npm_install()

I've put some print in packaging.py to help debugging. The output of the 
print is:
PIPELINE_LESS_BINARY = /src2/rb-extension-pack/fortinet/build/node_modules/
less/bin/lessc
PIPELINE_UGLIFYJS_BINARY = /src2/rb-extension-pack/fortinet/build/
node_modules/uglifyjs/bin/uglifyjs


On Monday, June 12, 2017 at 2:49:44 PM UTC-7, Kevin Yu wrote:
>
> Hi Christian,
>
> Thanks for trying out. I also did some debugging to see if I can find any 
> information. I added some print in the settings.py  
>
> PIPELINE_LESS_BINARY = os.path.join(NODE_PATH, 'less', 'bin', 'lessc')
> PIPELINE_UGLIFYJS_BINARY = os.path.join(NODE_PATH, 'uglifyjs', 'bin',
> 'uglifyjs')
> print 'PIPELINE_UGLIFYJS_BINARY = {}'.format(PIPELINE_UGLIFYJS_BINARY)
> print 'PIPELINE_LESS_BINARY = {}'.format(PIPELINE_LESS_BINARY)
>
>
>
> And this is what I see in the log:
>
> [Mon Jun 12 14:47:50.821618 2017] [:error] [pid 12918:tid 140227234481920] 
> PIPELINE_UGLIFYJS_BINARY = 
> /usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.12-py2.7.egg/reviewboard/../node_modules/uglifyjs/bin/uglifyjs
> [Mon Jun 12 14:47:50.821692 2017] [:error] [pid 12918:tid 140227234481920] 
> PIPELINE_LESS_BINARY = 
> /usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.12-py2.7.egg/reviewboard/../node_modules/less/bin/lessc
>
>
>
> On Saturday, June 10, 2017 at 1:43:26 AM UTC-7, Christian Hammond wrote:
>>
>> Right. We override this though in djblets/extensions/packaging.py in 
>> install_pipeline_deps(). We compute the path to the extension's 
>> node_modules and its lessc, and we set that in settings.
>>
>> I tested locally and it's performing as expected for me. Review Board's 
>> lessc isn't being used, but the extension's is. So something's going wrong 
>> here with the paths.
>>
>> How comfortable are you debugging Python? I'm curious as to whether 
>> pipeline_settings.LESS_BINARY in install_pipeline_deps() is being correctly 
>> set.
>>
>> Christian
>>
>> On Fri, Jun 9, 2017 at 5:51 PM, Kevin Yu  wrote:
>>
>>> Looks like the path to the npm_modules are prepopulated based on the 
>>> following code in settings.py:
>>> # Static media setup
>>> if RUNNING_TEST:
>>>PIPELINE_COMPILERS = []
>>> else:
>>>PIPELINE_COMPILERS = [
>>>'djblets.pipeline.compilers.es6.ES6Compiler',
>>>'djblets.pipeline.compilers.less.LessCompiler',
>>>]
>>>
>>> NODE_PATH = os.path.join(REVIEWBOARD_ROOT, '..', 'node_modules')
>>>
>>>
>>>
>>> On Friday, June 9, 2017 at 5:44:51 PM UTC-7, Kevin Yu wrote:

 Thanks Christian for the quick reply! much appreciated.

 It was installed using easy_install under Ubuntu.

 On Friday, June 9, 2017 at 5:38:11 PM UTC-7, Christian Hammond wrote:
>
> Hi Kevin,
>
> I actually don't believe this is related in this case. It looks like 
> the extension packaging stage is trying to locate the lessc path relative 
> to Review Board, which is not correct. It should be locating it from the 
> extension package. It sets the path prior to building the extension to 
> the 
> place in your tree, which, based on that output, should be populated...
>
> I have to run right now, but let me play around with this when I get 
> back and see if I can reproduce this.
>
> In the meantime, how do you install Review Board? Are you using 
> easy_install or yum?
>
> Christian
>
> On Fri, Jun 9, 2017 at 5:34 PM, Kevin Yu  wrote:
>
>> I just saw on 
>> https://www.reviewboard.org/docs/manual/dev/extending/extensions/static-files/,
>>  
>> it says
>>
>> Static bundles are packaged along with your extension automatically. 
>> You don’t have to do anything special. You will, however, need some 
>> node.js  dependencies in order to package 
>> static media bundles.
>>
>> *If you’re running Review Board 2.5.7+, these dependencies will be 
>> installed for you when you begin to build the package.*
>>
>> *If you’re running an older version, you will need to manually 
>> install them yourself. First, make sure you have a modern version of 
>> node.js installed and then run:*
>>
>> $ sudo npm install -g less uglifyjs
>>

Re: Cannot install extension after upgrading from 2.5.6.1 to 2.5.12 - lessc not found!

2017-06-12 Thread Alexander Galperin
I've put some print in packaging.py to help debugging. Here's what I have 
changed:
 def install_pipeline_deps(self, extension, css_bundles, js_bundles):
...
...
with open(package_file, 'w') as fp:
fp.write(json.dumps(
{
'name': '%s-extension' % os.path.basename(os.getcwd()),
'private': 'true',
'devDependencies': {},
'dependencies': dependencies,
},
indent=2))

old_cwd = os.getcwd()
os.chdir(build_dir)
*print 'PIPELINE_LESS_BINARY = 
{}'.format(pipeline_settings.LESS_BINARY)*
*print 'PIPELINE_UGLIFYJS_BINARY = 
{}'.format(pipeline_settings.UGLIFYJS_BINARY)*
self.npm_install()

And the output is:
PIPELINE_LESS_BINARY = /src2/rb-extension-pack/fortinet/build/node_modules/
less/bin/lessc
PIPELINE_UGLIFYJS_BINARY = /src2/rb-extension-pack/fortinet/build/
node_modules/uglifyjs/bin/uglifyjs

Also build/node_modules.. created in extention directory, so the path is 
correct at this point

On Monday, June 12, 2017 at 5:17:15 PM UTC-7, Christian Hammond wrote:
>
> Hi Kevin,
>
> printing in settings.py won't tell you anything of value. Those are the 
> correct locations at the time that settings.py loaded, but they're 
> overridden during the packaging process. The locations mentioned in my 
> previous e-mail are where that happens. Solving this will require narrowing 
> down the locations where the path is correct and where it's incorrect in 
> that process.
>
> Christian
>
> On Mon, Jun 12, 2017 at 2:49 PM, Kevin Yu  > wrote:
>
>> Hi Christian,
>>
>> Thanks for trying out. I also did some debugging to see if I can find any 
>> information. I added some print in the settings.py  
>>
>> PIPELINE_LESS_BINARY = os.path.join(NODE_PATH, 'less', 'bin', 'lessc')
>> PIPELINE_UGLIFYJS_BINARY = os.path.join(NODE_PATH, 'uglifyjs', 'bin',
>> 'uglifyjs')
>> print 'PIPELINE_UGLIFYJS_BINARY = {}'.format(PIPELINE_UGLIFYJS_BINARY)
>> print 'PIPELINE_LESS_BINARY = {}'.format(PIPELINE_LESS_BINARY)
>>
>>
>>
>> And this is what I see in the log:
>>
>> [Mon Jun 12 14:47:50.821618 2017] [:error] [pid 12918:tid 
>> 140227234481920] PIPELINE_UGLIFYJS_BINARY = 
>> /usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.12-py2.7.egg/reviewboard/../node_modules/uglifyjs/bin/uglifyjs
>> [Mon Jun 12 14:47:50.821692 2017] [:error] [pid 12918:tid 
>> 140227234481920] PIPELINE_LESS_BINARY = 
>> /usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.12-py2.7.egg/reviewboard/../node_modules/less/bin/lessc
>>
>>
>>
>> On Saturday, June 10, 2017 at 1:43:26 AM UTC-7, Christian Hammond wrote:
>>>
>>> Right. We override this though in djblets/extensions/packaging.py in 
>>> install_pipeline_deps(). We compute the path to the extension's 
>>> node_modules and its lessc, and we set that in settings.
>>>
>>> I tested locally and it's performing as expected for me. Review Board's 
>>> lessc isn't being used, but the extension's is. So something's going wrong 
>>> here with the paths.
>>>
>>> How comfortable are you debugging Python? I'm curious as to whether 
>>> pipeline_settings.LESS_BINARY in install_pipeline_deps() is being correctly 
>>> set.
>>>
>>> Christian
>>>
>>> On Fri, Jun 9, 2017 at 5:51 PM, Kevin Yu  wrote:
>>>
 Looks like the path to the npm_modules are prepopulated based on the 
 following code in settings.py:
 # Static media setup
 if RUNNING_TEST:
PIPELINE_COMPILERS = []
 else:
PIPELINE_COMPILERS = [
'djblets.pipeline.compilers.es6.ES6Compiler',
'djblets.pipeline.compilers.less.LessCompiler',
]

 NODE_PATH = os.path.join(REVIEWBOARD_ROOT, '..', 'node_modules')



 On Friday, June 9, 2017 at 5:44:51 PM UTC-7, Kevin Yu wrote:
>
> Thanks Christian for the quick reply! much appreciated.
>
> It was installed using easy_install under Ubuntu.
>
> On Friday, June 9, 2017 at 5:38:11 PM UTC-7, Christian Hammond wrote:
>>
>> Hi Kevin,
>>
>> I actually don't believe this is related in this case. It looks like 
>> the extension packaging stage is trying to locate the lessc path 
>> relative 
>> to Review Board, which is not correct. It should be locating it from the 
>> extension package. It sets the path prior to building the extension to 
>> the 
>> place in your tree, which, based on that output, should be populated...
>>
>> I have to run right now, but let me play around with this when I get 
>> back and see if I can reproduce this.
>>
>> In the meantime, how do you install Review Board? Are you using 
>> easy_install or yum?
>>
>> Christian
>>
>> On Fri, Jun 9, 2017 at 5:34 PM, Kevin Yu  wrote:
>>
>>> I just saw on 
>>>