text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto">How about throwing an exception if we're trying to declare a route with the name that already exists?</p>
<p dir="auto">For now it just silently does nothing, which doesn't help in development process at all.</p> | <table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>yes</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>2.7.30, 2.8.23, 3.2.10, 3.3.3</td>
</tr>
</tbody>
</table>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="236172654" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/23195" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/23195/hovercard" href="https://github.com/symfony/symfony/pull/23195">#23195</a> changed the assets:install command such that it removes unregonized content in the target directory.</p>
<p dir="auto">While I understand the intention, a feature that deletes files from disk (the webroot, even) without asking must not become the default behaviour in a patch level release.</p>
<p dir="auto">This change in behaviour broke our build/deployment scripts. Our AppKernel can be booted with different sets of bundles (controlled by an environment variable). So the build script does something like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="THEME_A bin/console assets:install
THEME_B bin/console assets:install
THEME_C bin/console assets:install
# ..."><pre class="notranslate"><code class="notranslate">THEME_A bin/console assets:install
THEME_B bin/console assets:install
THEME_C bin/console assets:install
# ...
</code></pre></div>
<p dir="auto">Before <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="236172654" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/23195" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/23195/hovercard" href="https://github.com/symfony/symfony/pull/23195">#23195</a> the resources for all themes were installed in the webroot, now only the resources required by the last configuration exist.</p>
<p dir="auto">It is also conceivable that people want to run completely unrelated Symfony applications out of the same webroot. Or the target path is on a remote filesystem, such as S3. Then running the command could break every other app.</p>
<p dir="auto">Please put this feature behind a --clean flag or so.</p> | 0 |
<p dir="auto">Hi everyone,</p>
<p dir="auto">I was using Celery 3.0.11 + Redis 2.6.2 as a broker. In my development environment (Mac OS X 10.8.2, Python 2.7.3, Django 1.4.3, 1 celery worker with concurrency = 4) I created a couple of simple tasks for my project (in tasks.py):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@task
def invoice_delete(invoice):
i = reload_instance(invoice)
if not i.deleted and i.amount_paid == 0:
i.delete()
@task
def expire_invoices():
invoices_to_expire = core.models.Invoice.objects.filter(
expires__lt=(now() + timedelta(minutes=1)),
deleted=False,
)
for i in invoices_to_expire:
invoice_delete.apply_async(args=[i], eta=i.expires)"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">invoice_delete</span>(<span class="pl-s1">invoice</span>):
<span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-en">reload_instance</span>(<span class="pl-s1">invoice</span>)
<span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">i</span>.<span class="pl-s1">deleted</span> <span class="pl-c1">and</span> <span class="pl-s1">i</span>.<span class="pl-s1">amount_paid</span> <span class="pl-c1">==</span> <span class="pl-c1">0</span>:
<span class="pl-s1">i</span>.<span class="pl-en">delete</span>()
<span class="pl-en">@<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">expire_invoices</span>():
<span class="pl-s1">invoices_to_expire</span> <span class="pl-c1">=</span> <span class="pl-s1">core</span>.<span class="pl-s1">models</span>.<span class="pl-v">Invoice</span>.<span class="pl-s1">objects</span>.<span class="pl-en">filter</span>(
<span class="pl-s1">expires__lt</span><span class="pl-c1">=</span>(<span class="pl-en">now</span>() <span class="pl-c1">+</span> <span class="pl-en">timedelta</span>(<span class="pl-s1">minutes</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)),
<span class="pl-s1">deleted</span><span class="pl-c1">=</span><span class="pl-c1">False</span>,
)
<span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-s1">invoices_to_expire</span>:
<span class="pl-s1">invoice_delete</span>.<span class="pl-en">apply_async</span>(<span class="pl-s1">args</span><span class="pl-c1">=</span>[<span class="pl-s1">i</span>], <span class="pl-s1">eta</span><span class="pl-c1">=</span><span class="pl-s1">i</span>.<span class="pl-s1">expires</span>)</pre></div>
<p dir="auto">and scheduled expire_invoices tasks to run every minute (in settings.py):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CELERYBEAT_SCHEDULE = {
'expire_invoices': {
'task': 'core.tasks.expire_invoices',
'schedule': crontab(),
}
}"><pre class="notranslate"><span class="pl-v">CELERYBEAT_SCHEDULE</span> <span class="pl-c1">=</span> {
<span class="pl-s">'expire_invoices'</span>: {
<span class="pl-s">'task'</span>: <span class="pl-s">'core.tasks.expire_invoices'</span>,
<span class="pl-s">'schedule'</span>: <span class="pl-en">crontab</span>(),
}
}</pre></div>
<p dir="auto">it worked, and I pushed it into production - Amazon Linux, Celery 3.0.11 - 1 worker with concurency=10, Redis 2.6.2, Python 2.7.3, Django 1.4.3. Celery and Redis were running under Supervisord. In production I got a problem: my expire_invoices task was launched 3 times within every minute, instead of 1, so I got duplicated invoice.deleted events. I tried the following:</p>
<ul dir="auto">
<li>changed crontab() to timedelta(seconds=60) - did not helped, still launched 3 times within a minute. If I tried seconds=30, it was launched twice within 30 seconds interval;</li>
<li>upgraded celery to 3.0.15 - no effect;</li>
<li>purged broker storage (using FLUSHALL - very rude) and cleaning schedule file and restarting everything - no effect;</li>
<li>switched from celery beat schedule storage from a file to a database, via "-S djcelery.schedulers.DatabaseScheduler" option - no effect;</li>
<li>temporally switched broker to 'django://'. I know that it is not recommended for production, I just wanted to see what happens. And... it helped. My task was launching exactly once a minute, as needed. Finally I ended up with installation of RabbitMQ and switching broker url to it, works fine as well.</li>
</ul>
<p dir="auto">My supervisord configs in production - celery:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[program:%(project_name)s_celery]
command=%(project_env)s/bin/python manage.py celery worker -E --loglevel=INFO --concurrency=10
directory=%(project_app)s
user=%(project_user)s
numprocs=1
stdout_logfile=%(project_logs)s/supervisor_celery_stdout.log
stderr_logfile=%(project_logs)s/supervisor_celery_stderr.log
autostart=true
autorestart=true
startsecs=10
stopwaitsecs = 600
priority=998"><pre class="notranslate"><code class="notranslate">[program:%(project_name)s_celery]
command=%(project_env)s/bin/python manage.py celery worker -E --loglevel=INFO --concurrency=10
directory=%(project_app)s
user=%(project_user)s
numprocs=1
stdout_logfile=%(project_logs)s/supervisor_celery_stdout.log
stderr_logfile=%(project_logs)s/supervisor_celery_stderr.log
autostart=true
autorestart=true
startsecs=10
stopwaitsecs = 600
priority=998
</code></pre></div>
<p dir="auto">...and celery beat:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
[program:%(project_name)s_celery_beat]
command=%(project_env)s/bin/python manage.py celery beat --loglevel=INFO -s %(celerybeat_dir)s/schedule
directory=%(project_app)s
user=%(project_user)s
numprocs=1
stdout_logfile=%(project_logs)s/supervisor_celery_beat_stdout.log
stderr_logfile=%(project_logs)s/supervisor_celery_beat_stderr.log
autostart=true
autorestart=true
startsecs=10
priority=999"><pre class="notranslate"><code class="notranslate">
[program:%(project_name)s_celery_beat]
command=%(project_env)s/bin/python manage.py celery beat --loglevel=INFO -s %(celerybeat_dir)s/schedule
directory=%(project_app)s
user=%(project_user)s
numprocs=1
stdout_logfile=%(project_logs)s/supervisor_celery_beat_stdout.log
stderr_logfile=%(project_logs)s/supervisor_celery_beat_stderr.log
autostart=true
autorestart=true
startsecs=10
priority=999
</code></pre></div> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="559621218" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5952" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5952/hovercard" href="https://github.com/celery/celery/pull/5952">#5952</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="114504575" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/2903" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/2903/hovercard" href="https://github.com/celery/celery/issues/2903">#2903</a></li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 4.4.1</p>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
```
redis==3.4.1
billiard==3.6.3.0
celery==4.4.1
kombu==4.6.8
```
</p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Celery just works</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">After upgrading Celery from 4.4.0 to 4.4.1 I suddenly see <code class="notranslate">TypeError: __init__() got an unexpected keyword argument 'socket_keepalive'</code>.</p>
<p dir="auto">This seems to be caused by PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="559621218" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5952" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5952/hovercard" href="https://github.com/celery/celery/pull/5952">#5952</a>, which adds this kwarg for Redis connections. However, not all Redis connection constructors take the same arguments (e.g. <code class="notranslate">UnixDomainSocketConnection</code> doesn't take <code class="notranslate">socket_keepalive</code>). This seems to be happened before as noted in issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="114504575" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/2903" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/2903/hovercard" href="https://github.com/celery/celery/issues/2903">#2903</a>.</p>
<p dir="auto">Everything works fine if I downgrade to 4.4.0 again.</p> | 0 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<p dir="auto">After upgrading to the latest SciPy (1.4.0, released on Tuesday), importing <code class="notranslate">torch</code> after <code class="notranslate">scipy</code> immediately segfaults. My current workaround is pinning SciPy to <1.4.0, which averts the crash. Oddly, specifically importing <code class="notranslate">scipy</code> first and then <code class="notranslate">torch</code> is the only combination of the two that I've found to crash.</p>
<h2 dir="auto">To Reproduce</h2>
<ol dir="auto">
<li><code class="notranslate">python3 -m venv build/venv</code></li>
<li><code class="notranslate">. build/venv/bin/activate</code></li>
<li><code class="notranslate">pip install scipy torch</code></li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% python -c 'import scipy, torch'
zsh: segmentation fault (core dumped) python -c 'import scipy, torch'"><pre class="notranslate"><code class="notranslate">% python -c 'import scipy, torch'
zsh: segmentation fault (core dumped) python -c 'import scipy, torch'
</code></pre></div>
</li>
</ol>
<p dir="auto">Using <code class="notranslate">cppyy</code> and <code class="notranslate">glog</code>'s signal handler, I was able to get some form of stack trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="*** Aborted at 1576699991 (unix time) try "date -d @1576699991" if you are using GNU date ***
PC: @ 0x7f96f9542db6 pybind11::detail::make_new_python_type()
*** SIGSEGV (@0x330) received by PID 11372 (TID 0x7f97125fe740) from PID 816; stack trace: ***
@ 0x7f971205af20 (unknown)
@ 0x7f96f9542db6 pybind11::detail::make_new_python_type()
@ 0x7f96f954ce86 pybind11::detail::generic_type::initialize()
@ 0x7f96f96cab5e torch::onnx::initONNXBindings()
@ 0x7f96f94c2eb0 initModule()
@ 0x5fba6f _PyImport_LoadDynamicModuleWithSpec
@ 0x5fbced (unknown)
@ 0x5678ee PyCFunction_Call
@ 0x51171e _PyEval_EvalFrameDefault
@ 0x508245 (unknown)
@ 0x50a080 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509d48 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509d48 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509d48 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509d48 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509455 _PyFunction_FastCallDict
@ 0x5a55a1 _PyObject_FastCallDict
@ 0x5a65de _PyObject_CallMethodIdObjArgs
@ 0x4f729d PyImport_ImportModuleLevelObject
@ 0x50e4f1 _PyEval_EvalFrameDefault
@ 0x508245 (unknown)
@ 0x5167b9 (unknown)
./run.sh: line 10: 11372 Segmentation fault (core dumped) python reproduce.py"><pre class="notranslate"><code class="notranslate">*** Aborted at 1576699991 (unix time) try "date -d @1576699991" if you are using GNU date ***
PC: @ 0x7f96f9542db6 pybind11::detail::make_new_python_type()
*** SIGSEGV (@0x330) received by PID 11372 (TID 0x7f97125fe740) from PID 816; stack trace: ***
@ 0x7f971205af20 (unknown)
@ 0x7f96f9542db6 pybind11::detail::make_new_python_type()
@ 0x7f96f954ce86 pybind11::detail::generic_type::initialize()
@ 0x7f96f96cab5e torch::onnx::initONNXBindings()
@ 0x7f96f94c2eb0 initModule()
@ 0x5fba6f _PyImport_LoadDynamicModuleWithSpec
@ 0x5fbced (unknown)
@ 0x5678ee PyCFunction_Call
@ 0x51171e _PyEval_EvalFrameDefault
@ 0x508245 (unknown)
@ 0x50a080 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509d48 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509d48 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509d48 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509d48 (unknown)
@ 0x50aa7d (unknown)
@ 0x50c5b9 _PyEval_EvalFrameDefault
@ 0x509455 _PyFunction_FastCallDict
@ 0x5a55a1 _PyObject_FastCallDict
@ 0x5a65de _PyObject_CallMethodIdObjArgs
@ 0x4f729d PyImport_ImportModuleLevelObject
@ 0x50e4f1 _PyEval_EvalFrameDefault
@ 0x508245 (unknown)
@ 0x5167b9 (unknown)
./run.sh: line 10: 11372 Segmentation fault (core dumped) python reproduce.py
</code></pre></div>
<p dir="auto">I don't know what SciPy has to do with this or why upgrading it causes segfaults inside PyTorch.</p>
<p dir="auto">For completeness, here's the <code class="notranslate">reproduce.py</code> script:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import cppyy
cppyy.load_library('glog')
cppyy.include('glog/logging.h')
cppyy.gbl.google.InstallFailureSignalHandler()
import scipy
import torch"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">cppyy</span>
<span class="pl-s1">cppyy</span>.<span class="pl-en">load_library</span>(<span class="pl-s">'glog'</span>)
<span class="pl-s1">cppyy</span>.<span class="pl-en">include</span>(<span class="pl-s">'glog/logging.h'</span>)
<span class="pl-s1">cppyy</span>.<span class="pl-s1">gbl</span>.<span class="pl-s1">google</span>.<span class="pl-v">InstallFailureSignalHandler</span>()
<span class="pl-k">import</span> <span class="pl-s1">scipy</span>
<span class="pl-k">import</span> <span class="pl-s1">torch</span></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">No segmentation fault.</p>
<h2 dir="auto">Environment</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% python collect_env.py
Collecting environment information...
PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: 10.1.243
OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
CMake version: version 3.10.2
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: GeForce GTX 1080
Nvidia driver version: 440.33.01
cuDNN version: Could not collect
Versions of relevant libraries:
[pip3] numpy==1.17.4
[pip3] torch==1.3.1
[conda] Could not collect"><pre class="notranslate"><code class="notranslate">% python collect_env.py
Collecting environment information...
PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: 10.1.243
OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
CMake version: version 3.10.2
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: GeForce GTX 1080
Nvidia driver version: 440.33.01
cuDNN version: Could not collect
Versions of relevant libraries:
[pip3] numpy==1.17.4
[pip3] torch==1.3.1
[conda] Could not collect
</code></pre></div> | <h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<p dir="auto">Import <code class="notranslate">torch</code> after <code class="notranslate">sklearn</code> causes a segfault.</p>
<h2 dir="auto">To Reproduce</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sklearn
import torch
print(torch.__version__)
print(sklearn.__version__)"><pre class="notranslate"><code class="notranslate">import sklearn
import torch
print(torch.__version__)
print(sklearn.__version__)
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11019190/71001688-15df3680-20de-11ea-8441-16a58497c70b.png"><img src="https://user-images.githubusercontent.com/11019190/71001688-15df3680-20de-11ea-8441-16a58497c70b.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">In reverse order:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import torch
import sklearn
print(torch.__version__)
print(sklearn.__version__)"><pre class="notranslate"><code class="notranslate">import torch
import sklearn
print(torch.__version__)
print(sklearn.__version__)
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11019190/71001720-255e7f80-20de-11ea-9338-5f4adcf1ac2c.png"><img src="https://user-images.githubusercontent.com/11019190/71001720-255e7f80-20de-11ea-9338-5f4adcf1ac2c.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">Environment</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: 10.1.243
OS: Manjaro Linux
GCC version: (GCC) 9.2.0
CMake version: version 3.16.0
Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: GeForce RTX 2080 Ti
Nvidia driver version: 430.64
cuDNN version: /usr/lib/libcudnn.so.7.6.5
Versions of relevant libraries:
[pip3] numpy==1.17.4
[pip3] torch==1.3.1
[pip3] torchvision==0.4.2
[conda] Could not collect"><pre class="notranslate"><code class="notranslate">PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: 10.1.243
OS: Manjaro Linux
GCC version: (GCC) 9.2.0
CMake version: version 3.16.0
Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: GeForce RTX 2080 Ti
Nvidia driver version: 430.64
cuDNN version: /usr/lib/libcudnn.so.7.6.5
Versions of relevant libraries:
[pip3] numpy==1.17.4
[pip3] torch==1.3.1
[pip3] torchvision==0.4.2
[conda] Could not collect
</code></pre></div>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Related closed issues:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="243779309" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/2143" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/2143/hovercard" href="https://github.com/pytorch/pytorch/issues/2143">#2143</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="208695074" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/786" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/786/hovercard" href="https://github.com/pytorch/pytorch/issues/786">#786</a></p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a></p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=steven.warren" rel="nofollow">Steven Warren</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-688?redirect=false" rel="nofollow">SPR-688</a></strong> and commented</p>
<p dir="auto">Proxy receives a Class[] that contains the interfaces to be supported by the proxy. The order of classes in the array are significant to Proxy as it uses that ordering to resolve method signature conflicts.</p>
<p dir="auto">AdvisedSupport returns an Array of interfaces supported, but the ordering is undefined. This can lead to unpredictable behaviour of the proxy class.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.1.4</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=geniusgroup" rel="nofollow">G</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4367?redirect=false" rel="nofollow">SPR-4367</a></strong> and commented</p>
<p dir="auto">Autowiring failed when one of the bean contains factory-method (Static setter). Even we don't apply autowire in that bean, it will also crash the whole framework.</p>
<p dir="auto">Reference: <a href="http://forum.springframework.org/showthread.php?t=48399" rel="nofollow">http://forum.springframework.org/showthread.php?t=48399</a></p>
<p dir="auto">Partial XML:</p>
<p dir="auto"><?xml version="1.0" encoding="UTF-8"?></p>
<p dir="auto"><beans xmlns="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
xmlns:context="<a href="http://www.springframework.org/schema/context" rel="nofollow">http://www.springframework.org/schema/context</a>"<br>
xsi:schemaLocation="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a> <a href="http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" rel="nofollow">http://www.springframework.org/schema/beans/spring-beans-2.5.xsd</a><br>
<a href="http://www.springframework.org/schema/context" rel="nofollow">http://www.springframework.org/schema/context</a> <a href="http://www.springframework.org/schema/context/spring-context-2.5.xsd%22%3E" rel="nofollow">http://www.springframework.org/schema/context/spring-context-2.5.xsd"></a></p>
<p dir="auto"><context:annotation-config /></p>
<p dir="auto"><bean id="hibernateUtil" class="com.foo.hibernate.HibernateUtil"<br>
factory-method="setSessionFactory"><br>
<constructor-arg ref="sessionFactory" /><br>
</bean><br>
</beans></p>
<p dir="auto">Java:<br>
package com.foo.hibernate;</p>
<p dir="auto">import org.hibernate.SessionFactory;</p>
<p dir="auto">public class HibernateUtil {</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private static SessionFactory sessionFactory_;
public static SessionFactory getSessionFactory() { return sessionFactory_; }
public static void setSessionFactory(SessionFactory sessionFactory) { sessionFactory_ = sessionFactory; }"><pre class="notranslate"><code class="notranslate">private static SessionFactory sessionFactory_;
public static SessionFactory getSessionFactory() { return sessionFactory_; }
public static void setSessionFactory(SessionFactory sessionFactory) { sessionFactory_ = sessionFactory; }
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">Error:<br>
ERROR|14:45:57,234| ContextLoader:215 - Context initialization failed<br>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateUtil' defined in ServletContext resource [/WEB-INF/conf/applicationContext-hibernate.xml]: Initialization of bean failed; nested exception is java.lang.NullPointerException<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:445)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)<br>
at java.security.AccessController.doPrivileged(Native Method)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)<br>
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)<br>
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)<br>
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)<br>
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)<br>
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)<br>
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)<br>
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)<br>
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br>
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)<br>
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br>
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)<br>
at org.apache.catalina.core.StandardService.start(StandardService.java:516)<br>
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)<br>
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br>
at java.lang.reflect.Method.invoke(Unknown Source)<br>
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)<br>
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)<br>
Caused by: java.lang.NullPointerException<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:876)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437)<br>
... 28 more</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398084676" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9024" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9024/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9024">#9024</a> NPE in AbstractAutowireCapableBeanFactory#populateBean() if bean wrapper is null and InstantiationAwareBeanPostProcessor are registered (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398085065" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9075" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9075/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9075">#9075</a> CLONE -Autowiring failed when one of the bean contains factory-method (<em><strong>"is duplicated by"</strong></em>)</li>
</ul> | 0 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/sharding-sphere/sharding-sphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="http://shardingsphere.io/document/current/en/overview/" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response <strong>more than 7 days</strong> and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">3.1.0</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">support GROUP_CONCAT</p>
<h3 dir="auto">Actual behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Table 'etl_data.MailSensitiveWord' doesn't exist"><pre class="notranslate"><code class="notranslate">Table 'etl_data.MailSensitiveWord' doesn't exist
</code></pre></div>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">antlr parsing error. <code class="notranslate">AntlrParsingEngine</code> did not extract <code class="notranslate">FromWhereSegment</code><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1615053/53952965-286b1f00-410d-11e9-8da2-eae00b15d150.png"><img src="https://user-images.githubusercontent.com/1615053/53952965-286b1f00-410d-11e9-8da2-eae00b15d150.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<ol dir="auto">
<li>config 2 datasources</li>
<li>config logic table A mapping to table A of one of datasource(not the default one)</li>
<li>select group_concat(wordType) from A group by wordType;</li>
<li>error</li>
</ol>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | <p dir="auto">Spring Boot :: v2.4.2<br>
Spring: v5.3.3<br>
Spring Data JPA<br>
Hibernate ORM core version: 5.4.27.Final<br>
Database: postgresql-13.1<br>
shardingsphere:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.0.0-alpha</version>
</dependency>"><pre class="notranslate"><<span class="pl-ent">dependency</span>>
<<span class="pl-ent">groupId</span>>org.apache.shardingsphere</<span class="pl-ent">groupId</span>>
<<span class="pl-ent">artifactId</span>>shardingsphere-jdbc-core-spring-boot-starter</<span class="pl-ent">artifactId</span>>
<<span class="pl-ent">version</span>>5.0.0-alpha</<span class="pl-ent">version</span>>
</<span class="pl-ent">dependency</span>></pre></div>
<p dir="auto">application.yml:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="spring:
shardingsphere:
props:
sql.show: true
datasource:
common:
driver-class-name: org.postgresql.Driver
type: com.alibaba.druid.pool.DruidDataSource
names: master0
master0:
# postgres database
url: jdbc:postgresql://localhost:5432/kpi
username: potgres
password: postgres
initialization-mode: always
rules:
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 1
sharding-algorithms:
sharding-by-month:
type: INTERVAL
props:
datetime-pattern: "yyyy-MM-dd HH:mm:ss"
datetime-lower: "2021-02-01 00:00:00"
datetime-upper: "2021-12-31 23:59:59"
sharding-suffix-pattern: "yyyyMM"
datetime-interval-amount: 1
datetime-interval-unit: "MONTHS"
tables:
kpi_data:
actual-data-nodes: master0.kpi_data_$->{2021..2021}0$->{1..9}, master0.kpi_data_$->{2021..2021}$->{10..12}
table-strategy:
standard:
sharding-column: begin_time
sharding-algorithm-name: sharding-by-month
key-generate-strategy:
column: id
key-generator-name: snowflake
enabled: true
jpa:
hibernate:
ddl-auto: update #none
show-sql: true
properties:
hibernate:
temp:
use_jdbc_metadata_defaults: false"><pre class="notranslate"><span class="pl-ent">spring</span>:
<span class="pl-ent">shardingsphere</span>:
<span class="pl-ent">props</span>:
<span class="pl-ent">sql.show</span>: <span class="pl-c1">true</span>
<span class="pl-ent">datasource</span>:
<span class="pl-ent">common</span>:
<span class="pl-ent">driver-class-name</span>: <span class="pl-s">org.postgresql.Driver</span>
<span class="pl-ent">type</span>: <span class="pl-s">com.alibaba.druid.pool.DruidDataSource</span>
<span class="pl-ent">names</span>: <span class="pl-s">master0</span>
<span class="pl-ent">master0</span>:
<span class="pl-c"><span class="pl-c">#</span> postgres database</span>
<span class="pl-ent">url</span>: <span class="pl-s">jdbc:postgresql://localhost:5432/kpi</span>
<span class="pl-ent">username</span>: <span class="pl-s">potgres</span>
<span class="pl-ent">password</span>: <span class="pl-s">postgres</span>
<span class="pl-ent">initialization-mode</span>: <span class="pl-s">always</span>
<span class="pl-ent">rules</span>:
<span class="pl-ent">sharding</span>:
<span class="pl-ent">key-generators</span>:
<span class="pl-ent">snowflake</span>:
<span class="pl-ent">type</span>: <span class="pl-s">SNOWFLAKE</span>
<span class="pl-ent">props</span>:
<span class="pl-ent">worker-id</span>: <span class="pl-c1">1</span>
<span class="pl-ent">sharding-algorithms</span>:
<span class="pl-ent">sharding-by-month</span>:
<span class="pl-ent">type</span>: <span class="pl-s">INTERVAL </span>
<span class="pl-ent">props</span>:
<span class="pl-ent">datetime-pattern</span>: <span class="pl-s"><span class="pl-pds">"</span>yyyy-MM-dd HH:mm:ss<span class="pl-pds">"</span></span>
<span class="pl-ent">datetime-lower</span>: <span class="pl-s"><span class="pl-pds">"</span>2021-02-01 00:00:00<span class="pl-pds">"</span></span>
<span class="pl-ent">datetime-upper</span>: <span class="pl-s"><span class="pl-pds">"</span>2021-12-31 23:59:59<span class="pl-pds">"</span></span>
<span class="pl-ent">sharding-suffix-pattern</span>: <span class="pl-s"><span class="pl-pds">"</span>yyyyMM<span class="pl-pds">"</span></span>
<span class="pl-ent">datetime-interval-amount</span>: <span class="pl-c1">1</span>
<span class="pl-ent">datetime-interval-unit</span>: <span class="pl-s"><span class="pl-pds">"</span>MONTHS<span class="pl-pds">"</span></span>
<span class="pl-ent">tables</span>:
<span class="pl-ent">kpi_data</span>:
<span class="pl-ent">actual-data-nodes</span>: <span class="pl-s">master0.kpi_data_$->{2021..2021}0$->{1..9}, master0.kpi_data_$->{2021..2021}$->{10..12}</span>
<span class="pl-ent">table-strategy</span>:
<span class="pl-ent">standard</span>:
<span class="pl-ent">sharding-column</span>: <span class="pl-s">begin_time</span>
<span class="pl-ent">sharding-algorithm-name</span>: <span class="pl-s">sharding-by-month</span>
<span class="pl-ent">key-generate-strategy</span>:
<span class="pl-ent">column</span>: <span class="pl-s">id</span>
<span class="pl-ent">key-generator-name</span>: <span class="pl-s">snowflake</span>
<span class="pl-ent">enabled</span>: <span class="pl-c1">true</span>
<span class="pl-ent">jpa</span>:
<span class="pl-ent">hibernate</span>:
<span class="pl-ent">ddl-auto</span>: <span class="pl-s">update </span><span class="pl-c"><span class="pl-c">#</span>none</span>
<span class="pl-ent">show-sql</span>: <span class="pl-c1">true</span>
<span class="pl-ent">properties</span>:
<span class="pl-ent">hibernate</span>:
<span class="pl-ent">temp</span>:
<span class="pl-ent">use_jdbc_metadata_defaults</span>: <span class="pl-c1">false</span></pre></div>
<p dir="auto">when application starts, exception occurs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
......
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:421) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) ~[spring-beans-5.3.3.jar:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) ~[spring-beans-5.3.3.jar:5.3.3]
... 22 common frames omitted
Caused by: org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
at org.apache.shardingsphere.sharding.route.engine.type.unconfigured.ShardingUnconfiguredTablesRoutingEngine.route(ShardingUnconfiguredTablesRoutingEngine.java:55) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:70) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:55) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:59) ~[shardingsphere-infra-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:57) ~[shardingsphere-infra-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:52) ~[shardingsphere-infra-context-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createExecutionContext(ShardingSphereStatement.java:289) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.executeQuery(ShardingSphereStatement.java:126) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]
at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:42) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.initializeSequences(DatabaseInformationImpl.java:65) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.<init>(DatabaseInformationImpl.java:59) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.internal.Helper.buildDatabaseInformation(Helper.java:155) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:96) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:316) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:469) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1259) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.3.jar:5.3.3]
... 26 common frames omitted"><pre lang="log" class="notranslate"><code class="notranslate">org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
......
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:421) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) ~[spring-beans-5.3.3.jar:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) ~[spring-beans-5.3.3.jar:5.3.3]
... 22 common frames omitted
Caused by: org.apache.shardingsphere.infra.exception.ShardingSphereException: Can not route tables for `[sequences]`, please make sure the tables are in same schema.
at org.apache.shardingsphere.sharding.route.engine.type.unconfigured.ShardingUnconfiguredTablesRoutingEngine.route(ShardingUnconfiguredTablesRoutingEngine.java:55) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:70) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:55) ~[shardingsphere-sharding-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:59) ~[shardingsphere-infra-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:57) ~[shardingsphere-infra-route-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:52) ~[shardingsphere-infra-context-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createExecutionContext(ShardingSphereStatement.java:289) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.executeQuery(ShardingSphereStatement.java:126) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]
at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:42) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.initializeSequences(DatabaseInformationImpl.java:65) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.<init>(DatabaseInformationImpl.java:59) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.internal.Helper.buildDatabaseInformation(Helper.java:155) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:96) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:316) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:469) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1259) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.3.jar:5.3.3]
... 26 common frames omitted
</code></pre></div>
<hr>
<p dir="auto">'select * from information_schema.sequences' will be automatically exceuted before creating table, then exception occurs</p> | 0 |
<p dir="auto">Using the example from the docs here: <a href="http://pandas.pydata.org/pandas-docs/dev/io.html#storing-multi-index-dataframes" rel="nofollow">http://pandas.pydata.org/pandas-docs/dev/io.html#storing-multi-index-dataframes</a> but specifying the 'columns' in <code class="notranslate">[1219]</code> keyword when selecting:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="store.select('df_mi', columns=['A', 'B'])"><pre class="notranslate"><code class="notranslate">store.select('df_mi', columns=['A', 'B'])
</code></pre></div>
<p dir="auto">leads to the failure below. The original example works, as does selecting columns with a standard index. I'm on a fairly recent master (~1 week) and Python 3.3. Hope this is not expected and I did not miss an issue, I did search for a bit.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="KeyError Traceback (most recent call last)
<ipython-input-67-678a9c77d998> in <module>()
----> 1 store.select('df_mi', columns=['A', 'B'])
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in select(self, key, where, start, stop, columns, iterator, chunksize, **kwargs)
413 return TableIterator(func, nrows=s.nrows, start=start, stop=stop, chunksize=chunksize)
414
--> 415 return TableIterator(func, nrows=s.nrows, start=start, stop=stop).get_values()
416
417 def select_as_coordinates(self, key, where=None, start=None, stop=None, **kwargs):
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in get_values(self)
931
932 def get_values(self):
--> 933 return self.func(self.start, self.stop)
934
935
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in func(_start, _stop)
408 # what we are actually going to do for a chunk
409 def func(_start, _stop):
--> 410 return s.read(where=where, start=_start, stop=_stop, columns=columns, **kwargs)
411
412 if iterator or chunksize is not None:
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in read(self, *args, **kwargs)
3142 def read(self, *args, **kwargs):
3143 df = super(AppendableMultiFrameTable, self).read(*args, **kwargs)
-> 3144 df.set_index(self.levels, inplace=True)
3145 return df
3146
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/frame.py in set_index(self, keys, drop, append, inplace, verify_integrity)
2795 names.append(None)
2796 else:
-> 2797 level = frame[col].values
2798 names.append(col)
2799 if drop:
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/frame.py in __getitem__(self, key)
1992 else:
1993 # get column
-> 1994 return self._get_item_cache(key)
1995
1996 def _getitem_slice(self, key):
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/generic.py in _get_item_cache(self, item)
572 return cache[item]
573 except Exception:
--> 574 values = self._data.get(item)
575 res = self._box_item_values(item, values)
576 cache[item] = res
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in get(self, item)
1646
1647 def get(self, item):
-> 1648 _, block = self._find_block(item)
1649 return block.get(item)
1650
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in _find_block(self, item)
1773
1774 def _find_block(self, item):
-> 1775 self._check_have(item)
1776 for i, block in enumerate(self.blocks):
1777 if item in block:
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in _check_have(self, item)
1780 def _check_have(self, item):
1781 if item not in self.items:
-> 1782 raise KeyError('no item named %s' % com.pprint_thing(item))
1783
1784 def reindex_axis(self, new_axis, method=None, axis=0, copy=True):
KeyError: 'no item named foo'"><pre class="notranslate"><code class="notranslate">KeyError Traceback (most recent call last)
<ipython-input-67-678a9c77d998> in <module>()
----> 1 store.select('df_mi', columns=['A', 'B'])
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in select(self, key, where, start, stop, columns, iterator, chunksize, **kwargs)
413 return TableIterator(func, nrows=s.nrows, start=start, stop=stop, chunksize=chunksize)
414
--> 415 return TableIterator(func, nrows=s.nrows, start=start, stop=stop).get_values()
416
417 def select_as_coordinates(self, key, where=None, start=None, stop=None, **kwargs):
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in get_values(self)
931
932 def get_values(self):
--> 933 return self.func(self.start, self.stop)
934
935
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in func(_start, _stop)
408 # what we are actually going to do for a chunk
409 def func(_start, _stop):
--> 410 return s.read(where=where, start=_start, stop=_stop, columns=columns, **kwargs)
411
412 if iterator or chunksize is not None:
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in read(self, *args, **kwargs)
3142 def read(self, *args, **kwargs):
3143 df = super(AppendableMultiFrameTable, self).read(*args, **kwargs)
-> 3144 df.set_index(self.levels, inplace=True)
3145 return df
3146
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/frame.py in set_index(self, keys, drop, append, inplace, verify_integrity)
2795 names.append(None)
2796 else:
-> 2797 level = frame[col].values
2798 names.append(col)
2799 if drop:
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/frame.py in __getitem__(self, key)
1992 else:
1993 # get column
-> 1994 return self._get_item_cache(key)
1995
1996 def _getitem_slice(self, key):
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/generic.py in _get_item_cache(self, item)
572 return cache[item]
573 except Exception:
--> 574 values = self._data.get(item)
575 res = self._box_item_values(item, values)
576 cache[item] = res
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in get(self, item)
1646
1647 def get(self, item):
-> 1648 _, block = self._find_block(item)
1649 return block.get(item)
1650
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in _find_block(self, item)
1773
1774 def _find_block(self, item):
-> 1775 self._check_have(item)
1776 for i, block in enumerate(self.blocks):
1777 if item in block:
/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in _check_have(self, item)
1780 def _check_have(self, item):
1781 if item not in self.items:
-> 1782 raise KeyError('no item named %s' % com.pprint_thing(item))
1783
1784 def reindex_axis(self, new_axis, method=None, axis=0, copy=True):
KeyError: 'no item named foo'
</code></pre></div> | <p dir="auto">I'm using pandas 0.12.0 and having issue with accessing hierarchically indexed data frame elements using the ix. As a note, the issue is coming only when I have datetime objects in level 0 of hierarchical index.</p>
<p dir="auto">arrays = [date_range('2013-11-15', periods=4).repeat(2),<br>
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]<br>
tuples = list(zip(*arrays))<br>
index = MultiIndex.from_tuples(tuples, names=['first', 'second'])<br>
df = DataFrame(randn(8, 3), index=index, columns=['A', 'B', 'C'])<br>
df.ix['2013-11-15', 'one']</p>
<hr>
<p dir="auto">KeyError Traceback (most recent call last)<br>
in ()<br>
----> 1 df.ix['2013-11-15', 'one']</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in <strong>getitem</strong>(self, key)<br>
45 pass<br>
46<br>
---> 47 return self._getitem_tuple(key)<br>
48 else:<br>
49 return self._getitem_axis(key, axis=0)</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_tuple(self, tup)<br>
251 def _getitem_tuple(self, tup):<br>
252 try:<br>
--> 253 return self._getitem_lowerdim(tup)<br>
254 except IndexingError:<br>
255 pass</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_lowerdim(self, tup)<br>
384 new_key, = new_key<br>
385<br>
--> 386 return getattr(section,self.name)[new_key]<br>
387<br>
388 raise IndexingError('not applicable')</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in <strong>getitem</strong>(self, key)<br>
45 pass<br>
46<br>
---> 47 return self._getitem_tuple(key)<br>
48 else:<br>
49 return self._getitem_axis(key, axis=0)</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_tuple(self, tup)<br>
251 def _getitem_tuple(self, tup):<br>
252 try:<br>
--> 253 return self._getitem_lowerdim(tup)<br>
254 except IndexingError:<br>
255 pass</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_lowerdim(self, tup)<br>
361 for i, key in enumerate(tup):<br>
362 if _is_label_like(key) or isinstance(key, tuple):<br>
--> 363 section = self._getitem_axis(key, axis=i)<br>
364<br>
365 # we have yielded a scalar ?</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_axis(self, key, axis)<br>
411 return self._get_loc(key, axis=axis)<br>
412<br>
--> 413 return self._get_label(key, axis=axis)<br>
414<br>
415 def _getitem_iterable(self, key, axis=0):</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _get_label(self, label, axis)<br>
59 return self.obj._xs(label, axis=axis, copy=False)<br>
60 except Exception:<br>
---> 61 return self.obj._xs(label, axis=axis, copy=True)<br>
62<br>
63 def _get_loc(self, key, axis=0):</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/frame.pyc in xs(self, key, axis, level, copy)<br>
2358<br>
2359 if axis == 1:<br>
-> 2360 data = self[key]<br>
2361 if copy:<br>
2362 data = data.copy()</p>
<p dir="auto">/u/pullurur/dig/quantinvest/env/lib/python2.6/site-packages/pandas/core/frame.pyc in <strong>getitem</strong>(self, key)<br>
2001 # get column<br>
2002 if self.columns.is_unique:<br>
-> 2003 return self._get_item_cache(key)<br>
2004<br>
2005 # duplicate columns</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item)<br>
665 return cache[item]<br>
666 except Exception:<br>
--> 667 values = self._data.get(item)<br>
668 res = self._box_item_values(item, values)<br>
669 cache[item] = res</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/internals.pyc in get(self, item)<br>
1653 def get(self, item):<br>
1654 if self.items.is_unique:<br>
-> 1655 _, block = self._find_block(item)<br>
1656 return block.get(item)<br>
1657 else:</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/internals.pyc in _find_block(self, item)<br>
1933<br>
1934 def _find_block(self, item):<br>
-> 1935 self._check_have(item)<br>
1936 for i, block in enumerate(self.blocks):<br>
1937 if item in block:</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/internals.pyc in _check_have(self, item)<br>
1940 def _check_have(self, item):<br>
1941 if item not in self.items:<br>
-> 1942 raise KeyError('no item named %s' % com.pprint_thing(item))<br>
1943<br>
1944 def reindex_axis(self, new_axis, method=None, axis=0, copy=True):</p>
<p dir="auto">KeyError: u'no item named one'</p> | 0 |
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>Maybe</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>4.0.3</td>
</tr>
</tbody>
</table>
<p dir="auto">hello everybody,</p>
<p dir="auto">I need my CDN service cache my website, so I set</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" /**
* @Route("/", defaults={"page": 1}, name="homepage")
* @Method("GET")
* @Cache(smaxage="3600")
*/
public function indexAction(ArticleRepository $articles, int $page): Response
{
$articles = $articles->findLatest($page);
return $this->render('article/index.html.twig', [
'articles' => $articles
]);
}"><pre class="notranslate"> <span class="pl-c">/**</span>
<span class="pl-c"> * @Route("/", defaults={"page": 1}, name="homepage")</span>
<span class="pl-c"> * @Method("GET")</span>
<span class="pl-c"> * @Cache(smaxage="3600")</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">indexAction</span>(<span class="pl-smi"><span class="pl-smi">ArticleRepository</span></span> <span class="pl-s1"><span class="pl-c1">$</span>articles</span>, <span class="pl-smi">int</span> <span class="pl-s1"><span class="pl-c1">$</span>page</span>): <span class="pl-smi"><span class="pl-smi">Response</span></span>
{
<span class="pl-s1"><span class="pl-c1">$</span>articles</span> = <span class="pl-s1"><span class="pl-c1">$</span>articles</span>-><span class="pl-en">findLatest</span>(<span class="pl-s1"><span class="pl-c1">$</span>page</span>);
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">render</span>(<span class="pl-s">'article/index.html.twig'</span>, [
<span class="pl-s">'articles'</span> => <span class="pl-s1"><span class="pl-c1">$</span>articles</span>
]);
}</pre></div>
<p dir="auto">then the <code class="notranslate">cache-control</code> header is <code class="notranslate">cache-control:max-age=0, must-revalidate, private, s-maxage=3600</code></p>
<p dir="auto">It contains the <code class="notranslate">max-age=0, must-revalidate, private</code> is not what I want.</p>
<p dir="auto">What should I do?</p>
<p dir="auto">Because the response header, so my CDN cannot cache my pages.</p>
<p dir="auto">thx.</p> | <p dir="auto">Hi,</p>
<p dir="auto">For background, I am attempting to write a <code class="notranslate">FormTypeExtension</code> that serialises form field constraints into data attributes on the input elements so that it is possible to write a generalised javascript library capable of validating most typical symfony forms client side.</p>
<p dir="auto">One place that breaks down is when validation rules depend on submitted data - I've seen and have been using <a href="http://symfony.com/doc/current/book/forms.html#groups-based-on-the-submitted-data" rel="nofollow">this</a> to successfully validate on the server side, but without the ability to define field interdependencies declaratively, it becomes impossible to bake these rules into data attributes: there is no way to serialise the decision that happens in that closure.</p>
<p dir="auto">With that in mind, I've been attempting to build another <code class="notranslate">FormTypeExtension</code> that introduces the notion of dependencies, see comments inline:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
namespace App\Form\Extension;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use App\Form\EventListener\DependsListener;
class DependsExtension extends AbstractTypeExtension
{
public function getExtendedType()
{
return 'form';
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setOptional(array(
'depends'
));
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
if (array_key_exists('depends', $options)) {
// should builder be needed here? is this even correct?
$builder->addEventSubscriber(new DependsListener($builder, $options['depends']));
}
}
public function buildView(FormView $view, FormInterface $form, array $options)
{
// bake dependencies into data attributes for client side js to act on
if (array_key_exists('depends', $options)) {
$view->vars['attr']['data-depends'] = json_encode($options['depends']);
}
}
}"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Form</span>\<span class="pl-v">Extension</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Form</span>\<span class="pl-v">FormBuilderInterface</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Form</span>\<span class="pl-v">FormView</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Form</span>\<span class="pl-v">FormInterface</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Form</span>\<span class="pl-v">AbstractTypeExtension</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">OptionsResolver</span>\<span class="pl-v">OptionsResolverInterface</span>;
<span class="pl-k">use</span> <span class="pl-v">App</span>\<span class="pl-v">Form</span>\<span class="pl-v">EventListener</span>\<span class="pl-v">DependsListener</span>;
<span class="pl-k">class</span> <span class="pl-v">DependsExtension</span> <span class="pl-k">extends</span> <span class="pl-v">AbstractTypeExtension</span>
{
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">getExtendedType</span>()
{
<span class="pl-k">return</span> <span class="pl-s">'form'</span>;
}
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">setDefaultOptions</span>(<span class="pl-smi"><span class="pl-smi">OptionsResolverInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>resolver</span>)
{
<span class="pl-s1"><span class="pl-c1">$</span>resolver</span>-><span class="pl-en">setOptional</span>(<span class="pl-en">array</span>(
<span class="pl-s">'depends'</span>
));
}
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">buildForm</span>(<span class="pl-smi"><span class="pl-smi">FormBuilderInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>builder</span>, <span class="pl-smi">array</span> <span class="pl-s1"><span class="pl-c1">$</span>options</span>)
{
<span class="pl-k">if</span> (array_key_exists(<span class="pl-s">'depends'</span>, <span class="pl-s1"><span class="pl-c1">$</span>options</span>)) {
<span class="pl-c">// should builder be needed here? is this even correct?</span>
<span class="pl-c"></span> <span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">addEventSubscriber</span>(<span class="pl-k">new</span> <span class="pl-v">DependsListener</span>(<span class="pl-s1"><span class="pl-c1">$</span>builder</span>, <span class="pl-s1"><span class="pl-c1">$</span>options</span>[<span class="pl-s">'depends'</span>]));
}
}
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">buildView</span>(<span class="pl-smi"><span class="pl-smi">FormView</span></span> <span class="pl-s1"><span class="pl-c1">$</span>view</span>, <span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>, <span class="pl-smi">array</span> <span class="pl-s1"><span class="pl-c1">$</span>options</span>)
{
<span class="pl-c">// bake dependencies into data attributes for client side js to act on</span>
<span class="pl-k">if</span> (array_key_exists(<span class="pl-s">'depends'</span>, <span class="pl-s1"><span class="pl-c1">$</span>options</span>)) {
<span class="pl-s1"><span class="pl-c1">$</span>view</span>-><span class="pl-c1">vars</span>[<span class="pl-s">'attr'</span>][<span class="pl-s">'data-depends'</span>] = json_encode(<span class="pl-s1"><span class="pl-c1">$</span>options</span>[<span class="pl-s">'depends'</span>]);
}
}
}</pre></div>
<p dir="auto">And the listener:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
namespace App\Form\EventListener;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\PropertyAccess\PropertyAccess;
class DependsListener implements EventSubscriberInterface
{
/**
*
* @var FormBuilderInterface
*/
private $builder;
private $depends;
public function __construct($builder, $depends)
{
$this->builder = $builder;
$this->depends = $depends;
}
public static function getSubscribedEvents()
{
return array(
FormEvents::PRE_SET_DATA => 'preSetData',
FormEvents::PRE_SUBMIT => 'preSubmit'
);
}
public function preSetData(FormEvent $event)
{
// TODO probably have to do something here when loading the form
}
public function preSubmit(FormEvent $event)
{
$root = $event->getForm()->getRoot();
$accessor = PropertyAccess::createPropertyAccessor();
$removeMe = true;
foreach ($this->depends as $fieldPath => $value) {
// TODO: use sf constraints for this? allows for more options than simple equality
if ($accessor->getValue($root, $fieldPath)->getData() != $value) {
$removeMe = $removeMe && true;
}
else {
$removeMe = false;
}
}
if ($removeMe) {
// this is where I'd like to somehow unset / interact with the constraints defined on the field
//
// note it is possible to just straight up remove the field:
$event->getForm()->getParent()->remove($event->getForm()->getName());
// but this is not ideal. ideally we'd disable server side validation and hide this field with js
}
}
}"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Form</span>\<span class="pl-v">EventListener</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Form</span>\<span class="pl-v">FormBuilderInterface</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">EventDispatcher</span>\<span class="pl-v">EventSubscriberInterface</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Form</span>\<span class="pl-v">FormEvent</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">Form</span>\<span class="pl-v">FormEvents</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">PropertyAccess</span>\<span class="pl-v">PropertyAccess</span>;
<span class="pl-k">class</span> <span class="pl-v">DependsListener</span> <span class="pl-k">implements</span> <span class="pl-v">EventSubscriberInterface</span>
{
<span class="pl-c">/**</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @var FormBuilderInterface</span>
<span class="pl-c"> */</span>
<span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>builder</span>;
<span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>depends</span>;
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">__construct</span>(<span class="pl-s1"><span class="pl-c1">$</span>builder</span>, <span class="pl-s1"><span class="pl-c1">$</span>depends</span>)
{
<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">builder</span> = <span class="pl-s1"><span class="pl-c1">$</span>builder</span>;
<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">depends</span> = <span class="pl-s1"><span class="pl-c1">$</span>depends</span>;
}
<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-k">function</span> <span class="pl-en">getSubscribedEvents</span>()
{
<span class="pl-k">return</span> <span class="pl-en">array</span>(
<span class="pl-v">FormEvents</span>::<span class="pl-c1">PRE_SET_DATA</span> => <span class="pl-s">'preSetData'</span>,
<span class="pl-v">FormEvents</span>::<span class="pl-c1">PRE_SUBMIT</span> => <span class="pl-s">'preSubmit'</span>
);
}
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">preSetData</span>(<span class="pl-smi"><span class="pl-smi">FormEvent</span></span> <span class="pl-s1"><span class="pl-c1">$</span>event</span>)
{
<span class="pl-c">// TODO probably have to do something here when loading the form</span>
}
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">preSubmit</span>(<span class="pl-smi"><span class="pl-smi">FormEvent</span></span> <span class="pl-s1"><span class="pl-c1">$</span>event</span>)
{
<span class="pl-s1"><span class="pl-c1">$</span>root</span> = <span class="pl-s1"><span class="pl-c1">$</span>event</span>-><span class="pl-en">getForm</span>()-><span class="pl-en">getRoot</span>();
<span class="pl-s1"><span class="pl-c1">$</span>accessor</span> = <span class="pl-v">PropertyAccess</span>::<span class="pl-en">createPropertyAccessor</span>();
<span class="pl-s1"><span class="pl-c1">$</span>removeMe</span> = <span class="pl-c1">true</span>;
<span class="pl-k">foreach</span> (<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">depends</span> <span class="pl-k">as</span> <span class="pl-s1"><span class="pl-c1">$</span>fieldPath</span> => <span class="pl-s1"><span class="pl-c1">$</span>value</span>) {
<span class="pl-c">// TODO: use sf constraints for this? allows for more options than simple equality</span>
<span class="pl-k">if</span> (<span class="pl-s1"><span class="pl-c1">$</span>accessor</span>-><span class="pl-en">getValue</span>(<span class="pl-s1"><span class="pl-c1">$</span>root</span>, <span class="pl-s1"><span class="pl-c1">$</span>fieldPath</span>)-><span class="pl-en">getData</span>() != <span class="pl-s1"><span class="pl-c1">$</span>value</span>) {
<span class="pl-s1"><span class="pl-c1">$</span>removeMe</span> = <span class="pl-s1"><span class="pl-c1">$</span>removeMe</span> && <span class="pl-c1">true</span>;
}
<span class="pl-k">else</span> {
<span class="pl-s1"><span class="pl-c1">$</span>removeMe</span> = <span class="pl-c1">false</span>;
}
}
<span class="pl-k">if</span> (<span class="pl-s1"><span class="pl-c1">$</span>removeMe</span>) {
<span class="pl-c">// this is where I'd like to somehow unset / interact with the constraints defined on the field</span>
<span class="pl-c">// </span>
<span class="pl-c">// note it is possible to just straight up remove the field:</span>
<span class="pl-s1"><span class="pl-c1">$</span>event</span>-><span class="pl-en">getForm</span>()-><span class="pl-en">getParent</span>()-><span class="pl-en">remove</span>(<span class="pl-s1"><span class="pl-c1">$</span>event</span>-><span class="pl-en">getForm</span>()-><span class="pl-en">getName</span>());
<span class="pl-c">// but this is not ideal. ideally we'd disable server side validation and hide this field with js</span>
}
}
}</pre></div>
<p dir="auto">As you can see, it seems impossible to unset / interact with the constraints associated with the field, even though it's possible to simply outright delete the field.</p>
<p dir="auto">Could anyone shed any light on if what I'm trying to do is possible / desired / insane / stupid and help point me in the direction of a solution?</p>
<p dir="auto">Thanks,<br>
Luke Cawood</p> | 0 |
<p dir="auto">I am trying to solve a simple example with the <code class="notranslate">dopri5</code> integrator in <code class="notranslate">scipy.integrate.ode</code>. As the documentation states</p>
<blockquote>
<p dir="auto">This is an explicit runge-kutta method of order (4)5 due to Dormand & Prince (with stepsize control and dense output).</p>
</blockquote>
<p dir="auto">this should work. So here is my example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
from scipy.integrate import ode
import matplotlib.pyplot as plt
def MassSpring_with_force(t, state, f):
""" Simple 1DOF dynamics model: m ddx(t) + k x(t) = f(t)"""
# unpack the state vector
x = state[0]
xd = state[1]
# these are our constants
k = 2.5 # Newtons per metre
m = 1.5 # Kilograms
# compute acceleration xdd
xdd = ( ( -k*x + f) / m )
# return the two state derivatives
return [xd, xdd]
def force(t):
""" Excitation force """
f0 = 1 # force amplitude [N]
freq = 20 # frequency[Hz]
omega = 2 * np.pi *freq # angular frequency [rad/s]
return f0 * np.sin(omega*t)
# Time range
t_start = 0
t_final = 1
# Main program
state_ode_f = ode(MassSpring_with_force)
state_ode_f.set_integrator('dopri5', rtol=1e-4, nsteps=500,
first_step=1e-6, max_step=1e-1, verbosity=True)
state2 = [0.0, 0.0] # initial conditions
state_ode_f.set_initial_value(state2, 0)
state_ode_f.set_f_params(force(0))
sol = np.array([[t_start, state2[0], state2[1]]], dtype=float)
print("Time\t\t Timestep\t dx\t\t ddx\t\t state_ode_f.successful()")
while state_ode_f.successful() and state_ode_f.t < (t_final):
state_ode_f.set_f_params(force(state_ode_f.t))
state_ode_f.integrate(t_final, step=True)
sol = np.append(sol, [[state_ode_f.t, state_ode_f.y[0], state_ode_f.y[1]]], axis=0)
print("{0:0.8f}\t {1:0.4e} \t{2:10.3e}\t {3:0.3e}\t {4}".format(
state_ode_f.t, sol[-1, 0]- sol[-2, 0], state_ode_f.y[0], state_ode_f.y[1], state_ode_f.successful()))"><pre class="notranslate"><code class="notranslate">import numpy as np
from scipy.integrate import ode
import matplotlib.pyplot as plt
def MassSpring_with_force(t, state, f):
""" Simple 1DOF dynamics model: m ddx(t) + k x(t) = f(t)"""
# unpack the state vector
x = state[0]
xd = state[1]
# these are our constants
k = 2.5 # Newtons per metre
m = 1.5 # Kilograms
# compute acceleration xdd
xdd = ( ( -k*x + f) / m )
# return the two state derivatives
return [xd, xdd]
def force(t):
""" Excitation force """
f0 = 1 # force amplitude [N]
freq = 20 # frequency[Hz]
omega = 2 * np.pi *freq # angular frequency [rad/s]
return f0 * np.sin(omega*t)
# Time range
t_start = 0
t_final = 1
# Main program
state_ode_f = ode(MassSpring_with_force)
state_ode_f.set_integrator('dopri5', rtol=1e-4, nsteps=500,
first_step=1e-6, max_step=1e-1, verbosity=True)
state2 = [0.0, 0.0] # initial conditions
state_ode_f.set_initial_value(state2, 0)
state_ode_f.set_f_params(force(0))
sol = np.array([[t_start, state2[0], state2[1]]], dtype=float)
print("Time\t\t Timestep\t dx\t\t ddx\t\t state_ode_f.successful()")
while state_ode_f.successful() and state_ode_f.t < (t_final):
state_ode_f.set_f_params(force(state_ode_f.t))
state_ode_f.integrate(t_final, step=True)
sol = np.append(sol, [[state_ode_f.t, state_ode_f.y[0], state_ode_f.y[1]]], axis=0)
print("{0:0.8f}\t {1:0.4e} \t{2:10.3e}\t {3:0.3e}\t {4}".format(
state_ode_f.t, sol[-1, 0]- sol[-2, 0], state_ode_f.y[0], state_ode_f.y[1], state_ode_f.successful()))
</code></pre></div>
<p dir="auto">The result I get is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Time Timestep dx ddx state_ode_f.successful()
1.00000000 1.0000e+00 0.000e+00 0.000e+00 True"><pre class="notranslate"><code class="notranslate">Time Timestep dx ddx state_ode_f.successful()
1.00000000 1.0000e+00 0.000e+00 0.000e+00 True
</code></pre></div>
<p dir="auto">Hence, only one time-step is computed which is obviously incorrect.</p>
<p dir="auto">This works with <code class="notranslate">vode</code> and <code class="notranslate">zvode</code> integrators</p> | <p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1820" rel="nofollow">http://projects.scipy.org/scipy/ticket/1820</a> on 2013-01-22 by trac user timdiller, assigned to trac user teoliphant.</em></p>
<p dir="auto">The dopri5 and dop853 methods of scipy.integrate.ode do not support the step keyword argument. This is nicely illustrated in this [http://stackoverflow.com/questions/12926393/using-adaptive-step-sizes-with-scipy-integrate-ode StackOverflow article].</p>
<p dir="auto">Implementing this would provide a better-working alternative to MATLAB's ode45(), etc.</p> | 1 |
<p dir="auto">Hi All</p>
<p dir="auto">i dont't know if there is something wrong with my confing or it is a bug but in WSL and linux boxes connected via ssh when pasting clear text from notepad, Windows Terminal after each line, leaves one empty line. I am pasting using right click.</p>
<p dir="auto">It does not happen on cmd.exe or PowerShell</p>
<p dir="auto">Anybody know how to resolve that?</p>
<p dir="auto">Thanks</p> | <p dir="auto">Multiline text pasted from the clipboard includes CRLF pairs in all cases; this is inappropriate for "Unix-space" sessions, such as WSL.</p>
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.145]
Windows Terminal version (if applicable): 71e19cd82528d66a0a7867cbed85990cfc1685f1"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.145]
Windows Terminal version (if applicable): 71e19cd82528d66a0a7867cbed85990cfc1685f1
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Select multiline text in Terminal.<br>
Copy it (via right-click, ostensibly)<br>
Paste it (again via right-click)</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">When pasting into a Unix-space session -- such as WSL -- pasted text should have a reasonable set of line-ending characters.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Line endings are "doubled" on text paste to Unix-space sessions.</p> | 1 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
When processing data I ran into error originating from accessing a variable with undefined as its value. However this error does not make it to the console. The rendering of the view stops and nothing happens. There is nothing on the console.<br>
Debugging the issue with the Developer Tools in chrome I could see that the error is thrown and it goes to core.es5.js in @angular/core/@angular/core.es5.js => callWithDebugContext() @ Line number 13054.<br>
Whenever the errors are not propagating to the console I can debug that the state of the view is 2 in the variable _currentView.</p>
<p dir="auto">Note:<br>
The project was initially created from the Angular Seed Project which was running Angular 2.4.x. Recently I ported the entire application to Angular CLI 1.0.0 running Angular 4.0.0. Earlier the same issue happened where there was no issue in the console but the page was not loading (in Angular 4 / Angular-CLI 1). When investigating it was some old code present in the previous version running on Angular 2.4.x that was causing the issue and I found this out when trying to run the application on the previous versions and that caused errors on the console which I fixed in the new version (Running Angular 4)</p>
<p dir="auto"><strong>Expected behavior</strong><br>
For any such TypeErrors the message has to propagate to the console ( when no user written catch block is specified ).</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
I am finding it hard to reproduce in a new project since my current project is fairly large.<br>
<a href="https://plnkr.co/edit/SbExopvcG02v74Ess5FM?p=catalogue" rel="nofollow">https://plnkr.co/edit/SbExopvcG02v74Ess5FM?p=catalogue</a></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<p dir="auto">Windows 7 OS 64Bit.<br>
Visual Studio Code 1.1.0.2<br>
Node Package Manager 3.10.8<br>
Using ng serve</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.X</li>
</ul>
<p dir="auto">+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @angular/[email protected]<br>
+-- @types/[email protected]<br>
+-- @types/[email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
+-- [email protected]<br>
`-- [email protected]</p>
<ul dir="auto">
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
</ul>
<p dir="auto">Chrome 56.0.2924.87</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br>
TypeScript 2.2.1</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
v6.9.1</p>
</li>
</ul>
<p dir="auto">I do not know what all I need to debug this and will be glad to provide more information ( once the kind of information required is specified ).</p> | <p dir="auto">zone.js seems to have managed to eaten an exception that I needed. Don't know if this is actually zone.js's fault or something further down the stack is suppose to handle notifying of the exception but I figured you could probably tell me. Stack trace of exception follows</p>
<p dir="auto">(anonymous) (display.component.ngfactory.ts:486)<br>
debugUpdateRenderer (core.es5.js:12651)<br>
checkAndUpdateView (core.es5.js:12030)<br>
callViewAction (core.es5.js:12340)<br>
execComponentViewsAction (core.es5.js:12286)<br>
checkAndUpdateView (core.es5.js:12031)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execComponentViewsAction (core.es5.js:12286)<br>
checkAndUpdateView (core.es5.js:12031)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execComponentViewsAction (core.es5.js:12286)<br>
checkAndUpdateView (core.es5.js:12031)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execComponentViewsAction (core.es5.js:12286)<br>
checkAndUpdateView (core.es5.js:12031)<br>
callWithDebugContext (core.es5.js:13013)<br>
debugCheckAndUpdateView (core.es5.js:12553)<br>
ViewRef_.detectChanges (core.es5.js:10122)<br>
(anonymous) (core.es5.js:5052)<br>
ApplicationRef_.tick (core.es5.js:5052)<br>
(anonymous) (core.es5.js:4932)<br>
ZoneDelegate.invoke (zone.js:365)<br>
onInvoke (core.es5.js:4125)<br>
ZoneDelegate.invoke (zone.js:364)<br>
Zone.run (zone.js:125)<br>
NgZone.run (core.es5.js:3994)<br>
next (core.es5.js:4932)<br>
schedulerFn (core.es5.js:3828)<br>
SafeSubscriber.__tryOrUnsub (Subscriber.js:234)<br>
SafeSubscriber.next (Subscriber.js:183)<br>
Subscriber._next (Subscriber.js:125)<br>
Subscriber.next (Subscriber.js:89)<br>
Subject.next (Subject.js:55)<br>
EventEmitter.emit (core.es5.js:3814)<br>
NgZone.checkStable (core.es5.js:4090)<br>
NgZone.setHasMicrotask (core.es5.js:4174)<br>
onHasTask (core.es5.js:4137)<br>
ZoneDelegate.hasTask (zone.js:418) //caught here<br>
ZoneDelegate._updateTaskCount (zone.js:438)<br>
Zone._updateTaskCount (zone.js:262)<br>
Zone.runTask (zone.js:182)<br>
drainMicroTaskQueue (zone.js:593)<br>
ZoneTask.invoke (zone.js:464)</p>
<p dir="auto">edit: (attempted) clarification<br>
An exception's information is lost, specifically here's what happened.</p>
<ol dir="auto">
<li>an angular template references invalid_variable.foo</li>
<li>this throws an error ReferenceError: invalid_variable is not defined or possibly Cannot read property 'foo' of undefined (the exact error isn't important)</li>
<li>the exception propagates up the stack (it's an exception after all) At several points it's caught enhanced with more information and thrown again, no surprises there.</li>
<li>ZoneDelegate.hasTask (zone.js:418) is wraped in a try catch where the catch does nothing. This catches the exception and stops handling it<br>
result: angular template stops rendering and it's very difficult to debug, as no stack trace or other error information are logged to the console. The error is currently silently caught and discarded.</li>
</ol>
<p dir="auto">desired behavior<br>
The exception is at some point shown to me either by being logged at some point, or being thrown and not caught at some point.</p> | 1 |
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.3.0 (latest released)</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">The unique ID of the task is seemingly not calculated correctly in base.py and it can cause in a duplicate key error, my guess is that this bit from /decorators/base.py:115:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if tg_task_id not in dag.task_ids:
return task_id"><pre class="notranslate"><code class="notranslate">if tg_task_id not in dag.task_ids:
return task_id
</code></pre></div>
<p dir="auto">doesn't make any sense and the actual return should be:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if tg_task_id not in dag.task_ids:
return tg_task_id"><pre class="notranslate"><code class="notranslate">if tg_task_id not in dag.task_ids:
return tg_task_id
</code></pre></div>
<p dir="auto">But I didn't write it so there is maybe a reason down the line for <code class="notranslate">return task_id</code>. Someone that does know his way around TaskFlow's codebase should pitch in.</p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">task.expand should not lead to a airflow.exceptions.DuplicateTaskIdFound inside task groups.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Pick example_task_group_decorator.py, change it so that task_1 returns a list, and call task_2 with <code class="notranslate">.expand(value=task_1)</code>.</p>
<p dir="auto">A modification as simple as this will already kill the DAG:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""Example DAG demonstrating the usage of the @taskgroup decorator."""
import pendulum
from airflow.decorators import task, task_group
from airflow.models.dag import DAG
# [START howto_task_group_decorator]
# Creating Tasks
@task
def task_start():
"""Empty Task which is First Task of Dag"""
return '[Task_start]'
@task
def task_1(value: int) -> list[str]:
"""Empty Task1"""
return [f'[ Task1 {value} ]', f'[ Task1 {value+1} ]']
@task
def task_2(value: list[str]) -> str:
"""Empty Task2"""
return f'[ Task2 {value} ]'
@task
def task_3(value: str) -> None:
"""Empty Task3"""
print(f'[ Task3 {value} ]')
@task
def task_end() -> None:
"""Empty Task which is Last Task of Dag"""
print('[ Task_End ]')
# Creating TaskGroups
@task_group
def task_group_function(value: int) -> None:
"""TaskGroup for grouping related Tasks"""
task_3(task_2.expand(value=task_1(value)))
# Executing Tasks and TaskGroups
with DAG(
dag_id="example_task_group_decorator",
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
catchup=False,
tags=["example"],
) as dag:
start_task = task_start()
end_task = task_end()
for i in range(5):
current_task_group = task_group_function(i)
start_task >> current_task_group >> end_task
# [END howto_task_group_decorator]"><pre class="notranslate"><code class="notranslate">#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""Example DAG demonstrating the usage of the @taskgroup decorator."""
import pendulum
from airflow.decorators import task, task_group
from airflow.models.dag import DAG
# [START howto_task_group_decorator]
# Creating Tasks
@task
def task_start():
"""Empty Task which is First Task of Dag"""
return '[Task_start]'
@task
def task_1(value: int) -> list[str]:
"""Empty Task1"""
return [f'[ Task1 {value} ]', f'[ Task1 {value+1} ]']
@task
def task_2(value: list[str]) -> str:
"""Empty Task2"""
return f'[ Task2 {value} ]'
@task
def task_3(value: str) -> None:
"""Empty Task3"""
print(f'[ Task3 {value} ]')
@task
def task_end() -> None:
"""Empty Task which is Last Task of Dag"""
print('[ Task_End ]')
# Creating TaskGroups
@task_group
def task_group_function(value: int) -> None:
"""TaskGroup for grouping related Tasks"""
task_3(task_2.expand(value=task_1(value)))
# Executing Tasks and TaskGroups
with DAG(
dag_id="example_task_group_decorator",
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
catchup=False,
tags=["example"],
) as dag:
start_task = task_start()
end_task = task_end()
for i in range(5):
current_task_group = task_group_function(i)
start_task >> current_task_group >> end_task
# [END howto_task_group_decorator]
</code></pre></div>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Manjaro Linux</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Virtualenv installation</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <p dir="auto">I wanted to discuss an important change proposal for our Breeze2 approach.</p>
<p dir="auto">TL;DR; I thought a lot about how we shold run Breeze2. Instead of having a single <code class="notranslate">./breeze</code> command we could have multiple <code class="notranslate">airflow-*</code> commands that would be automatically installed by <code class="notranslate">pipx install -e ./dev/breeze</code> and that it should be the only way of running various commands of breeze (both in CI and during local development). An example of that is <code class="notranslate">airflow-freespace</code> command that is used in CI to free space needed to run the commands.</p>
<h1 dir="auto">Context</h1>
<p dir="auto">I looked at some of the changes made recently, particularly just merged: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1094932287" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/20701" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/20701/hovercard" href="https://github.com/apache/airflow/pull/20701">#20701</a> and I thought we might change the approach of the new Breeze following the learnings we had and mostly suggestions of <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/uranusjr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/uranusjr">@uranusjr</a> when we dicussed the custom code in <a href="https://github.com/apache/airflow/blob/main/Breeze2">https://github.com/apache/airflow/blob/main/Breeze2</a> for bootstraping the environment.</p>
<p dir="auto">This is - in essence very similar aas the old <code class="notranslate">./breeze</code> was and I kept to be "anchored" with it however by introducing <code class="notranslate">pipx</code> and installing ./breeze locally in editable mode, we've almost achieved what I wanted from the beginning - i.e. very simple and os-independent way of bootstrapping the environment for Breeze.</p>
<p dir="auto">Current state, reasoning and decision is captured here (still Draft though): <a href="https://github.com/apache/airflow/blob/main/dev/breeze/doc/adr/0003-bootstraping-virtual-environment.md">https://github.com/apache/airflow/blob/main/dev/breeze/doc/adr/0003-bootstraping-virtual-environment.md</a></p>
<h1 dir="auto">Proposal</h1>
<p dir="auto">The "free-space" script shows how we can utilize multiple entry-points,. Instead of "one-command to rule them all" - "Breeze" - we could have multiple commands/entry-points installed with <code class="notranslate">pipx</code>:</p>
<ul dir="auto">
<li>airflow-breeze -> to run Breeze shell</li>
<li>airflow-build-ci-image -> to build ci image</li>
<li>airflow-build-prod-image-> to build prod image</li>
<li>airflow-build-docs - > to build docs,</li>
<li>airflow-run-static-checks - > to run static checks</li>
</ul>
<p dir="auto">and so on, rather than:</p>
<ul dir="auto">
<li>./Breeze2 build-ci-image</li>
<li>./Breeze2 build-docs</li>
</ul>
<p dir="auto">and so on.</p>
<h1 dir="auto">Why it might be better ?</h1>
<p dir="auto">Mainly because of <code class="notranslate">zen of python</code>: <a href="https://www.python.org/dev/peps/pep-0020/" rel="nofollow">https://www.python.org/dev/peps/pep-0020/</a></p>
<blockquote>
<p dir="auto">There should be one-- and preferably only one --obvious way to do it.</p>
</blockquote>
<p dir="auto">Wile <code class="notranslate">pipx-only</code> approach is not perfect, I think we can make it close to it (with some effort and added complexity).</p>
<p dir="auto">With PIPX installation, all those commands are easily accessible in the PATH (and auto-complete'able).</p>
<p dir="auto">Also the very same commands could be used in CI (same as we did with "airflow-freespace" - this would limit some duplication and made it much more straightforward - how to run some commands locally. The parameters for those commands could still be passed by environment variables in CI (Click has support for that and we already use it).</p>
<p dir="auto">The only problem to solve is how to handle errors when somene has "old" "breeze" virtualenv. Breeze will change dynamically - new dependencies will be added and we will move to newer versions regularly. This might lead to unnecessary issues and questions on Slack if those errorrs are somehow mysterious and not obvious. Current ./Breeze2 bootstrap script does it by automated upgrading of the virtualenv. However I thought about it and maybe we can approach it differently.</p>
<p dir="auto">I think we have a way to handle it. We should write a little common code for those commands to capture and store in repo what dependencies are needed (and which versions - that could be even requirements.txt file) and update it automatically with pre-commit and warn the users in cases the dependencies are missing or outdated whenever any command is run. Those dependencies will not change often, but when they do, all users should know that they should upgrade and it should be possible.</p>
<p dir="auto">This would be a warning only but it could provide a helpful "Your breeze enviroinment is outdated, please run <code class="notranslate">pipx install -e ./dev/breeze --force</code> to update the environment" warning.</p>
<p dir="auto">Then we could (as <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/uranusjr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/uranusjr">@uranusjr</a> proposed and stronly suggested) remove the custom <code class="notranslate">./Breeze2</code> bootstrapping.</p>
<h1 dir="auto">Why it might be worse ?</h1>
<p dir="auto">There are two serious dangers with pipx:</p>
<ul dir="auto">
<li>that the version you have in one branch will not work with another branch (very likely from the past experiences)</li>
<li>that even if you are in the same branch, you could have not installed the latest version of dependencies (and Breeze will fail) or that you have not installed it with --editable flag - which means that the code of Breeze in the branch is different that what you run. This might lead to serious, unforeseen and difficult to diagnose problems.</li>
</ul>
<p dir="auto">Both are real dangers, and they will significantly increase the likelihood that different users (especially the ones who are not experienced) will get Breeze not working and that they will raise support questions or (worse) that they will consider Breeze as buggy and will avoid using it or even will drop the idea of contributing to Airflow.</p>
<p dir="auto">The ./Breeze2 bootstrapping is free of those problems:</p>
<ul dir="auto">
<li>--editable mode is automatically used</li>
<li>latest dependencies are added when they were missing automatically</li>
<li>your Breeze version is very tightly connecteect to the branch you are in</li>
</ul> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">GTM tags should work the same way on every page, whether the user arrived at this page or browsed to it.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">GTM tags that use the <code class="notranslate">event</code> type stop working properly as soon as a user browse the website. By "browse", I mean using client-side navigation, which doesn't refresh the page but only part of it (kinda the point of SPA)</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">You can reproduce on my online staging environment:</p>
<ul dir="auto">
<li>Install Chrome plugin: <a href="https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna" rel="nofollow">https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna</a> to be able to see the GTM events calls in the browser console</li>
<li>Go to <a href="https://staging.hep.loan-advisor.studylink.fr/idrac" rel="nofollow">https://staging.hep.loan-advisor.studylink.fr/idrac</a></li>
<li>Click on the top-left IDRAC logo, you should see logs on the console (event fired)</li>
<li>Go to <a href="https://staging.hep.loan-advisor.studylink.fr" rel="nofollow">https://staging.hep.loan-advisor.studylink.fr</a> and select the "Idrac" choice from the select input, then click "Go", you should see logs in the console again (redirection detected, which creates a pageview)</li>
<li>Click on the top-left IDRAC logo, you won't see any log this time</li>
</ul>
<h2 dir="auto">Context</h2>
<p dir="auto">I believe that somehow GTM binds some DOM events upon loading that get cleaned when the DOM changes due to Next.js redirection, which reloads the DOM, partially.</p>
<p dir="auto">Those GTM tags (type: event) I'm talking about are basically triggers based on HTML class/id in the DOM. When I use the GTM Preview mode (debug), I can see that there is no gtm.linkClick fired when clicking the logo, if I got redirected from another page using a frontend-redirection. But if I refresh the page and click, it works just fine.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3807458/38091170-01e963ac-3365-11e8-830a-65fe7f2d7c63.png"><img src="https://user-images.githubusercontent.com/3807458/38091170-01e963ac-3365-11e8-830a-65fe7f2d7c63.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">The simplest workaround I see is to disable client-side redirection but forcing a page refresh, but that's not a nice workaround and kills the point of building an SPA in the first place.</p>
<p dir="auto">Maybe there is a way to force refresh the GTM script (need to clean it from the DOM and add it again because it won't trigger if already loaded), or to use a feature within GTM that binds everything again? I don't know.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>5.0.1-canary.16</td>
</tr>
<tr>
<td>node</td>
<td>6.10.3</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table> | <h1 dir="auto">Bug report</h1>
<p dir="auto">Deploying Next to a Firebase function, gets the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ Error: Cannot find module '/srv/next/server/static\vk8cHgwKqiKyVYwLtSV~e\pages\_error.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at _callee$ (/srv/node_modules/next/dist/server/require.js:85:46)
at tryCatch (/srv/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/srv/node_modules/regenerator-runtime/runtime.js:288:22)
at Generator.prototype.(anonymous function) [as next] (/srv/node_modules/regenerator-runtime/runtime.js:114:21)
at asyncGeneratorStep (/srv/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:5:24)
at _next (/srv/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:27:9) code: 'MODULE_NOT_FOUND' }"><pre class="notranslate"><code class="notranslate">{ Error: Cannot find module '/srv/next/server/static\vk8cHgwKqiKyVYwLtSV~e\pages\_error.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at _callee$ (/srv/node_modules/next/dist/server/require.js:85:46)
at tryCatch (/srv/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/srv/node_modules/regenerator-runtime/runtime.js:288:22)
at Generator.prototype.(anonymous function) [as next] (/srv/node_modules/regenerator-runtime/runtime.js:114:21)
at asyncGeneratorStep (/srv/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:5:24)
at _next (/srv/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:27:9) code: 'MODULE_NOT_FOUND' }
</code></pre></div>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">I think this is because there's a mix of slashes and backslashes in the file name so Node can't find it.</p>
<p dir="auto">The file definitely exists in the correct folder.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows</li>
<li>Version of Next.js: 7.0.2</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Would it make sense to replace all backslashes with slashes in the getPagePath function?</p> | 0 |
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.1.3</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">macosx</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">apache-airflow==1!2.1.3+astro.1<br>
apache-airflow-providers-amazon==2.1.0<br>
apache-airflow-providers-celery==2.0.0<br>
apache-airflow-providers-databricks==2.0.0<br>
apache-airflow-providers-ftp==2.0.0<br>
apache-airflow-providers-google==5.0.0<br>
apache-airflow-providers-http==2.0.0<br>
apache-airflow-providers-imap==2.0.0<br>
apache-airflow-providers-microsoft-mssql==2.0.0<br>
apache-airflow-providers-mysql==2.1.0<br>
apache-airflow-providers-opsgenie==2.0.0<br>
apache-airflow-providers-postgres==2.0.0<br>
apache-airflow-providers-sftp==2.1.0<br>
apache-airflow-providers-slack==4.0.0<br>
apache-airflow-providers-snowflake==2.1.0<br>
apache-airflow-providers-sqlite==2.0.0<br>
apache-airflow-providers-ssh==2.1.0</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Astronomer</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">Astro version 2.1.3</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Recently upgraded the platform to 2.1.3 and observed issues with TriggerDagRunOperator Operator. The child dag object when triggered from parent dag is not showing the start time in the tree view.<br>
Also start time are showing up as null in dag_run table.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trigger_profile = TriggerDagRunOperator(
task_id='trigger_profile', trigger_dag_id='child_dag'
)"><pre class="notranslate"><code class="notranslate">trigger_profile = TriggerDagRunOperator(
task_id='trigger_profile', trigger_dag_id='child_dag'
)
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/32855276/133961379-c95610ec-6d7a-492b-9aa1-6f3381d29ffd.png"><img src="https://user-images.githubusercontent.com/32855276/133961379-c95610ec-6d7a-492b-9aa1-6f3381d29ffd.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto">ideally it should display timestamp.</p>
<h3 dir="auto">How to reproduce</h3>
<ul dir="auto">
<li>create two DAGS.</li>
<li>dag_main.py</li>
<li>dag_child.py</li>
<li>create an operator in dag_main.py</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trigger_dag_child = TriggerDagRunOperator(
task_id='trigger_profile', trigger_dag_id='dag_child'"><pre class="notranslate"><code class="notranslate">trigger_dag_child = TriggerDagRunOperator(
task_id='trigger_profile', trigger_dag_id='dag_child'
</code></pre></div>
)</li>
<li>check start time in child dag</li>
</ul>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.1.1</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Scheduler regularly crashes with error messages like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MySQLdb._exceptions.IntegrityError: (1062, "Duplicate entry 'some-ETL-2022-01-19 14:00:00.000000' for key 'dag_id'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/airflow/.local/bin/airflow", line 8, in <module>
sys.exit(main())
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/cli.py", line 91, in wrapper
return f(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/commands/scheduler_command.py", line 64, in scheduler
job.run()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/base_job.py", line 237, in run
self._execute()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1303, in _execute
self._run_scheduler_loop()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1396, in _run_scheduler_loop
num_queued_tis = self._do_scheduling(session)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1492, in _do_scheduling
self._create_dagruns_for_dags(guard, session)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/retries.py", line 76, in wrapped_function
for attempt in run_with_db_retries(max_retries=retries, logger=logger, **retry_kwargs):
File "/home/airflow/.local/lib/python3.8/site-packages/tenacity/__init__.py", line 390, in __iter__
do = self.iter(retry_state=retry_state)
File "/home/airflow/.local/lib/python3.8/site-packages/tenacity/__init__.py", line 356, in iter
return fut.result()
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/retries.py", line 85, in wrapped_function
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1583, in _create_dagruns_for_dags
self._create_dag_runs(query.all(), session)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1625, in _create_dag_runs
run = dag.create_dagrun(
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py", line 67, in wrapper
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/dag.py", line 1796, in create_dagrun
session.flush()
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2523, in flush
self._flush(objects)
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2664, in _flush
transaction.rollback(_capture_exception=True)
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.raise_(
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2624, in _flush
flush_context.execute()
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
... "><pre class="notranslate"><code class="notranslate">MySQLdb._exceptions.IntegrityError: (1062, "Duplicate entry 'some-ETL-2022-01-19 14:00:00.000000' for key 'dag_id'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/airflow/.local/bin/airflow", line 8, in <module>
sys.exit(main())
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/cli.py", line 91, in wrapper
return f(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/commands/scheduler_command.py", line 64, in scheduler
job.run()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/base_job.py", line 237, in run
self._execute()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1303, in _execute
self._run_scheduler_loop()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1396, in _run_scheduler_loop
num_queued_tis = self._do_scheduling(session)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1492, in _do_scheduling
self._create_dagruns_for_dags(guard, session)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/retries.py", line 76, in wrapped_function
for attempt in run_with_db_retries(max_retries=retries, logger=logger, **retry_kwargs):
File "/home/airflow/.local/lib/python3.8/site-packages/tenacity/__init__.py", line 390, in __iter__
do = self.iter(retry_state=retry_state)
File "/home/airflow/.local/lib/python3.8/site-packages/tenacity/__init__.py", line 356, in iter
return fut.result()
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/retries.py", line 85, in wrapped_function
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1583, in _create_dagruns_for_dags
self._create_dag_runs(query.all(), session)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1625, in _create_dag_runs
run = dag.create_dagrun(
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py", line 67, in wrapper
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/dag.py", line 1796, in create_dagrun
session.flush()
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2523, in flush
self._flush(objects)
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2664, in _flush
transaction.rollback(_capture_exception=True)
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.raise_(
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2624, in _flush
flush_context.execute()
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
...
</code></pre></div>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto">We would expect these errors not to occur. According to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="631215427" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/9148" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/9148/hovercard" href="https://github.com/apache/airflow/issues/9148">#9148</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="795056129" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/13925" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/13925/hovercard" href="https://github.com/apache/airflow/issues/13925">#13925</a> this issue should have been fixed a couple of versions ago.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">kubernetes</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apache-airflow-providers-amazon==2.0.0
apache-airflow-providers-celery==2.0.0
apache-airflow-providers-cncf-kubernetes==2.0.0
apache-airflow-providers-docker==2.0.0
apache-airflow-providers-elasticsearch==2.0.1
apache-airflow-providers-ftp==2.0.0
apache-airflow-providers-google==4.0.0
apache-airflow-providers-grpc==2.0.0
apache-airflow-providers-hashicorp==2.0.0
apache-airflow-providers-http==2.0.0
apache-airflow-providers-imap==2.0.0
apache-airflow-providers-microsoft-azure==3.0.0
apache-airflow-providers-mysql==2.0.0
apache-airflow-providers-odbc==2.0.0
apache-airflow-providers-postgres==2.0.0
apache-airflow-providers-redis==2.0.0
apache-airflow-providers-sendgrid==2.0.0
apache-airflow-providers-sftp==2.0.0
apache-airflow-providers-slack==4.0.0
apache-airflow-providers-sqlite==2.0.0
apache-airflow-providers-ssh==2.0.0
"><pre class="notranslate"><code class="notranslate">apache-airflow-providers-amazon==2.0.0
apache-airflow-providers-celery==2.0.0
apache-airflow-providers-cncf-kubernetes==2.0.0
apache-airflow-providers-docker==2.0.0
apache-airflow-providers-elasticsearch==2.0.1
apache-airflow-providers-ftp==2.0.0
apache-airflow-providers-google==4.0.0
apache-airflow-providers-grpc==2.0.0
apache-airflow-providers-hashicorp==2.0.0
apache-airflow-providers-http==2.0.0
apache-airflow-providers-imap==2.0.0
apache-airflow-providers-microsoft-azure==3.0.0
apache-airflow-providers-mysql==2.0.0
apache-airflow-providers-odbc==2.0.0
apache-airflow-providers-postgres==2.0.0
apache-airflow-providers-redis==2.0.0
apache-airflow-providers-sendgrid==2.0.0
apache-airflow-providers-sftp==2.0.0
apache-airflow-providers-slack==4.0.0
apache-airflow-providers-sqlite==2.0.0
apache-airflow-providers-ssh==2.0.0
</code></pre></div>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Other 3rd-party Helm chart</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">deployed via <a href="https://artifacthub.io/packages/helm/airflow-helm/airflow/8.5.0" rel="nofollow">https://artifacthub.io/packages/helm/airflow-helm/airflow/8.5.0</a> to kubernetes cluster (kubernetes 1.18).</p>
<p dir="auto">Backend is a mariaDB (10.3.31)</p>
<p dir="auto">Docker image used as base image: apache/airflow:2.1.1-python3.8</p>
<p dir="auto">Additional python dependencies installed:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="airflow-exporter==1.5.2
boto3==1.18.58
s3fs==0.4.*
pandas==1.3.3
sqlalchemy==1.3.18
sqlalchemy-redshift==0.8.2
smart_open[aws]==2.1.*
# Use PyMySQL as dialect to fix SSL connection error
PyMySQL==1.0.2"><pre class="notranslate"><code class="notranslate">airflow-exporter==1.5.2
boto3==1.18.58
s3fs==0.4.*
pandas==1.3.3
sqlalchemy==1.3.18
sqlalchemy-redshift==0.8.2
smart_open[aws]==2.1.*
# Use PyMySQL as dialect to fix SSL connection error
PyMySQL==1.0.2
</code></pre></div>
<p dir="auto">Relevant parts of the airflow configuration:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="airflow:
config:
# [core]
AIRFLOW__CORE__PARALLELISM: "24"
AIRFLOW__CORE__DAG_CONCURRENCY: "20"
AIRFLOW__CORE__MAX_ACTIVE_RUNS_PER_DAG: "1"
AIRFLOW__CORE__LOAD_EXAMPLES: "False"
AIRFLOW__CORE__STORE_SERIALIZED_DAGS: "False""><pre class="notranslate"><code class="notranslate">airflow:
config:
# [core]
AIRFLOW__CORE__PARALLELISM: "24"
AIRFLOW__CORE__DAG_CONCURRENCY: "20"
AIRFLOW__CORE__MAX_ACTIVE_RUNS_PER_DAG: "1"
AIRFLOW__CORE__LOAD_EXAMPLES: "False"
AIRFLOW__CORE__STORE_SERIALIZED_DAGS: "False"
</code></pre></div>
<h3 dir="auto">Anything else</h3>
<p dir="auto">Between 1 and 10 scheduler restarts per hour on average with the above error message.</p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | 0 |
<p dir="auto">I've completed a couple of Bonfire's successfully and realized there was an issue that floated past the test. I'd love to be able to remove these solutions from my portfolio page.</p> | <p dir="auto">If there are multiple solutions posted to a bonfire I'd like the ability to remove older versions (though I'd also like to be <em>able</em> to keep older versions too). Perhaps the ability to edit the solution on my profile.</p> | 1 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="information_source" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png">ℹ</g-emoji> Computer information</h2>
<ul dir="auto">
<li>PowerToys version: v0.23.2</li>
<li>PowerToy Utility: PowerToys Run</li>
<li>Running PowerToys as Admin: Yes</li>
<li>Windows build number: 19041.572</li>
</ul>
<h2 dir="auto">📝 Provide detailed reproduction steps (if any)</h2>
<ol dir="auto">
<li>Install and run PowerToys</li>
<li>Open Window off-screen (sort of a bug in itself, but a common Windows issue)</li>
<li>Press Alt+Space to open the Window menu to allow it to be moved back on-screen</li>
</ol>
<h3 dir="auto"><g-emoji class="g-emoji" alias="heavy_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2714.png">✔️</g-emoji> Expected result</h3>
<p dir="auto">The window menu appears (Restore, move, size, etc)</p>
<h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3>
<p dir="auto">A popup appears, with no indication that it is related to PowerToys, that just says "Start typing...".</p>
<p dir="auto">One of the following should happen</p>
<ul dir="auto">
<li>It needs to be made clear that the window that appears is related to PowerToys Run (or at least PowerToys). It was a bit of luck that led me to realise it was PowerToys that had taken the shortcut</li>
<li>Change the shortcut to one that is not used in Windows by default</li>
<li>Do not turn it on by default, or make it an option during install (again, not enabled by default)</li>
</ul> | <p dir="auto">Hi,<br>
This issue has been happening when I try to calculate arithmetic operations with decimals.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/66273555/83442473-d9925f00-a40d-11ea-87fe-6bf8efcc95a1.jpg"><img src="https://user-images.githubusercontent.com/66273555/83442473-d9925f00-a40d-11ea-87fe-6bf8efcc95a1.jpg" alt="Anotación 2020-06-01 134302" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">I just upgraded to react 15.6 then i tested my app from react 15.5. RadioButtonGroup onChange does not fire when i click on a RadioButton</p> | <p dir="auto">I don't receive any call to onCheck in react >= 15.6.0</p> | 1 |
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.5.0</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">I have a dynamic mapping task that is supposed to launch over 100 KubernetesPodOperator tasks. I have assigned 2.0 CPUs per task. When running the DAG, 16 tasks are in 'running state', however only 3 truly run, the remainder 13 fail with <code class="notranslate">Pod took longer than 120 seconds to start</code>. The remainder of the tasks are either queued or scheduled, and when there are less than 16 active tasks, they run and more or less fail with the same error.</p>
<p dir="auto">Here is a snapshot of</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubectl -n airflow get all
NAME READY STATUS RESTARTS AGE
pod/airflow-postgresql-0 1/1 Running 5 2d
pod/airflow-scheduler-6dd68b485c-w8bhp 3/3 Running 19 2d
pod/airflow-statsd-586dbdcc6b-h4mnr 1/1 Running 5 2d
pod/airflow-triggerer-95565b95d-phts7 2/2 Running 14 2d
pod/airflow-webserver-599bb95bcd-7dtpk 1/1 Running 5 2d
pod/my-task-17dd038ca4d04164ba90f9c7f9a7fbb6 0/2 Pending 0 49s
pod/my-task-20aba86c65544ea384343f8fb4415d3a 0/2 Pending 0 53s
pod/my-task-3c5b4444a7d242459907ff3be7b7d6f6 0/2 Pending 0 44s
pod/my-task-5c8af5edb0904711b6a76a2edf1d1067 0/2 Pending 0 60s
pod/my-task-6001d3567f96400bb0ae559f22d3d2db 0/2 Pending 0 43s
pod/my-task-6dfb1945f3ff4ac4a06c7e6c6a85099c 0/2 Pending 0 81s
pod/my-task-71ad2fb48fb64f449014bba45bee980f 0/2 ContainerCreating 0 52s
pod/my-task-774216cb5f9344ffb35deac826d71639 0/2 Pending 0 68s
pod/my-task-814266d425254130868c3a5ebc8dce49 0/2 Pending 0 67s
pod/my-task-a11588d878b54944b4c069f49231ac36 0/2 Pending 0 77s
pod/my-task-b16c843fa038441ea31b90363ed86aa0 0/2 Pending 0 49s
pod/my-task-b85e2ed3417a4a62940661f418c900e5 0/2 Pending 0 60s
pod/my-task-d1de2a771a104a2592956a713f785300 0/2 Pending 0 73s
pod/my-task-dbeba55a80074c08bbdf023b3f0b885c 0/2 Completed 0 10m
pod/my-task-f83ad2805d314be3a7307b7216a54e53 2/2 Running 0 10m
pod/pipeline-my-task-0bc9e094afee4527b5b764e32f590282 0/1 Init:0/1 0 1s
pod/pipeline-my-task-1d51c5d3776e4dd8a89461e8a76faba1 1/1 Running 0 62s
pod/pipeline-my-task-24b1326a71d149fb9f62c101647468ee 1/1 Running 0 62s
pod/pipeline-my-task-29b132b7b0ce4832a5e30a821c6405bf 1/1 Running 0 10m
pod/pipeline-my-task-29fb55604eec457fa21d13d85c7889b5 1/1 Running 0 10m
pod/pipeline-my-task-2a337f1cc28b4315945cec8a961b1111 1/1 Running 0 69s
pod/pipeline-my-task-35d5c97570474082bc9b04189c433be7 1/1 Running 0 57s
pod/pipeline-my-task-569de133975d4dbb96becb2a04c0dac3 1/1 Running 0 78s
pod/pipeline-my-task-96a9681ace4441deba4faeef602f6e5b 1/1 Running 0 78s
pod/pipeline-my-task-9dcb9578720643eca5fa918a0a295f87 1/1 Running 0 87s
pod/pipeline-my-task-a643741d29ea4f4baa06e0ea20bc1a57 1/1 Running 0 10m
pod/pipeline-my-task-b04532a9f35a48a09cb1d46c9d9470dd 1/1 Running 0 57s
pod/pipeline-my-task-c9b7bb4ee07749be98083a11a512e1f4 1/1 Running 0 90s
pod/pipeline-my-task-d9c5ce9bf5ce499583cdf0ea3f58b7f0 1/1 Running 0 82s
pod/pipeline-my-task-dd5a5a45374f487fbc34c904e71b93b5 1/1 Running 0 59s
pod/pipeline-my-task-ea8c39d657824a1db505b00e8673b06a 1/1 Running 0 69s
pod/pipeline-my-task-fb5c71d274034f5392aebe0f4b395d98 1/1 Running 0 65s"><pre class="notranslate"><code class="notranslate">kubectl -n airflow get all
NAME READY STATUS RESTARTS AGE
pod/airflow-postgresql-0 1/1 Running 5 2d
pod/airflow-scheduler-6dd68b485c-w8bhp 3/3 Running 19 2d
pod/airflow-statsd-586dbdcc6b-h4mnr 1/1 Running 5 2d
pod/airflow-triggerer-95565b95d-phts7 2/2 Running 14 2d
pod/airflow-webserver-599bb95bcd-7dtpk 1/1 Running 5 2d
pod/my-task-17dd038ca4d04164ba90f9c7f9a7fbb6 0/2 Pending 0 49s
pod/my-task-20aba86c65544ea384343f8fb4415d3a 0/2 Pending 0 53s
pod/my-task-3c5b4444a7d242459907ff3be7b7d6f6 0/2 Pending 0 44s
pod/my-task-5c8af5edb0904711b6a76a2edf1d1067 0/2 Pending 0 60s
pod/my-task-6001d3567f96400bb0ae559f22d3d2db 0/2 Pending 0 43s
pod/my-task-6dfb1945f3ff4ac4a06c7e6c6a85099c 0/2 Pending 0 81s
pod/my-task-71ad2fb48fb64f449014bba45bee980f 0/2 ContainerCreating 0 52s
pod/my-task-774216cb5f9344ffb35deac826d71639 0/2 Pending 0 68s
pod/my-task-814266d425254130868c3a5ebc8dce49 0/2 Pending 0 67s
pod/my-task-a11588d878b54944b4c069f49231ac36 0/2 Pending 0 77s
pod/my-task-b16c843fa038441ea31b90363ed86aa0 0/2 Pending 0 49s
pod/my-task-b85e2ed3417a4a62940661f418c900e5 0/2 Pending 0 60s
pod/my-task-d1de2a771a104a2592956a713f785300 0/2 Pending 0 73s
pod/my-task-dbeba55a80074c08bbdf023b3f0b885c 0/2 Completed 0 10m
pod/my-task-f83ad2805d314be3a7307b7216a54e53 2/2 Running 0 10m
pod/pipeline-my-task-0bc9e094afee4527b5b764e32f590282 0/1 Init:0/1 0 1s
pod/pipeline-my-task-1d51c5d3776e4dd8a89461e8a76faba1 1/1 Running 0 62s
pod/pipeline-my-task-24b1326a71d149fb9f62c101647468ee 1/1 Running 0 62s
pod/pipeline-my-task-29b132b7b0ce4832a5e30a821c6405bf 1/1 Running 0 10m
pod/pipeline-my-task-29fb55604eec457fa21d13d85c7889b5 1/1 Running 0 10m
pod/pipeline-my-task-2a337f1cc28b4315945cec8a961b1111 1/1 Running 0 69s
pod/pipeline-my-task-35d5c97570474082bc9b04189c433be7 1/1 Running 0 57s
pod/pipeline-my-task-569de133975d4dbb96becb2a04c0dac3 1/1 Running 0 78s
pod/pipeline-my-task-96a9681ace4441deba4faeef602f6e5b 1/1 Running 0 78s
pod/pipeline-my-task-9dcb9578720643eca5fa918a0a295f87 1/1 Running 0 87s
pod/pipeline-my-task-a643741d29ea4f4baa06e0ea20bc1a57 1/1 Running 0 10m
pod/pipeline-my-task-b04532a9f35a48a09cb1d46c9d9470dd 1/1 Running 0 57s
pod/pipeline-my-task-c9b7bb4ee07749be98083a11a512e1f4 1/1 Running 0 90s
pod/pipeline-my-task-d9c5ce9bf5ce499583cdf0ea3f58b7f0 1/1 Running 0 82s
pod/pipeline-my-task-dd5a5a45374f487fbc34c904e71b93b5 1/1 Running 0 59s
pod/pipeline-my-task-ea8c39d657824a1db505b00e8673b06a 1/1 Running 0 69s
pod/pipeline-my-task-fb5c71d274034f5392aebe0f4b395d98 1/1 Running 0 65s
</code></pre></div>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">Only 3 tasks should be running.<br>
The remainder tasks should be scheduled or queued.</p>
<h3 dir="auto">How to reproduce</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
import json
import textwrap
import pendulum
from airflow.decorators import dag, task
from airflow.models.param import Param
from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import (
KubernetesPodOperator,
Secret,
)
from kubernetes.client import models as k8s
@dag(
schedule=None,
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
catchup=False,
tags=["example"],
)
def pipeline():
container_resources = k8s.V1ResourceRequirements(
limits={
"memory": "512Mi",
"cpu": 2.0,
},
requests={
"memory": "512Mi",
"cpu": 2.0,
},
)
volumes = [
k8s.V1Volume(
name="pvc-airflow",
persistent_volume_claim=k8s.V1PersistentVolumeClaimVolumeSource(
claim_name="pvc-airflow"
),
)
]
volume_mounts = [
k8s.V1VolumeMount(mount_path="/airflow", name="pvc-airflow", sub_path=None)
]
@task
def make_list():
return [{"a": "a"}] * 100
my_task = KubernetesPodOperator.partial(
name="my_task",
task_id="my_task",
image="ubuntu:20.04",
namespace="airflow",
container_resources=container_resources,
volumes=volumes,
volume_mounts=volume_mounts,
in_cluster=True,
do_xcom_push=True,
get_logs=True,
cmds=[
"/bin/bash",
"-c",
"""
sleep 600
"""
],
).expand(env_vars=make_list())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">json</span>
<span class="pl-k">import</span> <span class="pl-s1">textwrap</span>
<span class="pl-k">import</span> <span class="pl-s1">pendulum</span>
<span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">decorators</span> <span class="pl-k">import</span> <span class="pl-s1">dag</span>, <span class="pl-s1">task</span>
<span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">models</span>.<span class="pl-s1">param</span> <span class="pl-k">import</span> <span class="pl-v">Param</span>
<span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">providers</span>.<span class="pl-s1">cncf</span>.<span class="pl-s1">kubernetes</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">kubernetes_pod</span> <span class="pl-k">import</span> (
<span class="pl-v">KubernetesPodOperator</span>,
<span class="pl-v">Secret</span>,
)
<span class="pl-k">from</span> <span class="pl-s1">kubernetes</span>.<span class="pl-s1">client</span> <span class="pl-k">import</span> <span class="pl-s1">models</span> <span class="pl-k">as</span> <span class="pl-s1">k8s</span>
<span class="pl-en">@<span class="pl-en">dag</span>(</span>
<span class="pl-en"> <span class="pl-s1">schedule</span><span class="pl-c1">=</span><span class="pl-c1">None</span>,</span>
<span class="pl-en"> <span class="pl-s1">start_date</span><span class="pl-c1">=</span><span class="pl-s1">pendulum</span>.<span class="pl-en">datetime</span>(<span class="pl-c1">2021</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">"UTC"</span>),</span>
<span class="pl-en"> <span class="pl-s1">catchup</span><span class="pl-c1">=</span><span class="pl-c1">False</span>,</span>
<span class="pl-en"> <span class="pl-s1">tags</span><span class="pl-c1">=</span>[<span class="pl-s">"example"</span>],</span>
<span class="pl-en">)</span>
<span class="pl-k">def</span> <span class="pl-en">pipeline</span>():
<span class="pl-s1">container_resources</span> <span class="pl-c1">=</span> <span class="pl-s1">k8s</span>.<span class="pl-v">V1ResourceRequirements</span>(
<span class="pl-s1">limits</span><span class="pl-c1">=</span>{
<span class="pl-s">"memory"</span>: <span class="pl-s">"512Mi"</span>,
<span class="pl-s">"cpu"</span>: <span class="pl-c1">2.0</span>,
},
<span class="pl-s1">requests</span><span class="pl-c1">=</span>{
<span class="pl-s">"memory"</span>: <span class="pl-s">"512Mi"</span>,
<span class="pl-s">"cpu"</span>: <span class="pl-c1">2.0</span>,
},
)
<span class="pl-s1">volumes</span> <span class="pl-c1">=</span> [
<span class="pl-s1">k8s</span>.<span class="pl-v">V1Volume</span>(
<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"pvc-airflow"</span>,
<span class="pl-s1">persistent_volume_claim</span><span class="pl-c1">=</span><span class="pl-s1">k8s</span>.<span class="pl-v">V1PersistentVolumeClaimVolumeSource</span>(
<span class="pl-s1">claim_name</span><span class="pl-c1">=</span><span class="pl-s">"pvc-airflow"</span>
),
)
]
<span class="pl-s1">volume_mounts</span> <span class="pl-c1">=</span> [
<span class="pl-s1">k8s</span>.<span class="pl-v">V1VolumeMount</span>(<span class="pl-s1">mount_path</span><span class="pl-c1">=</span><span class="pl-s">"/airflow"</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"pvc-airflow"</span>, <span class="pl-s1">sub_path</span><span class="pl-c1">=</span><span class="pl-c1">None</span>)
]
<span class="pl-en">@<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">make_list</span>():
<span class="pl-k">return</span> [{<span class="pl-s">"a"</span>: <span class="pl-s">"a"</span>}] <span class="pl-c1">*</span> <span class="pl-c1">100</span>
<span class="pl-s1">my_task</span> <span class="pl-c1">=</span> <span class="pl-v">KubernetesPodOperator</span>.<span class="pl-en">partial</span>(
<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"my_task"</span>,
<span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">"my_task"</span>,
<span class="pl-s1">image</span><span class="pl-c1">=</span><span class="pl-s">"ubuntu:20.04"</span>,
<span class="pl-s1">namespace</span><span class="pl-c1">=</span><span class="pl-s">"airflow"</span>,
<span class="pl-s1">container_resources</span><span class="pl-c1">=</span><span class="pl-s1">container_resources</span>,
<span class="pl-s1">volumes</span><span class="pl-c1">=</span><span class="pl-s1">volumes</span>,
<span class="pl-s1">volume_mounts</span><span class="pl-c1">=</span><span class="pl-s1">volume_mounts</span>,
<span class="pl-s1">in_cluster</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">do_xcom_push</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">get_logs</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">cmds</span><span class="pl-c1">=</span>[
<span class="pl-s">"/bin/bash"</span>,
<span class="pl-s">"-c"</span>,
<span class="pl-s">"""</span>
<span class="pl-s"> sleep 600</span>
<span class="pl-s"> """</span>
],
).<span class="pl-en">expand</span>(<span class="pl-s1">env_vars</span><span class="pl-c1">=</span><span class="pl-en">make_list</span>())</pre></div>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 20.04.5 LTS</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Official Apache Airflow Helm Chart</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">I am running this locally using the helm chart on Kind.</p>
<p dir="auto">My machine is 4 CPU (x2), with 16 GB RAM.</p>
<h3 dir="auto">Anything else</h3>
<p dir="auto">I have confirmed that the failing tasks are not starting due to timeouts from waiting for resources too long.</p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <p dir="auto">The tests that are run in CI should use <code class="notranslate">breeze</code> and parallellism implemented in Python.</p>
<p dir="auto">NOTE: We should pay an attention to provide better error feedback when docker containers could not be started - see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1227699054" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/23523" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/23523/hovercard" href="https://github.com/apache/airflow/issues/23523">#23523</a></p> | 0 |
<p dir="auto">Steps to reproduce:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import socket
import requests
socket.setdefaultimeout(0.0001)
# Expected this to raise exception, but it does not.
requests.get('http://google.com')
# These 2 raise an exception
requests.get('http://google.com', timeout=socket.gettimeout())
requests.get('http://google.com', timeout=socket._GLOBAL_DEFAULT_TIMEOUT)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">socket</span>
<span class="pl-k">import</span> <span class="pl-s1">requests</span>
<span class="pl-s1">socket</span>.<span class="pl-en">setdefaultimeout</span>(<span class="pl-c1">0.0001</span>)
<span class="pl-c"># Expected this to raise exception, but it does not.</span>
<span class="pl-s1">requests</span>.<span class="pl-en">get</span>(<span class="pl-s">'http://google.com'</span>)
<span class="pl-c"># These 2 raise an exception</span>
<span class="pl-s1">requests</span>.<span class="pl-en">get</span>(<span class="pl-s">'http://google.com'</span>, <span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-s1">socket</span>.<span class="pl-en">gettimeout</span>())
<span class="pl-s1">requests</span>.<span class="pl-en">get</span>(<span class="pl-s">'http://google.com'</span>, <span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-s1">socket</span>.<span class="pl-s1">_GLOBAL_DEFAULT_TIMEOUT</span>)</pre></div>
<p dir="auto">Looks like the default "None" value is propagated to urllib3, which has <code class="notranslate">socket._GLOBAL_DEFAULT_TIMEOUT</code> set as the default timeout.</p>
<p dir="auto">Is this by-design or a bug?</p> | <p dir="auto">Thanks for an excellent package. I believe the quick start examples should include a timeout value. This is the more common case, rather than the exception.</p>
<p dir="auto">In the more advanced documentation it maybe wise to mention that sockets.getdefaulttimeout() is not used when a value is not specified.</p> | 1 |
<h2 dir="auto">ℹ Computer information</h2>
<ul dir="auto">
<li>PowerToys version: v0.20.1</li>
<li>PowerToy Utility: N/A</li>
<li>Running PowerToys as Admin: Yes</li>
<li>Windows build number: Microsoft Windows [Version 10.0.18363.1016]</li>
</ul>
<h2 dir="auto">📝 Provide detailed reproduction steps (if any)</h2>
<ol dir="auto">
<li>Uninstall PowerToys from <strong>Control Panel</strong> -> <strong>Program and Features</strong></li>
<li>Restart computer</li>
<li>Install PowerToys v0.20.1</li>
</ol>
<h3 dir="auto"><g-emoji class="g-emoji" alias="heavy_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2714.png">✔️</g-emoji> Expected result</h3>
<p dir="auto">Clean installation of PowerToys</p>
<h3 dir="auto">❌ Actual result</h3>
<p dir="auto">FancyZones settings (zone layout) still present and accessible via left clicking a window to drag, and then clicking right mouse button. I can see my pervious zone layout.</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">Say a user wants to quickly search the internet about 'pineapples' and but also has a folder named 'Pineapples'. After the first result which would be the search result for the folder, an addition result can be 'Search the web for: pineapples'. This would open up the default browser (or a new tab) and paste the query in the search box.</p> | 0 |
<p dir="auto">It would be great if you could cross compile binaries for different platforms when using <code class="notranslate">deno compile</code>.</p>
<p dir="auto">Example: <code class="notranslate">deno compile --target x86_64-apple-darwin https://deno.land/[email protected]/http/file_server.ts</code> from Linux or Windows to create a macOS binary.</p>
<p dir="auto">This should be relatively trivial to implement. Instead of using the current binary as the base binary for the compilation, we would download the binary for the specified target (using the same code as <code class="notranslate">deno upgrade</code>), and then use that as a compilation base binary.</p> | <p dir="auto">Now that a basic <code class="notranslate">deno compile</code> subcommand has been merged into deno it might be interesting to consider implementing support for a <code class="notranslate">--target</code> flag so that one could compile to all supported platforms from all supported platforms. Because of the approach taken for embedding the code into the binary it would probably be pretty easy to implement, the only slight problem being getting the binaries for the other platforms but those could just be fetched from releases.</p> | 1 |
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.18363.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 08/21/2020 17:24:57<br>
Exception:<br>
System.ObjectDisposedException: Cannot access a disposed object.<br>
Object name: 'Timer'.<br>
at System.Timers.Timer.set_Enabled(Boolean value)<br>
at System.Timers.Timer.Start()<br>
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.UpdateIsVisibleCache()<br>
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br>
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br>
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br>
at System.Windows.Window.SetRootVisual()<br>
at System.Windows.Window.SetRootVisualAndUpdateSTC()<br>
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br>
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br>
at System.Windows.Window.CreateSourceWindowDuringShow()<br>
at System.Windows.Window.SafeCreateWindowDuringShow()<br>
at System.Windows.Window.ShowHelper(Object booleanBox)<br>
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p> | <p dir="auto">Popup tells me to give y'all this.</p>
<p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5009460/2020-07-31.txt">2020-07-31.txt</a></p>
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.19041.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 07/31/2020 17:29:59<br>
Exception:<br>
System.ObjectDisposedException: Cannot access a disposed object.<br>
Object name: 'Timer'.<br>
at System.Timers.Timer.set_Enabled(Boolean value)<br>
at System.Timers.Timer.Start()<br>
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.UpdateIsVisibleCache()<br>
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br>
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br>
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br>
at System.Windows.Window.SetRootVisual()<br>
at System.Windows.Window.SetRootVisualAndUpdateSTC()<br>
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br>
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br>
at System.Windows.Window.CreateSourceWindowDuringShow()<br>
at System.Windows.Window.SafeCreateWindowDuringShow()<br>
at System.Windows.Window.ShowHelper(Object booleanBox)<br>
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">I'm trying to load a module in my application router in 2 ways:</p>
<ol dir="auto">
<li>{ path: 'lazy', loadChildren:'src/lazy/lazy.module#LazyModule' }</li>
<li>{ path: 'lazy', loadChildren: ()=> LazyModule }</li>
</ol>
<p dir="auto">In both ways the constructor of LazyModule is being invoked twice.<br>
Is there any way to avoid it?</p>
<p dir="auto">Regards,<br>
Lior</p> | <p dir="auto">E.g. <code class="notranslate">method({a, b}:{a:String, b:boolean})</code></p> | 0 |
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/add-placeholder-text-to-a-text-field#?solution=%0A%3Clink%20href%3D%22https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3Ecat%20photos%3C%2Fa%3E.%3C%2Fp%3E%0A%0A%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20alt%3D%22A%20cute%20orange%20cat%20lying%20on%20its%20back.%20%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%0A%3Cp%3EThings%20cats%20love%3A%3C%2Fp%3E%0A%3Cul%3E%0A%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%3C%2Ful%3E%0A%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%3Col%3E%0A%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%3C%2Fol%3E%0A%3Cinput%20type%3D%22text%22%3E%0A" rel="nofollow">Add Placeholder Text to a Text Field</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Click here for <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back. " src="https://bit.ly/fcc-relaxing-cat"></a>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<input type="text">
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">link</span> <span class="pl-c1">href</span>="<span class="pl-s">https://fonts.googleapis.com/css?family=Lobster</span>" <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" <span class="pl-c1">type</span>="<span class="pl-s">text/css</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">style</span><span class="pl-kos">></span>
.<span class="pl-c1">red-text</span> {
<span class="pl-c1">color</span><span class="pl-kos">:</span> red;
}
<span class="pl-ent">h2</span> {
<span class="pl-c1">font-family</span><span class="pl-kos">:</span> Lobster<span class="pl-kos">,</span> Monospace;
}
<span class="pl-ent">p</span> {
<span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">16<span class="pl-smi">px</span></span>;
<span class="pl-c1">font-family</span><span class="pl-kos">:</span> Monospace;
}
.<span class="pl-c1">thick-green-border</span> {
<span class="pl-c1">border-color</span><span class="pl-kos">:</span> green;
<span class="pl-c1">border-width</span><span class="pl-kos">:</span> <span class="pl-c1">10<span class="pl-smi">px</span></span>;
<span class="pl-c1">border-style</span><span class="pl-kos">:</span> solid;
<span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">%</span></span>;
}
.<span class="pl-c1">smaller-image</span> {
<span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">100<span class="pl-smi">px</span></span>;
}
<span class="pl-kos"></</span><span class="pl-ent">style</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h2</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">></span>CatPhotoApp<span class="pl-kos"></</span><span class="pl-ent">h2</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Click here for <span class="pl-kos"><</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>"<span class="pl-kos">></span>cat photos<span class="pl-kos"></</span><span class="pl-ent">a</span><span class="pl-kos">></span>.<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>"<span class="pl-kos">></span><span class="pl-kos"><</span><span class="pl-ent">img</span> <span class="pl-c1">class</span>="<span class="pl-s">smaller-image thick-green-border</span>" <span class="pl-c1">alt</span>="<span class="pl-s">A cute orange cat lying on its back. </span>" <span class="pl-c1">src</span>="<span class="pl-s">https://bit.ly/fcc-relaxing-cat</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">a</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Things cats love:<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">ul</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>cat nip<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>laser pointers<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>lasagna<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">ul</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Top 3 things cats hate:<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">ol</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>flea treatment<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>thunder<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>other cats<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">ol</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">text</span>"<span class="pl-kos">></span></pre></div> | <p dir="auto">In all the exercises, we the users are forced to press the enter key before writing any code.</p>
<hr>
<h4 dir="auto">Update:</h4>
<p dir="auto">We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.</p>
<p dir="auto">The fix can be confirmed on the beta website.</p>
<p dir="auto">The workaround currently on production website is:<br>
Press the <kbd>Enter</kbd> key on the challenge editor and then proceed with the challenge.</p>
<p dir="auto">Apologies for the inconvenience meanwhile.</p>
<p dir="auto">Reach us in the chat room if you need any assistance.</p> | 1 |
<h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.3.2</li>
<li>Platform: linux</li>
<li>Python version: 3.7</li>
<li>PyTorch version (GPU?): 1.7</li>
<li>Tensorflow version (GPU?): -</li>
<li>Using GPU in script?: -</li>
<li>Using distributed or parallel set-up in script?: -</li>
</ul>
<h3 dir="auto">Who can help</h3>
<ul dir="auto">
<li>albert, bert, xlm: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/LysandreJik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/LysandreJik">@LysandreJik</a></li>
</ul>
<h2 dir="auto">Information</h2>
<p dir="auto">In this line </p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/huggingface/transformers/blob/e73a3e1891775a915846cc0f24b7e9a26d6688fb/src/transformers/data/data_collator.py#L381">transformers/src/transformers/data/data_collator.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 381
in
<a data-pjax="true" class="commit-tease-sha" href="/huggingface/transformers/commit/e73a3e1891775a915846cc0f24b7e9a26d6688fb">e73a3e1</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L381" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="381"></td>
<td id="LC381" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">indices_random</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">bernoulli</span>(<span class="pl-s1">torch</span>.<span class="pl-en">full</span>(<span class="pl-s1">labels</span>.<span class="pl-s1">shape</span>, <span class="pl-c1">0.5</span>)).<span class="pl-en">bool</span>() <span class="pl-c1">&</span> <span class="pl-s1">masked_indices</span> <span class="pl-c1">&</span> <span class="pl-c1">~</span><span class="pl-s1">indices_replaced</span> </td>
</tr>
</tbody></table>
</div>
</div>
you need to change 0.5 to 0.1 to match the description written that only in 10% you would like to change tokens with randomly selected tokens.<p></p>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">Nothing to reproduce.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">probs should match BERT paper.</p> | <p dir="auto">I'm using an tweaked version of the <code class="notranslate">uer/roberta-base-chinese-extractive-qa</code> model. While I know how to train using multiple GPUs, it is not clear how to use multiple GPUs when coming to this stage. Essentially this is what I have:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
model = AutoModelForQuestionAnswering.from_pretrained('uer/roberta-base-chinese-extractive-qa')
tokenizer = AutoTokenizer.from_pretrained('uer/roberta-base-chinese-extractive-qa')
QA = pipeline('question-answering', model=model, tokenizer=tokenizer, device=0)"><pre class="notranslate"><code class="notranslate">from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
model = AutoModelForQuestionAnswering.from_pretrained('uer/roberta-base-chinese-extractive-qa')
tokenizer = AutoTokenizer.from_pretrained('uer/roberta-base-chinese-extractive-qa')
QA = pipeline('question-answering', model=model, tokenizer=tokenizer, device=0)
</code></pre></div>
<p dir="auto">Except the model I'm using is a tweaked version of the base model shown above. I'm trying to process a large number of documents and at the rate it's going at it would take on the order of weeks. Is there anyway to set the pipeline to use multiple gpus? So I could use something like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="os.environ["CUDA_VISIBLE_DEVICES"] = "0,1"
device = torch.device("cuda")"><pre class="notranslate"><code class="notranslate">os.environ["CUDA_VISIBLE_DEVICES"] = "0,1"
device = torch.device("cuda")
</code></pre></div>
<p dir="auto">And then use both devices?</p>
<p dir="auto">Also looks like someone else had the same question: <a href="https://stackoverflow.com/questions/64193049/how-to-use-transformers-pipeline-with-multi-gpu" rel="nofollow">https://stackoverflow.com/questions/64193049/how-to-use-transformers-pipeline-with-multi-gpu</a></p> | 0 |
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<p dir="auto">using pandas 0.22:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import numpy as np
In [2]: import pandas as pd
In [3]: object_data = ['silly walks', np.nan, 'dead parrot']
In [4]: pd.Series(object_data, dtype=object)
Out[4]:
0 silly walks
1 NaN
2 dead parrot
dtype: object
In [5]: pd.Series(object_data, dtype=str)
Out[5]:
0 silly walks
1 NaN
2 dead parrot
dtype: object"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">object_data</span> <span class="pl-c1">=</span> [<span class="pl-s">'silly walks'</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s">'dead parrot'</span>]
<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">object_data</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">object</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">4</span>]:
<span class="pl-c1">0</span> <span class="pl-s1">silly</span> <span class="pl-s1">walks</span>
<span class="pl-c1">1</span> <span class="pl-v">NaN</span>
<span class="pl-c1">2</span> <span class="pl-s1">dead</span> <span class="pl-s1">parrot</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">object</span>
<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">object_data</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">str</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">5</span>]:
<span class="pl-c1">0</span> <span class="pl-s1">silly</span> <span class="pl-s1">walks</span>
<span class="pl-c1">1</span> <span class="pl-v">NaN</span>
<span class="pl-c1">2</span> <span class="pl-s1">dead</span> <span class="pl-s1">parrot</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">object</span></pre></div>
<p dir="auto">using pandas 0.23:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import numpy as np
In [2]: import pandas as pd
In [3]: object_data = ['silly walks', np.nan, 'dead parrot']
In [4]: pd.Series(object_data, dtype=object)
Out[4]:
0 silly walks
1 NaN
2 dead parrot
dtype: object
In [5]: pd.Series(object_data, dtype=str)
Out[5]:
0 silly walks
1 nan
2 dead parrot
dtype: object"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">object_data</span> <span class="pl-c1">=</span> [<span class="pl-s">'silly walks'</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s">'dead parrot'</span>]
<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">object_data</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">object</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">4</span>]:
<span class="pl-c1">0</span> <span class="pl-s1">silly</span> <span class="pl-s1">walks</span>
<span class="pl-c1">1</span> <span class="pl-v">NaN</span>
<span class="pl-c1">2</span> <span class="pl-s1">dead</span> <span class="pl-s1">parrot</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">object</span>
<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">object_data</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">str</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">5</span>]:
<span class="pl-c1">0</span> <span class="pl-s1">silly</span> <span class="pl-s1">walks</span>
<span class="pl-c1">1</span> <span class="pl-s1">nan</span>
<span class="pl-c1">2</span> <span class="pl-s1">dead</span> <span class="pl-s1">parrot</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">object</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">as of v0.23, when provided with the <code class="notranslate">str</code> dtype, a <code class="notranslate">np.nan</code> in a list of values gets converter to the string <code class="notranslate">nan</code>.</p>
<p dir="auto"><a href="http://pandas.pydata.org/pandas-docs/stable/basics.html#dtypes" rel="nofollow">the docs don't specify <code class="notranslate">str</code> as a valid dtype in the first place </a>, so perhaps the problem here is that pandas should be stricter and check that the provided dtype is supported? Or the docs could mention that a custom conversion function can be passed? either way this caused test failures on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="328034320" data-permission-text="Title is private" data-url="https://github.com/clembou/behave-pandas/issues/7" data-hovercard-type="pull_request" data-hovercard-url="/clembou/behave-pandas/pull/7/hovercard" href="https://github.com/clembou/behave-pandas/pull/7">clembou/behave-pandas#7</a>, so I thought I'd raise an issue as I might not be the only one affected.</p>
<p dir="auto">Feel free to close if you think this is simply an unsupported use of the <code class="notranslate">dtype</code> parameter.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.5.final.0
python-bits: 64
OS: Darwin
OS-release: 17.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
<p dir="auto">pandas: 0.23.0<br>
pytest: None<br>
pip: 10.0.1<br>
setuptools: 39.2.0<br>
Cython: None<br>
numpy: 1.14.3<br>
scipy: None<br>
pyarrow: None<br>
xarray: None<br>
IPython: 6.4.0<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.7.3<br>
pytz: 2018.4<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
feather: None<br>
matplotlib: None<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: None<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: None<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | <p dir="auto">As far as I can tell, both methods of reading an Excel sheet (through ExcelFile and read_excel) do not have the option to avoid mangling duplicate columns, which exists for read_csv (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13708937" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/3468" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/3468/hovercard" href="https://github.com/pandas-dev/pandas/issues/3468">#3468</a>).</p>
<p dir="auto">I have an Excel file that looks like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" foo foo bar bar baz baz
A B A B A B
123 456 789 12 345 678
901 234 567 890 123 456
789 12 345 678 901 234"><pre class="notranslate"><code class="notranslate"> foo foo bar bar baz baz
A B A B A B
123 456 789 12 345 678
901 234 567 890 123 456
789 12 345 678 901 234
</code></pre></div>
<p dir="auto">I initially encountered this problem while trying to find a workaround for not being able to specify a multirow-header (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="18575759" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/4679" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/4679/hovercard" href="https://github.com/pandas-dev/pandas/issues/4679">#4679</a>). Reading in this Excel file with header = 0 (default) mangles the column names:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> df = pd.read_excel("dupe_cols.xlsx", header = 0)
>>> print df
foo foo.1 bar bar.1 baz baz.1
0 A B A B A B
1 123 456 789 12 345 678
2 901 234 567 890 123 456
3 789 12 345 678 901 234"><pre class="notranslate"><code class="notranslate">>>> df = pd.read_excel("dupe_cols.xlsx", header = 0)
>>> print df
foo foo.1 bar bar.1 baz baz.1
0 A B A B A B
1 123 456 789 12 345 678
2 901 234 567 890 123 456
3 789 12 345 678 901 234
</code></pre></div>
<p dir="auto">Unlike <code class="notranslate">read_csv</code>, <code class="notranslate">read_excel</code> does not have the option to avoid mangling duplicate columns (using ExcelFile.parse works the same as far as I can see). Specifying header = None in <code class="notranslate">read_excel</code> and then assigning the column names to the first row will effectively allow you to avoid mangling the column names. You could also read in the Excel sheet with header = None, save a .csv with header = False and index = False, then read that csv and specify mangle_dupe_cols = False to get the dataframe you want. (Incidentally, this also allows you to specify multiple rows as the header, which is the behavior I was originally trying to emulate.)</p> | 0 |
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">All textures are loaded in mirror.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18641723/54743330-2355a780-4bc4-11e9-8a4a-ad6bf9a349ac.png"><img src="https://user-images.githubusercontent.com/18641723/54743330-2355a780-4bc4-11e9-8a4a-ad6bf9a349ac.png" alt="Screenshot 2019-03-21 at 10 28 40" style="max-width: 100%;"></a></p>
<p dir="auto">When I switch to the 103dev version, this doesn't happen:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18641723/54743389-4b450b00-4bc4-11e9-9fa3-2d4eda99ad10.png"><img src="https://user-images.githubusercontent.com/18641723/54743389-4b450b00-4bc4-11e9-9fa3-2d4eda99ad10.png" alt="Screenshot 2019-03-21 at 10 29 46" style="max-width: 100%;"></a></p>
<p dir="auto">Super weird, right?</p>
<h5 dir="auto">Three.js version</h5>
<p dir="auto">THREE.JS version: 102</p>
<h5 dir="auto">Browser</h5>
<p dir="auto">Chrome: Version 72.0.3626.121 - It doesn't happen in Firefox.</p>
<h5 dir="auto">OS</h5>
<p dir="auto">macOS Mojave 10.14.3</p> | <h5 dir="auto">Description of the problem</h5>
<p dir="auto">Sprites are flipped. This happened after somewhere between 101 (which works) and 102. In the sandbox below you can exchange the three version, going back to the last major has them positioned correctly.</p>
<p dir="auto"><a href="https://codesandbox.io/s/1z92z6xwz4" rel="nofollow">https://codesandbox.io/s/1z92z6xwz4</a></p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r102</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Chrome</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> macOS</li>
</ul> | 1 |
<p dir="auto">I get an error if i try to install symfony2.7 via composer</p>
<p dir="auto">trigger_error('Symfony\Component\DependencyInjection\Definition::setFactoryMethod(getRepository) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', 16384) /Symfony/Component/DependencyInjection/Definition.php:137</p>
<p dir="auto">It seems that the XMLFileLoader on 2.7 is not updated. In the master, the problem seem to be solved.</p>
<p dir="auto"><a href="https://github.com/symfony/DependencyInjection/blob/2.7/Loader/XmlFileLoader.php#L150">https://github.com/symfony/DependencyInjection/blob/2.7/Loader/XmlFileLoader.php#L150</a></p> | <p dir="auto">Starting on a PR regarding another issue and I hooked up on of my applications to 2.8 instead of 2.6. For me this was 2 seconds to figure out it was caused by the old way of defining a factory service + method, but the error message might cause a lot of confusion for others. The message is thrown in the Definition class rather than the place where you expect it (Yaml Loader in this case).</p>
<p dir="auto">The fix for this is to change your service definition:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" # old
app.layout.menu.beta:
class: Knp\Menu\MenuItem
factory_service: app.layout.menu_builder
factory_method: createBetaMenu
tags:
- { name: knp_menu.menu, alias: beta }
# new
app.layout.menu.beta:
class: Knp\Menu\MenuItem
factory: [@app.layout.menu_builder, createBetaMenu]
tags:
- { name: knp_menu.menu, alias: beta }"><pre class="notranslate"> <span class="pl-c"><span class="pl-c">#</span> old</span>
<span class="pl-ent">app.layout.menu.beta</span>:
<span class="pl-ent">class</span>: <span class="pl-s">Knp\Menu\MenuItem</span>
<span class="pl-ent">factory_service</span>: <span class="pl-s">app.layout.menu_builder</span>
<span class="pl-ent">factory_method</span>: <span class="pl-s">createBetaMenu</span>
<span class="pl-ent">tags</span>:
- <span class="pl-s">{ name: knp_menu.menu, alias: beta }</span>
<span class="pl-c"><span class="pl-c">#</span> new</span>
<span class="pl-ent">app.layout.menu.beta</span>:
<span class="pl-ent">class</span>: <span class="pl-s">Knp\Menu\MenuItem</span>
<span class="pl-ent">factory</span>: <span class="pl-s">[@app.layout.menu_builder, createBetaMenu]</span>
<span class="pl-ent">tags</span>:
- <span class="pl-s">{ name: knp_menu.menu, alias: beta }</span></pre></div>
<p dir="auto">The thing is that the error message below does not clearly reflect that. I don't think it's desired to put this information in the message below, but maybe someone has a nice idea where to put it instead.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Deprecated: The Symfony\Component\DependencyInjection\Definition::setFactoryMethod method is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. in /home/ivanderberg/projects/symfony/src/Symfony/Component/DependencyInjection/Definition.php on line 137"><pre class="notranslate"><code class="notranslate">Deprecated: The Symfony\Component\DependencyInjection\Definition::setFactoryMethod method is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. in /home/ivanderberg/projects/symfony/src/Symfony/Component/DependencyInjection/Definition.php on line 137
</code></pre></div> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="➜ datastructures.rs git:(master) ✗ RUST_LOG="rustc=1;::rt::backtrace" rustc stack.rs &&./stack
rust: task failed at 'assertion failed: rp.is_none()', /private/tmp/rust-5o4g/rust-0.7/src/librustc/middle/typeck/collect.rs:1040
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /private/tmp/rust-5o4g/rust-0.7/src/librustc/rustc.rs:354
rust: domain main @0x7f9afc008410 root task failed"><pre class="notranslate"><code class="notranslate">➜ datastructures.rs git:(master) ✗ RUST_LOG="rustc=1;::rt::backtrace" rustc stack.rs &&./stack
rust: task failed at 'assertion failed: rp.is_none()', /private/tmp/rust-5o4g/rust-0.7/src/librustc/middle/typeck/collect.rs:1040
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /private/tmp/rust-5o4g/rust-0.7/src/librustc/rustc.rs:354
rust: domain main @0x7f9afc008410 root task failed
</code></pre></div>
<p dir="auto">The code that caused it is:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait ImmStack<T> {
fn push(self, item : T) -> Self;
fn pop(self) -> (Option<T>, Option<Self>);
fn new() -> Self;
}
#[deriving(Eq, ToStr)]
enum Chain<T> {
Link(T, ~Chain<T>),
Break
}
//impl<T> ImmStack<T> for Chain<T> {
// fn push(self, item : T) -> Chain<T> {
// Link(item, ~self)
// }
// fn pop(self) -> (Option<T>, Option<Chain<T>>) {
// match self {
// Link(item, ~new_self) => return (Some(item), Some(new_self)),
// Break => return (None, None)
// }
// }
// fn new() -> Chain<T> {
// Break
// }
//}
fn push<'self, T>(stack : &'self mut Chain<T>, item : T) -> &'self mut Chain<T> {
&mut Link(item, ~*stack)
}
fn pop<T>(stack : &mut Chain<T>) -> Option<T> {
match *stack {
Link(item, ~new_stack) => {
stack = &mut new_stack;
return Some(item);
},
Break => return None
}
}
fn new<T>() -> &mut Chain<T> {
&mut Break
}
fn main() {
let mut b : &Chain<int> = ~Break;
push(push(push(b, 1), 2), 3);
println(b.to_str());
}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">ImmStack</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">item</span> <span class="pl-kos">:</span> <span class="pl-smi">T</span><span class="pl-kos">)</span> -> <span class="pl-smi">Self</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">pop</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -> <span class="pl-kos">(</span><span class="pl-smi">Option</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">,</span> <span class="pl-smi">Option</span><span class="pl-kos"><</span><span class="pl-smi">Self</span><span class="pl-kos">></span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -> <span class="pl-smi">Self</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c1">#<span class="pl-kos">[</span>deriving<span class="pl-kos">(</span><span class="pl-v">Eq</span>, <span class="pl-v">ToStr</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">enum</span> <span class="pl-smi">Chain</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-v">Link</span><span class="pl-kos">(</span><span class="pl-smi">T</span><span class="pl-kos">,</span> ~<span class="pl-smi">Chain</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-v">Break</span>
<span class="pl-kos">}</span>
<span class="pl-c">//impl<T> ImmStack<T> for Chain<T> {</span>
<span class="pl-c">// fn push(self, item : T) -> Chain<T> {</span>
<span class="pl-c">// Link(item, ~self)</span>
<span class="pl-c">// }</span>
<span class="pl-c">// fn pop(self) -> (Option<T>, Option<Chain<T>>) {</span>
<span class="pl-c">// match self {</span>
<span class="pl-c">// Link(item, ~new_self) => return (Some(item), Some(new_self)),</span>
<span class="pl-c">// Break => return (None, None)</span>
<span class="pl-c">// }</span>
<span class="pl-c">// }</span>
<span class="pl-c">// fn new() -> Chain<T> {</span>
<span class="pl-c">// Break</span>
<span class="pl-c">// }</span>
<span class="pl-c">//}</span>
<span class="pl-k">fn</span> <span class="pl-en">push</span><span class="pl-kos"><</span><span class="pl-c1">'</span><span class="pl-ent">self</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">(</span><span class="pl-s1">stack</span> <span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-c1">'</span><span class="pl-ent">self</span> <span class="pl-k">mut</span> <span class="pl-smi">Chain</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">,</span> <span class="pl-s1">item</span> <span class="pl-kos">:</span> <span class="pl-smi">T</span><span class="pl-kos">)</span> -> <span class="pl-c1">&</span><span class="pl-c1">'</span><span class="pl-ent">self</span> <span class="pl-k">mut</span> <span class="pl-smi">Chain</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-c1">&</span><span class="pl-k">mut</span> <span class="pl-v">Link</span><span class="pl-kos">(</span>item<span class="pl-kos">,</span> ~<span class="pl-c1">*</span>stack<span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">pop</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">(</span><span class="pl-s1">stack</span> <span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-k">mut</span> <span class="pl-smi">Chain</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">)</span> -> <span class="pl-smi">Option</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">match</span> <span class="pl-c1">*</span>stack <span class="pl-kos">{</span>
<span class="pl-v">Link</span><span class="pl-kos">(</span>item<span class="pl-kos">,</span> ~new_stack<span class="pl-kos">)</span> => <span class="pl-kos">{</span>
stack = <span class="pl-c1">&</span><span class="pl-k">mut</span> new_stack<span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-v">Some</span><span class="pl-kos">(</span>item<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-v">Break</span> => <span class="pl-k">return</span> <span class="pl-v">None</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">new</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span><span class="pl-kos">(</span><span class="pl-kos">)</span> -> <span class="pl-c1">&</span><span class="pl-k">mut</span> <span class="pl-smi">Chain</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-c1">&</span><span class="pl-k">mut</span> <span class="pl-v">Break</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> <span class="pl-k">mut</span> b <span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-smi">Chain</span><span class="pl-kos"><</span><span class="pl-smi">int</span><span class="pl-kos">></span> = ~<span class="pl-v">Break</span><span class="pl-kos">;</span>
<span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-en">push</span><span class="pl-kos">(</span>b<span class="pl-kos">,</span> <span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">println</span><span class="pl-kos">(</span>b<span class="pl-kos">.</span><span class="pl-en">to_str</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_LOG=rustc=1,::rt::backtrace rustc link_header.rs
rust: task failed at 'assertion failed: rp.is_none()', /Users/shout/Projects/rust/src/librustc/middle/typeck/collect.rs:1044
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/shout/Projects/rust/src/librustc/rustc.rs:358
rust: domain main @0x7f86ba819810 root task failed"><pre class="notranslate"><code class="notranslate">$ RUST_LOG=rustc=1,::rt::backtrace rustc link_header.rs
rust: task failed at 'assertion failed: rp.is_none()', /Users/shout/Projects/rust/src/librustc/middle/typeck/collect.rs:1044
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/shout/Projects/rust/src/librustc/rustc.rs:358
rust: domain main @0x7f86ba819810 root task failed
</code></pre></div>
<p dir="auto">Complete contents of <code class="notranslate">link_header.rs</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#[ crate_type = "lib" ];
// Given a Link header, parse out the next url
// <https://api.github.com/repositories?since=364>; rel="next", <https://api.github.com/repositories{?since}>; rel="first"
fn parse(header: ~str) -> &'self str {
match header.find('<') {
Some(start) => {
match header.find('>') {
Some(end) => {
return header.slice(start + 1, end);
},
_ => { fail!("Missing >") }
}
},
_ => {fail!("Missing <") }
}
}"><pre class="notranslate"><code class="notranslate">#[ crate_type = "lib" ];
// Given a Link header, parse out the next url
// <https://api.github.com/repositories?since=364>; rel="next", <https://api.github.com/repositories{?since}>; rel="first"
fn parse(header: ~str) -> &'self str {
match header.find('<') {
Some(start) => {
match header.find('>') {
Some(end) => {
return header.slice(start + 1, end);
},
_ => { fail!("Missing >") }
}
},
_ => {fail!("Missing <") }
}
}
</code></pre></div> | 1 |
<p dir="auto">Add an event to trace zonesets changes.<br>
The data to trace is:</p>
<ul dir="auto">
<li>zoneset type (custom or template, in case of template which one)</li>
<li>number of zones per zoneset</li>
<li>number of apps in the app zone history</li>
</ul>
<p dir="auto">reference:<br>
<a href="https://github.com/microsoft/PowerToys/blob/master/src/modules/fancyzones/lib/trace.cpp">https://github.com/microsoft/PowerToys/blob/master/src/modules/fancyzones/lib/trace.cpp</a><br>
<a href="https://github.com/microsoft/PowerToys/blob/master/src/modules/shortcut_guide/trace.cpp">https://github.com/microsoft/PowerToys/blob/master/src/modules/shortcut_guide/trace.cpp</a></p> | <p dir="auto">When i was trying to get into the settings page of powertoy tool, the settings page opens after a long time and it is a blank screen with nothing in it</p> | 0 |
<p dir="auto">Dear Julia maintainers,</p>
<p dir="auto">I am forwarding Debian bug <a href="http://bugs.debian.org/807701" rel="nofollow">#807701</a>:</p>
<p dir="auto">On Fri, Dec 11, 2015 at 06:36:09PM +0000, Edmund Grimley Evans wrote:</p>
<blockquote>
<p dir="auto">It failed to build on arm64:</p>
<p dir="auto"><a href="https://buildd.debian.org/status/package.php?p=julia&suite=sid" rel="nofollow">https://buildd.debian.org/status/package.php?p=julia&suite=sid</a></p>
<p dir="auto">The error was:</p>
<p dir="auto">signal (6): Aborted<br>
gsignal at /lib/aarch64-linux-gnu/libc.so.6 (unknown line)<br>
Aborted</p>
<p dir="auto">The problem seems to be that there is no system call epoll_wait on<br>
arm64, only epoll_pwait, so you need a patch like this:</p>
</blockquote>
<p dir="auto">The issue had already been fixed in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/libuv/libuv/commit/1d8332f/hovercard" href="https://github.com/libuv/libuv/commit/1d8332f">libuv/libuv@<tt>1d8332f</tt></a>, which calls either uv__epoll_wait<br>
or uv__epoll_pwait, depending on availability [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66871547" data-permission-text="Title is private" data-url="https://github.com/libuv/libuv/issues/308" data-hovercard-type="pull_request" data-hovercard-url="/libuv/libuv/pull/308/hovercard" href="https://github.com/libuv/libuv/pull/308">libuv/libuv#308</a>].</p>
<p dir="auto">What is the current status of migrating Julia to upstream libuv?</p>
<p dir="auto">Switching sooner than later would help avoid duplicate work such as in this case.</p>
<p dir="auto">Regards,<br>
Peter</p> | <p dir="auto">There is a duplicated example here</p>
<p dir="auto"><a href="https://github.com/JuliaLang/julia/blame/master/doc/src/manual/arrays.md#L139">https://github.com/JuliaLang/julia/blame/master/doc/src/manual/arrays.md#L139</a></p>
<p dir="auto"><a href="https://github.com/JuliaLang/julia/blame/master/doc/src/manual/arrays.md#L146">https://github.com/JuliaLang/julia/blame/master/doc/src/manual/arrays.md#L146</a></p> | 0 |
<p dir="auto">Hello,</p>
<p dir="auto">Originally seen when using FunctionWrappers. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yuyichao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yuyichao">@yuyichao</a> was nice enough to provide a MWE, that shows non-repeatably inefficient code. I am out of my depth here for such julia internals, just relaying the message :)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> using BenchmarkTools
julia> f3(x, y) = x - x + 0.5
f3 (generic function with 1 method)
julia> g3(f, x, y) = f3(x, y)
g3 (generic function with 1 method)
julia> p3 = @cfunction(g3, Float64, (Ref{typeof(f3)}, Float64, Float64))
Ptr{Nothing} @0x00007f8405b31650
julia> @benchmark ccall($p3, Float64, (Ref{typeof(f3)}, Float64, Float64), f3, 1.0, 2.0)
BenchmarkTools.Trial:
memory estimate: 48 bytes
allocs estimate: 3
--------------
minimum time: 66.488 ns (0.00% GC)
median time: 68.980 ns (0.00% GC)
mean time: 74.425 ns (0.45% GC)
maximum time: 510.097 ns (73.69% GC)
--------------
samples: 10000
evals/sample: 977
julia> p3 = @cfunction(g3, Float64, (Ref{typeof(f3)}, Float64, Float64))
Ptr{Nothing} @0x00007f8405b42ec0
julia> @benchmark ccall($p3, Float64, (Ref{typeof(f3)}, Float64, Float64), f3, 1.0, 2.0)
BenchmarkTools.Trial:
memory estimate: 0 bytes
allocs estimate: 0
--------------
minimum time: 4.527 ns (0.00% GC)
median time: 4.554 ns (0.00% GC)
mean time: 4.965 ns (0.00% GC)
maximum time: 44.207 ns (0.00% GC)
--------------
samples: 10000
evals/sample: 1000"><pre class="notranslate"><code class="notranslate">julia> using BenchmarkTools
julia> f3(x, y) = x - x + 0.5
f3 (generic function with 1 method)
julia> g3(f, x, y) = f3(x, y)
g3 (generic function with 1 method)
julia> p3 = @cfunction(g3, Float64, (Ref{typeof(f3)}, Float64, Float64))
Ptr{Nothing} @0x00007f8405b31650
julia> @benchmark ccall($p3, Float64, (Ref{typeof(f3)}, Float64, Float64), f3, 1.0, 2.0)
BenchmarkTools.Trial:
memory estimate: 48 bytes
allocs estimate: 3
--------------
minimum time: 66.488 ns (0.00% GC)
median time: 68.980 ns (0.00% GC)
mean time: 74.425 ns (0.45% GC)
maximum time: 510.097 ns (73.69% GC)
--------------
samples: 10000
evals/sample: 977
julia> p3 = @cfunction(g3, Float64, (Ref{typeof(f3)}, Float64, Float64))
Ptr{Nothing} @0x00007f8405b42ec0
julia> @benchmark ccall($p3, Float64, (Ref{typeof(f3)}, Float64, Float64), f3, 1.0, 2.0)
BenchmarkTools.Trial:
memory estimate: 0 bytes
allocs estimate: 0
--------------
minimum time: 4.527 ns (0.00% GC)
median time: 4.554 ns (0.00% GC)
mean time: 4.965 ns (0.00% GC)
maximum time: 44.207 ns (0.00% GC)
--------------
samples: 10000
evals/sample: 1000
</code></pre></div>
<p dir="auto">Cheers!</p> | <p dir="auto">Copied from: <a href="https://discourse.julialang.org/t/performance-and-memory-regression-with-function-wrappers-in-julia-1-4/44589" rel="nofollow">https://discourse.julialang.org/t/performance-and-memory-regression-with-function-wrappers-in-julia-1-4/44589</a></p>
<h3 dir="auto">Setup:</h3>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> using BenchmarkTools
julia> using FunctionWrappers: FunctionWrapper
julia> w = let closed_over=([1], [2])
FunctionWrapper{typeof(closed_over), Tuple{}}(() -> closed_over)
end;"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">using</span> BenchmarkTools
julia<span class="pl-k">></span> <span class="pl-k">using</span> FunctionWrappers<span class="pl-k">:</span> FunctionWrapper
julia<span class="pl-k">></span> w <span class="pl-k">=</span> <span class="pl-k">let</span> closed_over<span class="pl-k">=</span>([<span class="pl-c1">1</span>], [<span class="pl-c1">2</span>])
<span class="pl-c1">FunctionWrapper</span><span class="pl-c1">{typeof(closed_over), Tuple{}}</span>(() <span class="pl-k">-></span> closed_over)
<span class="pl-k">end</span>;</pre></div>
<h3 dir="auto">Results</h3>
<p dir="auto">Julia 1.3.1:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> @btime $w()
5.435 ns (0 allocations: 0 bytes)"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">@btime</span> <span class="pl-k">$</span><span class="pl-c1">w</span>()
<span class="pl-c1">5.435</span> ns (<span class="pl-c1">0</span> allocations<span class="pl-k">:</span> <span class="pl-c1">0</span> bytes)</pre></div>
<p dir="auto">Julia 1.4.2:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> @btime $w()
9.919 ns (1 allocation: 16 bytes)"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">@btime</span> <span class="pl-k">$</span><span class="pl-c1">w</span>()
<span class="pl-c1">9.919</span> ns (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">16</span> bytes)</pre></div>
<p dir="auto">Julia 1.5.0</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> @btime $w()
10.112 ns (1 allocation: 32 bytes)"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">@btime</span> <span class="pl-k">$</span><span class="pl-c1">w</span>()
<span class="pl-c1">10.112</span> ns (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">32</span> bytes)</pre></div>
<p dir="auto">Julia 1.6.0-DEV.607</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> @btime $w()
11.846 ns (1 allocation: 32 bytes)"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">@btime</span> <span class="pl-k">$</span><span class="pl-c1">w</span>()
<span class="pl-c1">11.846</span> ns (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">32</span> bytes)</pre></div>
<p dir="auto">This turns out to be the source of a significant performance regression in Parametron.jl (which was designed to allocate zero memory).</p>
<p dir="auto">Here's my system info:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> versioninfo()
Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)"><pre class="notranslate"><code class="notranslate">julia> versioninfo()
Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
</code></pre></div>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yuyichao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yuyichao">@yuyichao</a> pointed to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="586971885" data-permission-text="Title is private" data-url="https://github.com/yuyichao/FunctionWrappers.jl/issues/14" data-hovercard-type="issue" data-hovercard-url="/yuyichao/FunctionWrappers.jl/issues/14/hovercard" href="https://github.com/yuyichao/FunctionWrappers.jl/issues/14">yuyichao/FunctionWrappers.jl#14</a> as a related issue. I cannot reproduce the MWE from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="586971885" data-permission-text="Title is private" data-url="https://github.com/yuyichao/FunctionWrappers.jl/issues/14" data-hovercard-type="issue" data-hovercard-url="/yuyichao/FunctionWrappers.jl/issues/14/hovercard?comment_id=603379495&comment_type=issue_comment" href="https://github.com/yuyichao/FunctionWrappers.jl/issues/14#issuecomment-603379495">yuyichao/FunctionWrappers.jl#14 (comment)</a> on Julia 1.5, but the slowness and extra allocation of my example here is still present in Julia 1.5.0.</p> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">Module iam_cert</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.0.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">No changes</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ubuntu Linux 16.04 install via PIP</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">iam_cert task fails with an error message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [10.0.21.71]: FAILED! => {"changed": false, "failed": true, "msg": "Boto is required for this module"}"><pre class="notranslate"><code class="notranslate">fatal: [10.0.21.71]: FAILED! => {"changed": false, "failed": true, "msg": "Boto is required for this module"}
</code></pre></div>
<p dir="auto">Boto and Boto3 are installed and work fine for the rest of the scripts so it appears as if this is restricted to this module. Failure is independent of the state of the <code class="notranslate">validate_certs</code> flag.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">The task is as follows:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: Set a key on AWS for the HTTPS load balancer
iam_cert:
name: iam_cert_name
state: present
cert: "{{ ssl_cert }}"
key: "{{ ssl_keys }}"
cert_chain: "{{ ssl_chain }}"
when: cloud_vendor == "aws""><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Set a key on AWS for the HTTPS load balancer</span>
<span class="pl-ent">iam_cert</span>:
<span class="pl-ent">name</span>: <span class="pl-s">iam_cert_name</span>
<span class="pl-ent">state</span>: <span class="pl-s">present</span>
<span class="pl-ent">cert</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ ssl_cert }}<span class="pl-pds">"</span></span>
<span class="pl-ent">key</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ ssl_keys }}<span class="pl-pds">"</span></span>
<span class="pl-ent">cert_chain</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ ssl_chain }}<span class="pl-pds">"</span></span>
<span class="pl-ent">when</span>: <span class="pl-s">cloud_vendor == "aws"</span></pre></div>
<p dir="auto">Failure because the module reports "Boto not found"</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Uploaded certificate details</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="task path: /home/davehornco/aws-janobi/roles/proxy/tasks/main.yml:52
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/cloud/amazon/iam_cert.py
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/cloud/amazon/iam_cert.py
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.0.21.71> (0, '/home/davehornco\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status <10.0.17.158> (0, '/home/davehornco\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095 `" && echo ansible-tmp-1494661506.94-77749697865095="` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095 `" ) && sleep 0'"'"''
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550 `" && echo ansible-tmp-1494661506.94-269551299808550="` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550 `" ) && sleep 0'"'"''
<10.0.17.158> (0, 'ansible-tmp-1494661506.94-77749697865095=/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> PUT /tmp/tmp1XsqVZ TO /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py
<10.0.17.158> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 '[10.0.17.158]'
<10.0.21.71> (0, 'ansible-tmp-1494661506.94-269551299808550=/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> PUT /tmp/tmpfErvCB TO /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py
<10.0.21.71> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 '[10.0.21.71]'
<10.0.17.158> (0, 'sftp> put /tmp/tmp1XsqVZ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/davehornco size 0\r\ndebug3: Looking up /tmp/tmp1XsqVZ\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:3648\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 3648 bytes at 65536\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'chmod u+x /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py && sleep 0'"'"''
<10.0.21.71> (0, 'sftp> put /tmp/tmpfErvCB /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/davehornco size 0\r\ndebug3: Looking up /tmp/tmpfErvCB\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:3648\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 3648 bytes at 65536\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'chmod u+x /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py && sleep 0'"'"''
<10.0.17.158> (0, '', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 -tt 10.0.17.158 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-yticsqsyyxklqvvcexagsghtzplbfgoa; /usr/bin/python /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py; rm -rf "/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.0.21.71> (0, '', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 -tt 10.0.21.71 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-bifuoqxzaombbtliyfahkaufxnlxkvlh; /usr/bin/python /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py; rm -rf "/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.0.21.71> (0, '\r\n{"msg": "Boto is required for this module", "failed": true, "invocation": {"module_args": {"profile": null, "new_name": null, "dup_ok": false, "new_path": null, "name": "iam_cert_name", "security_token": null, "cert": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.cer", "region": null, "aws_secret_key": null, "aws_access_key": null, "state": "present", "key": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.key", "ec2_url": null, "path": "/", "validate_certs": true, "cert_chain": "/home/bob/.acme.sh/dev.horn.co/fullchain.cer"}}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.0.21.71 closed.\r\n')
<10.0.17.158> (0, '\r\n{"msg": "Boto is required for this module", "failed": true, "invocation": {"module_args": {"profile": null, "new_name": null, "dup_ok": false, "new_path": null, "name": "iam_cert_name", "security_token": null, "cert": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.cer", "region": null, "aws_secret_key": null, "aws_access_key": null, "state": "present", "key": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.key", "ec2_url": null, "path": "/", "validate_certs": true, "cert_chain": "/home/bob/.acme.sh/dev.horn.co/fullchain.cer"}}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.0.17.158 closed.\r\n')
fatal: [10.0.21.71]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"aws_access_key": null,
"aws_secret_key": null,
"cert": "somefile",
"cert_chain": "somefile",
"dup_ok": false,
"ec2_url": null,
"key": "somefile",
"name": "iam_cert_name",
"new_name": null,
"new_path": null,
"path": "/",
"profile": null,
"region": null,
"security_token": null,
"state": "present",
"validate_certs": true
}
},
"msg": "Boto is required for this module"
}
fatal: [10.0.17.158]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"aws_access_key": null,
"aws_secret_key": null,
"cert": "somefile",
"cert_chain": "somefile",
"dup_ok": false,
"ec2_url": null,
"key": "somefile",
"name": "iam_cert_name",
"new_name": null,
"new_path": null,
"path": "/",
"profile": null,
"region": null,
"security_token": null,
"state": "present",
"validate_certs": true
}
},
"msg": "Boto is required for this module"
}"><pre class="notranslate"><code class="notranslate">task path: /home/davehornco/aws-janobi/roles/proxy/tasks/main.yml:52
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/cloud/amazon/iam_cert.py
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/cloud/amazon/iam_cert.py
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.0.21.71> (0, '/home/davehornco\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status <10.0.17.158> (0, '/home/davehornco\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095 `" && echo ansible-tmp-1494661506.94-77749697865095="` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095 `" ) && sleep 0'"'"''
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550 `" && echo ansible-tmp-1494661506.94-269551299808550="` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550 `" ) && sleep 0'"'"''
<10.0.17.158> (0, 'ansible-tmp-1494661506.94-77749697865095=/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> PUT /tmp/tmp1XsqVZ TO /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py
<10.0.17.158> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 '[10.0.17.158]'
<10.0.21.71> (0, 'ansible-tmp-1494661506.94-269551299808550=/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> PUT /tmp/tmpfErvCB TO /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py
<10.0.21.71> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 '[10.0.21.71]'
<10.0.17.158> (0, 'sftp> put /tmp/tmp1XsqVZ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/davehornco size 0\r\ndebug3: Looking up /tmp/tmp1XsqVZ\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:3648\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 3648 bytes at 65536\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'chmod u+x /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py && sleep 0'"'"''
<10.0.21.71> (0, 'sftp> put /tmp/tmpfErvCB /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/davehornco size 0\r\ndebug3: Looking up /tmp/tmpfErvCB\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:3648\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 3648 bytes at 65536\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'chmod u+x /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py && sleep 0'"'"''
<10.0.17.158> (0, '', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 -tt 10.0.17.158 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-yticsqsyyxklqvvcexagsghtzplbfgoa; /usr/bin/python /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py; rm -rf "/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.0.21.71> (0, '', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 -tt 10.0.21.71 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-bifuoqxzaombbtliyfahkaufxnlxkvlh; /usr/bin/python /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py; rm -rf "/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.0.21.71> (0, '\r\n{"msg": "Boto is required for this module", "failed": true, "invocation": {"module_args": {"profile": null, "new_name": null, "dup_ok": false, "new_path": null, "name": "iam_cert_name", "security_token": null, "cert": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.cer", "region": null, "aws_secret_key": null, "aws_access_key": null, "state": "present", "key": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.key", "ec2_url": null, "path": "/", "validate_certs": true, "cert_chain": "/home/bob/.acme.sh/dev.horn.co/fullchain.cer"}}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.0.21.71 closed.\r\n')
<10.0.17.158> (0, '\r\n{"msg": "Boto is required for this module", "failed": true, "invocation": {"module_args": {"profile": null, "new_name": null, "dup_ok": false, "new_path": null, "name": "iam_cert_name", "security_token": null, "cert": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.cer", "region": null, "aws_secret_key": null, "aws_access_key": null, "state": "present", "key": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.key", "ec2_url": null, "path": "/", "validate_certs": true, "cert_chain": "/home/bob/.acme.sh/dev.horn.co/fullchain.cer"}}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.0.17.158 closed.\r\n')
fatal: [10.0.21.71]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"aws_access_key": null,
"aws_secret_key": null,
"cert": "somefile",
"cert_chain": "somefile",
"dup_ok": false,
"ec2_url": null,
"key": "somefile",
"name": "iam_cert_name",
"new_name": null,
"new_path": null,
"path": "/",
"profile": null,
"region": null,
"security_token": null,
"state": "present",
"validate_certs": true
}
},
"msg": "Boto is required for this module"
}
fatal: [10.0.17.158]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"aws_access_key": null,
"aws_secret_key": null,
"cert": "somefile",
"cert_chain": "somefile",
"dup_ok": false,
"ec2_url": null,
"key": "somefile",
"name": "iam_cert_name",
"new_name": null,
"new_path": null,
"path": "/",
"profile": null,
"region": null,
"security_token": null,
"state": "present",
"validate_certs": true
}
},
"msg": "Boto is required for this module"
}
</code></pre></div> | <h4 dir="auto">ISSUE TYPE</h4>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h4 dir="auto">COMPONENT NAME</h4>
<ul dir="auto">
<li>command</li>
<li>shell</li>
<li>yum</li>
<li>dnf</li>
</ul>
<h4 dir="auto">ANSIBLE VERSION</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0.0
config file = /home/msanabria/repos/ansible-workstation/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.0.0
config file = /home/msanabria/repos/ansible-workstation/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h4 dir="auto">CONFIGURATION</h4>
<p dir="auto"><em>ansible.cfg</em>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
ansible_managed = This file is managed by Ansible. All changes will be overwritten.
inventory = hosts.yml
retry_files_enabled = false
[privilege_escalation]
become_ask_pass = True"><pre class="notranslate"><code class="notranslate">[defaults]
ansible_managed = This file is managed by Ansible. All changes will be overwritten.
inventory = hosts.yml
retry_files_enabled = false
[privilege_escalation]
become_ask_pass = True
</code></pre></div>
<h4 dir="auto">OS / ENVIRONMENT</h4>
<ul dir="auto">
<li>Control node:<br>
Fedora release 25 (Twenty Five)</li>
<li>Managed node:<br>
Fedora release 25 (Twenty Five)</li>
</ul>
<h4 dir="auto">SUMMARY</h4>
<p dir="auto">When running a playbook with --tags options that specifies a tag of a task or tasks within a role, any dependencies of that role are not executed.</p>
<h4 dir="auto">STEPS TO REPRODUCE</h4>
<p dir="auto">tree:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".
├── ansible.cfg
├── hosts.yml
├── roles
│ ├── apps
│ │ ├── meta
│ │ │ └── main.yml
│ │ └── tasks
│ │ ├── chrome.yml
│ │ └── main.yml
│ └── common
│ ├── meta
│ │ └── main.yml
│ └── tasks
│ └── main.yml
└── workstation_setup.yml
"><pre class="notranslate"><code class="notranslate">.
├── ansible.cfg
├── hosts.yml
├── roles
│ ├── apps
│ │ ├── meta
│ │ │ └── main.yml
│ │ └── tasks
│ │ ├── chrome.yml
│ │ └── main.yml
│ └── common
│ ├── meta
│ │ └── main.yml
│ └── tasks
│ └── main.yml
└── workstation_setup.yml
</code></pre></div>
<p dir="auto"><em>hosts.yml</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[workstation]
localhost ansible_connection=local"><pre class="notranslate"><code class="notranslate">[workstation]
localhost ansible_connection=local
</code></pre></div>
<p dir="auto"><em>roles/apps/meta/main.yml</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
dependencies:
- { role: common }"><pre class="notranslate"><code class="notranslate">---
dependencies:
- { role: common }
</code></pre></div>
<p dir="auto"><em>roles/apps/tasks/chrome.yml</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
- name: Install Google Chrome
dnf:
..."><pre class="notranslate"><code class="notranslate">---
- name: Install Google Chrome
dnf:
...
</code></pre></div>
<p dir="auto"><em>roles/apps/tasks/main.yml</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
- name: Include chrome.yml
include: chrome.yml
tags:
- chrome"><pre class="notranslate"><code class="notranslate">---
- name: Include chrome.yml
include: chrome.yml
tags:
- chrome
</code></pre></div>
<p dir="auto"><em>roles/common/meta/main.yml</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
allow_duplicates: yes"><pre class="notranslate"><code class="notranslate">---
allow_duplicates: yes
</code></pre></div>
<p dir="auto"><em>roles/common/tasks/main.yml</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
- name: Install common packages
dnf:
..."><pre class="notranslate"><code class="notranslate">---
- name: Install common packages
dnf:
...
</code></pre></div>
<p dir="auto"><em>workstation_setup.yml</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
- name: Playbook to configure a Fedora workstation
hosts: workstation
become: yes
roles:
- { role: common }
- { role: apps }"><pre class="notranslate"><code class="notranslate">---
- name: Playbook to configure a Fedora workstation
hosts: workstation
become: yes
roles:
- { role: common }
- { role: apps }
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Expected Ansible to execute the dependency of the role with the tagged task(s).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook workstation_setup.yml --tags chrome --list-tasks
playbook: workstation_setup.yml
play #1 (workstation): Playbook to configure a Fedora workstation TAGS: []
tasks:
common : Install common packages TAGS: []
apps : Install Google Chrome TAGS: [chrome]"><pre class="notranslate"><code class="notranslate">$ ansible-playbook workstation_setup.yml --tags chrome --list-tasks
playbook: workstation_setup.yml
play #1 (workstation): Playbook to configure a Fedora workstation TAGS: []
tasks:
common : Install common packages TAGS: []
apps : Install Google Chrome TAGS: [chrome]
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Ansible only executes the tagged task(s) and not any dependencies.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook workstation_setup.yml --tags chrome --list-tasks
playbook: workstation_setup.yml
play #1 (workstation): Playbook to configure a Fedora workstation TAGS: []
tasks:
apps : Install Google Chrome TAGS: [chrome]"><pre class="notranslate"><code class="notranslate">$ ansible-playbook workstation_setup.yml --tags chrome --list-tasks
playbook: workstation_setup.yml
play #1 (workstation): Playbook to configure a Fedora workstation TAGS: []
tasks:
apps : Install Google Chrome TAGS: [chrome]
</code></pre></div> | 0 |
<p dir="auto">Even if I want to find specific package, first it lays out all packages.</p> | <p dir="auto">Panes do not load immediately - I think we could do a lot to make the UI <em>feel</em> more responsive even before tuning the underlying package and settings operations.</p> | 1 |
<h3 dir="auto">Vue.js version</h3>
<p dir="auto">1.0.21</p>
<h3 dir="auto">Steps to reproduce</h3>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<div :style="{backgroundSize:'100%'}"></div>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">:style</span>="<span class="pl-s">{backgroundSize:'100%'}</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div>
<h3 dir="auto">What is Expected?</h3>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<div style="background-size:100%;"></div>
// or
<div style="background-size:100% auto;"></div>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">style</span>="<span class="pl-s">background-size:100%;</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
// or
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">style</span>="<span class="pl-s">background-size:100% auto;</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div>
<h3 dir="auto">What is actually happening?</h3>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<div style="background-size:100% 100%;"></div>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">style</span>="<span class="pl-s">background-size:100% 100%;</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div>
<p dir="auto">from css documentation of background-size:<br>
Sets the width and height of the background image in percent of the parent element. The first value sets the width, the second value sets the height. <strong>If only one value is given, the second is set to "auto"</strong></p> | <h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">Sometimes prop validation error messages are to vague, and one would like to specify his own custom error message, instead of the default "Invalid prop: custom validator check failed for prop" message.</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">I suggest supporting the validator to be an object. Instead of:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default {
name: 'MyComponent',
props: {
type: {
type: String,
validator: v => ['positive', 'negative', 'warning', 'info'].includes(v)
}
}
}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'MyComponent'</span><span class="pl-kos">,</span>
<span class="pl-c1">props</span>: <span class="pl-kos">{</span>
<span class="pl-c1">type</span>: <span class="pl-kos">{</span>
<span class="pl-c1">type</span>: <span class="pl-v">String</span><span class="pl-kos">,</span>
<span class="pl-en">validator</span>: <span class="pl-s1">v</span> <span class="pl-c1">=></span> <span class="pl-kos">[</span><span class="pl-s">'positive'</span><span class="pl-kos">,</span> <span class="pl-s">'negative'</span><span class="pl-kos">,</span> <span class="pl-s">'warning'</span><span class="pl-kos">,</span> <span class="pl-s">'info'</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">includes</span><span class="pl-kos">(</span><span class="pl-s1">v</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Have the following:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default {
name: 'MyComponent',
props: {
type: {
type: String,
validator: {
handler: v => ['positive', 'negative', 'warning', 'info'].includes(v),
message: "Type must be one of 'positive', 'negative', 'warning', 'info'"
}
}
}
}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'MyComponent'</span><span class="pl-kos">,</span>
<span class="pl-c1">props</span>: <span class="pl-kos">{</span>
<span class="pl-c1">type</span>: <span class="pl-kos">{</span>
<span class="pl-c1">type</span>: <span class="pl-v">String</span><span class="pl-kos">,</span>
<span class="pl-c1">validator</span>: <span class="pl-kos">{</span>
<span class="pl-en">handler</span>: <span class="pl-s1">v</span> <span class="pl-c1">=></span> <span class="pl-kos">[</span><span class="pl-s">'positive'</span><span class="pl-kos">,</span> <span class="pl-s">'negative'</span><span class="pl-kos">,</span> <span class="pl-s">'warning'</span><span class="pl-kos">,</span> <span class="pl-s">'info'</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">includes</span><span class="pl-kos">(</span><span class="pl-s1">v</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-c1">message</span>: <span class="pl-s">"Type must be one of 'positive', 'negative', 'warning', 'info'"</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | 0 |
<p dir="auto">It's a common beginner's problem to create a vector with run-time size filled with identical values, but the idiomatic solution is pretty much undiscoverable without asking people on IRC/StackOverflow/Reddit.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/steveklabnik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/steveklabnik">@steveklabnik</a></p> | <p dir="auto">Rustc sometimes recognizes and logs the same error multiple times.</p>
<p dir="auto">Test case: <a href="https://gist.github.com/reem/78db1ad233f1c87f9ca7">https://gist.github.com/reem/78db1ad233f1c87f9ca7</a></p>
<p dir="auto"><code class="notranslate">rustc --test</code> consistently logs (note the double report on the L#33 error):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
lib.rs:33 replace_map(b, double);
^~~~~~~~~~~
lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
lib.rs:33 replace_map(b, double);
^~~~~~~~~~~
lib.rs:36:5: 36:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
lib.rs:36 replace_map(b, |&mut: x: uint| x * 2);
^~~~~~~~~~~
lib.rs:39:5: 39:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
lib.rs:39 replace_map(b, |&: x: uint| x * 2);
^~~~~~~~~~~
error: aborting due to 4 previous errors"><pre class="notranslate"><code class="notranslate">lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
lib.rs:33 replace_map(b, double);
^~~~~~~~~~~
lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
lib.rs:33 replace_map(b, double);
^~~~~~~~~~~
lib.rs:36:5: 36:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
lib.rs:36 replace_map(b, |&mut: x: uint| x * 2);
^~~~~~~~~~~
lib.rs:39:5: 39:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
lib.rs:39 replace_map(b, |&: x: uint| x * 2);
^~~~~~~~~~~
error: aborting due to 4 previous errors
</code></pre></div> | 0 |
<p dir="auto">arrays defined in vars or vars_files work ok, while those from host/group vars and inventory (${groups.somegroup} are handled incorrectly</p>
<p dir="auto">See attached gist (full test case with output)<br>
<a href="https://gist.github.com/mkaluza/6121615">https://gist.github.com/mkaluza/6121615</a></p>
<p dir="auto">vars 'a' and 'c' behave correctly, while var 'b' and group 'grp' does not</p> | <h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 1.9.1
configured module search path = None"><pre class="notranslate"><code class="notranslate">ansible 1.9.1
configured module search path = None
</code></pre></div>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Mac OSX 10.9.5</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Roles that are included multiple times cannot have their dependencies included multiple times. The documentation states that <code class="notranslate">allow_duplicates</code> accomplish something like this so long as the dependency is included multiple times from the <em>same</em> role, but it does not seem to work for the aforementioned case.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Here's a simple set of playbooks / roles that should illustrate the problem.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="### ./hypervisor-1.yml
---
- hosts:
- host1
roles:
- role: vm
name: red
- role: vm
name: blue
### ./hypervisor-2.yml
---
- hosts:
- host2
roles:
- role: vm
name: green
- role: vm
name: yellow
- role: vm
name: purple
### ./inventory
[hosts]
host1
host2
### ./roles/disk/tasks/main.yml
- debug: msg="Setting up disk for {{ path }}"
### ./roles/vm/meta/main.yml
---
allow_duplicates: yes
dependencies:
- role: disk
path: "/path/to/{{ name }}"
### ./roles/vm/tasks/main.yml
- debug: msg="Installing VM {{ name }}""><pre class="notranslate"><code class="notranslate">### ./hypervisor-1.yml
---
- hosts:
- host1
roles:
- role: vm
name: red
- role: vm
name: blue
### ./hypervisor-2.yml
---
- hosts:
- host2
roles:
- role: vm
name: green
- role: vm
name: yellow
- role: vm
name: purple
### ./inventory
[hosts]
host1
host2
### ./roles/disk/tasks/main.yml
- debug: msg="Setting up disk for {{ path }}"
### ./roles/vm/meta/main.yml
---
allow_duplicates: yes
dependencies:
- role: disk
path: "/path/to/{{ name }}"
### ./roles/vm/tasks/main.yml
- debug: msg="Installing VM {{ name }}"
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Running the first playbook, <code class="notranslate">hypervisor-1.yml</code>, should give output that shows a disk is set up for both <code class="notranslate">red</code> and <code class="notranslate">blue</code>, as well as the installation of the VM for both.</p>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [host1] ******************************************************************
GATHERING FACTS ***************************************************************
ok: [host1]
TASK: [disk | debug msg="Setting up disk for /path/to/red"] *******************
ok: [host1] => {
"msg": "Setting up disk for /path/to/red"
}
TASK: [vm | debug msg="Installing VM red"] ************************************
ok: [host1] => {
"msg": "Installing VM red"
}
TASK: [vm | debug msg="Installing VM blue"] ***********************************
ok: [host1] => {
"msg": "Installing VM blue"
}
PLAY RECAP ********************************************************************
host1 : ok=4 changed=0 unreachable=0 failed=0 "><pre class="notranslate"><code class="notranslate">PLAY [host1] ******************************************************************
GATHERING FACTS ***************************************************************
ok: [host1]
TASK: [disk | debug msg="Setting up disk for /path/to/red"] *******************
ok: [host1] => {
"msg": "Setting up disk for /path/to/red"
}
TASK: [vm | debug msg="Installing VM red"] ************************************
ok: [host1] => {
"msg": "Installing VM red"
}
TASK: [vm | debug msg="Installing VM blue"] ***********************************
ok: [host1] => {
"msg": "Installing VM blue"
}
PLAY RECAP ********************************************************************
host1 : ok=4 changed=0 unreachable=0 failed=0
</code></pre></div>
<p dir="auto">Note the disk is only set up for <code class="notranslate">red</code> and is skipped for <code class="notranslate">blue</code>.</p> | 0 |
<p dir="auto"><strong>I'm submitting a bug report</strong></p>
<p dir="auto"><strong>Webpack version:</strong><br>
2.x, 2.1.0-beta.20, from master (as of <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/webpack/webpack/commit/2553f4931d01bda54d696092d73e3cba9e2e9b3b/hovercard" href="https://github.com/webpack/webpack/commit/2553f4931d01bda54d696092d73e3cba9e2e9b3b"><tt>2553f49</tt></a>)</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
OSX 10.x</p>
<p dir="auto"><strong>Current behavior:</strong><br>
Warnings like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING in ./index.js
9:12 export 'x' was not found in './dep.js'"><pre class="notranslate"><code class="notranslate">WARNING in ./index.js
9:12 export 'x' was not found in './dep.js'
</code></pre></div>
<p dir="auto">duplicated multiple times on each rebuild in watch mode.</p>
<p dir="auto"><strong>Expected/desired behavior:</strong><br>
Warnings should be reported only once per occurrence.</p>
<p dir="auto"><strong>Repro</strong></p>
<p dir="auto">See <a href="https://github.com/andreypopp/wp2-stats-issue">https://github.com/andreypopp/wp2-stats-issue</a></p> | <p dir="auto">Sorry for duplicate issues but I'm really unsure what repo this issue belongs in. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133377396" data-permission-text="Title is private" data-url="https://github.com/webpack-contrib/eslint-loader/issues/80" data-hovercard-type="issue" data-hovercard-url="/webpack-contrib/eslint-loader/issues/80/hovercard" href="https://github.com/webpack-contrib/eslint-loader/issues/80">webpack-contrib/eslint-loader#80</a>. Looking at the updated dependencies I'm guessing this is some sort of issue with <code class="notranslate">acorn</code> versions but I'm not sure?</p>
<p dir="auto">Webpack 2 has a dependency on <code class="notranslate">"acorn": "^2.4.0"</code>, and Eslint 2 has a dependency on <code class="notranslate">"espree": "^3.0.0"</code> which in turn has a dependency on <code class="notranslate">"acorn": "^2.7.0"</code>.</p>
<ul dir="auto">
<li>Webpack 2 => <code class="notranslate">"acorn": "^2.4.0"</code></li>
<li>Eslint 2 => <code class="notranslate">"espree": "^3.0.0"</code> => <code class="notranslate">"acorn": "^2.7.0"</code></li>
</ul>
<p dir="auto">Eslint 2 has a dependency on <code class="notranslate">"espree": "^2.2.4"</code> which in turn has NO <code class="notranslate">acorn</code> dependency so I'm guessing whatever is happening is some sort of conflict in <code class="notranslate">acorn</code> but I'm unsure how this plays out.</p>
<ul dir="auto">
<li>Webpack 2 => <code class="notranslate">"acorn": "^2.4.0"</code></li>
<li>Eslint 1 => <code class="notranslate">"espree": "^2.2.4"</code></li>
</ul>
<p dir="auto">I think this could be an NPM 3 semver thing where NPM tries to be smart and and sees two versions of <code class="notranslate">acorn</code> with <code class="notranslate">^2.x</code> and extracts them out into the root of <code class="notranslate">node_modules</code></p>
<p dir="auto">Upon updating to Eslint 2 and Webpack 2 I get an error in <code class="notranslate">espree</code> shown below. With Webpack 1 I don't get this error, and with Webpack <code class="notranslate">2.0.7.-beta</code> and Eslint <code class="notranslate">1.x</code> I don't get the error as well. If you have any ideas and cold point me in the right direction I'd appreciate it.</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"parser": "babel-eslint",
"plugins": [
"react"
],
"env": {
"browser": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"experimentalObjectRestSpread": true,
"generators": true,
"jsx": true,
"module": true,
"modules": true,
"restParams": true,
"spread": true,
"jsx": true
}
}
}"><pre class="notranslate">{
<span class="pl-ent">"parser"</span>: <span class="pl-s"><span class="pl-pds">"</span>babel-eslint<span class="pl-pds">"</span></span>,
<span class="pl-ent">"plugins"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>react<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"env"</span>: {
<span class="pl-ent">"browser"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"node"</span>: <span class="pl-c1">true</span>
},
<span class="pl-ent">"parserOptions"</span>: {
<span class="pl-ent">"ecmaVersion"</span>: <span class="pl-c1">6</span>,
<span class="pl-ent">"sourceType"</span>: <span class="pl-s"><span class="pl-pds">"</span>module<span class="pl-pds">"</span></span>,
<span class="pl-ent">"ecmaFeatures"</span>: {
<span class="pl-ent">"arrowFunctions"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"blockBindings"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"experimentalObjectRestSpread"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"generators"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"jsx"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"module"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"modules"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"restParams"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"spread"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"jsx"</span>: <span class="pl-c1">true</span>
}
}
}</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in ./src/js/index.js
Module parse failed: /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/babel-loader/index.js?{"presets":["react","es2015","stage-0"],"plugins":["transform-runtime","transform-decorators-legacy","typecheck",["react-transform",{"transforms":[{"transform":"react-transform-hmr","imports":["react"],"locals":["module"]},{"transform":"react-transform-catch-errors","imports":["react","redbox-react"]}]}]]}!/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/eslint-loader/index.js!/Users/davidfox-powell/dev/frontend-boilerplate/src/js/index.js
Cannot read property 'ecmaFeatures' of undefined
You may need an appropriate loader to handle this file type.
TypeError: Cannot read property 'ecmaFeatures' of undefined
at Parser.parseTopLevel (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/espree/espree.js:271:18)
at Parser.parse (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/acorn/dist/acorn.js:1636:17)
at Object.parse (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/acorn/dist/acorn.js:905:44)
at Parser.parse (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/webpack/lib/Parser.js:960:18)
at Module.<anonymous> (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/webpack/lib/NormalModule.js:192:16)
at /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/webpack/lib/NormalModule.js:160:10
at /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:334:3
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:182:10)
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:189:10)
at /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:204:3
at Object.context.callback (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:87:13)
at Object.module.exports (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/babel-loader/index.js:89:8)
at LOADER_EXECUTION (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:95:14)
at runSyncOrAsync (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:96:4)
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:200:2)
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:189:10)
at /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:204:3
at Object.context.callback (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:87:13)
at Object.module.exports (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/eslint-loader/index.js:113:8)
at LOADER_EXECUTION (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:95:14)
at runSyncOrAsync (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:96:4)
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:200:2)
@ multi main"><pre class="notranslate"><code class="notranslate">ERROR in ./src/js/index.js
Module parse failed: /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/babel-loader/index.js?{"presets":["react","es2015","stage-0"],"plugins":["transform-runtime","transform-decorators-legacy","typecheck",["react-transform",{"transforms":[{"transform":"react-transform-hmr","imports":["react"],"locals":["module"]},{"transform":"react-transform-catch-errors","imports":["react","redbox-react"]}]}]]}!/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/eslint-loader/index.js!/Users/davidfox-powell/dev/frontend-boilerplate/src/js/index.js
Cannot read property 'ecmaFeatures' of undefined
You may need an appropriate loader to handle this file type.
TypeError: Cannot read property 'ecmaFeatures' of undefined
at Parser.parseTopLevel (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/espree/espree.js:271:18)
at Parser.parse (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/acorn/dist/acorn.js:1636:17)
at Object.parse (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/acorn/dist/acorn.js:905:44)
at Parser.parse (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/webpack/lib/Parser.js:960:18)
at Module.<anonymous> (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/webpack/lib/NormalModule.js:192:16)
at /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/webpack/lib/NormalModule.js:160:10
at /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:334:3
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:182:10)
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:189:10)
at /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:204:3
at Object.context.callback (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:87:13)
at Object.module.exports (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/babel-loader/index.js:89:8)
at LOADER_EXECUTION (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:95:14)
at runSyncOrAsync (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:96:4)
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:200:2)
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:189:10)
at /Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:204:3
at Object.context.callback (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:87:13)
at Object.module.exports (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/eslint-loader/index.js:113:8)
at LOADER_EXECUTION (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:95:14)
at runSyncOrAsync (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:96:4)
at iterateNormalLoaders (/Users/davidfox-powell/dev/frontend-boilerplate/node_modules/loader-runner/lib/LoaderRunner.js:200:2)
@ multi main
</code></pre></div> | 0 |
<p dir="auto">If the viewport is smaller than the list of dropdown links of a fixed-top navbar, there is no way to scroll down to view links that are beyond my view. The reason being obviously that the entire navbar is "fixed". I've tried to make .navbar-collapse scrollable but it won't always scroll down to the very end, it's very confusing.</p>
<p dir="auto">Can be reproduced using your example here: <a href="http://getbootstrap.com/examples/navbar-fixed-top/" rel="nofollow">http://getbootstrap.com/examples/navbar-fixed-top/</a>, both on mobile and desktop. I'm using the newest Chrome Browser.</p>
<p dir="auto">Any thoughts on this are VERY MUCH appreciated - thanks!</p> | <p dir="auto">[Original title: Expanded navbar on mobile (landscape) is cut off]<br>
/CC <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mdo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mdo">@mdo</a></p> | 1 |
<p dir="auto">What use are options like <code class="notranslate">precision</code>, <code class="notranslate">rounding_mode</code> for an integer type?</p>
<p dir="auto">Why is this form called "integer" when it clearly deals with floats?</p>
<p dir="auto">I'd expect integer type to allow only values like <code class="notranslate">-2, -1, 0, 1, 2, 3, ...</code> etc, and to have options like <code class="notranslate">allow_negative</code> and <code class="notranslate">allow_zero</code>.</p>
<blockquote>
<p dir="auto">This field has different options on how to handle input values that aren't integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6).</p>
</blockquote>
<p dir="auto">I'd expect <code class="notranslate">number</code> field to behave like this (based on configuration options), and <code class="notranslate">integer</code> type should only allow.. well.. integer values. The name of this form is misleading.</p>
<p dir="auto">PS. Am I the only one who finds <code class="notranslate">precision</code> weird option for an "integer" type?</p> | <p dir="auto">The <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php"><code class="notranslate">IntegerType</code></a> supports floats, but as the name suggests it should only accept integers, i.e. whole numbers.</p>
<p dir="auto">The <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/NumberType.php"><code class="notranslate">NumberType</code></a> supports floats, locale specific numeric strings (e.g. "40,000") etc.</p>
<p dir="auto">I propose a change to these 2 types:</p>
<ul dir="auto">
<li><code class="notranslate">IntegerType</code>: should be used for whole integers as the name suggests</li>
<li><code class="notranslate">NumberType</code>: should be used for floats (rendering as an <code class="notranslate">input[type="number"]</code>), and have a new option (<code class="notranslate">support_locale_strings</code> or something similar) so that it renders as <code class="notranslate">input[type="text"]</code> and has the relevant attached <code class="notranslate">NumberToLocalizedStringTransformer</code>.</li>
</ul>
<p dir="auto">This is obviously a BC break so marked it for 3.0.</p> | 1 |
<ul dir="auto">
<li>VSCode Version: 1.2.0 + 1.3.0-insiders</li>
<li>OS Version: MacOS X 10.11.5</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Open/create scss file</li>
<li>Write a map, the first colon is marked as an error</li>
<li>Error message: <code class="notranslate">") expected"</code></li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1062408/15908611/e272477c-2dc2-11e6-8e3a-d76f23d7ff30.png"><img width="333" alt="screen shot 2016-06-08 at 21 43 33" src="https://cloud.githubusercontent.com/assets/1062408/15908611/e272477c-2dc2-11e6-8e3a-d76f23d7ff30.png" style="max-width: 100%;"></a></p>
<p dir="auto">Code from screenshot:</p>
<div class="highlight highlight-source-css-scss notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Breakpoints
$breakpoints: (
'xsmall': 21.25rem, // 340px
'small': 40rem, // 640px
'medium': 48rem, // 768px
'large': 61.25rem, // 980px
'xlarge': 82rem // 1312px
);"><pre class="notranslate"><span class="pl-c"><span class="pl-c">//</span> Breakpoints</span>
<span class="pl-v">$breakpoints</span>: (
<span class="pl-s"><span class="pl-pds">'</span>xsmall<span class="pl-pds">'</span></span>: <span class="pl-c1">21.25<span class="pl-k">rem</span></span>, <span class="pl-c"><span class="pl-c">//</span> 340px</span>
<span class="pl-s"><span class="pl-pds">'</span>small<span class="pl-pds">'</span></span>: <span class="pl-c1">40<span class="pl-k">rem</span></span>, <span class="pl-c"><span class="pl-c">//</span> 640px</span>
<span class="pl-s"><span class="pl-pds">'</span>medium<span class="pl-pds">'</span></span>: <span class="pl-c1">48<span class="pl-k">rem</span></span>, <span class="pl-c"><span class="pl-c">//</span> 768px</span>
<span class="pl-s"><span class="pl-pds">'</span>large<span class="pl-pds">'</span></span>: <span class="pl-c1">61.25<span class="pl-k">rem</span></span>, <span class="pl-c"><span class="pl-c">//</span> 980px</span>
<span class="pl-s"><span class="pl-pds">'</span>xlarge<span class="pl-pds">'</span></span>: <span class="pl-c1">82<span class="pl-k">rem</span></span> <span class="pl-c"><span class="pl-c">//</span> 1312px</span>
);</pre></div> | <p dir="auto">If I add a map to a scss file, e.g. "$map: (key1: value1, key2: value2, key3: value3);" it shows as an error. Red squiggly appears under the ":" after the first key and hover message reads ") expected". Despite the error in editor node-sass evaluates map-get correctly over it.</p> | 1 |
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-staging/6016/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-staging/6016/</a></p>
<p dir="auto">Failed: Kubectl client Update Demo should create and stop a replication controller [Conformance] {Kubernetes e2e suite}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:135
Jun 15 07:17:41.598: Timed out after 300 seconds waiting for name=update-demo pods to reach valid state"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:135
Jun 15 07:17:41.598: Timed out after 300 seconds waiting for name=update-demo pods to reach valid state
</code></pre></div> | <p dir="auto">Seeing a fair number of failures from the PR builder failing because they can't reach gcr.io</p>
<p dir="auto"><code class="notranslate">Get https://gcr.io/v2/: dial tcp: lookup gcr.io on 169.254.169.254:53: dial udp 169.254.169.254:53: network is unreachable\n v1 ping attempt failed with error: Get https://gcr.io/v1/_ping: dial tcp: lookup gcr.io on 169.254.169.254:53: dial udp 169.254.169.254:53: network is unreachable</code></p>
<p dir="auto">May need to disable the affected tests until the issue can be resolved.</p>
<p dir="auto">18:11:42 I0331 01:07:35.717951 2083 provider.go:91] Refreshing cache for provider: _credentialprovider.defaultDockerConfigProvider<br>
18:11:42 I0331 01:07:35.718029 2083 docker.go:161] Pulling image gcr.io/google_containers/busybox:1.24 without credentials<br>
18:11:42 I0331 01:07:36.102990 2083 docker.go:161] Pulling image gcr.io/google_containers/mounttest:0.2 without credentials<br>
18:11:42 • Failure [0.544 seconds]<br>
18:11:42 Container Conformance Test<br>
18:11:42 /var/lib/jenkins/workspace/node-pull-build-e2e-test/go/src/k8s.io/kubernetes/test/e2e_node/conformance_test.go:164<br>
18:11:42 container conformance blackbox test<br>
18:11:42 /var/lib/jenkins/workspace/node-pull-build-e2e-test/go/src/k8s.io/kubernetes/test/e2e_node/conformance_test.go:163<br>
18:11:42 when testing images that exist<br>
18:11:42 /var/lib/jenkins/workspace/node-pull-build-e2e-test/go/src/k8s.io/kubernetes/test/e2e_node/conformance_test.go:79<br>
18:11:42 it should pull successfully [Conformance] [It]<br>
18:11:42 /var/lib/jenkins/workspace/node-pull-build-e2e-test/go/src/k8s.io/kubernetes/test/e2e_node/conformance_test.go:63<br>
18:11:42<br>
18:11:42 Expected error:<br>
18:11:42 <_errors.errorString | 0xc2083c1f00>: {<br>
18:11:42 s: "image pull failed for gcr.io/google_containers/mounttest:0.2, this may be because there are no credentials on this request. details: (unable to ping registry endpoint <a href="https://gcr.io/v0/%5Cnv2" rel="nofollow">https://gcr.io/v0/\nv2</a> ping attempt failed with error: Get <a href="https://gcr.io/v2/" rel="nofollow">https://gcr.io/v2/</a>: dial tcp: lookup gcr.io on 169.254.169.254:53: dial udp 169.254.169.254:53: network is unreachable\n v1 ping attempt failed with error: Get <a href="https://gcr.io/v1/_ping" rel="nofollow">https://gcr.io/v1/_ping</a>: dial tcp: lookup gcr.io on 169.254.169.254:53: dial udp 169.254.169.254:53: network is unreachable)",<br>
18:11:42 }<br>
18:11:42 image pull failed for gcr.io/google_containers/mounttest:0.2, this may be because there are no credentials on this request. details: (unable to ping registry endpoint <a href="https://gcr.io/v0/" rel="nofollow">https://gcr.io/v0/</a><br>
18:11:42 v2 ping attempt failed with error: Get <a href="https://gcr.io/v2/" rel="nofollow">https://gcr.io/v2/</a>: dial tcp: lookup gcr.io on 169.254.169.254:53: dial udp 169.254.169.254:53: network is unreachable<br>
18:11:42 v1 ping attempt failed with error: Get <a href="https://gcr.io/v1/_ping" rel="nofollow">https://gcr.io/v1/_ping</a>: dial tcp: lookup gcr.io on 169.254.169.254:53: dial udp 169.254.169.254:53: network is unreachable)<br>
18:11:42 not to have occurred</p> | 1 |
<p dir="auto">The first line is working, the second one, on GPU, returns an error</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="torch.FloatTensor(3, 4).random_(2)
torch.FloatTensor(3, 4).cuda().random_(2)"><pre class="notranslate"><span class="pl-s1">torch</span>.<span class="pl-v">FloatTensor</span>(<span class="pl-c1">3</span>, <span class="pl-c1">4</span>).<span class="pl-en">random_</span>(<span class="pl-c1">2</span>)
<span class="pl-s1">torch</span>.<span class="pl-v">FloatTensor</span>(<span class="pl-c1">3</span>, <span class="pl-c1">4</span>).<span class="pl-en">cuda</span>().<span class="pl-en">random_</span>(<span class="pl-c1">2</span>)</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="AttributeError: 'FloatTensor' object has no attribute 'random_'"><pre class="notranslate"><code class="notranslate">AttributeError: 'FloatTensor' object has no attribute 'random_'
</code></pre></div> | <blockquote>
<p dir="auto">torch.Tensor(10).random_(0,10) #works<br>
torch.Tensor(10).random_(0,10).cuda() #works<br>
torch.Tensor(10).cuda().random_(0,10) #does not work</p>
</blockquote> | 1 |
<p dir="auto">I have no jap charakters also in UTF-8. (Linux Mint 17.1)</p>
<p dir="auto">I didn't choose any font family in settings.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9461698/8187455/11ce610a-1450-11e5-8b05-4bbc9e8ded53.png"><img src="https://cloud.githubusercontent.com/assets/9461698/8187455/11ce610a-1450-11e5-8b05-4bbc9e8ded53.png" alt="screenshot" style="max-width: 100%;"></a></p>
<p dir="auto">for example this<br>
"TITLE_LOST_NEW": "新遺失",<br>
"TITLE_LOST_EDIT": "遺失修正",<br>
"TITLE_LOST_DETAIL": "遺失詳細",<br>
"TITLE_LOSTS_PAIRS": "対で遺失",<br>
"TITLE_LOSTS_MY": "個人の遺失",<br>
"TITLE_LOSTS": "遺失",</p>
<p dir="auto">*** Here is my additional information ***</p>
<p dir="auto">$ atom --version<br>
0.209.0</p>
<hr>
<p dir="auto">$ apm links<br>
/home/frdm/.atom/dev/packages (0)<br>
└── (no links)<br>
/home/frdm/.atom/packages (0)<br>
└── (no links)</p>
<hr>
<p dir="auto">YES the problem remains if Atom runs in <em>safe mode</em><br>
YES it doesn't matter if I chose a font that supports these characters, DejavuSans Mono, Monospace, Noto Sans etc...</p>
<hr>
<p dir="auto">here is my FULL /.atom</p>
<p dir="auto">.atom.zip 13.3 MB<br>
<a href="https://mega.co.nz/#!CZw1ETab!MG8JHXZ_3kIYuYoSMhwp-oaV2jATdMqk3Pk7MXavSbk" rel="nofollow">https://mega.co.nz/#!CZw1ETab!MG8JHXZ_3kIYuYoSMhwp-oaV2jATdMqk3Pk7MXavSbk</a></p>
<hr>
<p dir="auto">Processor : 4x AMD A8-4500M APU integrated GPU<br>
Operating System : Linux Mint 17.1 Rebecca (MATE)<br>
OpenGL : AMD Radeon HD 7640G<br>
X11 Vendor : The X.Org Foundation v1.15.1<br>
Kernel : Linux 3.13.0-55-generic (x86_64)</p> | <p dir="auto">Text:</p>
<blockquote>
<p dir="auto">这上面的夜的天空,奇怪而高,我生平没有见过这样奇怪而高的天空。他仿佛要离开人间而去,使人们仰面不再看见。然而现在却非常之蓝,闪闪地睒着几十个星星的眼,冷眼。他的口角上现出微笑,似乎自以为大有深意,而将繁霜洒在我的园里的野花草上。</p>
</blockquote>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/49931/6959354/a30f8266-d94a-11e4-9167-35ea308a5ad2.png"><img src="https://cloud.githubusercontent.com/assets/49931/6959354/a30f8266-d94a-11e4-9167-35ea308a5ad2.png" alt="3" style="max-width: 100%;"></a></p>
<p dir="auto">It happen after update to 0.189.0, and it's normal in 0.188.0 .</p>
<p dir="auto">I try disabled all community packages or star with <code class="notranslate">--safe</code> mode, still happen.</p>
<p dir="auto">Update: Ubuntu 14.04</p> | 1 |
<p dir="auto">Challenges 4, 5, etc., not logged in.</p>
<p dir="auto">User Agent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"</p>
<p dir="auto"><strong>Steps to reproduce:</strong></p>
<ol dir="auto">
<li>Pass challenge 4, Work with Data in D3.<br>
My passing code was:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<body>
<script>
const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];
// Add your code below this line
d3.select('body').selectAll('h2')
.data(dataset)
.enter()
.append('h2')
.text('New Title');
// Add your code above this line
</script>
</body>"><pre class="notranslate"><code class="notranslate"><body>
<script>
const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];
// Add your code below this line
d3.select('body').selectAll('h2')
.data(dataset)
.enter()
.append('h2')
.text('New Title');
// Add your code above this line
</script>
</body>
</code></pre></div>
<ol start="2" dir="auto">
<li>Do not go on to next challenge.</li>
<li>Resubmit and get this error:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// running test
"Identifier 'dataset' has already been declared"
"Identifier 'dataset' has already been declared"
"Identifier 'dataset' has already been declared"
"Identifier 'dataset' has already been declared"
// finished test"><pre class="notranslate"><code class="notranslate">// running test
"Identifier 'dataset' has already been declared"
"Identifier 'dataset' has already been declared"
"Identifier 'dataset' has already been declared"
"Identifier 'dataset' has already been declared"
// finished test
</code></pre></div>
<p dir="auto">You can also get this error by:</p>
<ol dir="auto">
<li>Completing and passing challenge 4.</li>
<li>Moving on to challenge 5.</li>
<li>Submitting challenge 5, even with correct code.</li>
<li>Get the error, and your code will not show on phone.</li>
<li>Refresh page, it will pass.</li>
</ol> | <p dir="auto">Challenge <a href="http://beta.freecodecamp.com/en/challenges/data-visualization-with-d3/work-with-dynamic-data-in-d3" rel="nofollow">work-with-dynamic-data-in-d3</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36</code>.</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
<body>
<script>
const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];
d3.select("body").selectAll("h2")
.data(dataset)
.enter()
.append("h2")
.text((d) => d + " USD");
// Add your code above this line
</script>
</body>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">body</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-k">const</span> <span class="pl-s1">dataset</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">12</span><span class="pl-kos">,</span> <span class="pl-c1">31</span><span class="pl-kos">,</span> <span class="pl-c1">22</span><span class="pl-kos">,</span> <span class="pl-c1">17</span><span class="pl-kos">,</span> <span class="pl-c1">25</span><span class="pl-kos">,</span> <span class="pl-c1">18</span><span class="pl-kos">,</span> <span class="pl-c1">29</span><span class="pl-kos">,</span> <span class="pl-c1">14</span><span class="pl-kos">,</span> <span class="pl-c1">9</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-s1">d3</span><span class="pl-kos">.</span><span class="pl-en">select</span><span class="pl-kos">(</span><span class="pl-s">"body"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">selectAll</span><span class="pl-kos">(</span><span class="pl-s">"h2"</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">data</span><span class="pl-kos">(</span><span class="pl-s1">dataset</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">enter</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">append</span><span class="pl-kos">(</span><span class="pl-s">"h2"</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">text</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">d</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-s1">d</span> <span class="pl-c1">+</span> <span class="pl-s">" USD"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Add your code above this line</span>
<span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">body</span><span class="pl-kos">></span></pre></div>
<p dir="auto">This would be the right solution, but it says <code class="notranslate">dataset</code> is already declared. The issue is resolved by renaming the variable.</p> | 1 |
<h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">master branch</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-Proxy & governance</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">throw exception when creates sharding binding table rules repeatedly</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">no exception and result in duplicate metadata</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10829171/120983776-9ac77f80-c7ac-11eb-8683-0278c3716a32.png"><img src="https://user-images.githubusercontent.com/10829171/120983776-9ac77f80-c7ac-11eb-8683-0278c3716a32.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | <h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">apache-shardingsphere-5.0.0-RC1-SNAPSHOT-shardingsphere-proxy-bin</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-Proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">In the shardingsphere proxy scenario, the benchmarkSQL is running properly, and the OpenGauss does not break down.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Run benchmarkSQL in the shardingsphere proxy scenario, openGauss will crash</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<p dir="auto">BenchmarkSQL:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # ll
total 284
-rwxrwxrwx 1 root root 30 Jun 18 17:08 .gitignore
-rw-r--r-- 1 root root 3 Sep 17 15:11 .jTPCC_run_seq.dat
-rw-r--r-- 1 root root 136218 Sep 17 15:12 benchmarksql-error.log
-rw-r--r-- 1 root root 35742 Sep 17 15:12 benchmarksql-trace.log
-rwxrwxrwx 1 root root 8515 Sep 8 20:29 config-sharding.yaml
-rwxrwxrwx 1 root root 1100 Jun 18 17:08 funcs.sh
-rwxrwxrwx 1 root root 2123 Jun 18 17:08 generateGraphs.sh
-rwxrwxrwx 1 root root 7256 Jun 18 17:08 generateReport.sh
-rwxrwxrwx 1 root root 961 Sep 13 09:56 log4j.properties
-rwxrwxrwx 1 root root 962 Jun 18 17:08 log4j.properties.bak
drwxrwxrwx 2 root root 4096 Jun 18 17:08 misc
-rwxrwxrwx 1 root root 1063 Jun 18 17:08 props.fb
-rwxrwxrwx 1 root root 947 Jun 18 17:08 props.ora
-rwxrwxrwx 1 root root 1465 Sep 8 20:54 props.pg
-rwxrwxrwx 1 root root 1335 Jun 18 17:08 props.pg.bak
-rwxrwxrwx 1 root root 1423 Sep 15 15:19 props.pg_single
-rwxrwxrwx 1 root root 1224 Sep 11 12:21 props.sharding
-rwxrwxrwx 1 root root 385 Jun 18 17:08 runBenchmark.sh
-rwxrwxrwx 1 root root 504 Jun 18 17:08 runDatabaseBuild.sh
-rwxrwxrwx 1 root root 330 Jun 18 17:08 runDatabaseDestroy.sh
-rwxrwxrwx 1 root root 200 Jun 18 17:08 runLoader.sh
-rwxrwxrwx 1 root root 1207 Jun 18 17:08 runSQL.sh
drwxrwxrwx 2 root root 4096 Sep 9 11:39 sql.common
drwxrwxrwx 2 root root 4096 Jun 18 17:08 sql.firebird
drwxrwxrwx 2 root root 4096 Jun 18 17:08 sql.oracle
drwxrwxrwx 2 root root 4096 Jun 18 17:08 sql.postgres
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # cat props.sharding
db=postgres
driver=org.postgresql.Driver
conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
//conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?loggerLevel=OFF&batchMode=OFF&replication=TRUE
user=root
password=root
//warehouses=1000
warehouses=10
loadWorkers=100
//terminals=812
terminals=10
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=60
//Number of total transactions per minute
limitTxnsPerMin=0
//Set to true to run in 4.x compatible mode. Set to false to use the
//entire configured database evenly.
terminalWarehouseFixed=false
//The following five values must add up to 100
//The default percentages of 45, 43, 4, 4 & 4 match the TPC-C spec
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
// Directory name to create for collecting detailed result data.
// Comment this out to suppress.
//resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
//osCollectorScript=./misc/os_collector_linux.py
//osCollectorInterval=1
//osCollectorSSHAddr=user@dbhost
//osCollectorDevices=net_eth0 blk_sda
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run #
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # ./runBenchmark.sh props.sharding
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
15:11:40,832 [main] INFO jTPCC : Term-00,
15:11:40,835 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,835 [main] INFO jTPCC : Term-00, BenchmarkSQL v5.0
15:11:40,835 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,836 [main] INFO jTPCC : Term-00, (c) 2003, Raul Barbosa
15:11:40,836 [main] INFO jTPCC : Term-00, (c) 2004-2016, Denis Lussier
15:11:40,838 [main] INFO jTPCC : Term-00, (c) 2016, Jan Wieck
15:11:40,838 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,838 [main] INFO jTPCC : Term-00,
15:11:40,839 [main] INFO jTPCC : Term-00, db=postgres
15:11:40,839 [main] INFO jTPCC : Term-00, driver=org.postgresql.Driver
15:11:40,839 [main] INFO jTPCC : Term-00, conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:40,839 [main] INFO jTPCC : Term-00, user=root
15:11:40,839 [main] INFO jTPCC : Term-00,
15:11:40,840 [main] INFO jTPCC : Term-00, warehouses=10
15:11:40,840 [main] INFO jTPCC : Term-00, terminals=10
15:11:40,842 [main] INFO jTPCC : Term-00, runMins=60
15:11:40,842 [main] INFO jTPCC : Term-00, limitTxnsPerMin=0
15:11:40,842 [main] INFO jTPCC : Term-00, terminalWarehouseFixed=false
15:11:40,842 [main] INFO jTPCC : Term-00,
15:11:40,843 [main] INFO jTPCC : Term-00, newOrderWeight=45
15:11:40,843 [main] INFO jTPCC : Term-00, paymentWeight=43
15:11:40,843 [main] INFO jTPCC : Term-00, orderStatusWeight=4
15:11:40,843 [main] INFO jTPCC : Term-00, deliveryWeight=4
15:11:40,843 [main] INFO jTPCC : Term-00, stockLevelWeight=4
15:11:40,843 [main] INFO jTPCC : Term-00,
15:11:40,844 [main] INFO jTPCC : Term-00, resultDirectory=null
15:11:40,844 [main] INFO jTPCC : Term-00, osCollectorScript=null
15:11:40,844 [main] INFO jTPCC : Term-00,
15:11:40,867 [main] INFO jTPCC : Term-00, config=null
15:11:40,868 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,080 [main] INFO jTPCC : Term-00, C value for C_LAST during load: 184
15:11:41,080 [main] INFO jTPCC : Term-00, C value for C_LAST this run: 90
15:11:41,080 [main] INFO jTPCC : Term-00, 15:11:41,085 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,108 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,128 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,151 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,175 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,200 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,224 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,243 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,262 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,285 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off 15:12:19,631 [Thread-10] ERROR jTPCCTData : Unexpected SQLException in PAYMENTUsage: 70MB / 960MB
15:12:19,632 [Thread-10] ERROR jTPCCTData : [90.90.169.34:40422/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
15:12:19,632 [Thread-9] ERROR jTPCCTData : Unexpected SQLException in PAYMENT
15:12:19,632 [Thread-7] ERROR jTPCCTData : Unexpected SQLException in NEW_ORDER
org.postgresql.util.PSQLException: [90.90.169.34:40422/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
15:12:19,632 [Thread-7] ERROR jTPCCTData : [90.90.169.34:40416/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
at jTPCCTData.executePayment(jTPCCTData.java:786)
at jTPCCTData.execute(jTPCCTData.java:93)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
15:12:19,631 [Thread-4] ERROR jTPCCTData : Unexpected SQLException in NEW_ORDER
15:12:19,633 [Thread-4] ERROR jTPCCTData : [90.90.169.34:40410/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
org.postgresql.util.PSQLException: [90.90.169.34:40410/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
at jTPCCTData.executeNewOrder(jTPCCTData.java:456)
at jTPCCTData.execute(jTPCCTData.java:89)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:231)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
org.postgresql.util.PSQLException: [90.90.169.34:40416/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
at jTPCCTData.executeNewOrder(jTPCCTData.java:456)
at jTPCCTData.execute(jTPCCTData.java:89)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:231)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
15:12:19,632 [Thread-5] ERROR jTPCCTData : Unexpected SQLException in PAYMENT
15:12:19,634 [Thread-5] ERROR jTPCCTData : [90.90.169.34:40412/90.90.169.84:3307] ERROR: [90.90.169.84:33786/90.90.169.82:15400] socket is not closed; Urgent packet sent to backend successfully; An I/O error occured while sending to the backend.detail:EOF Exception;
org.postgresql.util.PSQLException: [90.90.169.34:40412/90.90.169.84:3307] ERROR: [90.90.169.84:33786/90.90.169.82:15400] socket is not closed; Urgent packet sent to backend successfully; An I/O error occured while sending to the backend.detail:EOF Exception;
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
15:12:19,632 [Thread-9] ERROR jTPCCTData : [90.90.169.34:40420/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:126)
at jTPCCTData.executePayment(jTPCCTData.java:741)
at jTPCCTData.execute(jTPCCTData.java:93)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
org.postgresql.util.PSQLException: [90.90.169.34:40420/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
at jTPCCTData.executePayment(jTPCCTData.java:786)
at jTPCCTData.execute(jTPCCTData.java:93)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
15:12:19,635 [Thread-10] FATAL jTPCCTerminal :
java.lang.NullPointerException
at jTPCCTData.tracePayment(jTPCCTData.java:952)
at jTPCCTData.traceScreen(jTPCCTData.java:178)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:152)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run #"><pre class="notranslate"><code class="notranslate">hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # ll
total 284
-rwxrwxrwx 1 root root 30 Jun 18 17:08 .gitignore
-rw-r--r-- 1 root root 3 Sep 17 15:11 .jTPCC_run_seq.dat
-rw-r--r-- 1 root root 136218 Sep 17 15:12 benchmarksql-error.log
-rw-r--r-- 1 root root 35742 Sep 17 15:12 benchmarksql-trace.log
-rwxrwxrwx 1 root root 8515 Sep 8 20:29 config-sharding.yaml
-rwxrwxrwx 1 root root 1100 Jun 18 17:08 funcs.sh
-rwxrwxrwx 1 root root 2123 Jun 18 17:08 generateGraphs.sh
-rwxrwxrwx 1 root root 7256 Jun 18 17:08 generateReport.sh
-rwxrwxrwx 1 root root 961 Sep 13 09:56 log4j.properties
-rwxrwxrwx 1 root root 962 Jun 18 17:08 log4j.properties.bak
drwxrwxrwx 2 root root 4096 Jun 18 17:08 misc
-rwxrwxrwx 1 root root 1063 Jun 18 17:08 props.fb
-rwxrwxrwx 1 root root 947 Jun 18 17:08 props.ora
-rwxrwxrwx 1 root root 1465 Sep 8 20:54 props.pg
-rwxrwxrwx 1 root root 1335 Jun 18 17:08 props.pg.bak
-rwxrwxrwx 1 root root 1423 Sep 15 15:19 props.pg_single
-rwxrwxrwx 1 root root 1224 Sep 11 12:21 props.sharding
-rwxrwxrwx 1 root root 385 Jun 18 17:08 runBenchmark.sh
-rwxrwxrwx 1 root root 504 Jun 18 17:08 runDatabaseBuild.sh
-rwxrwxrwx 1 root root 330 Jun 18 17:08 runDatabaseDestroy.sh
-rwxrwxrwx 1 root root 200 Jun 18 17:08 runLoader.sh
-rwxrwxrwx 1 root root 1207 Jun 18 17:08 runSQL.sh
drwxrwxrwx 2 root root 4096 Sep 9 11:39 sql.common
drwxrwxrwx 2 root root 4096 Jun 18 17:08 sql.firebird
drwxrwxrwx 2 root root 4096 Jun 18 17:08 sql.oracle
drwxrwxrwx 2 root root 4096 Jun 18 17:08 sql.postgres
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # cat props.sharding
db=postgres
driver=org.postgresql.Driver
conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
//conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?loggerLevel=OFF&batchMode=OFF&replication=TRUE
user=root
password=root
//warehouses=1000
warehouses=10
loadWorkers=100
//terminals=812
terminals=10
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=60
//Number of total transactions per minute
limitTxnsPerMin=0
//Set to true to run in 4.x compatible mode. Set to false to use the
//entire configured database evenly.
terminalWarehouseFixed=false
//The following five values must add up to 100
//The default percentages of 45, 43, 4, 4 & 4 match the TPC-C spec
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
// Directory name to create for collecting detailed result data.
// Comment this out to suppress.
//resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
//osCollectorScript=./misc/os_collector_linux.py
//osCollectorInterval=1
//osCollectorSSHAddr=user@dbhost
//osCollectorDevices=net_eth0 blk_sda
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run #
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # ./runBenchmark.sh props.sharding
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
15:11:40,832 [main] INFO jTPCC : Term-00,
15:11:40,835 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,835 [main] INFO jTPCC : Term-00, BenchmarkSQL v5.0
15:11:40,835 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,836 [main] INFO jTPCC : Term-00, (c) 2003, Raul Barbosa
15:11:40,836 [main] INFO jTPCC : Term-00, (c) 2004-2016, Denis Lussier
15:11:40,838 [main] INFO jTPCC : Term-00, (c) 2016, Jan Wieck
15:11:40,838 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,838 [main] INFO jTPCC : Term-00,
15:11:40,839 [main] INFO jTPCC : Term-00, db=postgres
15:11:40,839 [main] INFO jTPCC : Term-00, driver=org.postgresql.Driver
15:11:40,839 [main] INFO jTPCC : Term-00, conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:40,839 [main] INFO jTPCC : Term-00, user=root
15:11:40,839 [main] INFO jTPCC : Term-00,
15:11:40,840 [main] INFO jTPCC : Term-00, warehouses=10
15:11:40,840 [main] INFO jTPCC : Term-00, terminals=10
15:11:40,842 [main] INFO jTPCC : Term-00, runMins=60
15:11:40,842 [main] INFO jTPCC : Term-00, limitTxnsPerMin=0
15:11:40,842 [main] INFO jTPCC : Term-00, terminalWarehouseFixed=false
15:11:40,842 [main] INFO jTPCC : Term-00,
15:11:40,843 [main] INFO jTPCC : Term-00, newOrderWeight=45
15:11:40,843 [main] INFO jTPCC : Term-00, paymentWeight=43
15:11:40,843 [main] INFO jTPCC : Term-00, orderStatusWeight=4
15:11:40,843 [main] INFO jTPCC : Term-00, deliveryWeight=4
15:11:40,843 [main] INFO jTPCC : Term-00, stockLevelWeight=4
15:11:40,843 [main] INFO jTPCC : Term-00,
15:11:40,844 [main] INFO jTPCC : Term-00, resultDirectory=null
15:11:40,844 [main] INFO jTPCC : Term-00, osCollectorScript=null
15:11:40,844 [main] INFO jTPCC : Term-00,
15:11:40,867 [main] INFO jTPCC : Term-00, config=null
15:11:40,868 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,080 [main] INFO jTPCC : Term-00, C value for C_LAST during load: 184
15:11:41,080 [main] INFO jTPCC : Term-00, C value for C_LAST this run: 90
15:11:41,080 [main] INFO jTPCC : Term-00, 15:11:41,085 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,108 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,128 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,151 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,175 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,200 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,224 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,243 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,262 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off
15:11:41,285 [main] INFO ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&batchMode=on&fetchsize=10&loggerLevel=off 15:12:19,631 [Thread-10] ERROR jTPCCTData : Unexpected SQLException in PAYMENTUsage: 70MB / 960MB
15:12:19,632 [Thread-10] ERROR jTPCCTData : [90.90.169.34:40422/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
15:12:19,632 [Thread-9] ERROR jTPCCTData : Unexpected SQLException in PAYMENT
15:12:19,632 [Thread-7] ERROR jTPCCTData : Unexpected SQLException in NEW_ORDER
org.postgresql.util.PSQLException: [90.90.169.34:40422/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
15:12:19,632 [Thread-7] ERROR jTPCCTData : [90.90.169.34:40416/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
at jTPCCTData.executePayment(jTPCCTData.java:786)
at jTPCCTData.execute(jTPCCTData.java:93)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
15:12:19,631 [Thread-4] ERROR jTPCCTData : Unexpected SQLException in NEW_ORDER
15:12:19,633 [Thread-4] ERROR jTPCCTData : [90.90.169.34:40410/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
org.postgresql.util.PSQLException: [90.90.169.34:40410/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
at jTPCCTData.executeNewOrder(jTPCCTData.java:456)
at jTPCCTData.execute(jTPCCTData.java:89)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:231)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
org.postgresql.util.PSQLException: [90.90.169.34:40416/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
at jTPCCTData.executeNewOrder(jTPCCTData.java:456)
at jTPCCTData.execute(jTPCCTData.java:89)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:231)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
15:12:19,632 [Thread-5] ERROR jTPCCTData : Unexpected SQLException in PAYMENT
15:12:19,634 [Thread-5] ERROR jTPCCTData : [90.90.169.34:40412/90.90.169.84:3307] ERROR: [90.90.169.84:33786/90.90.169.82:15400] socket is not closed; Urgent packet sent to backend successfully; An I/O error occured while sending to the backend.detail:EOF Exception;
org.postgresql.util.PSQLException: [90.90.169.34:40412/90.90.169.84:3307] ERROR: [90.90.169.84:33786/90.90.169.82:15400] socket is not closed; Urgent packet sent to backend successfully; An I/O error occured while sending to the backend.detail:EOF Exception;
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
15:12:19,632 [Thread-9] ERROR jTPCCTData : [90.90.169.34:40420/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:126)
at jTPCCTData.executePayment(jTPCCTData.java:741)
at jTPCCTData.execute(jTPCCTData.java:93)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
org.postgresql.util.PSQLException: [90.90.169.34:40420/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
at jTPCCTData.executePayment(jTPCCTData.java:786)
at jTPCCTData.execute(jTPCCTData.java:93)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
15:12:19,635 [Thread-10] FATAL jTPCCTerminal :
java.lang.NullPointerException
at jTPCCTData.tracePayment(jTPCCTData.java:952)
at jTPCCTData.traceScreen(jTPCCTData.java:178)
at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:152)
at jTPCCTerminal.run(jTPCCTerminal.java:86)
at java.lang.Thread.run(Thread.java:748)
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run #
</code></pre></div>
<p dir="auto">Shardingsphere-proxy:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[omm@sharding01 conf]$ pwd
/home/omm/apache-shardingsphere-5.0.0-RC1-SNAPSHOT-shardingsphere-proxy-bin/conf
[omm@sharding01 conf]$ ll
total 68K
-rwxrwxrwx 1 omm dbgrp 4.1K Sep 6 10:31 config-database-discovery.yaml
-rwxrwxrwx 1 omm dbgrp 3.0K Sep 6 10:31 config-encrypt.yaml
-rwxrwxrwx 1 omm dbgrp 3.7K Sep 6 10:31 config-readwrite-splitting.yaml
-rwxrwxrwx 1 omm dbgrp 3.0K Sep 6 10:31 config-shadow.yaml
-rwxrwxrwx 1 omm dbgrp 7.7K Sep 17 14:54 config-sharding.yaml
-rwxrwxrwx 1 omm dbgrp 7.6K Sep 11 11:29 config-sharding.yaml.20210916
-rwxrwxrwx 1 omm dbgrp 7.6K Sep 11 11:29 config-sharding.yaml.4pcs
-rwxrwxrwx 1 omm dbgrp 5.3K Sep 6 10:31 config-sharding.yaml.bak
-rwxrwxrwx 1 omm dbgrp 1.4K Sep 13 17:24 logback.xml
-rwxrwxrwx 1 omm dbgrp 1.4K Sep 6 10:31 logback.xml.bak
-rwxrwxrwx 1 omm dbgrp 2.4K Sep 15 10:34 server.yaml
-rwxrwxrwx 1 omm dbgrp 2.4K Sep 11 09:47 server.yaml.bak
[omm@sharding01 conf]$
[omm@sharding01 conf]$
[omm@sharding01 conf]$ cat config-sharding.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
######################################################################################################
#
# Here you can configure the rules for the proxy.
# This example is configuration of sharding rule.
#
######################################################################################################
schemaName: sharding_db
dataSources:
ds_0:
# url: jdbc:postgresql://90.90.169.81:15400/tpccdb?serverTimezone=UTC&useSSL=false
url: jdbc:opengauss://90.90.169.81:15400/tpccdb?serverTimezone=UTC&useSSL=false
username: tpcc
password: Huawei_123
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 2000
minPoolSize: 900
ds_1:
# url: jdbc:postgresql://90.90.169.82:15400/tpccdb?serverTimezone=UTC&useSSL=false
url: jdbc:opengauss://90.90.169.82:15400/tpccdb?serverTimezone=UTC&useSSL=false
username: tpcc
password: Huawei_123
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 2000
minPoolSize: 900
rules:
- !SHARDING
tables:
bmsql_config:
actualDataNodes: ds_${0..1}.bmsql_config
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_config_inline
shardingColumn: cfg_id
bmsql_customer:
actualDataNodes: ds_${0..1}.bmsql_customer
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_customer_inline
shardingColumn: c_w_id
bmsql_district:
actualDataNodes: ds_${0..1}.bmsql_district
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_district_inline
shardingColumn: d_w_id
bmsql_history:
actualDataNodes: ds_${0..1}.bmsql_history
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_history_inline
shardingColumn: h_w_id
bmsql_item:
actualDataNodes: ds_${0..1}.bmsql_item
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_item_inline
shardingColumn: i_id
bmsql_new_order:
actualDataNodes: ds_${0..1}.bmsql_new_order
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_new_order_inline
shardingColumn: no_w_id
bmsql_oorder:
actualDataNodes: ds_${0..1}.bmsql_oorder
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_oorder_inline
shardingColumn: o_w_id
bmsql_order_line:
actualDataNodes: ds_${0..1}.bmsql_order_line
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_order_line_inline
shardingColumn: ol_w_id
bmsql_stock:
actualDataNodes: ds_${0..1}.bmsql_stock
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_stock_inline
shardingColumn: s_w_id
bmsql_warehouse:
actualDataNodes: ds_${0..1}.bmsql_warehouse
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_warehouse_inline
shardingColumn: w_id
bindingTables:
- bmsql_warehouse, bmsql_customer
- bmsql_stock, bmsql_district, bmsql_order_line
defaultDatabaseStrategy:
none: null
defaultTableStrategy:
none: null
shardingAlgorithms:
database_inline:
props:
algorithm-expression: ds_${user_id % 2}
type: INLINE
ds_bmsql_config_inline:
props:
algorithm-expression: ds_${cfg_id % 2}
type: INLINE
ds_bmsql_customer_inline:
props:
algorithm-expression: ds_${c_w_id % 2}
type: INLINE
ds_bmsql_district_inline:
props:
algorithm-expression: ds_${d_w_id % 2}
type: INLINE
ds_bmsql_history_inline:
props:
algorithm-expression: ds_${h_w_id % 2}
type: INLINE
ds_bmsql_item_inline:
props:
algorithm-expression: ds_${i_id % 2}
type: INLINE
ds_bmsql_new_order_inline:
props:
algorithm-expression: ds_${no_w_id % 2}
type: INLINE
ds_bmsql_oorder_inline:
props:
algorithm-expression: ds_${o_w_id % 2}
type: INLINE
ds_bmsql_order_line_inline:
props:
algorithm-expression: ds_${ol_w_id % 2}
type: INLINE
ds_bmsql_stock_inline:
props:
algorithm-expression: ds_${s_w_id % 2}
type: INLINE
ds_bmsql_warehouse_inline:
props:
algorithm-expression: ds_${w_id % 2}
type: INLINE
keyGenerators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
######################################################################################################
#
# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
#
######################################################################################################
#schemaName: sharding_db
#
#dataSources:
# ds_0:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
# minPoolSize: 1
# ds_1:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
# minPoolSize: 1
#
#rules:
#- !SHARDING
# tables:
# t_order:
# actualDataNodes: ds_${0..1}.t_order_${0..1}
# tableStrategy:
# standard:
# shardingColumn: order_id
# shardingAlgorithmName: t_order_inline
# keyGenerateStrategy:
# column: order_id
# keyGeneratorName: snowflake
# t_order_item:
# actualDataNodes: ds_${0..1}.t_order_item_${0..1}
# tableStrategy:
# standard:
# shardingColumn: order_id
# shardingAlgorithmName: t_order_item_inline
# keyGenerateStrategy:
# column: order_item_id
# keyGeneratorName: snowflake
# bindingTables:
# - t_order,t_order_item
# defaultDatabaseStrategy:
# standard:
# shardingColumn: user_id
# shardingAlgorithmName: database_inline
# defaultTableStrategy:
# none:
#
# shardingAlgorithms:
# database_inline:
# type: INLINE
# props:
# algorithm-expression: ds_${user_id % 2}
# t_order_inline:
# type: INLINE
# props:
# algorithm-expression: t_order_${order_id % 2}
# t_order_item_inline:
# type: INLINE
# props:
# algorithm-expression: t_order_item_${order_id % 2}
#
# keyGenerators:
# snowflake:
# type: SNOWFLAKE
# props:
# worker-id: 123
[omm@sharding01 conf]$
[omm@sharding01 conf]$ cat server.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
######################################################################################################
#
# If you want to configure governance, authorization and proxy properties, please refer to this file.
#
######################################################################################################
#mode:
# type: Cluster
# repository:
# type: ZooKeeper
# props:
# namespace: governance_ds
# server-lists: localhost:2181
# retryIntervalMilliseconds: 500
# timeToLiveSeconds: 60
# maxRetries: 3
# operationTimeoutMilliseconds: 500
# overwrite: false
rules:
- !AUTHORITY
users:
- root@%:root
- sharding@:sharding
provider:
type: ALL_PRIVILEGES_PERMITTED
# - !TRANSACTION
# defaultType: XA
# providerType: Atomikos
#scaling:
# blockQueueSize: 10000
# workerThread: 40
# clusterAutoSwitchAlgorithm:
# type: IDLE
# props:
# incremental-task-idle-minute-threshold: 30
props:
max-connections-size-per-query: 1
executor-size: 16 # Infinite by default.
proxy-frontend-flush-threshold: 128 # The default value is 128.
proxy-opentracing-enabled: false
proxy-hint-enabled: false
sql-show: true
check-table-metadata-enabled: false
lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
# Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
# The default value is -1, which means set the minimum value for different JDBC drivers.
proxy-backend-query-fetch-size: -1
check-duplicate-table-enabled: false
[omm@sharding01 conf]$"><pre class="notranslate"><code class="notranslate">[omm@sharding01 conf]$ pwd
/home/omm/apache-shardingsphere-5.0.0-RC1-SNAPSHOT-shardingsphere-proxy-bin/conf
[omm@sharding01 conf]$ ll
total 68K
-rwxrwxrwx 1 omm dbgrp 4.1K Sep 6 10:31 config-database-discovery.yaml
-rwxrwxrwx 1 omm dbgrp 3.0K Sep 6 10:31 config-encrypt.yaml
-rwxrwxrwx 1 omm dbgrp 3.7K Sep 6 10:31 config-readwrite-splitting.yaml
-rwxrwxrwx 1 omm dbgrp 3.0K Sep 6 10:31 config-shadow.yaml
-rwxrwxrwx 1 omm dbgrp 7.7K Sep 17 14:54 config-sharding.yaml
-rwxrwxrwx 1 omm dbgrp 7.6K Sep 11 11:29 config-sharding.yaml.20210916
-rwxrwxrwx 1 omm dbgrp 7.6K Sep 11 11:29 config-sharding.yaml.4pcs
-rwxrwxrwx 1 omm dbgrp 5.3K Sep 6 10:31 config-sharding.yaml.bak
-rwxrwxrwx 1 omm dbgrp 1.4K Sep 13 17:24 logback.xml
-rwxrwxrwx 1 omm dbgrp 1.4K Sep 6 10:31 logback.xml.bak
-rwxrwxrwx 1 omm dbgrp 2.4K Sep 15 10:34 server.yaml
-rwxrwxrwx 1 omm dbgrp 2.4K Sep 11 09:47 server.yaml.bak
[omm@sharding01 conf]$
[omm@sharding01 conf]$
[omm@sharding01 conf]$ cat config-sharding.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
######################################################################################################
#
# Here you can configure the rules for the proxy.
# This example is configuration of sharding rule.
#
######################################################################################################
schemaName: sharding_db
dataSources:
ds_0:
# url: jdbc:postgresql://90.90.169.81:15400/tpccdb?serverTimezone=UTC&useSSL=false
url: jdbc:opengauss://90.90.169.81:15400/tpccdb?serverTimezone=UTC&useSSL=false
username: tpcc
password: Huawei_123
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 2000
minPoolSize: 900
ds_1:
# url: jdbc:postgresql://90.90.169.82:15400/tpccdb?serverTimezone=UTC&useSSL=false
url: jdbc:opengauss://90.90.169.82:15400/tpccdb?serverTimezone=UTC&useSSL=false
username: tpcc
password: Huawei_123
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 2000
minPoolSize: 900
rules:
- !SHARDING
tables:
bmsql_config:
actualDataNodes: ds_${0..1}.bmsql_config
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_config_inline
shardingColumn: cfg_id
bmsql_customer:
actualDataNodes: ds_${0..1}.bmsql_customer
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_customer_inline
shardingColumn: c_w_id
bmsql_district:
actualDataNodes: ds_${0..1}.bmsql_district
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_district_inline
shardingColumn: d_w_id
bmsql_history:
actualDataNodes: ds_${0..1}.bmsql_history
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_history_inline
shardingColumn: h_w_id
bmsql_item:
actualDataNodes: ds_${0..1}.bmsql_item
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_item_inline
shardingColumn: i_id
bmsql_new_order:
actualDataNodes: ds_${0..1}.bmsql_new_order
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_new_order_inline
shardingColumn: no_w_id
bmsql_oorder:
actualDataNodes: ds_${0..1}.bmsql_oorder
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_oorder_inline
shardingColumn: o_w_id
bmsql_order_line:
actualDataNodes: ds_${0..1}.bmsql_order_line
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_order_line_inline
shardingColumn: ol_w_id
bmsql_stock:
actualDataNodes: ds_${0..1}.bmsql_stock
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_stock_inline
shardingColumn: s_w_id
bmsql_warehouse:
actualDataNodes: ds_${0..1}.bmsql_warehouse
databaseStrategy:
standard:
shardingAlgorithmName: ds_bmsql_warehouse_inline
shardingColumn: w_id
bindingTables:
- bmsql_warehouse, bmsql_customer
- bmsql_stock, bmsql_district, bmsql_order_line
defaultDatabaseStrategy:
none: null
defaultTableStrategy:
none: null
shardingAlgorithms:
database_inline:
props:
algorithm-expression: ds_${user_id % 2}
type: INLINE
ds_bmsql_config_inline:
props:
algorithm-expression: ds_${cfg_id % 2}
type: INLINE
ds_bmsql_customer_inline:
props:
algorithm-expression: ds_${c_w_id % 2}
type: INLINE
ds_bmsql_district_inline:
props:
algorithm-expression: ds_${d_w_id % 2}
type: INLINE
ds_bmsql_history_inline:
props:
algorithm-expression: ds_${h_w_id % 2}
type: INLINE
ds_bmsql_item_inline:
props:
algorithm-expression: ds_${i_id % 2}
type: INLINE
ds_bmsql_new_order_inline:
props:
algorithm-expression: ds_${no_w_id % 2}
type: INLINE
ds_bmsql_oorder_inline:
props:
algorithm-expression: ds_${o_w_id % 2}
type: INLINE
ds_bmsql_order_line_inline:
props:
algorithm-expression: ds_${ol_w_id % 2}
type: INLINE
ds_bmsql_stock_inline:
props:
algorithm-expression: ds_${s_w_id % 2}
type: INLINE
ds_bmsql_warehouse_inline:
props:
algorithm-expression: ds_${w_id % 2}
type: INLINE
keyGenerators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
######################################################################################################
#
# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
#
######################################################################################################
#schemaName: sharding_db
#
#dataSources:
# ds_0:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
# minPoolSize: 1
# ds_1:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
# minPoolSize: 1
#
#rules:
#- !SHARDING
# tables:
# t_order:
# actualDataNodes: ds_${0..1}.t_order_${0..1}
# tableStrategy:
# standard:
# shardingColumn: order_id
# shardingAlgorithmName: t_order_inline
# keyGenerateStrategy:
# column: order_id
# keyGeneratorName: snowflake
# t_order_item:
# actualDataNodes: ds_${0..1}.t_order_item_${0..1}
# tableStrategy:
# standard:
# shardingColumn: order_id
# shardingAlgorithmName: t_order_item_inline
# keyGenerateStrategy:
# column: order_item_id
# keyGeneratorName: snowflake
# bindingTables:
# - t_order,t_order_item
# defaultDatabaseStrategy:
# standard:
# shardingColumn: user_id
# shardingAlgorithmName: database_inline
# defaultTableStrategy:
# none:
#
# shardingAlgorithms:
# database_inline:
# type: INLINE
# props:
# algorithm-expression: ds_${user_id % 2}
# t_order_inline:
# type: INLINE
# props:
# algorithm-expression: t_order_${order_id % 2}
# t_order_item_inline:
# type: INLINE
# props:
# algorithm-expression: t_order_item_${order_id % 2}
#
# keyGenerators:
# snowflake:
# type: SNOWFLAKE
# props:
# worker-id: 123
[omm@sharding01 conf]$
[omm@sharding01 conf]$ cat server.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
######################################################################################################
#
# If you want to configure governance, authorization and proxy properties, please refer to this file.
#
######################################################################################################
#mode:
# type: Cluster
# repository:
# type: ZooKeeper
# props:
# namespace: governance_ds
# server-lists: localhost:2181
# retryIntervalMilliseconds: 500
# timeToLiveSeconds: 60
# maxRetries: 3
# operationTimeoutMilliseconds: 500
# overwrite: false
rules:
- !AUTHORITY
users:
- root@%:root
- sharding@:sharding
provider:
type: ALL_PRIVILEGES_PERMITTED
# - !TRANSACTION
# defaultType: XA
# providerType: Atomikos
#scaling:
# blockQueueSize: 10000
# workerThread: 40
# clusterAutoSwitchAlgorithm:
# type: IDLE
# props:
# incremental-task-idle-minute-threshold: 30
props:
max-connections-size-per-query: 1
executor-size: 16 # Infinite by default.
proxy-frontend-flush-threshold: 128 # The default value is 128.
proxy-opentracing-enabled: false
proxy-hint-enabled: false
sql-show: true
check-table-metadata-enabled: false
lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
# Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
# The default value is -1, which means set the minimum value for different JDBC drivers.
proxy-backend-query-fetch-size: -1
check-duplicate-table-enabled: false
[omm@sharding01 conf]$
</code></pre></div>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | 0 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
^
Error: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?
at NodePath.insertBefore (node_modules/@babel/traverse/lib/path/modification.js:57:11)
at PluginPass.Class (node_modules/@babel/plugin-proposal-class-properties/lib/index.js:475:14)
at newFn (node_modules/@babel/traverse/lib/visitors.js:193:21)
at NodePath._call (node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (node_modules/@babel/traverse/lib/path/context.js:88:12)
at TraversalContext.visitQueue (node_modules/@babel/traverse/lib/context.js:118:16)
at TraversalContext.visitSingle (node_modules/@babel/traverse/lib/context.js:90:19)
at TraversalContext.visit (node_modules/@babel/traverse/lib/context.js:146:19)
at Function.traverse.node (node_modules/@babel/traverse/lib/index.js:94:17)"><pre class="notranslate"><code class="notranslate"> throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
^
Error: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?
at NodePath.insertBefore (node_modules/@babel/traverse/lib/path/modification.js:57:11)
at PluginPass.Class (node_modules/@babel/plugin-proposal-class-properties/lib/index.js:475:14)
at newFn (node_modules/@babel/traverse/lib/visitors.js:193:21)
at NodePath._call (node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (node_modules/@babel/traverse/lib/path/context.js:88:12)
at TraversalContext.visitQueue (node_modules/@babel/traverse/lib/context.js:118:16)
at TraversalContext.visitSingle (node_modules/@babel/traverse/lib/context.js:90:19)
at TraversalContext.visit (node_modules/@babel/traverse/lib/context.js:146:19)
at Function.traverse.node (node_modules/@babel/traverse/lib/index.js:94:17)
</code></pre></div>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from "react";
export class App extends React.Component {
constructor(props) { super(props); }
f = () => { const { props } = this; }
static g = () => null;
render() { return null; }
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">"react"</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">App</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-c1">f</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> props <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-k">static</span> <span class="pl-c1">g</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-c1">null</span><span class="pl-kos">;</span>
<span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">null</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
Errors out in babel 7 b45+, works in babel 77 b44.<br>
Also, babel is very preculiar when repoing this error. if you try to change the code a little bit more, eg removing f or g, removing export call, remove constructor or contents of f etc etc the error probably goes away.</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong><br>
./node_modules/.bin/babel-node src/index.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""@babel/core": "7.0.0-beta.49",
"@babel/preset-env": "7.0.0-beta.49",
"@babel/preset-react": "7.0.0-beta.49",
"@babel/node": "7.0.0-beta.49",
"@babel/runtime": "7.0.0-beta.49","><pre class="notranslate"><span class="pl-s">"@babel/core"</span>: <span class="pl-s">"7.0.0-beta.49"</span><span class="pl-kos">,</span>
<span class="pl-s">"@babel/preset-env"</span>: <span class="pl-s">"7.0.0-beta.49"</span><span class="pl-kos">,</span>
<span class="pl-s">"@babel/preset-react"</span>: <span class="pl-s">"7.0.0-beta.49"</span><span class="pl-kos">,</span>
<span class="pl-s">"@babel/node"</span>: <span class="pl-s">"7.0.0-beta.49"</span><span class="pl-kos">,</span>
<span class="pl-s">"@babel/runtime"</span>: <span class="pl-s">"7.0.0-beta.49"</span><span class="pl-kos">,</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"presets": [
"@babel/env",
"@babel/preset-react",
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}"><pre class="notranslate"><code class="notranslate">{
"presets": [
"@babel/env",
"@babel/preset-react",
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
</code></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): v7.0.0-beta.49</li>
<li>Node/npm version: Node 8.9.3/npm 6</li>
<li>OS: OSX 10.13.4</li>
<li>Monorepo no</li>
<li>How you are using Babel: cli</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
works in babel 7 b44</p> | <p dir="auto">I'm reporting an error I get for every React component exported after I upgraded to @babel/*@^7.0.0-beta.37:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in ./apps/visitor/components/List.js
Module build failed: Error: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?"><pre class="notranslate"><code class="notranslate">ERROR in ./apps/visitor/components/List.js
Module build failed: Error: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?
</code></pre></div>
<p dir="auto">I already checked this out <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="284884939" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/7122" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/7122/hovercard" href="https://github.com/babel/babel/issues/7122">#7122</a> where the problem was a version mismatch but it does not seem my case.</p>
<p dir="auto">Babel config in package.json:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""babel": {
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"useBuiltIns": "usage",
"debug": true
}
],
"@babel/preset-stage-0",
"@babel/preset-react"
],
"plugins": [
"lodash",
"@babel/plugin-proposal-decorators",
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
]
},"><pre class="notranslate"><code class="notranslate">"babel": {
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"useBuiltIns": "usage",
"debug": true
}
],
"@babel/preset-stage-0",
"@babel/preset-react"
],
"plugins": [
"lodash",
"@babel/plugin-proposal-decorators",
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
]
},
</code></pre></div>
<p dir="auto">Dependencies version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""devDependencies": {
"@babel/core": "^7.0.0-beta.37",
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.37",
"@babel/plugin-proposal-decorators": "7.0.0-beta.37",
"@babel/polyfill": "^7.0.0-beta.37",
"@babel/preset-env": "^7.0.0-beta.37",
"@babel/preset-react": "^7.0.0-beta.37",
"@babel/preset-stage-0": "^7.0.0-beta.37",
"babel-eslint": "8.2.1",
"babel-jest": "22.0.4",
"babel-loader": "8.0.0-beta.0",
"babel-minify-webpack-plugin": "0.2.0",
"babel-plugin-lodash": "3.3.2",
...
}"><pre class="notranslate"><code class="notranslate">"devDependencies": {
"@babel/core": "^7.0.0-beta.37",
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.37",
"@babel/plugin-proposal-decorators": "7.0.0-beta.37",
"@babel/polyfill": "^7.0.0-beta.37",
"@babel/preset-env": "^7.0.0-beta.37",
"@babel/preset-react": "^7.0.0-beta.37",
"@babel/preset-stage-0": "^7.0.0-beta.37",
"babel-eslint": "8.2.1",
"babel-jest": "22.0.4",
"babel-loader": "8.0.0-beta.0",
"babel-minify-webpack-plugin": "0.2.0",
"babel-plugin-lodash": "3.3.2",
...
}
</code></pre></div>
<p dir="auto">Thanks for the amazing work on this project as always 💪🏻</p> | 1 |
<p dir="auto">Hi,<br>
Hope everyone is ok</p>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">In Chrome V68, everything is ok but the problem is with the Chrome used by Google Bot.<br>
In fact, in my home page, after building the home page, the title is automatically replaced by ": An unexpected error has occured".<br>
You definetely need to go over "to reproduce and dem section"</p>
<h2 dir="auto">To Reproduce & Dem</h2>
<p dir="auto">You need to go to <a href="https://www.browserling.com/browse/win/7/chrome/41/https://en.vetolib.vet" rel="nofollow">https://www.browserling.com/browse/win/7/chrome/41/https://en.vetolib.vet</a> and observe the title.<br>
The other page are totally OK.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>NextJs 6.1.1</li>
<li>Node.JS 8.11.1</li>
<li>Nginx AWS Server</li>
</ul>
<h2 dir="auto">My Code</h2>
<p dir="auto">document.js :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" `<html lang={process.env.LANGUAGECODE}>
<Head>
{/*Meta tag for every page*/}
{/* <meta charSet="utf-8" /> */}
{/* Use minimum-scale=1 to enable GPU rasterization */}
<meta name="viewport" content={'user-scalable=0, initial-scale=1, ' + 'minimum-scale=1, width=device-width, height=device-height'}/>
{/* PWA primary color */}
<meta name="theme-color" content={pageContext.theme.palette.primary.main} />
{/* Links*/}
<link rel="stylesheet" href="/_next/static/style.css" />
<link rel="shortcut icon" href="/static/favicon.ico" />
<link rel="stylesheet" href="https://cdn.rawgit.com/h-ibaldo/Raleway_Fixed_Numerals/master/css/rawline.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
{/* Comfortaa Logo Font */}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Comfortaa" />
{/* GOOGLE SEARCH CONSOLE */}
<meta name="google-site-verification" content={process.env.GOOGLESEARCHCONSOLE} />
</Head>
<body>
<Main />
<NextScript />
</body>
</html>`"><pre class="notranslate"><code class="notranslate"> `<html lang={process.env.LANGUAGECODE}>
<Head>
{/*Meta tag for every page*/}
{/* <meta charSet="utf-8" /> */}
{/* Use minimum-scale=1 to enable GPU rasterization */}
<meta name="viewport" content={'user-scalable=0, initial-scale=1, ' + 'minimum-scale=1, width=device-width, height=device-height'}/>
{/* PWA primary color */}
<meta name="theme-color" content={pageContext.theme.palette.primary.main} />
{/* Links*/}
<link rel="stylesheet" href="/_next/static/style.css" />
<link rel="shortcut icon" href="/static/favicon.ico" />
<link rel="stylesheet" href="https://cdn.rawgit.com/h-ibaldo/Raleway_Fixed_Numerals/master/css/rawline.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
{/* Comfortaa Logo Font */}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Comfortaa" />
{/* GOOGLE SEARCH CONSOLE */}
<meta name="google-site-verification" content={process.env.GOOGLESEARCHCONSOLE} />
</Head>
<body>
<Main />
<NextScript />
</body>
</html>`
</code></pre></div>
<p dir="auto">landing.js (actually it's the home page)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import LandingMeta from 'landing/landingMeta';
return (
<I18nextProvider i18n={Local(props.translations,props.language)}>
<div>
<LandingMeta/>
<CookiesStateConnector/>
<GlobalSnackbar/>
<NavBar fixed/>
<Opener/>
<HowTo />
<Footer />
</div>
</I18nextProvider>
);"><pre class="notranslate"><code class="notranslate">import LandingMeta from 'landing/landingMeta';
return (
<I18nextProvider i18n={Local(props.translations,props.language)}>
<div>
<LandingMeta/>
<CookiesStateConnector/>
<GlobalSnackbar/>
<NavBar fixed/>
<Opener/>
<HowTo />
<Footer />
</div>
</I18nextProvider>
);
</code></pre></div>
<p dir="auto">And the famous LandingMeta.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" return (
<Head>
{/*Meta tag That can change on some pages (use a key to avoid duplication)*/}
<title key="title" >Vetolib : Make An online appointment</title>
{/*A brief description of the page.*/}
<meta key="description" name="description" content={`${t('meta:metaOgTitle')} ${t('meta:metaOgDescription')}`} />
{/*A series of keywords you deem relevant to the page in question.*/}
<meta key="keywords" name="keywords" content={t('meta:metaKeyWords')} />
{/*An indication to search engine crawlers (robots or "bots") as to what they should do with the page.*/}
<meta key="robots" name="robots" content="index,follow" />
</Head>
);"><pre class="notranslate"><code class="notranslate"> return (
<Head>
{/*Meta tag That can change on some pages (use a key to avoid duplication)*/}
<title key="title" >Vetolib : Make An online appointment</title>
{/*A brief description of the page.*/}
<meta key="description" name="description" content={`${t('meta:metaOgTitle')} ${t('meta:metaOgDescription')}`} />
{/*A series of keywords you deem relevant to the page in question.*/}
<meta key="keywords" name="keywords" content={t('meta:metaKeyWords')} />
{/*An indication to search engine crawlers (robots or "bots") as to what they should do with the page.*/}
<meta key="robots" name="robots" content="index,follow" />
</Head>
);
</code></pre></div>
<p dir="auto">Thank you so much for your help</p> | <h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">I have 3 different websites served by next.js and some random pages are being indexed on google with title as ": An unexpected error has occurred - My website name" but everything looks fine with the title tag when opening page's source</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Have no idea, since the error only appears when indexed by google, but you can see it wrong with these website:<br>
site:brasilmaplestory.com<br>
just google it ^</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">No error message at page's title</p>
<h2 dir="auto">Screenshots</h2>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>Version of Next.js: 6.1.1</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">How do I use the title tag:</p>
<h3 dir="auto">page.jsx</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<PageLayout title={`CashShop | ${websiteName`}>
.... Page content
</PageLayout>"><pre class="notranslate"><span class="pl-c1"><</span><span class="pl-v">PageLayout</span> <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-kos">{</span>`CashShop | ${<span class="pl-s1">websiteName</span>`<span class="pl-kos">}</span><span class="pl-c1">></span>
...<span class="pl-kos">.</span> <span class="pl-c1">Page</span> <span class="pl-s1">content</span>
<span class="pl-c1"><</span><span class="pl-c1">/</span>PageLayout></pre></div>
<h3 dir="auto">PageLayout.jsx</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const PageLayout = ({
title,
...
}) => (
<div>
<Head>
<meta charSet="UTF-8" />
<title>{title}</title>
........
</Head>
</div>
);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-v">PageLayout</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">{</span>
title<span class="pl-kos">,</span>
...
<span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">(</span>
<span class="pl-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">Head</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">meta</span> <span class="pl-c1">charSet</span><span class="pl-c1">=</span><span class="pl-s">"UTF-8"</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">title</span><span class="pl-c1">></span><span class="pl-kos">{</span><span class="pl-s1">title</span><span class="pl-kos">}</span><span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">title</span><span class="pl-c1">></span>
........
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">Head</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 1 |
<p dir="auto">Hi everyone,</p>
<p dir="auto">I've found a nasty memory leak while using <code class="notranslate">np.random.shuffle</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
@profile
def shuffle_leaktest():
x = np.random.randn(1000, 1000)
for ii in xrange(1000):
np.random.shuffle(x)
del x
if __name__ == '__main__':
print "numpy version: " + np.__version__
shuffle_leaktest()"><pre class="notranslate"><code class="notranslate">import numpy as np
@profile
def shuffle_leaktest():
x = np.random.randn(1000, 1000)
for ii in xrange(1000):
np.random.shuffle(x)
del x
if __name__ == '__main__':
print "numpy version: " + np.__version__
shuffle_leaktest()
</code></pre></div>
<p dir="auto"><code class="notranslate">$ python -m memory_profiler shuffle_leaktest.py</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="numpy version: 1.9.0.dev-fae89b0
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 110.535 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 118.195 MiB 7.660 MiB x = np.random.randn(1000, 1000)
6 337.770 MiB 219.574 MiB for ii in xrange(1000):
7 337.770 MiB 0.000 MiB np.random.shuffle(x)
8 337.770 MiB 0.000 MiB del x"><pre class="notranslate"><code class="notranslate">numpy version: 1.9.0.dev-fae89b0
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 110.535 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 118.195 MiB 7.660 MiB x = np.random.randn(1000, 1000)
6 337.770 MiB 219.574 MiB for ii in xrange(1000):
7 337.770 MiB 0.000 MiB np.random.shuffle(x)
8 337.770 MiB 0.000 MiB del x
</code></pre></div>
<p dir="auto">Using <code class="notranslate">git bisect</code> I've tracked down the first instance of memory leakage to commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/numpy/numpy/commit/607863d7387e80dab4b064856b598a8c86e9bee4/hovercard" href="https://github.com/numpy/numpy/commit/607863d7387e80dab4b064856b598a8c86e9bee4"><tt>607863d</tt></a>.</p>
<p dir="auto">No leak:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" numpy version: 1.9.0.dev-c7a30d5
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 103.633 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 111.285 MiB 7.652 MiB x = np.random.randn(1000, 1000)
6 111.305 MiB 0.020 MiB for ii in xrange(1000):
7 111.305 MiB 0.000 MiB np.random.shuffle(x)
8 103.672 MiB -7.633 MiB del x"><pre class="notranslate"><code class="notranslate"> numpy version: 1.9.0.dev-c7a30d5
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 103.633 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 111.285 MiB 7.652 MiB x = np.random.randn(1000, 1000)
6 111.305 MiB 0.020 MiB for ii in xrange(1000):
7 111.305 MiB 0.000 MiB np.random.shuffle(x)
8 103.672 MiB -7.633 MiB del x
</code></pre></div>
<p dir="auto">Leak:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" numpy version: 1.9.0.dev-607863d
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 112.664 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 120.316 MiB 7.652 MiB x = np.random.randn(1000, 1000)
6 183.031 MiB 62.715 MiB for ii in xrange(1000):
7 183.031 MiB 0.000 MiB np.random.shuffle(x)
8 175.398 MiB -7.633 MiB del x"><pre class="notranslate"><code class="notranslate"> numpy version: 1.9.0.dev-607863d
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 112.664 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 120.316 MiB 7.652 MiB x = np.random.randn(1000, 1000)
6 183.031 MiB 62.715 MiB for ii in xrange(1000):
7 183.031 MiB 0.000 MiB np.random.shuffle(x)
8 175.398 MiB -7.633 MiB del x
</code></pre></div>
<p dir="auto">However, this leak seems to be much less pronounced than the one I'm currently seeing in master. It seems that things suddenly got a lot worse with commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/numpy/numpy/commit/9f8771accdc11a83dc928a99bd0ba48fe7bcca89/hovercard" href="https://github.com/numpy/numpy/commit/9f8771accdc11a83dc928a99bd0ba48fe7bcca89"><tt>9f8771a</tt></a>:</p>
<p dir="auto">Small leak:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" numpy version: 1.9.0.dev-f57c77b
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 87.219 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 94.871 MiB 7.652 MiB x = np.random.randn(1000, 1000)
6 157.789 MiB 62.918 MiB for ii in xrange(1000):
7 157.789 MiB 0.000 MiB np.random.shuffle(x)
8 150.156 MiB -7.633 MiB del x"><pre class="notranslate"><code class="notranslate"> numpy version: 1.9.0.dev-f57c77b
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 87.219 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 94.871 MiB 7.652 MiB x = np.random.randn(1000, 1000)
6 157.789 MiB 62.918 MiB for ii in xrange(1000):
7 157.789 MiB 0.000 MiB np.random.shuffle(x)
8 150.156 MiB -7.633 MiB del x
</code></pre></div>
<p dir="auto">Big leak:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" numpy version: 1.9.0.dev-9f8771a
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 118.914 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 126.566 MiB 7.652 MiB x = np.random.randn(1000, 1000)
6 346.133 MiB 219.566 MiB for ii in xrange(1000):
7 346.133 MiB 0.000 MiB np.random.shuffle(x)
8 346.133 MiB 0.000 MiB del x"><pre class="notranslate"><code class="notranslate"> numpy version: 1.9.0.dev-9f8771a
Filename: shuffle_leaktest.py
Line # Mem usage Increment Line Contents
================================================
3 118.914 MiB 0.000 MiB @profile
4 def shuffle_leaktest():
5 126.566 MiB 7.652 MiB x = np.random.randn(1000, 1000)
6 346.133 MiB 219.566 MiB for ii in xrange(1000):
7 346.133 MiB 0.000 MiB np.random.shuffle(x)
8 346.133 MiB 0.000 MiB del x
</code></pre></div> | <p dir="auto">Hi everyone,</p>
<p dir="auto">I found a memory leak writing code using the <a href="http://deeplearning.net/software/theano/" rel="nofollow">theano</a> module and I was able to trace it back to numpy.</p>
<p dir="auto"><a href="https://groups.google.com/forum/#!topic/theano-dev/3gI_S9ns9oE" rel="nofollow">I already posted on the theano mailing list about it</a></p>
<p dir="auto">Sample code to reproduce the leak:</p>
<p dir="auto">Required modules:</p>
<ul dir="auto">
<li>Numpy (<a href="https://github.com/numpy/numpy/commit/0c9f285f38ea4d143c5e79badd0d36cb808242a6">commit</a>: <code class="notranslate">0c9f285f38ea4d143c5e79badd0d36cb808242a6</code>)</li>
<li>Scipy (<a href="https://github.com/scipy/scipy/commit/d9a8c214c4cea75f7d240957a646b562cf081f8b">commit</a>: <code class="notranslate">d9a8c214c4cea75f7d240957a646b562cf081f8b</code>)</li>
<li>Theano (<a href="https://github.com/Theano/Theano/commit/26d913091e56b3e80e7c562175b856a90dd782e4">commit</a>: <code class="notranslate">26d913091e56b3e80e7c562175b856a90dd782e4</code>)</li>
<li>for "<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Profile/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Profile">@Profile</a>" decorator: memory_profiler and psutils</li>
<li>I also use OpenBlas</li>
</ul>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import theano
from theano import tensor as T
import numpy as np
k = T.iscalar("k")
A = T.vector("A")
# Symbolic description of the result
result, updates = theano.scan(fn=lambda prior_result, A: prior_result * A,
outputs_info=T.ones_like(A),
non_sequences=A,
n_steps=k)
print "Compiling function"
power = theano.function(inputs=[A,k], outputs=result, updates=updates)
print "Compiling function - done"
ip = np.arange(10000)
x = None
print "Starting loop"
@profile
def test():
for i in xrange(10000):
x = power(ip,6)
test()
print "Done.""><pre class="notranslate"><span class="pl-en">import</span> <span class="pl-en">theano</span>
<span class="pl-en">from</span> <span class="pl-en">theano</span> <span class="pl-en">import</span> <span class="pl-en">tensor</span> <span class="pl-en">as</span> <span class="pl-c1">T</span>
<span class="pl-en">import</span> <span class="pl-en">numpy</span> <span class="pl-en">as</span> <span class="pl-en">np</span>
<span class="pl-s1">k</span> <span class="pl-c1">=</span> <span class="pl-c1">T</span><span class="pl-kos">.</span><span class="pl-en">iscalar</span><span class="pl-kos">(</span><span class="pl-s">"k"</span><span class="pl-kos">)</span>
<span class="pl-c1">A</span> <span class="pl-c1">=</span> <span class="pl-c1">T</span><span class="pl-kos">.</span><span class="pl-en">vector</span><span class="pl-kos">(</span><span class="pl-s">"A"</span><span class="pl-kos">)</span>
<span class="pl-c"># Symbolic description of the result</span>
<span class="pl-s1">result</span><span class="pl-kos">,</span> <span class="pl-s1">updates</span> <span class="pl-c1">=</span> <span class="pl-en">theano</span><span class="pl-kos">.</span><span class="pl-en">scan</span><span class="pl-kos">(</span><span class="pl-s1">fn</span><span class="pl-c1">=</span><span class="pl-en">lambda</span> <span class="pl-en">prior_result</span><span class="pl-kos">,</span> <span class="pl-pds">A</span>: <span class="pl-en">prior_result</span> * <span class="pl-c1">A</span><span class="pl-kos">,</span>
<span class="pl-s1">outputs_info</span><span class="pl-c1">=</span><span class="pl-c1">T</span><span class="pl-kos">.</span><span class="pl-en">ones_like</span><span class="pl-kos">(</span><span class="pl-c1">A</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-s1">non_sequences</span><span class="pl-c1">=</span><span class="pl-c1">A</span><span class="pl-kos">,</span>
<span class="pl-s1">n_steps</span><span class="pl-c1">=</span><span class="pl-s1">k</span><span class="pl-kos">)</span>
<span class="pl-en">print</span> <span class="pl-s">"Compiling function"</span>
<span class="pl-s1">power</span> <span class="pl-c1">=</span> <span class="pl-en">theano</span><span class="pl-kos">.</span><span class="pl-en">function</span><span class="pl-kos">(</span><span class="pl-s1">inputs</span><span class="pl-c1">=</span><span class="pl-kos">[</span><span class="pl-c1">A</span><span class="pl-kos">,</span><span class="pl-s1">k</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">outputs</span><span class="pl-c1">=</span><span class="pl-s1">result</span><span class="pl-kos">,</span> <span class="pl-s1">updates</span><span class="pl-c1">=</span><span class="pl-s1">updates</span><span class="pl-kos">)</span>
<span class="pl-en">print</span> <span class="pl-s">"Compiling function - done"</span>
<span class="pl-s1">ip</span> <span class="pl-c1">=</span> <span class="pl-en">np</span><span class="pl-kos">.</span><span class="pl-en">arange</span><span class="pl-kos">(</span><span class="pl-c1">10000</span><span class="pl-kos">)</span>
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-v">None</span>
<span class="pl-en">print</span> <span class="pl-s">"Starting loop"</span>
<span class="pl-c1">@profile</span>
<span class="pl-k">def</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:
<span class="pl-k">for</span> <span class="pl-en">i</span> <span class="pl-k">in</span> <span class="pl-en">xrange</span><span class="pl-kos">(</span><span class="pl-c1">10000</span><span class="pl-kos">)</span>:
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">power</span><span class="pl-kos">(</span><span class="pl-s1">ip</span><span class="pl-kos">,</span><span class="pl-c1">6</span><span class="pl-kos">)</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-en">print</span> <span class="pl-s">"Done."</span></pre></div>
<p dir="auto">For more logs:<br>
<a href="https://gist.github.com/ogh/b6694c8eb7793b454dee">https://gist.github.com/ogh/b6694c8eb7793b454dee</a></p>
<p dir="auto">With the same configuration except for numpy switched out with a version from last September everything works fine without any leak.<br>
(tried the November version since I was using it on a server where I did not have the memory leak)</p>
<p dir="auto">The version of numpy that works without a leak: <a href="https://github.com/numpy/numpy/tree/135443768a24ab4fbfd4fa5c8fc40f27d2e25c96">commit</a><code class="notranslate">135443768a24ab4fbfd4fa5c8fc40f27d2e25c96</code></p>
<p dir="auto">Can you give me any advice on how to narrow down the problem further?</p> | 1 |
<p dir="auto">I had originally installed atom via <code class="notranslate">brew cask install</code> and the <code class="notranslate">atom</code> command was working fine. Then, for reasons, I uninstalled the cask version and installed atom from atom.io. Ever since, despite performing "Install Shell Commands" and making sure the symlinks are correct, the <code class="notranslate">atom</code> command fails to load the current folder. It's highly likely this is isolated to my installation only, but I'm having a hard time figuring out where things go wrong.</p>
<p dir="auto">I have tried:</p>
<ul dir="auto">
<li>Removing ~/.atom entirely</li>
<li>Exporting a nearly uncustomized <code class="notranslate">$PATH</code> before launching atom</li>
<li>Atom -> Install Shell Commands (and manually checking the symlinks after)</li>
<li>Launching from various folders, just in case there was something weird in the pathname</li>
</ul>
<p dir="auto">So far nothing has worked.</p>
<p dir="auto">Atom seems to be getting the <code class="notranslate">--executed-from</code> argument just fine and with a correct value. For example, if I launch atom in /tmp, I can see the following command with <code class="notranslate">ps aux | grep -i atom</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/Applications/Atom.app/Contents/MacOS/Atom --executed-from=/tmp --pid=77617 --path-environment=/Users/redacted/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"><pre class="notranslate"><code class="notranslate">/Applications/Atom.app/Contents/MacOS/Atom --executed-from=/tmp --pid=77617 --path-environment=/Users/redacted/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
</code></pre></div>
<p dir="auto">The launched editor just shows a blank untitled document, does not open the tree view, and Cmd+P says that the project is empty. The <code class="notranslate">--pid</code> doesn't point to any existing process but then again I don't really know what it's for anyway.</p>
<p dir="auto">File -> Open does work.</p>
<p dir="auto">Any ideas? I'm on 0.209.0 currently but the issue has persisted for a month or so.</p>
<p dir="auto">Here's the path to the atom script in case it helps:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="➜ /tmp readlink /usr/local/bin/atom
/Applications/Atom.app/Contents/Resources/app/atom.sh"><pre class="notranslate"><code class="notranslate">➜ /tmp readlink /usr/local/bin/atom
/Applications/Atom.app/Contents/Resources/app/atom.sh
</code></pre></div> | <p dir="auto">When executing v 0.200.0 from command line, Atom open an empty untittled file instead the ones from that directory, and in fact the tree view don't get open both with the shortcut or the menu option. Other tabs like preference are working. After executing <code class="notranslate">atom .</code> the tree view gets shown and it works normally, and also now it gets shown when launching it without arguments too as it should do.</p> | 1 |
<h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">4.0.0.M1</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">sharding-proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">images table has no shards.</p>
<p dir="auto">The images table structure is as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CREATE TABLE `images` (
`id` int(11) DEFAULT NULL,
`image` blob
) ENGINE=InnoDB DEFAULT CHARSET=utf8;"><pre class="notranslate"><code class="notranslate">CREATE TABLE `images` (
`id` int(11) DEFAULT NULL,
`image` blob
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</code></pre></div>
<p dir="auto">java code is as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Test
public void blobInsertTest() throws Exception {
Class.forName("com.mysql.jdbc.Driver");
String sql = "INSERT INTO images(id,image) values(?,?)";
Connection conn = DriverManager.getConnection(url, username, password);
PreparedStatement ps = conn.prepareStatement(sql);
ps.setInt(1,2);
InputStream in = new FileInputStream("f:\\1122.jpg");
ps.setBlob(2, in);
int count = ps.executeUpdate();
System.out.println(count);
}"><pre class="notranslate"><code class="notranslate">@Test
public void blobInsertTest() throws Exception {
Class.forName("com.mysql.jdbc.Driver");
String sql = "INSERT INTO images(id,image) values(?,?)";
Connection conn = DriverManager.getConnection(url, username, password);
PreparedStatement ps = conn.prepareStatement(sql);
ps.setInt(1,2);
InputStream in = new FileInputStream("f:\\1122.jpg");
ps.setBlob(2, in);
int count = ps.executeUpdate();
System.out.println(count);
}
</code></pre></div>
<p dir="auto">Run the code normally by connecting mysql.</p>
<p dir="auto">Running code by connecting sharding-proxy reports the error as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.sql.SQLException: Unknown exception: INSERT INTO column size mismatch value size.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2535)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1911)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2145)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2081)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2066)
at com.zhongan.dmds.sharding_sphere.ShardingProxyTest.blobInsertTest(ShardingProxyTest.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)"><pre class="notranslate"><code class="notranslate">java.sql.SQLException: Unknown exception: INSERT INTO column size mismatch value size.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2535)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1911)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2145)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2081)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2066)
at com.zhongan.dmds.sharding_sphere.ShardingProxyTest.blobInsertTest(ShardingProxyTest.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
</code></pre></div> | <h2 dir="auto">Question</h2>
<p dir="auto">The shardingSphere I use is version 5.1.1</p>
<p dir="auto">The following is my mybatis sql</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<insert id="test">
INSERT INTO test
(v_uuid, company_id, hash_id, store_id, msku, stock_90_list)
VALUES
<foreach collection="tList" item="item" index="index" separator=",">
(
#{item.vUuid},
#{item.companyId},
#{item.hashId},
#{item.storeId},
#{item.msku},
#{item.stock90List}
)
</foreach>
ON DUPLICATE KEY UPDATE
company_id = values(company_id),
stock_90_list=values(stock_90_list)
</insert>"><pre class="notranslate"><<span class="pl-ent">insert</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>test<span class="pl-pds">"</span></span>>
INSERT INTO test
(v_uuid, company_id, hash_id, store_id, msku, stock_90_list)
VALUES
<<span class="pl-ent">foreach</span> <span class="pl-e">collection</span>=<span class="pl-s"><span class="pl-pds">"</span>tList<span class="pl-pds">"</span></span> <span class="pl-e">item</span>=<span class="pl-s"><span class="pl-pds">"</span>item<span class="pl-pds">"</span></span> <span class="pl-e">index</span>=<span class="pl-s"><span class="pl-pds">"</span>index<span class="pl-pds">"</span></span> <span class="pl-e">separator</span>=<span class="pl-s"><span class="pl-pds">"</span>,<span class="pl-pds">"</span></span>>
(
#{item.vUuid},
#{item.companyId},
#{item.hashId},
#{item.storeId},
#{item.msku},
#{item.stock90List}
)
</<span class="pl-ent">foreach</span>>
ON DUPLICATE KEY UPDATE
company_id = values(company_id),
stock_90_list=values(stock_90_list)
</<span class="pl-ent">insert</span>></pre></div>
<p dir="auto">Below is the value of parsing sql in ParseInfo<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/41101749/225798897-521a4fdd-8f7a-42f6-acb5-cb7cfb818bcf.png"><img src="https://user-images.githubusercontent.com/41101749/225798897-521a4fdd-8f7a-42f6-acb5-cb7cfb818bcf.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">This will result in an error:<br>
Cause: java.lang.StringIndexOutOfBoundsException: String index out of range: -52</p> | 0 |
<p dir="auto">No curves appear in Tensorboard 25 when I click on a heading to open one.<br>
Maybe related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="170972139" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/3782" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/3782/hovercard" href="https://github.com/tensorflow/tensorflow/issues/3782">#3782</a></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: Ubuntu 14.04</p>
<p dir="auto">If installed from source, provide</p>
<ol dir="auto">
<li>The commit hash (<code class="notranslate">git rev-parse HEAD</code>): <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/008bcaea38815f46804fc3f56492f4dd93837a56/hovercard" href="https://github.com/tensorflow/tensorflow/commit/008bcaea38815f46804fc3f56492f4dd93837a56"><tt>008bcae</tt></a></li>
<li>The output of <code class="notranslate">bazel version</code> 0.3.0</li>
</ol> | <p dir="auto">After a clean install of TensorFlow v0.10 (from <code class="notranslate">master</code>) my TensorBoard is suddenly broken. The scalar event plots do not show upon clicking (see screenshow below). While the logs in the terminal do not show any errors, the Chrome Developer console shows the following error upon opening a figure:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tf-tensorboard.html:1517 Uncaught Error: tf-chart-scaffold's content doesn't implement the required interfaceinsertBefore @ VM2478 polymer-mini.html:560"><pre class="notranslate"><code class="notranslate">tf-tensorboard.html:1517 Uncaught Error: tf-chart-scaffold's content doesn't implement the required interfaceinsertBefore @ VM2478 polymer-mini.html:560
</code></pre></div>
<p dir="auto">I am running Chrome Version 52.0.2743.116 (64-bit) on Linux Mint 17.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/bedbaf7fd1ce31a10c862fe38488e3863d919e0c0446d7b8f3825d41bd5245bd/687474703a2f2f692e696d6775722e636f6d2f476e5234364e4c2e706e67"><img src="https://camo.githubusercontent.com/bedbaf7fd1ce31a10c862fe38488e3863d919e0c0446d7b8f3825d41bd5245bd/687474703a2f2f692e696d6775722e636f6d2f476e5234364e4c2e706e67" alt="TensorBoard" data-canonical-src="http://i.imgur.com/GnR46NL.png" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">Greater than or equal to version 0.189.0 of atom does not support Chinese input.Hopes to fix as soon as possible.</p> | <p dir="auto">Text:</p>
<blockquote>
<p dir="auto">这上面的夜的天空,奇怪而高,我生平没有见过这样奇怪而高的天空。他仿佛要离开人间而去,使人们仰面不再看见。然而现在却非常之蓝,闪闪地睒着几十个星星的眼,冷眼。他的口角上现出微笑,似乎自以为大有深意,而将繁霜洒在我的园里的野花草上。</p>
</blockquote>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/49931/6959354/a30f8266-d94a-11e4-9167-35ea308a5ad2.png"><img src="https://cloud.githubusercontent.com/assets/49931/6959354/a30f8266-d94a-11e4-9167-35ea308a5ad2.png" alt="3" style="max-width: 100%;"></a></p>
<p dir="auto">It happen after update to 0.189.0, and it's normal in 0.188.0 .</p>
<p dir="auto">I try disabled all community packages or star with <code class="notranslate">--safe</code> mode, still happen.</p>
<p dir="auto">Update: Ubuntu 14.04</p> | 1 |
<p dir="auto">Hi there,</p>
<p dir="auto">I am in the process of upgrading a Silex app and part of that is an upgrade of the sf components. With sf 2.6 I've run into a problem with the TraceableEventDispatcher.<br>
Dispatcher version is v2.6.6</p>
<p dir="auto">silex_upgrade/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php:134<br>
silex_upgrade/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Session.php:199<br>
silex_upgrade/vendor/silex/silex/src/Silex/Provider/SessionServiceProvider.php:93<br>
silex_upgrade/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:61<br>
silex_upgrade/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:61<br>
silex_upgrade/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php:164<br>
silex_upgrade/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php:53<br>
silex_upgrade/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:112<br>
silex_upgrade/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:126<br>
silex_upgrade/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:66<br>
silex_upgrade/vendor/silex/silex/src/Silex/Application.php:543<br>
silex_upgrade/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php:81<br>
silex_upgrade/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php:327<br>
silex_upgrade/php/tests/controllers/TestLookupController.php:20</p> | <table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.2.1</td>
</tr>
</tbody>
</table>
<p dir="auto">After upgrading to PHP 7.1 and symfony 3.2.1 I sometimes (once a week, random) get the following error:</p>
<blockquote>
<p dir="auto">FatalErrorException in classes.php line 347:<br>
Error: Class Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::write)</p>
</blockquote>
<p dir="auto">I changed the following lines in config.yml to the new Symfony 3 style:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="session:
# handler_id set to null will use default session handler from php.ini
handler_id: session.handler.native_file
save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%""><pre class="notranslate"><code class="notranslate">session:
# handler_id set to null will use default session handler from php.ini
handler_id: session.handler.native_file
save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
</code></pre></div>
<p dir="auto">But it still happened.</p>
<p dir="auto">After reading <a href="http://stackoverflow.com/questions/36088683/php-7-symfony-3-fatal-error-1-abstract-method-and-must-therefore-be-declared-a" rel="nofollow">http://stackoverflow.com/questions/36088683/php-7-symfony-3-fatal-error-1-abstract-method-and-must-therefore-be-declared-a</a><br>
The solution is indeed to restart Apache.</p>
<p dir="auto">I have no clue what can be the cause, maybe PHP 7.1, but Symfony 3 is compatible with 7.1 right?</p>
<p dir="auto">Maybe someone here can point me in the right direction to solve this :)</p> | 0 |
<p dir="auto"><strong>Apache Airflow version</strong>: 2.1.0</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>): v1.18.17-gke.1901</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: Google Cloud</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Debian GNU/Linux 10 (buster)</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux airflow-scheduler-7697b66974-m6mct 5.4.89+ <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="69689814" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/1" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/1/hovercard" href="https://github.com/apache/airflow/pull/1">#1</a> SMP Sat Feb 13 19:45:14 PST 2021 x86_64 GNU/Linux</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
When the <code class="notranslate">scheduler</code> is restarted the currently running tasks are facing SIGTERM error.<br>
Every time the <code class="notranslate">scheduler</code> is restarted or re-deployed then the current <code class="notranslate">scheduler</code> is terminated and a new <code class="notranslate">scheduler</code> is created. If during this process exist tasks running the new <code class="notranslate">scheduler</code> will terminate these tasks with <code class="notranslate">complete</code> status and new tasks will be created to continue the work of the terminated ones. After few seconds the new tasks are terminated with <code class="notranslate">error</code> status and SIGTERM error.</p>
<details><summary>Error log</summary> [2021-07-07 14:59:49,024] {cursor.py:661} INFO - query execution done
[2021-07-07 14:59:49,025] {arrow_result.pyx:0} INFO - fetching data done
[2021-07-07 15:00:07,361] {local_task_job.py:196} WARNING - State of this instance has been externally set to failed. Terminating instance.
[2021-07-07 15:00:07,363] {process_utils.py:100} INFO - Sending Signals.SIGTERM to GPID 150
[2021-07-07 15:00:12,845] {taskinstance.py:1264} ERROR - Received SIGTERM. Terminating subprocesses.
[2021-07-07 15:00:12,907] {process_utils.py:66} INFO - Process psutil.Process(pid=150, status='terminated', exitcode=0, started='14:59:46') (150) terminated with exit code 0 </details>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">The tasks currently running should be allowed to finish their process or the substitute tasks should execute their process with success.<br>
The new <code class="notranslate">scheduler</code> should interfere with the running tasks.</p>
<p dir="auto"><strong>How to reproduce it</strong>:</p>
<p dir="auto">To reproduce is necessary to start a DAG that has some task(s) that take some minutes to be completed. During this task(s) processing a new deploy for <code class="notranslate">scheduler</code> should be executed. During the re-deploy, the current <code class="notranslate">scheduler</code> will be terminated and a new one will be created. The current task(s) will be completed (without finish their processing) and substituted for new ones that will fail in seconds.</p>
<p dir="auto"><strong>Anything else we need to know</strong>:</p>
<p dir="auto">The problem was not happening with Airflow 1.10.15 and it started to happens after the upgrade to Airflow 2.1.0.</p> | <p dir="auto"><strong>Apache Airflow version</strong>: 2.1.0</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"6b3f9b283463c1d5a2455df301182805e65c7145", GitTreeState:"clean", BuildDate:"2021-05-19T22:28:47Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"6b3f9b283463c1d5a2455df301182805e65c7145", GitTreeState:"clean", BuildDate:"2021-05-19T22:28:47Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
</code></pre></div>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: Azure</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): ubuntu 18.04</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
Since I launched airflow 2.1.0 on our cluster on Friday, the scheduler has failed 716 times stating "BrokenPipeError"</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2021-06-07 12:07:19,362] {scheduler_job.py:1205} INFO - Executor reports execution of demo_git_notebook_parameterized.demo_git_notebook_parameterized execution_date=2021-06-07 12:05:41.835167+00:00 exited with status None for try_number 1
[2021-06-07 12:07:22,798] {scheduler_job.py:748} INFO - Exiting gracefully upon receiving signal 15
[2021-06-07 12:07:23,800] {process_utils.py:100} INFO - Sending Signals.SIGTERM to GPID 55
[2021-06-07 12:07:24,154] {process_utils.py:207} INFO - Waiting up to 5 seconds for processes to exit...
[2021-06-07 12:07:24,211] {process_utils.py:207} INFO - Waiting up to 5 seconds for processes to exit...
[2021-06-07 12:07:24,265] {process_utils.py:66} INFO - Process psutil.Process(pid=55, status='terminated', exitcode=0, started='12:02:39') (55) terminated with exit code 0
[2021-06-07 12:07:24,266] {process_utils.py:66} INFO - Process psutil.Process(pid=7433, status='terminated', started='12:07:23') (7433) terminated with exit code None
[2021-06-07 12:07:24,266] {process_utils.py:66} INFO - Process psutil.Process(pid=7432, status='terminated', started='12:07:22') (7432) terminated with exit code None
[2021-06-07 12:07:24,266] {kubernetes_executor.py:759} INFO - Shutting down Kubernetes executor
[2021-06-07 12:07:24,266] {scheduler_job.py:1308} ERROR - Exception when executing Executor.end
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1286, in _execute
self._run_scheduler_loop()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1400, in _run_scheduler_loop
time.sleep(min(self._processor_poll_interval, next_event))
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 751, in _exit_gracefully
sys.exit(os.EX_OK)
SystemExit: 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1306, in _execute
self.executor.end()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/executors/kubernetes_executor.py", line 761, in end
self._flush_task_queue()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/executors/kubernetes_executor.py", line 714, in _flush_task_queue
self.log.debug('Executor shutting down, task_queue approximate size=%d', self.task_queue.qsize())
File "<string>", line 2, in qsize
File "/usr/local/lib/python3.8/multiprocessing/managers.py", line 834, in _callmethod
conn.send((self._id, methodname, args, kwds))
File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 206, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 411, in _send_bytes
self._send(header + buf)
File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
[2021-06-07 12:07:24,268] {process_utils.py:100} INFO - Sending Signals.SIGTERM to GPID 55
[2021-06-07 12:07:24,268] {scheduler_job.py:1313} INFO - Exited execute loop"><pre class="notranslate"><code class="notranslate">[2021-06-07 12:07:19,362] {scheduler_job.py:1205} INFO - Executor reports execution of demo_git_notebook_parameterized.demo_git_notebook_parameterized execution_date=2021-06-07 12:05:41.835167+00:00 exited with status None for try_number 1
[2021-06-07 12:07:22,798] {scheduler_job.py:748} INFO - Exiting gracefully upon receiving signal 15
[2021-06-07 12:07:23,800] {process_utils.py:100} INFO - Sending Signals.SIGTERM to GPID 55
[2021-06-07 12:07:24,154] {process_utils.py:207} INFO - Waiting up to 5 seconds for processes to exit...
[2021-06-07 12:07:24,211] {process_utils.py:207} INFO - Waiting up to 5 seconds for processes to exit...
[2021-06-07 12:07:24,265] {process_utils.py:66} INFO - Process psutil.Process(pid=55, status='terminated', exitcode=0, started='12:02:39') (55) terminated with exit code 0
[2021-06-07 12:07:24,266] {process_utils.py:66} INFO - Process psutil.Process(pid=7433, status='terminated', started='12:07:23') (7433) terminated with exit code None
[2021-06-07 12:07:24,266] {process_utils.py:66} INFO - Process psutil.Process(pid=7432, status='terminated', started='12:07:22') (7432) terminated with exit code None
[2021-06-07 12:07:24,266] {kubernetes_executor.py:759} INFO - Shutting down Kubernetes executor
[2021-06-07 12:07:24,266] {scheduler_job.py:1308} ERROR - Exception when executing Executor.end
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1286, in _execute
self._run_scheduler_loop()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1400, in _run_scheduler_loop
time.sleep(min(self._processor_poll_interval, next_event))
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 751, in _exit_gracefully
sys.exit(os.EX_OK)
SystemExit: 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1306, in _execute
self.executor.end()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/executors/kubernetes_executor.py", line 761, in end
self._flush_task_queue()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/executors/kubernetes_executor.py", line 714, in _flush_task_queue
self.log.debug('Executor shutting down, task_queue approximate size=%d', self.task_queue.qsize())
File "<string>", line 2, in qsize
File "/usr/local/lib/python3.8/multiprocessing/managers.py", line 834, in _callmethod
conn.send((self._id, methodname, args, kwds))
File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 206, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 411, in _send_bytes
self._send(header + buf)
File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
[2021-06-07 12:07:24,268] {process_utils.py:100} INFO - Sending Signals.SIGTERM to GPID 55
[2021-06-07 12:07:24,268] {scheduler_job.py:1313} INFO - Exited execute loop
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
For it to not do that.</p>
<p dir="auto"><strong>How to reproduce it</strong>:<br>
I'm not too sure. Could it be an issue with Airflow 2.1.0 itself, and it can be reproduced just by launching it in a cluster? Using KubernetesExecutor, no celery.<br>
Could it be an issue with Azure?</p>
<p dir="auto"><strong>Anything else we need to know</strong>:<br>
by my very rough calculations it happens every 6 minutes?</p> | 1 |
<p dir="auto">I am pretty sure this is going to affect <em>any</em> install from a git remote with a ref that's not found in the origin. But I encountered it trying to install a PR, and haven't investigated further.</p>
<p dir="auto">Instead of "remote reference not found in git repository", or some other helpful thing, it does this.</p>
<h3 dir="auto">Current Behavior:</h3>
<p dir="auto">Pacote fails with a git folder issue.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ npm i npm/pacote#pull/55
npm ERR! code 128
npm ERR! command failed
npm ERR! command git clone --mirror -q ssh://[email protected]/npm/pacote.git /Users/isaacs/.npm/_cacache/tmp/git-clone-00c3d7a2/.git
npm ERR! fatal: destination path '/Users/isaacs/.npm/_cacache/tmp/git-clone-00c3d7a2/.git' already exists and is not an empty directory.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/isaacs/.npm/_logs/2021-05-03T00_17_29_111Z-debug.log"><pre class="notranslate"><code class="notranslate">$ npm i npm/pacote#pull/55
npm ERR! code 128
npm ERR! command failed
npm ERR! command git clone --mirror -q ssh://[email protected]/npm/pacote.git /Users/isaacs/.npm/_cacache/tmp/git-clone-00c3d7a2/.git
npm ERR! fatal: destination path '/Users/isaacs/.npm/_cacache/tmp/git-clone-00c3d7a2/.git' already exists and is not an empty directory.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/isaacs/.npm/_logs/2021-05-03T00_17_29_111Z-debug.log
</code></pre></div>
<h3 dir="auto">Expected Behavior:</h3>
<p dir="auto">Report that <code class="notranslate">pull/55</code> isn't a thing that exists in the npm/pacote repository.</p>
<h3 dir="auto">Environment:</h3>
<p dir="auto">macOS, npm 7.11.2</p>
<p dir="auto">My bet is that this is a bug in either <code class="notranslate">pacote</code> or <code class="notranslate">@npmcli/git</code>, but I haven't dug any further into it as yet.</p> | <p dir="auto">### Current Behavior:</p>
<h3 dir="auto">Expected Behavior:</h3>
<p dir="auto"><code class="notranslate">npm install</code> with erroneous git version on a github dependency whines about cache "already exists"</p>
<h3 dir="auto">Steps To Reproduce:</h3>
<ol dir="auto">
<li>with a fresh npm package.json, add a dep for a non-existent branch, e.g.<code class="notranslate">"dependencies": { "shex-test": "github:shexSpec/shexTest#master" }</code></li>
<li><code class="notranslate">npm install --cache /tmp/brand-new-cache</code></li>
</ol>
<h3 dir="auto">Environment:</h3>
<ul dir="auto">
<li>OS: Ubuntu 20.04</li>
</ul>
<h3 dir="auto">Error Message:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="eric@touchy:/tmp/npmz/npm-user$ npm install --cache /tmp/brand-new-cache
npm ERR! code 128
npm ERR! command failed
npm ERR! command git clone --mirror -q ssh://[email protected]/shexSpec/shexTest.git /tmp/brand-new-cache/_cacache/tmp/git-clone-e421e02b/.git
npm ERR! fatal: destination path '/tmp/brand-new-cache/_cacache/tmp/git-clone-e421e02b/.git' already exists and is not an empty directory.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/brand-new-cache/_logs/2021-04-25T16_32_24_722Z-debug.log"><pre class="notranslate"><code class="notranslate">eric@touchy:/tmp/npmz/npm-user$ npm install --cache /tmp/brand-new-cache
npm ERR! code 128
npm ERR! command failed
npm ERR! command git clone --mirror -q ssh://[email protected]/shexSpec/shexTest.git /tmp/brand-new-cache/_cacache/tmp/git-clone-e421e02b/.git
npm ERR! fatal: destination path '/tmp/brand-new-cache/_cacache/tmp/git-clone-e421e02b/.git' already exists and is not an empty directory.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/brand-new-cache/_logs/2021-04-25T16_32_24_722Z-debug.log
</code></pre></div>
<p dir="auto">The real prob had nothing to do with the cache, but simply that the <code class="notranslate">master</code> branch was renamed to <code class="notranslate">main</code> (which makes this a timely UI experience to improve).</p>
<p dir="auto">Related issue:<br>
If you change to an existent branch (e.g. <code class="notranslate">main</code>), <code class="notranslate">npm i</code>, change back, and <code class="notranslate">npm i</code> again, you see no error. The <code class="notranslate">package-lock.json</code> entry was changed to <code class="notranslate">"shex-test": "github:shexSpec/shexTest#master"</code> but the node_modules entry appeared to stay on <code class="notranslate">main</code>. While playing with this, i had to reset to square 1 with <code class="notranslate">rm -rf node_modules/ package-lock.json /tmp/brand-new-cache/</code> to get around this overly agreeable behavior.</p> | 1 |
<p dir="auto">Unable to enter Chinese on any terminal opened by Windows terminal<br>
Windows terminal : Windows Terminal (Preview) Version: 0.6.2951.0<br>
windows : Win10 Enterprise Edition version: 18362.449</p> | <h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">It would be really nice to be able to rename tabs by just double-clicling them and setting new title in some kind of text-box. This name replaces original title and stays until tab closed or renamed again.</p>
<p dir="auto">This feature is very useful when working with multiple similar tabs like many ssh connections to different servers or tailing multiple logs, etc. Quite often it's one-time sessions and there is no reason to make custom profile for them. Example - hackathon event when you work with a lot of terminal tabs but when it's finished - you never use it again.</p>
<p dir="auto">For example i use this very feature in IntelliJ IDEs (PyCharm, PhpStorm, etc) all the time.</p> | 0 |
<pre class="notranslate">What steps will reproduce the problem?
1. go get code.google.com/p/go-tour
2. go vet code.google.com/p/go-tour/prog
What is the expected output?
No panic.
What do you see instead?
INTERNAL PANIC: runtime error: invalid memory address or nil pointer dereference
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x38 pc=0x4eb38c]
goroutine 1 [running]:
code.google.com/p/go.tools/go/types.func·003()
/home/u/goget/src/code.google.com/p/go.tools/go/types/check.go:113 +0x16a
code.google.com/p/go.tools/go/types.identicalMethods(0xc2101ed380, 0xc2100cffc0,
0xc2100e0310)
/home/u/goget/src/code.google.com/p/go.tools/go/types/predicates.go:235 +0x28c
code.google.com/p/go.tools/go/types.IsIdentical(0xc21004f200, 0xc2101bdee8,
0xc21004f200, 0xc2100e0310, 0xc21005a800, ...)
/home/u/goget/src/code.google.com/p/go.tools/go/types/predicates.go:170 +0x974
code.google.com/p/go.tools/go/types.(*operand).isAssignable(0xc2102138c0, 0xc2100d2480,
0xc21004f240, 0xc2100cff60, 0x41e500, ...)
/home/u/goget/src/code.google.com/p/go.tools/go/types/operand.go:144 +0x172
code.google.com/p/go.tools/go/types.(*checker).assignment(0xc21005b900, 0xc2102138c0,
0xc21004f240, 0xc2100cff60, 0xc21004f240, ...)
/home/u/goget/src/code.google.com/p/go.tools/go/types/stmt.go:36 +0x1dd
code.google.com/p/go.tools/go/types.(*checker).argument(0xc21005b900, 0xc2100d0600, 0x0,
0xc21005a740, 0xc210098560, ...)
/home/u/goget/src/code.google.com/p/go.tools/go/types/expr.go:987 +0x23a
code.google.com/p/go.tools/go/types.(*checker).rawExpr(0xc21005b900, 0xc2102138c0,
0xc21005a900, 0xc21009c080, 0x0, ...)
/home/u/goget/src/code.google.com/p/go.tools/go/types/expr.go:1603 +0x3c3b
code.google.com/p/go.tools/go/types.(*checker).stmt(0xc21005b900, 0xc21005aa00,
0xc210089d60)
/home/u/goget/src/code.google.com/p/go.tools/go/types/stmt.go:356 +0x545c
code.google.com/p/go.tools/go/types.(*checker).stmtList(0xc21005b900, 0xc21009c0c0, 0x3,
0x4)
/home/u/goget/src/code.google.com/p/go.tools/go/types/stmt.go:266 +0x68
code.google.com/p/go.tools/go/types.check(0xc2100d2480, 0x601020, 0x1, 0xc21005a540,
0xc2100ce800, ...)
/home/u/goget/src/code.google.com/p/go.tools/go/types/check.go:159 +0x431
code.google.com/p/go.tools/go/types.(*Context).Check(0xc2100d2480, 0x601020, 0x1,
0xc21005a540, 0xc2100ce800, ...)
/home/u/goget/src/code.google.com/p/go.tools/go/types/api.go:142 +0x6c
main.(*Package).check(0xc2100d23c0, 0xc21005a540, 0xc2100ce800, 0x42, 0x80, ...)
/home/u/goget/src/code.google.com/p/go.tools/cmd/vet/types.go:32 +0x168
main.doPackage(0x601020, 0x1, 0xc21000a010, 0x42, 0x42, ...)
/home/u/goget/src/code.google.com/p/go.tools/cmd/vet/main.go:226 +0x8f5
main.main()
/home/u/goget/src/code.google.com/p/go.tools/cmd/vet/main.go:144 +0x665
goroutine 2 [runnable]:
exit status 2
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
Linux
Which version are you using? (run 'go version')
go version devel +4aa7943034c5 Thu Jun 06 18:10:42 2013 -0700 linux/amd64
code.google.com/p/go.tools
changeset: 956fb611bffb
Please provide any additional information below.
The file that causes this panic is:
code.google.com/p/go-tour/prog/interfaces-are-satisfied-implicitly.go
Below is a simplified version that still causes the panic. I'll inline the
example since play.golang.org is almost impossible to access from some parts of
Asia.
package main
import (
"fmt"
"os"
)
type Writer interface {
Write(b []byte) (n int, err error)
}
func main() {
var w Writer
// os.Stdout implements Writer
w = os.Stdout
fmt.Fprintf(w, "hello, writer\n")
}</pre> | <p dir="auto">by <strong>aaron.blohowiak</strong>:</p>
<pre class="notranslate">What does 'go version' print?
go version go1.2.1 darwin/amd64
I checked the source in tip and the problem is also there.
What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.
<a href="http://play.golang.org/p/4ZbUkex2Wm" rel="nofollow">http://play.golang.org/p/4ZbUkex2Wm</a>
What happened?
RequestURI() returns a path with many valid characters escaped.
What should have happened instead?
All sub-delim characters MUST NOT be escaped.
Please provide any additional information below.
Using the ReverseProxy breaks OAuth signing verification because of url.URL RequestURI()'s incorrect replacement of reserved characters with their encoded counterparts in shouldEncode(). There is a workaround of creating a custom Director that looks at the RequestURI and performs the correct parsing and escaping, populating the req.URL.Opaque and draining the req.URL.Path, but it would be better for the std library to do the right thing. Code that relies on the current escaping behavior is wrong, so I do not believe that fixing this would violate the stability guarantee.
This violates the http spec: rfc3986 §2.2 Reserved Characters
The purpose of reserved characters is to provide a set of delimiting characters that are distinguishable from other data within a URI. URIs that differ in the replacement of a reserved character with its corresponding percent-encoded octet are not equivalent. Percent-encoding a reserved character, or decoding a percent-encoded octet that corresponds to a reserved character, will change how the URI is interpreted by most applications. Thus, characters in the reserved set are protected from normalization and are therefore safe to be used by scheme-specific and producer-specific algorithms for delimiting data subcomponents within a URI.</pre> | 0 |
<p dir="auto">As I am already including:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""node/node.d.ts": {
"commit": "e850b6ac0d59fee86dd7cb6a1be2caf6400bde14"
}"><pre class="notranslate"><span class="pl-s">"node/node.d.ts"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"commit"</span>: <span class="pl-s">"e850b6ac0d59fee86dd7cb6a1be2caf6400bde14"</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">In my <code class="notranslate">tsd.json</code> file and angular also includes those, I get lots of <code class="notranslate">error TS2300: Duplicate identifier ...</code> errors.</p>
<p dir="auto">Is there really no solution for this? If there is a solution, can someone point me to it because I cannot find something that would make it work, besides me not including these typings in my own <code class="notranslate">tsd.json</code> file.</p> | <p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">ngc is creating the following code for app.component.ngfactory.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="...
import * as import9 from '@angular/core/src/change_detection/change_detection';
import * as import10 from '@angular/router/src/router_outlet_map';
import * as import11 from '@angular/core/src/linker/component_factory_resolver';
import * as import12 from '@angular/core/src/metadata/view';
import * as import13 from '@angular/core/src/linker/component_factory_resolver';
import * as import14 from './model/navigation.service';
import * as import15 from '@angular/router/src/router';
..."><pre class="notranslate">...
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">import9</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/core/src/change_detection/change_detection'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">import10</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/router/src/router_outlet_map'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">import11</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/core/src/linker/component_factory_resolver'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">import12</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/core/src/metadata/view'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">import13</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/core/src/linker/component_factory_resolver'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">import14</span> <span class="pl-k">from</span> <span class="pl-s">'./model/navigation.service'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">import15</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/router/src/router'</span><span class="pl-kos">;</span>
...</pre></div>
<p dir="auto">Notice that import11 and import13 refer to the same file. This creates a naming conflict which in turn breaks dependency injection (No provider found for ComponentFactoryResolver$1) when used with rollup.js. Even if that weren't the case, this would unnecessarily increase the project's code size.</p>
<p dir="auto">The original app.component.ts file looks like this:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { SelectorPageComponent } from './pages/selector.component';
import { NavigationService } from './model/navigation.service';
@Component({
selector: 'my-app',
directives: [RouterOutlet],
providers: [NavigationService],
template: '<router-outlet></router-outlet>',
precompile: [ SelectorPageComponent ]
})
export class AppComponent {}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">Component</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/core'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">RouterOutlet</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@angular/router'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">SelectorPageComponent</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./pages/selector.component'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">NavigationService</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./model/navigation.service'</span><span class="pl-kos">;</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'my-app'</span><span class="pl-kos">,</span>
<span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-smi">RouterOutlet</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">providers</span>: <span class="pl-kos">[</span><span class="pl-smi">NavigationService</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'<router-outlet></router-outlet>'</span><span class="pl-kos">,</span>
<span class="pl-c1">precompile</span>: <span class="pl-kos">[</span> <span class="pl-smi">SelectorPageComponent</span> <span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">AppComponent</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">NavigationService imports @angular/router, as does AppComponent. Given the order of the imports in the ngfactory file, this seems to be the source of the issue.</p>
<p dir="auto">This may be related somehow to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="166041786" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/10132" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/10132/hovercard" href="https://github.com/angular/angular/issues/10132">#10132</a>, although ngc succeeds without any warnings so it's a different issue.</p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto">Regardless of the cause, ngc should never import the exact same thing twice.</p>
<p dir="auto"><strong>Reproduction of the problem</strong></p>
<p dir="auto">I have not yet figured out how to reproduce this exact problem in a smaller project. Does anybody have insight as to what might cause this to happen? I am using @angular/compiler-cli (ngc) 0.4.1 and Angular 2.0.0-rc.4 with a fairly standard tsconfig.json file.</p>
<p dir="auto">One odd thing is that <code class="notranslate">"angularCompilerOptions": {"debug": true}</code> doesn't seem to do anything. I'd hoped it would shed insight on where imported files are coming from.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.4</li>
<li><strong>Browser:</strong> all</li>
<li><strong>Language:</strong> TypeScript 1.8.2</li>
</ul> | 0 |
<ul dir="auto">
<li>Electron version: 1.4.4</li>
<li>Operating system: Windows 10</li>
</ul>
<p dir="auto">Scenario:<br>
I want to paste a copied image in my Electron app. But when I copy an image in Windows Explorer (png or jpg) and try to retrieve it from Clipboard, Clipboard.readImage() returns an empty NativeImage Object.</p>
<p dir="auto">Based on the docs, I assumed it would work with all operating systems:<br>
<a href="http://electron.atom.io/docs/api/clipboard/#clipboardreadimagetype" rel="nofollow">http://electron.atom.io/docs/api/clipboard/#clipboardreadimagetype</a></p>
<p dir="auto">The same code is working fine in macOS. But the majority of our customers are using Windows.</p> | <p dir="auto">i want to get image file from clipboard.</p>
<p dir="auto">when right-click an image on a web page and copy it, i can get the image file from both browser's <code class="notranslate">onpaste</code> event and <code class="notranslate">clipboard</code> module that electron provided.</p>
<p dir="auto">when it came to <strong>files(images) in finder</strong>, <code class="notranslate">cmd+c</code> copy it, browser's <code class="notranslate">onpaste</code> event can only give you a preview icon of this file.</p>
<p dir="auto">like this:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2055081/8722431/48302d14-2bf7-11e5-9ec2-e465279aa6db.png"><img src="https://cloud.githubusercontent.com/assets/2055081/8722431/48302d14-2bf7-11e5-9ec2-e465279aa6db.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">i hope electron can give me more power to access clipboard data. but after i look through the api doc of clipboard and native-image, tryed in devtool of electron, the result still the same, i can only get the preview icon of the image.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2055081/8722485/b69c1c18-2bf7-11e5-85f3-e61a59cf4c46.png"><img src="https://cloud.githubusercontent.com/assets/2055081/8722485/b69c1c18-2bf7-11e5-85f3-e61a59cf4c46.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">how can i access to image data copyed from finder, not from web page?</p>
<p dir="auto">here is some code, paste those code to devtool of electron, copy an image file in finder, back to devtool, press enter.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var clipboard = require('clipboard');
var img = clipboard.readImage('png');
document.body.innerHTML += '<img src="' +img.toDataUrl()+ '">';"><pre class="notranslate"><code class="notranslate">var clipboard = require('clipboard');
var img = clipboard.readImage('png');
document.body.innerHTML += '<img src="' +img.toDataUrl()+ '">';
</code></pre></div> | 1 |
<p dir="auto">[Enter steps to reproduce below:]</p>
<ol dir="auto">
<li>...</li>
<li>...</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.169.0<br>
<strong>System</strong>: Mac OS X 10.10.1<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Atom can only handle files < 2MB for now.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /Applications/Atom.app/Contents/Resources/app/src/project.js:355
Error: Atom can only handle files < 2MB for now.
at Project.module.exports.Project.buildBuffer (/Applications/Atom.app/Contents/Resources/app/src/project.js:355:15)
at Project.module.exports.Project.bufferForPath (/Applications/Atom.app/Contents/Resources/app/src/project.js:332:63)
at Project.module.exports.Project.open (/Applications/Atom.app/Contents/Resources/app/src/project.js:286:19)
at Workspace.module.exports.Workspace.openUriInPane (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:485:29)
at Workspace.module.exports.Workspace.open (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:412:19)
at Ipc.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:45:32)
at Ipc.emit (events.js:110:17)
at process.<anonymous> (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:22:29)
at process.emit (events.js:118:17)
"><pre class="notranslate"><code class="notranslate">At /Applications/Atom.app/Contents/Resources/app/src/project.js:355
Error: Atom can only handle files < 2MB for now.
at Project.module.exports.Project.buildBuffer (/Applications/Atom.app/Contents/Resources/app/src/project.js:355:15)
at Project.module.exports.Project.bufferForPath (/Applications/Atom.app/Contents/Resources/app/src/project.js:332:63)
at Project.module.exports.Project.open (/Applications/Atom.app/Contents/Resources/app/src/project.js:286:19)
at Workspace.module.exports.Workspace.openUriInPane (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:485:29)
at Workspace.module.exports.Workspace.open (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:412:19)
at Ipc.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:45:32)
at Ipc.emit (events.js:110:17)
at process.<anonymous> (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:22:29)
at process.emit (events.js:118:17)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -0:00.0 application:open (atom-text-editor.editor.is-focused)"><pre class="notranslate"><code class="notranslate"> -0:00.0 application:open (atom-text-editor.editor.is-focused)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"disabledPackages": [
"autocomplete"
]
},
"editor": {
"fontSize": 12,
"softWrap": true,
"invisibles": {}
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"disabledPackages"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>autocomplete<span class="pl-pds">"</span></span>
]
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"fontSize"</span>: <span class="pl-c1">12</span>,
<span class="pl-ent">"softWrap"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"invisibles"</span>: {}
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
atom-beautify, v0.21.2
autoclose-html, v0.13.0
autocomplete-paths, v0.9.1
autocomplete-plus, v1.1.0
dart-tools, v0.8.5
editorconfig, v0.3.0
html-id-class-snippets, v1.4.1
jsformat, v0.7.18
language-clojure, v0.10.0
language-dart, v0.1.1
linter-clojure, v0.0.4
minimap, v3.5.6
react, v0.8.8
recent-files, v0.3.0
remote-edit, v1.6.3
terminal-status, v1.3.5
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
atom<span class="pl-k">-</span>beautify, v0.<span class="pl-ii">21</span>.<span class="pl-ii">2</span>
autoclose<span class="pl-k">-</span>html, v0.<span class="pl-ii">13</span>.<span class="pl-ii">0</span>
autocomplete<span class="pl-k">-</span>paths, v0.<span class="pl-ii">9</span>.<span class="pl-ii">1</span>
autocomplete<span class="pl-k">-</span>plus, v1.<span class="pl-ii">1</span>.<span class="pl-ii">0</span>
dart<span class="pl-k">-</span>tools, v0.<span class="pl-ii">8</span>.<span class="pl-ii">5</span>
editorconfig, v0.<span class="pl-ii">3</span>.<span class="pl-ii">0</span>
html<span class="pl-k">-</span>id<span class="pl-k">-</span>class<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">4</span>.<span class="pl-ii">1</span>
jsformat, v0.<span class="pl-ii">7</span>.<span class="pl-ii">18</span>
language<span class="pl-k">-</span>clojure, v0.<span class="pl-ii">10</span>.<span class="pl-ii">0</span>
language<span class="pl-k">-</span>dart, v0.<span class="pl-ii">1</span>.<span class="pl-ii">1</span>
linter<span class="pl-k">-</span>clojure, v0.<span class="pl-ii">0</span>.<span class="pl-ii">4</span>
minimap, v3.<span class="pl-ii">5</span>.<span class="pl-ii">6</span>
react, v0.<span class="pl-ii">8</span>.<span class="pl-ii">8</span>
recent<span class="pl-k">-</span>files, v0.<span class="pl-ii">3</span>.<span class="pl-ii">0</span>
remote<span class="pl-k">-</span>edit, v1.<span class="pl-ii">6</span>.<span class="pl-ii">3</span>
terminal<span class="pl-k">-</span>status, v1.<span class="pl-ii">3</span>.<span class="pl-ii">5</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | <p dir="auto">Uncaught Error: Atom can only handle files < 2MB for now.</p>
<p dir="auto"><strong>Atom Version</strong>: 0.153.0<br>
<strong>System</strong>: linux 3.13.0-40-generic<br>
<strong>Thrown From</strong>: <a href="https://github.com/atom/tree-view">tree-view</a> package</p> | 1 |
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">Hi there. This is the error message:</p>
<blockquote>
<p dir="auto">[.CommandBufferContext]RENDER WARNING: there is no texture bound to the unit 1</p>
</blockquote>
<p dir="auto">I try to ignore these warnings, but sometimes (more than 50% time in my 3D Game) it will stop loading textures. It drove me crazy for a whole day and finally found it was caused by the latest Chrome update [Version 50.0.2661.75 m]. (Chrome was updated from [Version 49.0.2623.110 m])</p>
<p dir="auto">This is my test code for the issue:<br>
<a href="http://rendxx.github.io/RendxxGitHub/Test/LightIssue/test-master.html" rel="nofollow">test link for [r75]</a><br>
<a href="http://rendxx.github.io/RendxxGitHub/Test/LightIssue/test-dev.html" rel="nofollow">test link for [dev]</a></p>
<p dir="auto">It is a simple environment to reproduce the issue. It looks fine in this example, but if the scene is complex enough, some textures will be missing.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r75</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> IOS</li>
</ul>
<h5 dir="auto">Hardware Requirements</h5>
<p dir="auto">Hardware isn't relevant.</p> | <p dir="auto">Seems like I'm finally starting to experiment with something that I've been thinking for a long time.</p>
<p dir="auto"><strong>The problem</strong></p>
<p dir="auto">The current <code class="notranslate">Geometry</code> structure is, albeit user-friendly, convoluted and unperformant. That structure was designed before WebGL even existed and it has been patched along the way.</p>
<p dir="auto"><code class="notranslate">BufferGeometry</code> was created as a response to this. However, <code class="notranslate">BufferGeometry</code> has the opposite problem, it's not user-friendly. I don't think a "normal" user needs to know what attributes are.</p>
<p dir="auto">Every time I see a three.js based project running on WebGL on mobile I hope (fear) the persons behind it didn't use <code class="notranslate">Geometry</code>.</p>
<p dir="auto"><strong>The solution</strong></p>
<p dir="auto">I spent a long while trying to think how to make <code class="notranslate">BufferGeometry</code> more user friendly, but I couldn't see a way of doing that without sacrificing its flexibility so eventually I decided to keep <code class="notranslate">BufferGeometry</code> as it is. I spent some time during the last cycle making <code class="notranslate">Projector</code> (<code class="notranslate">CanvasRenderer</code>, <code class="notranslate">SoftwareRenderer</code>, <code class="notranslate">SVGRenderer</code>, ...) support the structure instead.</p>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/blob/dev/src/core/Projector.js#L307-L342">https://github.com/mrdoob/three.js/blob/dev/src/core/Projector.js#L307-L342</a></p>
<p dir="auto">The intention now is to go with <code class="notranslate">Geometry2</code>, which eventually would replace <code class="notranslate">Geometry</code> and break backwards compatibility, although I wonder if people modify geometry much or not...</p>
<p dir="auto">The idea of <code class="notranslate">Geometry2</code> is to have everything in flat arrays: <code class="notranslate">vertices</code>, <code class="notranslate">normals</code>, <code class="notranslate">uvs</code> and <code class="notranslate">colors</code> ready to be submitted to the GPU (on the WebGL side).</p>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/blob/dev/src/core/Geometry2.js">https://github.com/mrdoob/three.js/blob/dev/src/core/Geometry2.js</a></p>
<p dir="auto">However, that's not very user-friendly... I experimented with a similar class some months ago that had some "interfaces" to help the user:</p>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/blob/dev/examples/js/core/TypedGeometry.js">https://github.com/mrdoob/three.js/blob/dev/examples/js/core/TypedGeometry.js</a></p>
<p dir="auto">All that getters/setters black magic basically allows the user to modify the geometry without having to know that they're just modifying a blob of numbers. The API looked like this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="geometry.face( 10 ).vertex( 1 ).x = 10;"><pre class="notranslate"><span class="pl-s1">geometry</span><span class="pl-kos">.</span><span class="pl-en">face</span><span class="pl-kos">(</span> <span class="pl-c1">10</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">vertex</span><span class="pl-kos">(</span> <span class="pl-c1">1</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">x</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">However, this would only be for the user. Generators and loaders would fill the arrays directly. Here's how <code class="notranslate">PlaneGeometry2</code> looks like:</p>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/blob/dev/src/extras/geometries/PlaneGeometry2.js">https://github.com/mrdoob/three.js/blob/dev/src/extras/geometries/PlaneGeometry2.js</a></p>
<p dir="auto">As a side not, performance-wise, I've noticed that where <code class="notranslate">PlaneGeometry</code> was created in ~6ms, <code class="notranslate">PlaneGeometry2</code> generates in ~0.3ms.</p>
<p dir="auto">On the <code class="notranslate">Projector</code> side, the code is looking pretty simple so far:</p>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/blob/dev/src/core/Projector.js#L343-L358">https://github.com/mrdoob/three.js/blob/dev/src/core/Projector.js#L343-L358</a></p>
<p dir="auto"><strong>To index or not to index</strong></p>
<p dir="auto">This is another topic that has troubled me for years and I think I want to bet to favour non-indexed geometries this time around. Part of the current over complexity in <code class="notranslate">WebGLRenderer</code> is the fact that WebGL limits <code class="notranslate">ELEMENT_ARRAY_BUFFER</code> (indices) to <code class="notranslate">Uint16Array</code> (without extensions). This means that, internally, <code class="notranslate">WebGLRenderer</code> has to split your geometry in chunks and well... I rather not explain how painful this is.</p>
<p dir="auto">So, even if indexed geometries save on GPU bandwidth, I don't think the complexity it creates is worth it. <code class="notranslate">Geometry2</code> won't support indices (Let me know if I'm missing something here).</p>
<p dir="auto">However, <code class="notranslate">BufferGeometry</code> will still be in place, so if someone wants to construct their custom indexed geometry they will still have a way to do it.</p>
<p dir="auto"><strong>Outcome</strong></p>
<p dir="auto">In theory, generators and loaders will speed up ~10x. Projects will consume less memory (single <code class="notranslate">Float32Array</code>s vs tons of <code class="notranslate">Vector2</code>/<code class="notranslate">Vector3</code>s). And, both <code class="notranslate">Projector</code> and <code class="notranslate">WebGLRenderer</code> will get much simpler.</p> | 0 |
<p dir="auto"><strong>I'm submitting a</strong></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> bug report</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> feature request</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> support request</li>
</ul>
<p dir="auto"><strong>Current behavior</strong><br>
When instantiating a component with <a href="https://angular.io/docs/ts/latest/api/core/index/ViewContainerRef-class.html#!#createComponent-anchor" rel="nofollow">ViewContainerRef.createComponent()</a>, if component has a selector, and there are also directives that match the component selector, they don't get instantiated.</p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">All matching directives should get instantiated along with the component instantiation.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
This plunk: <a href="https://plnkr.co/edit/1oLA6HkAuOTgwOPMseG2?p=preview" rel="nofollow">https://plnkr.co/edit/1oLA6HkAuOTgwOPMseG2?p=preview</a></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto">Creating component from <strong>template</strong>, or <strong>programmatically</strong> is a matter of use case and should result in the same outcome as much as possible. Although there is no support for explicitly applying a custom set of directives on the instantiated component when working with <code class="notranslate">ViewContainerRef.createComponent()</code>, and it may be too complicated to add support for it, the case when component selector matches some other directives can and need to be handled.</p>
<p dir="auto">The specific use case in which I encountered the issue:<br>
I was creating a structural <code class="notranslate">*myLoading="condition"</code> directive, which simply renders a spinner if the condition is true or renders the host element otherwise. I was using <a href="https://material.angular.io/components/component/progress-spinner" rel="nofollow">MdProgressSpinner</a> component for the spinner but the stroke color was not applying because the theme related classes are adding via a directive with exact same selector as the component selector.<br>
I created a <a href="https://plnkr.co/edit/DLJoA3L40p7WLSxcoDO4?p=preview" rel="nofollow">simple plunk</a> for this example.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<p dir="auto">Not related actually.</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 4.1.3</li>
</ul>
<ul dir="auto">
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
</ul>
<ul dir="auto">
<li>
<p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =</p>
</li>
</ul> | <p dir="auto">I've been digging into Angular 2 and have run into a potential road block for extending certain kinds of components.</p>
<p dir="auto">In the the following example, I have a button component, and a directive that will apply styles based on touch events. There will be many other objects other than just the button that will inherit the exact same touch behavior. I've explored my options, and I'm at a loss:</p>
<ul dir="auto">
<li>Directly extend a TouchClass. This seems less than ideal since typescript doesn't support multiple class inheritance, and I'd also like to expose the behavior to consumers for use in their own classes.</li>
<li>Fake multiple class inheritance through an interface. This seems like a hack and requires me to redeclare a shim api on every class I'm trying to mix into. <a href="https://www.stevefenton.co.uk/2014/02/TypeScript-Mixins-Part-One/" rel="nofollow">https://www.stevefenton.co.uk/2014/02/TypeScript-Mixins-Part-One/</a></li>
<li>Create a helper function that does it through a service directly on elementRef.nativeElement in the component constructor. I really don't want to do this since it states in the docs that nativeElement will be null when running in a worker, and that capability is something I'm the most excited about.</li>
</ul>
<p dir="auto">Without getting too deep into the guts, I'd presume that the componentMetadata is available during the components compile time, and that the host property could be scanned for additional directives that could be added dynamically and compiled at the same time. This would allow you to do mixins the angular way: using composable directives to extend functionality, and doing it without breaking view projection. Short example below.</p>
<p dir="auto"><strong>Current behavior</strong><br>
Declaring a directive in componentMetadata.host treats it as a regular attribute</p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
The directive declared in host would be processed at compile time.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/**
* App
*/
@Component({
selector: 'app-component',
template: '<g-btn>TEST</g-btn>',
directives: [gBtn, gTouch]
})
export class AppComponent {
constructor() {
}
}
/**
* Touch Directive
* Will be used in lots and lots of components
*/
@Directive({
selector: '[g-touch]',
host: {
'(touchstart)': '...',
'(touchend)': '...',
'(touchmove)': '...',
'(touchcancel)': '...'
}
})
export class gTouch {
constructor() {
}
}
/**
* Simple button component
*/
@Component({
selector: 'g-btn',
template: '<ng-content></ng-content>',
host: {
'role': 'button',
// WOULD LOVE FOR THIS TO COMPILE THE DIRECTIVE!
// right now it just adds an attribute called g-touch
'g-touch': ' '
}
})
export class gBtn {
constructor() {
}
}"><pre class="notranslate"><span class="pl-c">/**</span>
<span class="pl-c"> * App</span>
<span class="pl-c"> */</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'app-component'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'<g-btn>TEST</g-btn>'</span><span class="pl-kos">,</span>
<span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-s1">gBtn</span><span class="pl-kos">,</span> <span class="pl-s1">gTouch</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">AppComponent</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Touch Directive</span>
<span class="pl-c"> * Will be used in lots and lots of components</span>
<span class="pl-c"> */</span>
@<span class="pl-smi">Directive</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'[g-touch]'</span><span class="pl-kos">,</span>
<span class="pl-c1">host</span>: <span class="pl-kos">{</span>
<span class="pl-s">'(touchstart)'</span>: <span class="pl-s">'...'</span><span class="pl-kos">,</span>
<span class="pl-s">'(touchend)'</span>: <span class="pl-s">'...'</span><span class="pl-kos">,</span>
<span class="pl-s">'(touchmove)'</span>: <span class="pl-s">'...'</span><span class="pl-kos">,</span>
<span class="pl-s">'(touchcancel)'</span>: <span class="pl-s">'...'</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">gTouch</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Simple button component</span>
<span class="pl-c"> */</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'g-btn'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'<ng-content></ng-content>'</span><span class="pl-kos">,</span>
<span class="pl-c1">host</span>: <span class="pl-kos">{</span>
<span class="pl-s">'role'</span>: <span class="pl-s">'button'</span><span class="pl-kos">,</span>
<span class="pl-c">// WOULD LOVE FOR THIS TO COMPILE THE DIRECTIVE!</span>
<span class="pl-c">// right now it just adds an attribute called g-touch</span>
<span class="pl-s">'g-touch'</span>: <span class="pl-s">' '</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">gBtn</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Some ideas of how this could work:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Option 1: just scan the host properties for directives.
// This would be my ideal, simple and understandable
@Component({
selector: 'g-btn',
template: '<ng-content></ng-content>',
host: {
'role': 'button',
'g-touch': true // or {prop: 'foo'} or string
}
})
// Option 2: definitely more declarative using a hostDirectives property
// more declarative, albeit more annoying to have to reimport the touch class
@Component({
selector: 'g-btn',
template: '<ng-content></ng-content>',
hostDirectives: gTouch,
host: {
'role': 'button',
'g-touch': true
}
})
// Option 3: declare host directives as its own thing, still just
// use keys pointing to bool, obj, or string
@Component({
selector: 'g-btn',
template: '<ng-content></ng-content>',
hostDirectives: {
'g-touch': {someOption: someOption}
},
host: {
'role': 'button',
}
});
// Option 4: Not a huge fan of this one, but understandable if
// people want to keep one host property
@Component({
selector: 'g-btn',
template: '<ng-content></ng-content>',
host: {
'role': 'button',
_directives: {
'g-touch': true
}
}
});"><pre class="notranslate"><span class="pl-c">// Option 1: just scan the host properties for directives.</span>
<span class="pl-c">// This would be my ideal, simple and understandable</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'g-btn'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'<ng-content></ng-content>'</span><span class="pl-kos">,</span>
<span class="pl-c1">host</span>: <span class="pl-kos">{</span>
<span class="pl-s">'role'</span>: <span class="pl-s">'button'</span><span class="pl-kos">,</span>
<span class="pl-s">'g-touch'</span>: <span class="pl-c1">true</span> <span class="pl-c">// or {prop: 'foo'} or string</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-c">// Option 2: definitely more declarative using a hostDirectives property</span>
<span class="pl-c">// more declarative, albeit more annoying to have to reimport the touch class</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'g-btn'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'<ng-content></ng-content>'</span><span class="pl-kos">,</span>
<span class="pl-c1">hostDirectives</span>: <span class="pl-s1">gTouch</span><span class="pl-kos">,</span>
<span class="pl-c1">host</span>: <span class="pl-kos">{</span>
<span class="pl-s">'role'</span>: <span class="pl-s">'button'</span><span class="pl-kos">,</span>
<span class="pl-s">'g-touch'</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-c">// Option 3: declare host directives as its own thing, still just</span>
<span class="pl-c">// use keys pointing to bool, obj, or string</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'g-btn'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'<ng-content></ng-content>'</span><span class="pl-kos">,</span>
<span class="pl-c1">hostDirectives</span>: <span class="pl-kos">{</span>
<span class="pl-s">'g-touch'</span>: <span class="pl-kos">{</span><span class="pl-c1">someOption</span>: <span class="pl-s1">someOption</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">host</span>: <span class="pl-kos">{</span>
<span class="pl-s">'role'</span>: <span class="pl-s">'button'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Option 4: Not a huge fan of this one, but understandable if</span>
<span class="pl-c">// people want to keep one host property</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'g-btn'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'<ng-content></ng-content>'</span><span class="pl-kos">,</span>
<span class="pl-c1">host</span>: <span class="pl-kos">{</span>
<span class="pl-s">'role'</span>: <span class="pl-s">'button'</span><span class="pl-kos">,</span>
<span class="pl-c1">_directives</span>: <span class="pl-kos">{</span>
<span class="pl-s">'g-touch'</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Thanks everyone, Angular 2 is looking great!. Let me know if theres something I'm missing.</p> | 1 |
<p dir="auto">This sample illustrates what I'm talking about:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" // Run this with:
// deno run --allow-run ./elevation.ts
if (Deno.args.includes('network')) {
console.log('Thanks for the elevated permissions sucker!')
const result = await fetch('https://example.com');
console.log(result)
} else {
const p = Deno.run({
cmd: ['deno', 'run', '--allow-net', './elevation.ts', 'network']
})
// await its completion
const code = await p.status()
console.log(code)
}
"><pre class="notranslate"><code class="notranslate"> // Run this with:
// deno run --allow-run ./elevation.ts
if (Deno.args.includes('network')) {
console.log('Thanks for the elevated permissions sucker!')
const result = await fetch('https://example.com');
console.log(result)
} else {
const p = Deno.run({
cmd: ['deno', 'run', '--allow-net', './elevation.ts', 'network']
})
// await its completion
const code = await p.status()
console.log(code)
}
</code></pre></div>
<p dir="auto">Unless Deno does some advanced cascading of ACL around further deno's spawned within its process (which it seems like it should do here) this is relaying a false sense of security to the user of the deno program.</p>
<p dir="auto">If I am a user, and I run unknown code via deno, with the assumption of deno's security protecting me (which is what the marketing blurbs seem to imply), I wouldn't expect that an --allow-run flag is giving full unfettered access to everything.</p>
<p dir="auto">As such, the allow-run flag is very misleading and should not be a distinct flag - if people need to run subprocesses, it should only be done with the allow-all flag.</p> | <p dir="auto">When you execute a subprocess there's no guarantees of what it can do - all security bets are off. <code class="notranslate">--allow-run</code> masks this and is an extra command line flag. Therefore I suggest removing it entirely and requiring users to supply <code class="notranslate">--allow-all</code>.</p> | 1 |
<p dir="auto">Fresh clone of repo.<br>
commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/1d53babd2f23439975518fda94d9122b15e779c9/hovercard" href="https://github.com/rust-lang/rust/commit/1d53babd2f23439975518fda94d9122b15e779c9"><tt>1d53bab</tt></a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% configure --disable-debug --disable-optimize --enable-clang
% time make -j8
...
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore.dylib
rust: task 7fa031d00000 ran out of stack
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libstd.dylib
cp: x86_64-apple-darwin/stage2/lib/libcore.dylib
cp: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore-*.dylib: No such file or directory
make: *** [x86_64-apple-darwin/stage2/lib/libcore.dylib] Error 1
make: *** Waiting for unfinished jobs....
rust: task 7fa058c0ad10 ran out of stack
real 4m54.362s
user 22m36.394s
sys 1m4.580s"><pre class="notranslate"><code class="notranslate">% configure --disable-debug --disable-optimize --enable-clang
% time make -j8
...
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore.dylib
rust: task 7fa031d00000 ran out of stack
compile_and_link: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libstd.dylib
cp: x86_64-apple-darwin/stage2/lib/libcore.dylib
cp: x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore-*.dylib: No such file or directory
make: *** [x86_64-apple-darwin/stage2/lib/libcore.dylib] Error 1
make: *** Waiting for unfinished jobs....
rust: task 7fa058c0ad10 ran out of stack
real 4m54.362s
user 22m36.394s
sys 1m4.580s
</code></pre></div>
<p dir="auto">This may be a duplicate of another issue, for example perhaps <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13615943" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/6049" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/6049/hovercard" href="https://github.com/rust-lang/rust/issues/6049">#6049</a>. I'm honestly not sure.</p>
<p dir="auto">At this point I have bisected the problem down to:</p>
<p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/4a24f10ac6f155699f086051ba6a728d9afb5ca6/hovercard" href="https://github.com/rust-lang/rust/commit/4a24f10ac6f155699f086051ba6a728d9afb5ca6"><tt>4a24f10</tt></a> is the first bad commit<br>
commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/4a24f10ac6f155699f086051ba6a728d9afb5ca6/hovercard" href="https://github.com/rust-lang/rust/commit/4a24f10ac6f155699f086051ba6a728d9afb5ca6"><tt>4a24f10</tt></a><br>
Author: Huon Wilson <a href="mailto:[email protected]">[email protected]</a><br>
Date: Wed Apr 24 22:29:19 2013 +1000</p>
<p dir="auto">(But it is possible that Huon's code is just exposing a latent bug in rustc, rather than actually having something fundamentally wrong with it itself.) I plan to investigate backing out Huon's change to see if that makes the problem go away, just so I can actually bootstrap a compiler and do more investigation.</p> | <p dir="auto">I encountered an assertion failure in rustc 0.6</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
let x = Some(3);
let y = 0;
match(x) {
None => println("None"),
_ if y == 0 => println("y is zero"),
Some(n) => println(fmt!("Some(%d)", n)),
}
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> x = <span class="pl-v">Some</span><span class="pl-kos">(</span><span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> y = <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-k">match</span><span class="pl-kos">(</span>x<span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-v">None</span> => <span class="pl-en">println</span><span class="pl-kos">(</span><span class="pl-s">"None"</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
_ <span class="pl-k">if</span> y == <span class="pl-c1">0</span> => <span class="pl-en">println</span><span class="pl-kos">(</span><span class="pl-s">"y is zero"</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-v">Some</span><span class="pl-kos">(</span>n<span class="pl-kos">)</span> => <span class="pl-en">println</span><span class="pl-kos">(</span><span class="pl-en">fmt</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Some(%d)"</span>, n<span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Above is a simple test code to reproduce the bug<br>
(Yes it is a silly code which can be rephrased into match nested in if)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kimhyunkang$ RUST_LOG=rustc=1,::rt::backtrace rustc test.rs
rust: task failed at 'assertion failed: (m.len() > 0u || chk.is_some())', /Users/kimhyunkang/usr/pkgs/rust-0.6/src/librustc/middle/trans/_match.rs:1262
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/kimhyunkang/usr/pkgs/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x7f8789819410 root task failed"><pre class="notranslate"><code class="notranslate">kimhyunkang$ RUST_LOG=rustc=1,::rt::backtrace rustc test.rs
rust: task failed at 'assertion failed: (m.len() > 0u || chk.is_some())', /Users/kimhyunkang/usr/pkgs/rust-0.6/src/librustc/middle/trans/_match.rs:1262
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/kimhyunkang/usr/pkgs/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x7f8789819410 root task failed
</code></pre></div> | 0 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-passing-values-to-functions-with-arguments#?solution=%2F%2F%20Example%0Afunction%20ourFunction%28a%2C%20b%29%20%7B%0A%20%20console.log%28a%20-%20b%29%3B%0A%7D%0AourFunction%2810%2C%205%29%3B%20%2F%2F%20Outputs%205%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line.%0Avar%20myFunction%20%3D%20function%28param1%2C%20param2%29%7B%0A%20%20console.log%28param1%20%2B%20param2%29%3B%0A%7D%3B%0AmyFunction%2820%2C%2020%29%3B%0A%0A" rel="nofollow">Waypoint: Passing Values to Functions with Arguments</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36</code>.</p>
<p dir="auto">This is the error throwing "RangeError: Maximum call stack size exceeded"<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3717689/12060409/691ed65c-af45-11e5-867e-a566f3b3edaf.png"><img src="https://cloud.githubusercontent.com/assets/3717689/12060409/691ed65c-af45-11e5-867e-a566f3b3edaf.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">My code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Example
function ourFunction(a, b) {
console.log(a - b);
}
ourFunction(10, 5); // Outputs 5
// Only change code below this line.
var myFunction = function(param1, param2){
console.log(param1 + param2);
};
myFunction(20, 20);
"><pre class="notranslate"><span class="pl-c">// Example</span>
<span class="pl-k">function</span> <span class="pl-en">ourFunction</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">a</span> <span class="pl-c1">-</span> <span class="pl-s1">b</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">ourFunction</span><span class="pl-kos">(</span><span class="pl-c1">10</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Outputs 5</span>
<span class="pl-c">// Only change code below this line.</span>
<span class="pl-k">var</span> <span class="pl-en">myFunction</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">param1</span><span class="pl-kos">,</span> <span class="pl-s1">param2</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">param1</span> <span class="pl-c1">+</span> <span class="pl-s1">param2</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-en">myFunction</span><span class="pl-kos">(</span><span class="pl-c1">20</span><span class="pl-kos">,</span> <span class="pl-c1">20</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
</pre></div> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-passing-values-to-functions-with-arguments#?solution=%2F%2F%20Example%0Afunction%20ourFunction%28a%2C%20b%29%20%7B%0A%20%20console.log%28a%20-%20b%29%3B%0A%7D%0AourFunction%2810%2C%205%29%3B%20%2F%2F%20Outputs%205%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line.%0A%0Afunction%20myFunction%28c%2C%20d%29%7B%0A%20%20console.log%28c%20%2B%20d%29%3B%0A%7D%0AmyFunction%282%2C%203%29%3B%0A" rel="nofollow">Waypoint: Passing Values to Functions with Arguments</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36</code>.</p>
<p dir="auto">Running tests outputs <code class="notranslate">RangeError: Maximum call stack size exceeded</code> and no tests pass.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Example
function ourFunction(a, b) {
console.log(a - b);
}
ourFunction(10, 5); // Outputs 5
// Only change code below this line.
function myFunction(c, d){
console.log(c + d);
}
myFunction(2, 3);
"><pre class="notranslate"><span class="pl-c">// Example</span>
<span class="pl-k">function</span> <span class="pl-en">ourFunction</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">a</span> <span class="pl-c1">-</span> <span class="pl-s1">b</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">ourFunction</span><span class="pl-kos">(</span><span class="pl-c1">10</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Outputs 5</span>
<span class="pl-c">// Only change code below this line.</span>
<span class="pl-k">function</span> <span class="pl-en">myFunction</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">,</span> <span class="pl-s1">d</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">c</span> <span class="pl-c1">+</span> <span class="pl-s1">d</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">myFunction</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">after changing with django + celery to python 3.6.7 I get a DeprecationWarning for<br>
../celery/utils/imports.py:</p>
<p dir="auto">kind regards Jens</p>
<ul class="contains-task-list">
<li>[x ] I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues in this issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with retries, ETA/Countdown & rate limits disabled.</li>
</ul>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto">problem is not visible with pyhton3.5.x<br>
same output for celery 4.3.rc2 or 4.2.1</p>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">no Deprecation Warning for python 3.6.7 like before in python 3.5</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Output of <code class="notranslate">/venvdir/dev367/bin/python -Wd manage.py runserver 0.0.0.0:8000</code> :<br>
<code class="notranslate">/venvdir/dev367/lib/python3.6/site-packages/celery/utils/imports.py:5: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp as _imp</code></p>
<p dir="auto"><code class="notranslate">/venvdir/dev367/bin/celery -A client report software -> celery:4.3.0rc2 (rhubarb) kombu:4.4.0 py:3.6.7 billiard:3.6.0.0 py-amqp:2.4.2 platform -> system:Linux arch:64bit, ELF kernel version:4.14.92-boot2docker imp:CPython loader -> celery.loaders.app.AppLoader settings -> transport:amqp results:django-db</code></p> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Issue+Type%3A+Feature+Request%22+">issues list</a><br>
for similar or identical feature requests.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3A%22PR+Type%3A+Feature%22+">pull requests list</a><br>
for existing proposed implementations of this feature.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the if the same feature was already implemented in the<br>
master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h1 dir="auto">Brief Summary</h1>
<p dir="auto">With <code class="notranslate">prefork</code>, there are a couple parameters <code class="notranslate">--max-tasks-per-child</code> and <code class="notranslate">--max-memory-per-child</code> that can help control memory usage in case of memory leaks. Those parameters aren't compatible with <code class="notranslate">gevent</code>. It would be awesome if there was a way to handle memory leaks with eventlets, where a restart or cleanup can be triggered</p>
<h1 dir="auto">Design</h1>
<h2 dir="auto">Architectural Considerations</h2>
<p dir="auto">None</p>
<h2 dir="auto">Proposed Behavior</h2>
<h2 dir="auto">Proposed UI/UX</h2>
<h2 dir="auto">Diagrams</h2>
<p dir="auto">N/A</p>
<h2 dir="auto">Alternatives</h2>
<p dir="auto">None</p> | 0 |
<p dir="auto">This happens when I'm trying to write a file directly in a remote FTP directory.</p>
<ol dir="auto">
<li>Try to open a remote FTP folder through Nautilus (Linux/Gnome).</li>
<li>Open a file from this folder with Atom.</li>
<li>Write something and save.</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.194.0<br>
<strong>System</strong>: linux 3.19.3-3-ARCH<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: ESPIPE: invalid seek, write</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /usr/share/atom/resources/app.asar/src/pane.js:759
Error: ESPIPE: invalid seek, write
at Error (native)
at Object.fs.writeSync (fs.js:657:20)
at Object.fs.writeFileSync (fs.js:1164:21)
at Object.fsPlus.writeFileSync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/lib/fs-plus.js:240:17)
at File.module.exports.File.writeFileSync (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:264:19)
at File.module.exports.File.writeFileWithPrivilegeEscalationSync (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:362:21)
at File.module.exports.File.writeSync (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:336:12)
at TextBuffer.module.exports.TextBuffer.saveAs (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:913:17)
at TextBuffer.module.exports.TextBuffer.save (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:899:19)
at TextEditor.module.exports.TextEditor.save (/usr/share/atom/resources/app.asar/src/text-editor.js:554:26)
at Pane.module.exports.Pane.saveItem (/usr/share/atom/resources/app.asar/src/pane.js:523:18)
at Pane.module.exports.Pane.saveActiveItem (/usr/share/atom/resources/app.asar/src/pane.js:506:19)
at Workspace.module.exports.Workspace.saveActivePaneItem (/usr/share/atom/resources/app.asar/src/workspace.js:574:35)
at atom-workspace.atom.commands.add.core:save (/usr/share/atom/resources/app.asar/src/workspace-element.js:310:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:238:29)
at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:178:20)
"><pre class="notranslate"><code class="notranslate">At /usr/share/atom/resources/app.asar/src/pane.js:759
Error: ESPIPE: invalid seek, write
at Error (native)
at Object.fs.writeSync (fs.js:657:20)
at Object.fs.writeFileSync (fs.js:1164:21)
at Object.fsPlus.writeFileSync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/lib/fs-plus.js:240:17)
at File.module.exports.File.writeFileSync (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:264:19)
at File.module.exports.File.writeFileWithPrivilegeEscalationSync (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:362:21)
at File.module.exports.File.writeSync (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:336:12)
at TextBuffer.module.exports.TextBuffer.saveAs (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:913:17)
at TextBuffer.module.exports.TextBuffer.save (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:899:19)
at TextEditor.module.exports.TextEditor.save (/usr/share/atom/resources/app.asar/src/text-editor.js:554:26)
at Pane.module.exports.Pane.saveItem (/usr/share/atom/resources/app.asar/src/pane.js:523:18)
at Pane.module.exports.Pane.saveActiveItem (/usr/share/atom/resources/app.asar/src/pane.js:506:19)
at Workspace.module.exports.Workspace.saveActivePaneItem (/usr/share/atom/resources/app.asar/src/workspace.js:574:35)
at atom-workspace.atom.commands.add.core:save (/usr/share/atom/resources/app.asar/src/workspace-element.js:310:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:238:29)
at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:178:20)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -0:01.8.0 core:save (atom-text-editor.editor.is-focused)"><pre class="notranslate"><code class="notranslate"> -0:01.8.0 core:save (atom-text-editor.editor.is-focused)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"followSymlinks": true,
"autoHideMenuBar": true,
"themes": [
"one-light-ui",
"atom-light-syntax"
]
},
"editor": {
"fontFamily": "Monaco",
"showIndentGuide": true,
"tabLength": 4,
"useShadowDOM": true,
"invisibles": {},
"fontSize": 12
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"followSymlinks"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"autoHideMenuBar"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"themes"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>one-light-ui<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>atom-light-syntax<span class="pl-pds">"</span></span>
]
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"fontFamily"</span>: <span class="pl-s"><span class="pl-pds">"</span>Monaco<span class="pl-pds">"</span></span>,
<span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"tabLength"</span>: <span class="pl-c1">4</span>,
<span class="pl-ent">"useShadowDOM"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"fontSize"</span>: <span class="pl-c1">12</span>
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
angularjs, v0.2.0
atom-beautify, v0.24.1
atom-html-preview, v0.1.6
atomui, vundefined
autoclose-html, v0.15.0
color-picker, v1.7.0
docblockr, v0.6.3
html-helper, v0.2.3
laravel, v0.4.2
script, v2.19.0
terminal-panel, v1.10.0
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
angularjs, v0.<span class="pl-ii">2</span>.<span class="pl-ii">0</span>
atom<span class="pl-k">-</span>beautify, v0.<span class="pl-ii">24</span>.<span class="pl-ii">1</span>
atom<span class="pl-k">-</span>html<span class="pl-k">-</span>preview, v0.<span class="pl-ii">1</span>.<span class="pl-ii">6</span>
atomui, vundefined
autoclose<span class="pl-k">-</span>html, v0.<span class="pl-ii">15</span>.<span class="pl-ii">0</span>
color<span class="pl-k">-</span>picker, v1.<span class="pl-ii">7</span>.<span class="pl-ii">0</span>
docblockr, v0.<span class="pl-ii">6</span>.<span class="pl-ii">3</span>
html<span class="pl-k">-</span>helper, v0.<span class="pl-ii">2</span>.<span class="pl-ii">3</span>
laravel, v0.<span class="pl-ii">4</span>.<span class="pl-ii">2</span>
script, v2.<span class="pl-ii">19</span>.<span class="pl-ii">0</span>
terminal<span class="pl-k">-</span>panel, v1.<span class="pl-ii">10</span>.<span class="pl-ii">0</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | <p dir="auto">Title pretty much sums it up. No problems saving to a regular file system. SSHFS is fine too. I'm on Ubuntu 14.04 x64. I've encountered this error in various .99, .100, and .101 builds from the master branch.</p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">When exit a dialog, the dialog paper should disappear with the passed transition (zooms out if the transition is <code class="notranslate">Grow</code>)</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The dialog paper disappears immediately, but the backdrop disappears normally.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Open the dialog with <code class="notranslate">Grow</code> transition</li>
<li>Close the opened dialog</li>
<li><a href="https://codesandbox.io/s/k01k060n73" rel="nofollow">https://codesandbox.io/s/k01k060n73</a></li>
</ol>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.20</td>
</tr>
<tr>
<td>React</td>
<td>16.0.0</td>
</tr>
<tr>
<td>browser</td>
<td>64.0.3265.0 (Official Build) canary (64-bit)</td>
</tr>
</tbody>
</table> | <p dir="auto">When the button has focus and you press ENTER to execute the action, the handler is actually called twice. If I press the button with the mouse the handler is only called one, which is the expected behaviour. This is not specific to FlatButton, as I've seen the same behaviour for IconButton as well.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">onClick handler should only be called once.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">onClick handler is called twice.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Check this url: <a href="https://codesandbox.io/s/20kq3pow9p" rel="nofollow">https://codesandbox.io/s/20kq3pow9p</a></p>
<ol dir="auto">
<li>Bring up Chrome dev tools to be able to see the console.log</li>
<li>Click the text "hello" to move focus to that window.</li>
<li>On the keyboard hit tab to set focus to the "Click me" button</li>
<li>Hit ENTER on the keyboard</li>
<li>Watch the console and see that "clicked" was printed twice.</li>
</ol>
<p dir="auto">Also note that if I in the handler uncomment e.preventDefault() it's actually only printed once.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">Trying to enable navigation by using keyboard only (or most of the time).</p>
<h2 dir="auto">Your Environment</h2>
<p dir="auto">OSX</p>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>0.19.2</td>
</tr>
<tr>
<td>React</td>
<td>15.5.4</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto"><code class="notranslate">test/repl.jl</code> was added in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34228161" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6955" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/6955/hovercard" href="https://github.com/JuliaLang/julia/pull/6955">#6955</a>, most of the file is <code class="notranslate">@unix_only</code> at the moment except a few lines at the very end. These lines are freezing for me on Windows, but they're using process commands that you'd think <em>should work</em>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" | | |_| | | | (_| | | Version 0.3.0-prerelease+3381 (2014-06-02 13:19 UTC)
_/ |\__'_|_|_|\__'_| | Commit ddf4197* (0 days old master)
|__/ | x86_64-w64-mingw32
julia> exename = joinpath(JULIA_HOME, "julia")
"D:\\code\\msys64\\home\\Tony\\julia\\usr\\bin\\julia"
julia> outs, ins, p = readandwrite(`$exename -f --quiet`)
(Pipe(active, 0 bytes waiting),Pipe(open, 0 bytes waiting),Process(`'D:\code\msy
s64\home\Tony\julia\usr\bin\julia' -f --quiet`, ProcessRunning))
julia> write(ins,"1\nquit()\n")
9
julia> ins
Pipe(open, 0 bytes waiting)
julia> outs
Pipe(active, 2 bytes waiting)
julia> readall(outs)"><pre class="notranslate"><code class="notranslate"> | | |_| | | | (_| | | Version 0.3.0-prerelease+3381 (2014-06-02 13:19 UTC)
_/ |\__'_|_|_|\__'_| | Commit ddf4197* (0 days old master)
|__/ | x86_64-w64-mingw32
julia> exename = joinpath(JULIA_HOME, "julia")
"D:\\code\\msys64\\home\\Tony\\julia\\usr\\bin\\julia"
julia> outs, ins, p = readandwrite(`$exename -f --quiet`)
(Pipe(active, 0 bytes waiting),Pipe(open, 0 bytes waiting),Process(`'D:\code\msy
s64\home\Tony\julia\usr\bin\julia' -f --quiet`, ProcessRunning))
julia> write(ins,"1\nquit()\n")
9
julia> ins
Pipe(open, 0 bytes waiting)
julia> outs
Pipe(active, 2 bytes waiting)
julia> readall(outs)
</code></pre></div>
<p dir="auto">This last command never exits, I have to manually kill the julia process(es).</p>
<hr>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="exename = joinpath(JULIA_HOME, "julia")
outs, ins, p = readandwrite(`$exename -f --quiet`)
write(ins,"1\nquit()\n")
readall(outs)"><pre class="notranslate"><code class="notranslate">exename = joinpath(JULIA_HOME, "julia")
outs, ins, p = readandwrite(`$exename -f --quiet`)
write(ins,"1\nquit()\n")
readall(outs)
</code></pre></div> | <p dir="auto">For some reason jl_is_pty (or more precisely the pNtQueryInformationFile in uv_get socketname) blocks until another character is received on stdin.</p> | 1 |
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.): No</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): etcd watcher</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): Bug report</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>): HEAD / commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kubernetes/kubernetes/commit/8b5264e095251aa4ffa546390e2ef785061dc5e8/hovercard" href="https://github.com/kubernetes/kubernetes/commit/8b5264e095251aa4ffa546390e2ef785061dc5e8"><tt>8b5264e</tt></a></p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: local VM</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Fedora 24</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux localhost.localdomain 4.7.7-200.fc24.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192559" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1">#1</a> SMP Sat Oct 8 00:21:59 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</li>
<li><strong>Install tools</strong>: N/A</li>
<li><strong>Others</strong>: N/A</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">If you do a watch from resource version "0" using etcd_watcher.go (the etcd v2 client code), it initially performs a get of the key in question and returns Added or Modified events, based on a comparison of each node's createdIndex and modifiedIndex. This works all the time.</p>
<p dir="auto">If you do a watch from resource version "0" using watcher.go (the etcd v3 client code), it attempts to get <code class="notranslate">kv.modifiedIndex - 1</code> for each kv returned, in an attempt to provide both the previous and current versions of each kv/object. This works as long as <code class="notranslate">kv.modifiedIndex - 1</code> has not been compacted. If compaction has occurred, the initial <code class="notranslate">sync()</code> will fail, and it's not possible to watch from "0"' for this particular key.</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">Either:</p>
<ol dir="auto">
<li>The v3 watcher should not change the behavior from the v2 watcher; namely, it should not attempt to get the previous revision of each object and instead just return the current version as a <code class="notranslate">watch.Added</code> event</li>
<li>We agree that it's ok to change the behavior, and in the event that the database has been compacted and the previous revision of an object cannot be retrieved, that object is sent as a <code class="notranslate">watch.Added</code> event instead of <code class="notranslate">watch.Modified</code>.</li>
</ol>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible): I'm working on a unit test and fix.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wojtek-t/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wojtek-t">@wojtek-t</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hongchaodeng/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hongchaodeng">@hongchaodeng</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/xiang90/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/xiang90">@xiang90</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/smarterclayton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/smarterclayton">@smarterclayton</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/liggitt/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/liggitt">@liggitt</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/deads2k/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/deads2k">@deads2k</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/derekwaynecarr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/derekwaynecarr">@derekwaynecarr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sttts/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sttts">@sttts</a></p> | <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | 0 |
<p dir="auto"><strong>Apache Airflow version</strong>:<br>
2.0.0b3</p>
<p dir="auto"><strong>What happened</strong>:<br>
When Airflow is ran within CeleryExecutor mode and using the new Cloudwatch integration (from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="566055616" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/7437" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/7437/hovercard" href="https://github.com/apache/airflow/pull/7437">#7437</a>), log groups and log streams are created, but no log events are pushed to AWS. The Webserver is able to read the log stream as expected. There are no errors, just empty logs within Cloudwatch:<br>
<code class="notranslate">*** Reading remote log from Cloudwatch log_group: airflow-task log_stream: tutorial_taskflow_api_etl_dag/extract/2020-12-02T16_37_07.011589+00_00/1.log.</code></p>
<p dir="auto">By switching to SequentialExecutor (default), with one container acting as both the scheduler and webserver, only then are the logs written as expected:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="*** Reading remote log from Cloudwatch log_group: airflow-task log_stream: tutorial_taskflow_api_etl_dag/extract/2020-12-02T18_04_50.259906+00_00/1.log.
Task exited with return code 0
test
Exporting the following env vars:
AIRFLOW_CTX_DAG_OWNER=airflow
AIRFLOW_CTX_DAG_ID=tutorial_taskflow_api_etl_dag
AIRFLOW_CTX_TASK_ID=extract
AIRFLOW_CTX_EXECUTION_DATE=2020-12-02T18:04:50.259906+00:00
AIRFLOW_CTX_DAG_RUN_ID=manual__2020-12-02T18:04:50.259906+00:00
Running <TaskInstance: tutorial_taskflow_api_etl_dag.extract 2020-12-02T18:04:50.259906+00:00 [running]> on host 845928f08686
Started process 152 to run task
Executing <Task(_PythonDecoratedOperator): extract> on 2020-12-02T18:04:50.259906+00:00
--------------------------------------------------------------------------------
Starting attempt 1 of 1
--------------------------------------------------------------------------------
Dependencies all met for <TaskInstance: tutorial_taskflow_api_etl_dag.extract 2020-12-02T18:04:50.259906+00:00 [queued]>
Dependencies all met for <TaskInstance: tutorial_taskflow_api_etl_dag.extract 2020-12-02T18:04:50.259906+00:00 [queued]>
"><pre class="notranslate"><code class="notranslate">*** Reading remote log from Cloudwatch log_group: airflow-task log_stream: tutorial_taskflow_api_etl_dag/extract/2020-12-02T18_04_50.259906+00_00/1.log.
Task exited with return code 0
test
Exporting the following env vars:
AIRFLOW_CTX_DAG_OWNER=airflow
AIRFLOW_CTX_DAG_ID=tutorial_taskflow_api_etl_dag
AIRFLOW_CTX_TASK_ID=extract
AIRFLOW_CTX_EXECUTION_DATE=2020-12-02T18:04:50.259906+00:00
AIRFLOW_CTX_DAG_RUN_ID=manual__2020-12-02T18:04:50.259906+00:00
Running <TaskInstance: tutorial_taskflow_api_etl_dag.extract 2020-12-02T18:04:50.259906+00:00 [running]> on host 845928f08686
Started process 152 to run task
Executing <Task(_PythonDecoratedOperator): extract> on 2020-12-02T18:04:50.259906+00:00
--------------------------------------------------------------------------------
Starting attempt 1 of 1
--------------------------------------------------------------------------------
Dependencies all met for <TaskInstance: tutorial_taskflow_api_etl_dag.extract 2020-12-02T18:04:50.259906+00:00 [queued]>
Dependencies all met for <TaskInstance: tutorial_taskflow_api_etl_dag.extract 2020-12-02T18:04:50.259906+00:00 [queued]>
</code></pre></div>
<p dir="auto">The logging configuration is turned on for the Scheduler, Webserver, and Workers. <strong>Log groups and log streams are being created as expected, but log events are not</strong>. There are no errors in the workers, and in AWS the IAM policy permissions are all-inclusive (they also definitely work with SequentialExecutor)</p>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
I expected logs of tasks ran by the celery workers to display for the Webserver when ran with Cloudwatch Remote logging.</p>
<p dir="auto"><strong>How to reproduce it</strong>:<br>
Run Airflow 2.0.0b3 with Webserver in CeleryExecutor mode, two workers, 1 scheduler</p> | <h3 dir="auto">Apache Airflow Provider(s)</h3>
<p dir="auto">datadog</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">apache-airflow-providers-datadog==3.0.0</p>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.2.2</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Mac OS</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Amazon (AWS) MWAA</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">What happened</h3>
<p dir="auto">I installed the provider package for DataDog. After installation I'm not getting any import errors when using the hook/operator in a DAG file, but I'm unable to create a DataDog connection through the Airflow UI.</p>
<p dir="auto">I noticed in this file where other providers have a Connections section, Datadog does not.<br>
<a href="https://github.com/apache/airflow/blob/main/airflow/providers/datadog/provider.yaml">https://github.com/apache/airflow/blob/main/airflow/providers/datadog/provider.yaml</a></p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">See above -- I believe some code is missing to actually allow the creation of a DataDog connection.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Install the noted version of the Datadog provider package, through the airflow UI attempt to create a DataDog connection.</p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | 0 |
<p dir="auto">I'm running into an issue where some of my worker processes will stop processing new tasks, causing them to pile up on the queue server. Left alone it will sometimes clear, and sometimes grow to impact all workers, effectively blocking processing.</p>
<p dir="auto">However, if I issue a management command, such as "celery inspect scheduled" it will cause workers to resume operation immediately. Although sometimes only briefly before halting again.</p>
<p dir="auto"><strong>The setup:</strong></p>
<ul dir="auto">
<li>celery 3.1.9</li>
<li>kombu 3.0.12</li>
<li>amqp 1.4.4</li>
<li>RabbitMQ (3.1.3) / ampq for all communication and results.</li>
<li>Mid-sized config: 7 worker nodes, 13 queues for service differentiation, and about 40 total worker processes per worker node.</li>
<li>Nodes are running the prefork worker, with 1-8 processes per queue, depending on the queue.</li>
<li>CELERYD_PREFETCH_MULTIPLIER = 1</li>
<li>CELERY_ACKS_LATE = True</li>
<li>CELERYD_MAX_TASKS_PER_CHILD = 16</li>
<li>I'm using -Ofair, as even within a given queue some tasks may take very different times to execute. Overall task per second throughput has never been an issue.</li>
<li>Example command line:
<blockquote>
<p dir="auto">python /home/celeryworker/web/manage.py celery worker --without-gossip --loglevel=INFO -Q transcode -Ofair -c 2 -n celery-worker-7-prod_transcode</p>
</blockquote>
</li>
</ul>
<p dir="auto">I believe it may have to do with scheduled tasks, as everytime I've been able to catch it in action there have been a fairly large number of tasks waiting for a countdown to expire. On the order of the total number of task slots available for that queue (I'm counting 7 workers, listening with -c4 on a queue, and a prefetch multiplier of 1 to be 28 task slots)</p>
<p dir="auto">I have not been able to confirm if the rabbitmq channel prefetch value is being correctly incremented when this issue is occurring and there are scheduled tasks; though it is being correctly incremented by scheduled tasks during normal operation. (I'll double check that the next time this recurs.)</p>
<p dir="auto">In general the above config is doing exactly what I expect; one task per worker process, multiple tasks per node, and the next task coming out of the queue as soon as any given worker is no longer busy. It's only occasionally that things go off the rails and, one node at a time, new tasks will no longer be executed. (Other processes listening on other queues on that node will continue to work, or fail, independently.)</p> | <p dir="auto">See test case here:<br>
<a href="https://github.com/sabw8217/celery_test">https://github.com/sabw8217/celery_test</a></p>
<p dir="auto">If I enqueue a number of tasks, and then start a worker with --without-mingle and --without-gossip, the worker seems to hang and not actually run any of the tasks I enqueued. I'm running this on debian. On my dev box I have pretty consistently been able to cause the worker to "wake up" and start consuming tasks by issuing a 'celery inspect' command. 'celery inspect active' will return something like:<br>
-> <a href="mailto:[email protected]">[email protected]</a>: OK<br>
- empty -<br>
And then worker the will go through the tasks.</p>
<p dir="auto">Debug output from the worker looks like:<br>
[2014-02-04 13:53:47,628: DEBUG/MainProcess] | Worker: Starting Hub<br>
[2014-02-04 13:53:47,628: DEBUG/MainProcess] ^-- substep ok<br>
[2014-02-04 13:53:47,628: DEBUG/MainProcess] | Worker: Starting Pool<br>
[2014-02-04 13:53:47,633: DEBUG/MainProcess] ^-- substep ok<br>
[2014-02-04 13:53:47,634: DEBUG/MainProcess] | Worker: Starting Consumer<br>
[2014-02-04 13:53:47,635: DEBUG/MainProcess] | Consumer: Starting Connection<br>
[2014-02-04 13:53:47,644: INFO/MainProcess] Connected to amqp://guest@localhost:5672//<br>
[2014-02-04 13:53:47,645: DEBUG/MainProcess] ^-- substep ok<br>
[2014-02-04 13:53:47,645: DEBUG/MainProcess] | Consumer: Starting Events<br>
[2014-02-04 13:53:47,659: DEBUG/MainProcess] ^-- substep ok<br>
[2014-02-04 13:53:47,661: DEBUG/MainProcess] | Consumer: Starting Heart<br>
[2014-02-04 13:53:47,663: DEBUG/MainProcess] ^-- substep ok<br>
[2014-02-04 13:53:47,663: DEBUG/MainProcess] | Consumer: Starting Tasks<br>
[2014-02-04 13:53:47,666: DEBUG/MainProcess] basic.qos: prefetch_count->4<br>
[2014-02-04 13:53:47,667: DEBUG/MainProcess] ^-- substep ok<br>
[2014-02-04 13:53:47,667: DEBUG/MainProcess] | Consumer: Starting Control<br>
[2014-02-04 13:53:47,669: DEBUG/MainProcess] ^-- substep ok<br>
[2014-02-04 13:53:47,670: DEBUG/MainProcess] | Consumer: Starting event loop<br>
[2014-02-04 13:53:47,670: WARNING/MainProcess] <a href="mailto:[email protected]">[email protected]</a> ready.<br>
[2014-02-04 13:53:47,670: DEBUG/MainProcess] | Worker: Hub.register Pool...</p> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.34.3]</li>
<li>Operating System: [All]</li>
<li>Browser: [All]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto">The POST request here: <a href="https://github.com/microsoft/playwright/blob/ec972fb7c140908560347ea215d30016fda2508d/packages/playwright-core/src/server/chromium/chromium.ts#L192C28-L199">https://github.com/microsoft/playwright/blob/ec972fb7c140908560347ea215d30016fda2508d/packages/playwright-core/src/server/chromium/chromium.ts#L192C28-L199</a><br>
is correct, but the method <code class="notranslate">fetchData</code> defined here: </p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/microsoft/playwright/blob/ec972fb7c140908560347ea215d30016fda2508d/packages/playwright-core/src/utils/network.ts#L97-L111">playwright/packages/playwright-core/src/utils/network.ts</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 97 to 111
in
<a data-pjax="true" class="commit-tease-sha" href="/microsoft/playwright/commit/ec972fb7c140908560347ea215d30016fda2508d">ec972fb</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L97" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="97"></td>
<td id="LC97" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">fetchData</span><span class="pl-kos">(</span><span class="pl-s1">params</span>: <span class="pl-smi">HTTPRequestParams</span><span class="pl-kos">,</span> <span class="pl-s1">onError</span>?: <span class="pl-kos">(</span><span class="pl-s1">params</span>: <span class="pl-smi">HTTPRequestParams</span><span class="pl-kos">,</span> <span class="pl-s1">response</span>: <span class="pl-s1">http</span><span class="pl-kos">.</span><span class="pl-smi">IncomingMessage</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">Error</span><span class="pl-kos">></span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">string</span><span class="pl-kos">></span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L98" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="98"></td>
<td id="LC98" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Promise</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">resolve</span><span class="pl-kos">,</span> <span class="pl-s1">reject</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L99" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="99"></td>
<td id="LC99" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-en">httpRequest</span><span class="pl-kos">(</span><span class="pl-s1">params</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-s1">response</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L100" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="100"></td>
<td id="LC100" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-c1">statusCode</span> <span class="pl-c1">!==</span> <span class="pl-c1">200</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
</tr>
<tr class="border-0">
<td id="L101" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="101"></td>
<td id="LC101" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">const</span> <span class="pl-s1">error</span> <span class="pl-c1">=</span> <span class="pl-s1">onError</span> ? <span class="pl-k">await</span> <span class="pl-en">onError</span><span class="pl-kos">(</span><span class="pl-s1">params</span><span class="pl-kos">,</span> <span class="pl-s1">response</span><span class="pl-kos">)</span> : <span class="pl-k">new</span> <span class="pl-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">`fetch failed: server returned code <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-c1">statusCode</span><span class="pl-kos">}</span></span>. URL: <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">params</span><span class="pl-kos">.</span><span class="pl-c1">url</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L102" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="102"></td>
<td id="LC102" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-en">reject</span><span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L103" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="103"></td>
<td id="LC103" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L104" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="104"></td>
<td id="LC104" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
</tr>
<tr class="border-0">
<td id="L105" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="105"></td>
<td id="LC105" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">let</span> <span class="pl-s1">body</span> <span class="pl-c1">=</span> <span class="pl-s">''</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L106" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="106"></td>
<td id="LC106" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'data'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">chunk</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-s1">body</span> <span class="pl-c1">+=</span> <span class="pl-s1">chunk</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L107" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="107"></td>
<td id="LC107" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'error'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">error</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-en">reject</span><span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L108" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="108"></td>
<td id="LC108" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'end'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">body</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L109" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="109"></td>
<td id="LC109" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">reject</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L110" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="110"></td>
<td id="LC110" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
<tr class="border-0">
<td id="L111" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="111"></td>
<td id="LC111" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
</tr>
</tbody></table>
</div>
</div>
is not passing the header <code class="notranslate">"Content-type": "application/json"</code><br>
so when Selenium Hub receives the request, it drops the body of the request.<p></p>
<p dir="auto">It's the only instance where the method is doing a "POST" rather than a "GET", which I guess has resulted in this slipping through.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Setup a Remote Selenium Grid Hub</li>
<li>Follow the docs</li>
<li>Run the tests</li>
<li>Read the Selenium Grid Hub logs</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">[Describe expected behavior]</p>
<p dir="auto">Propagate the Selenium Grid capabilities from the environment variable</p>
<p dir="auto">[Describe actual behavior]</p>
<p dir="auto">Does not propagate Selenium Grid capabilities from the environment variable</p> | <p dir="auto">As far as I can understand it is possible to take a full page screenshot when calling <code class="notranslate">await page.screenshot({ path: 'screenshot.png', fullPage: true });</code>, but not after a test run / on failure.<br>
The option to take full page screenshots on failure (something like <code class="notranslate">screenshot: { mode: 'only-on-failure', fullPage: true }</code>) would make it easier to analyze failed tests because sometimes the reason for the test to fail might be outside of the current viewport.</p> | 0 |
<p dir="auto">I downloaded the Symfony Standard Edition 2.3.4 and placed the following code in <code class="notranslate">app_dev.php</code>:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="echo $request->getUri();"><pre class="notranslate"><span class="pl-k">echo</span> <span class="pl-s1"><span class="pl-c1">$</span>request</span>-><span class="pl-en">getUri</span>();</pre></div>
<p dir="auto">Then I visited the following url: <code class="notranslate">http://localhost/RSA-Programm/web/app_dev.php?module=search&type=user&func=form</code>. The output is <code class="notranslate">http://localhost/RSA-Programm/web/app_dev.php/?func=form&module=search&type=user</code>. Notice the additional slash after <code class="notranslate">app_dev.php</code>.</p>
<p dir="auto">Refs <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="19161307" data-permission-text="Title is private" data-url="https://github.com/zikula/core/issues/1094" data-hovercard-type="issue" data-hovercard-url="/zikula/core/issues/1094/hovercard" href="https://github.com/zikula/core/issues/1094">zikula/core#1094</a>. The same problem occurs in Zikula. Routing is not yet enabled so all urls are like the one above (with <code class="notranslate">index.php</code>). This causes the url in the profiler to be wrong:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/18292211cb15ca0efe6fb1b8b240e7cc646d8dddf56cfc780dfbe96264718ef9/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323134353039322f313130343839302f34613037663932302d313930662d313165332d386232662d6136373365313138623836632e706e67"><img src="https://camo.githubusercontent.com/18292211cb15ca0efe6fb1b8b240e7cc646d8dddf56cfc780dfbe96264718ef9/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323134353039322f313130343839302f34613037663932302d313930662d313165332d386232662d6136373365313138623836632e706e67" alt="image" data-canonical-src="https://f.cloud.github.com/assets/2145092/1104890/4a07f920-190f-11e3-8b2f-a673e118b86c.png" style="max-width: 100%;"></a></p> | <p dir="auto">There is a problem with the path info in the <code class="notranslate">Request</code> class.</p>
<p dir="auto">Given a request to <code class="notranslate">http://localhost/symfony-standard/app_dev.php</code>, the info in the Request are as follows:<br>
Request::getBaseUrl() returns <code class="notranslate">/symfony-standard/app_dev.php</code> (correct)<br>
Request::getPathInfo() returns <code class="notranslate">/</code> which is wrong because it must be empty ``.</p>
<p dir="auto">The reason is that <code class="notranslate">Request::getBaseUrl() . Request::getPathInfo()</code> must represent the real request path. Since it is lying about the real path, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="4130771" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/3958" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/3958/hovercard" href="https://github.com/symfony/symfony/pull/3958">#3958</a> generates the incorrect relative path based on the wrong info.</p>
<p dir="auto">So there is a problem when the path info should be empty but never is (it defaults to <code class="notranslate">/</code>).<br>
I think it's this commit that should be reverted: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/62d09b8fb2c4c5468dd19b016c593bc2629cd6fb/hovercard" href="https://github.com/symfony/symfony/commit/62d09b8fb2c4c5468dd19b016c593bc2629cd6fb"><tt>62d09b8</tt></a></p>
<p dir="auto">ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fabpot/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fabpot">@fabpot</a></p> | 1 |
<p dir="auto">When is the new release coming?</p> | 0 |
|
<p dir="auto">Image cache is caching error icons for apps with no thumbnail. If an icon is available later, Image cache would need to be deleted manually to invalidate it.</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">I used i25A Rii mini wireless keyboard (<a href="http://www.riitek.com/product/i25a.html" rel="nofollow">http://www.riitek.com/product/i25a.html</a>). The keyboard itself doesn't have Function keys and Windows Key, so I need a tool to remap shortcuts. Said like remap <strong>Ctrl+Alt+1</strong> to <strong>F1</strong>, <strong>Ctrl+Alt+2</strong> to <strong>F2</strong>, and so on.. also <strong>Ctrl+Alt+W</strong> to <strong>Windows key</strong>.<br>
I hope Keyboard Manager can Remap shortcut to key.</p>
<p dir="auto">I hope Keyboard Manager can be utilized to Remap a shortcut to a key.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1> | 0 |
<p dir="auto">So I'm currently adding in logic to handle the removal of arbitrary nodes that would result in invalid code.</p>
<p dir="auto">There are currently two ways to tackle this:</p>
<ol dir="auto">
<li>Detect it and throw compiler errors</li>
<li>Detect it and fix it up on a case-by-case basis.</li>
</ol>
<h2 dir="auto"></h2>
<p dir="auto">For example, when removing the <code class="notranslate">foo</code> <code class="notranslate">callee</code> of a <code class="notranslate">CallExpression</code> the following <em>could</em> be done:</p>
<h3 dir="auto">Change the callee to undefined</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="bar(foo("bar"));"><pre class="notranslate"><span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-s">"bar"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">=></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="bar(undefined("bar"));"><pre class="notranslate"><span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-c1">undefined</span><span class="pl-kos">(</span><span class="pl-s">"bar"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Noop the function</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="bar(foo("bar"));"><pre class="notranslate"><span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-s">"bar"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">=></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="bar(undefined);"><pre class="notranslate"><span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-c1">undefined</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">(Arguments are turned into a <code class="notranslate">SequenceExpression</code>, "pure" values are removed from it, and we ensure it evaluates to <code class="notranslate">undefined</code> by pushing it onto the sequence expression)</p>
<h3 dir="auto">Throw an error</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="bar(foo("bar"));"><pre class="notranslate"><span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-s">"bar"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">=></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CompilerError: Invalid removal of `CallExpression` `callee`."><pre class="notranslate"><span class="pl-v">CompilerError</span>: <span class="pl-v">Invalid</span> <span class="pl-s1">removal</span> <span class="pl-k">of</span> <span class="pl-s">`CallExpression`</span> <span class="pl-s">`callee`</span><span class="pl-kos">.</span></pre></div>
<hr>
<p dir="auto">Unsure how to handle these, ideally I'd like idiomatic transforms. Having to worry about the context whenever you want to remove a node is gross, it leads to duplicating every single contextual validation permutation which is pretty nasty. Leaning more towards the noop case since at least that doesn't result in broken code.</p> | <h2 dir="auto">Bug Report</h2>
<p dir="auto">Following code works correctly with Typescript compiler but fails with Babel.</p>
<p dir="auto"><strong>Current behavior</strong><br>
A clear and concise description of the behavior.</p>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function undoable(target: any, propertyKey: string) {
Object.defineProperty(target, propertyKey, {
get: function () {
return 'customFoo';
},
});
}
class PropModel {
@undoable foo?: string;
}
const g = new PropModel();
console.log(g.foo); // her is 'undefined' with Babel, but 'customFoo' with Typescript"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">undoable</span><span class="pl-kos">(</span><span class="pl-s1">target</span>: <span class="pl-s1">any</span><span class="pl-kos">,</span> <span class="pl-s1">propertyKey</span>: <span class="pl-s1">string</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">propertyKey</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-en">get</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s">'customFoo'</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">class</span> <span class="pl-v">PropModel</span> <span class="pl-kos">{</span>
@<span class="pl-s1">undoable</span> <span class="pl-c1">foo</span>?: <span class="pl-c1">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-s1">g</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">PropModel</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">g</span><span class="pl-kos">.</span><span class="pl-c1">foo</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// her is 'undefined' with Babel, but 'customFoo' with Typescript</span></pre></div>
<p dir="auto"><strong>Expected behavior</strong><br>
A clear and concise description of what you expected to happen (or code).</p>
<p dir="auto">I am able to override class protptype in the decorator.</p>
<p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p>
<ul dir="auto">
<li>Filename: <code class="notranslate">babel.config.js</code></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": ["next/babel"],
"plugins": [
"jsx-control-statements",
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
],
"env": {
"test": {
"plugins": ["babel-plugin-istanbul"]
}
}
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"next/babel"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"jsx-control-statements"</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-decorators"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"legacy"</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-class-properties"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"loose"</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">]</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"env"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"test"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span><span class="pl-s">"babel-plugin-istanbul"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" System:
OS: Windows 10 10.0.18363
Binaries:
Node: 12.16.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD"><pre class="notranslate"><code class="notranslate"> System:
OS: Windows 10 10.0.18363
Binaries:
Node: 12.16.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
</code></pre></div>
<ul dir="auto">
<li>Monorepo: No</li>
<li>How you are using Babel: Webpack</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto"><strong>Additional context</strong><br>
Add any other context about the problem here. Or a screenshot if applicable</p> | 0 |
<p dir="auto"><strong>Glide Version</strong>:</p>
<p dir="auto"><strong>Integration libraries</strong>:</p>
<p dir="auto"><strong>Device/Android Version</strong>:</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:</p>
<p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with..."><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-smi">with</span>...</pre></div>
<p dir="auto"><strong>Layout XML</strong>:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<FrameLayout xmlns:android="..."><pre class="notranslate"><<span class="pl-ent">FrameLayout</span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>...</span></pre></div>
<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="paste stack trace and/or log here"><pre class="notranslate"><span class="pl-en">paste</span> <span class="pl-en">stack</span> <span class="pl-en">trace</span> <span class="pl-k">and</span>/<span class="pl-en">or</span> <span class="pl-en">log</span> <span class="pl-en">here</span></pre></div> | <h2 dir="auto">Idea</h2>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(this).load(bitmap).into(imageView);
Glide.with(this).load(drawable).into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-smi">this</span>).<span class="pl-en">load</span>(<span class="pl-s1">bitmap</span>).<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);
<span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-smi">this</span>).<span class="pl-en">load</span>(<span class="pl-s1">drawable</span>).<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">This looks weird compared to <code class="notranslate">ImageView.setImageBitmap(bitmap)</code>, but if you need animation and error handling (null bitmap), the above could become an easy to use, fire and forget, go-to line instead of duplicating code.<br>
Note: you've already made a wrapper of <code class="notranslate">ImageView#setImageResource</code> and <code class="notranslate">ImageView#setImageUri</code>.</p>
<p dir="auto">Currently they throw</p>
<blockquote>
<p dir="auto">Caused by: java.lang.IllegalArgumentException: Unknown type android.graphics.Bitmap@44759ab8. You must provide a Model of a type for which there is a registered ModelLoader, if you are using a custom model, you must first call Glide#register with a ModelLoaderFactory for your custom model class.<br>
<code class="notranslate">at com.bumptech.glide.RequestManager.loadGeneric(RequestManager.java:382)</code><br>
<code class="notranslate">at com.bumptech.glide.RequestManager.load(RequestManager.java:374)</code></p>
</blockquote>
<h2 dir="auto">Context</h2>
<p dir="auto">This came up when I was trying to display a captured image using Glide (oversimplified code):</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE), Activity.RESULT_FIRST_USER);
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == REQUEST_CODE_GET_PICTURE && resultCode == Activity.RESULT_OK) {
Bitmap bitmap = (Bitmap)data.getExtras().get("data");
Glide.with(this).load(bitmap)/*...*/.into(image);"><pre class="notranslate"><span class="pl-en">startActivityForResult</span>(<span class="pl-k">new</span> <span class="pl-smi">Intent</span>(<span class="pl-smi">MediaStore</span>.<span class="pl-c1">ACTION_IMAGE_CAPTURE</span>), <span class="pl-smi">Activity</span>.<span class="pl-c1">RESULT_FIRST_USER</span>);
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-s1">onActivityResult</span>(<span class="pl-smi">int</span> <span class="pl-s1">requestCode</span>, <span class="pl-smi">int</span> <span class="pl-s1">resultCode</span>, <span class="pl-smi">Intent</span> <span class="pl-s1">data</span>) {
<span class="pl-k">if</span>(<span class="pl-s1">requestCode</span> == <span class="pl-c1">REQUEST_CODE_GET_PICTURE</span> && <span class="pl-s1">resultCode</span> == <span class="pl-smi">Activity</span>.<span class="pl-c1">RESULT_OK</span>) {
<span class="pl-smi">Bitmap</span> <span class="pl-s1">bitmap</span> = (<span class="pl-smi">Bitmap</span>)<span class="pl-s1">data</span>.<span class="pl-en">getExtras</span>().<span class="pl-en">get</span>(<span class="pl-s">"data"</span>);
<span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-smi">this</span>).<span class="pl-en">load</span>(<span class="pl-s1">bitmap</span>)<span class="pl-c">/*...*/</span>.<span class="pl-en">into</span>(<span class="pl-s1">image</span>);</pre></div> | 1 |
<p dir="auto"><a href="http://twitter.github.com/bootstrap/javascript.html#carousel">http://twitter.github.com/bootstrap/javascript.html#carousel</a></p>
<p dir="auto">I was wondering if images in carousel not looping forever is a default condition, or a bug.</p>
<p dir="auto">If it is a default condition, is there a way for carousel to loop through images forever?</p>
<p dir="auto">Right now, carousel stops cycling when it reaches the right most side image.</p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Validation started for.. _gh_pages/javascript/index.html
1=> "Duplicate ID myModalLabel." Line no: 469
2=> "The first occurrence of ID myModalLabel was here." Line no: 362
3=> "Duplicate ID myModalLabel." Line no: 483
4=> "The first occurrence of ID myModalLabel was here." Line no: 362
No of errors: 4"><pre class="notranslate"><code class="notranslate">Validation started for.. _gh_pages/javascript/index.html
1=> "Duplicate ID myModalLabel." Line no: 469
2=> "The first occurrence of ID myModalLabel was here." Line no: 362
3=> "Duplicate ID myModalLabel." Line no: 483
4=> "The first occurrence of ID myModalLabel was here." Line no: 362
No of errors: 4
</code></pre></div>
<p dir="auto">Was IDs duplicated accidentaly?</p> | 0 |
<p dir="auto">See screenshot: seems like <code class="notranslate">a/b/file5</code> should appear just below <code class="notranslate">a/file2</code>, not after <code class="notranslate">z/file4</code>.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3205856/7297018/c295f750-e9bc-11e4-8f48-03fdd4e6717c.png"><img src="https://cloud.githubusercontent.com/assets/3205856/7297018/c295f750-e9bc-11e4-8f48-03fdd4e6717c.png" alt="screen shot 2015-04-23 at 13 28 15" style="max-width: 100%;"></a></p>
<p dir="auto">I'm using OS X 10.9.5, Atom version 0.194.0.</p> | <p dir="auto">Hi all,</p>
<p dir="auto">If I apply the ‘text-rendering: optimizeLegibility’ directive to the stylesheets on .editor or .workspace, any subsequent command palettes, text fields or tabs have a visually broken/erratic caret:</p>
<ul dir="auto">
<li>In text fields, such as the command palette or settings view, the caret appears before the first character even though it's actually pointing to the end of the text;</li>
<li>Moving the caret left and right in an editor tab sometimes causes it to jump several places left and right of where it should be, there doesn't seem to be any discernible pattern and reloading the tab causes different breakages to happen.</li>
</ul>
<p dir="auto">This issue only affects new tabs/palettes created after the stylesheet change occurs, it seems. Similarly, removing the stylesheet change only takes effect for new tabs/palettes.</p>
<p dir="auto">I'm running Atom HEAD on Gentoo Linux, 64-bit, not using the react editor.</p>
<p dir="auto">Not sure which part of Atom this applies to, so I've filed it against atom/atom (sorry!)</p> | 0 |
<p dir="auto">I am trying to calculate silhouette_score or silhouette_samples using a sparse matrix but getting the following error:</p>
<p dir="auto"><strong>ValueError: diag requires an array of at least two dimensions</strong></p>
<p dir="auto">The sample code is as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="edges = [
(1, 2, 0.9),
(1, 3, 0.7),
(1, 4, 0.1),
(1, 5, 0),
(1, 6, 0),
(2, 3, 0.8),
(2, 4, 0.2),
(2, 5, 0),
(2, 6, 0.3),
(3, 4, 0.3),
(3, 5, 0.2),
(3, 6, 0.25),
(4, 5, 0.8),
(4, 6, 0.6),
(5, 6, 0.9),
(7, 8, 1.0)]
gg = nx.Graph()
for u,v, w in edges:
gg.add_edge(u, v, weight=w)
adj = nx.adjacency_matrix(gg)
adj.setdiag(0)
from sklearn.metrics import silhouette_score, silhouette_samples
print(silhouette_score(adj, metric='precomputed', labels=labels))
silhouette_samples(adj, metric='precomputed', labels=labels)"><pre class="notranslate"><code class="notranslate">edges = [
(1, 2, 0.9),
(1, 3, 0.7),
(1, 4, 0.1),
(1, 5, 0),
(1, 6, 0),
(2, 3, 0.8),
(2, 4, 0.2),
(2, 5, 0),
(2, 6, 0.3),
(3, 4, 0.3),
(3, 5, 0.2),
(3, 6, 0.25),
(4, 5, 0.8),
(4, 6, 0.6),
(5, 6, 0.9),
(7, 8, 1.0)]
gg = nx.Graph()
for u,v, w in edges:
gg.add_edge(u, v, weight=w)
adj = nx.adjacency_matrix(gg)
adj.setdiag(0)
from sklearn.metrics import silhouette_score, silhouette_samples
print(silhouette_score(adj, metric='precomputed', labels=labels))
silhouette_samples(adj, metric='precomputed', labels=labels)
</code></pre></div> | <h4 dir="auto">Describe the bug</h4>
<p dir="auto"><code class="notranslate">silhouette_samples(X, y, metric="precomputed")</code> fails with <code class="notranslate">ValueError: diag requires an array of at least two dimensions</code> if X is sparse.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sklearn.metrics import silhouette_samples
from sklearn.neighbors import kneighbors_graph
from sklearn.datasets import make_blobs
X, y = make_blobs(n_samples=1000, centers=5, n_features=10)
pdist = kneighbors_graph(X, 5, mode='distance')
# pdist is scipy.sparse.csr.csr_matrix
silhouette_samples(pdist, y, metric="precomputed")"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">metrics</span> <span class="pl-k">import</span> <span class="pl-s1">silhouette_samples</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">neighbors</span> <span class="pl-k">import</span> <span class="pl-s1">kneighbors_graph</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">datasets</span> <span class="pl-k">import</span> <span class="pl-s1">make_blobs</span>
<span class="pl-v">X</span>, <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-en">make_blobs</span>(<span class="pl-s1">n_samples</span><span class="pl-c1">=</span><span class="pl-c1">1000</span>, <span class="pl-s1">centers</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">n_features</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)
<span class="pl-s1">pdist</span> <span class="pl-c1">=</span> <span class="pl-en">kneighbors_graph</span>(<span class="pl-v">X</span>, <span class="pl-c1">5</span>, <span class="pl-s1">mode</span><span class="pl-c1">=</span><span class="pl-s">'distance'</span>)
<span class="pl-c"># pdist is scipy.sparse.csr.csr_matrix</span>
<span class="pl-en">silhouette_samples</span>(<span class="pl-s1">pdist</span>, <span class="pl-s1">y</span>, <span class="pl-s1">metric</span><span class="pl-c1">=</span><span class="pl-s">"precomputed"</span>)</pre></div>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">No error is thrown.</p>
<h4 dir="auto">Actual Results</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-14-140890024e6c> in <module>
----> 1 silhouette_samples(pdist, y, metric="precomputed")
/data1/mschroeder/miniconda3/envs/20-assdc/lib/python3.7/site-packages/sklearn/metrics/cluster/_unsupervised.py in silhouette_samples(X, labels, metric, **kwds)
216 if metric == 'precomputed':
217 atol = np.finfo(X.dtype).eps * 100
--> 218 if np.any(np.abs(np.diagonal(X)) > atol):
219 raise ValueError(
220 'The precomputed distance matrix contains non-zero '
<__array_function__ internals> in diagonal(*args, **kwargs)
/data1/mschroeder/miniconda3/envs/20-assdc/lib/python3.7/site-packages/numpy/core/fromnumeric.py in diagonal(a, offset, axis1, axis2)
1615 return asarray(a).diagonal(offset=offset, axis1=axis1, axis2=axis2)
1616 else:
-> 1617 return asanyarray(a).diagonal(offset=offset, axis1=axis1, axis2=axis2)
1618
1619
ValueError: diag requires an array of at least two dimensions"><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-14-140890024e6c> in <module>
----> 1 silhouette_samples(pdist, y, metric="precomputed")
/data1/mschroeder/miniconda3/envs/20-assdc/lib/python3.7/site-packages/sklearn/metrics/cluster/_unsupervised.py in silhouette_samples(X, labels, metric, **kwds)
216 if metric == 'precomputed':
217 atol = np.finfo(X.dtype).eps * 100
--> 218 if np.any(np.abs(np.diagonal(X)) > atol):
219 raise ValueError(
220 'The precomputed distance matrix contains non-zero '
<__array_function__ internals> in diagonal(*args, **kwargs)
/data1/mschroeder/miniconda3/envs/20-assdc/lib/python3.7/site-packages/numpy/core/fromnumeric.py in diagonal(a, offset, axis1, axis2)
1615 return asarray(a).diagonal(offset=offset, axis1=axis1, axis2=axis2)
1616 else:
-> 1617 return asanyarray(a).diagonal(offset=offset, axis1=axis1, axis2=axis2)
1618
1619
ValueError: diag requires an array of at least two dimensions
</code></pre></div>
<h4 dir="auto">Possible fix</h4>
<p dir="auto">Change <code class="notranslate">np.diagonal(X)</code> to <code class="notranslate">X.diagonal()</code>, because this is implemented for <code class="notranslate">numpy.ndarray</code> as well as <code class="notranslate">scipy.sparse.csr_matrix.diagonal</code>. Or should this rather be fixed in numpy (so that np.diagonal does the right thing for sparse matrices)?</p>
<h4 dir="auto">Versions</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="System:
python: 3.7.6 | packaged by conda-forge | (default, Jun 1 2020, 18:57:50) [GCC 7.5.0]
executable: /data1/mschroeder/miniconda3/envs/20-assdc/bin/python
machine: Linux-4.4.0-109-generic-x86_64-with-debian-stretch-sid
Python dependencies:
pip: 20.1.1
setuptools: 47.3.1.post20200616
sklearn: 0.22.2.post1
numpy: 1.18.5
scipy: 1.4.1
Cython: None
pandas: 1.0.5
matplotlib: 3.2.1
joblib: 0.15.1
Built with OpenMP: True"><pre class="notranslate"><code class="notranslate">System:
python: 3.7.6 | packaged by conda-forge | (default, Jun 1 2020, 18:57:50) [GCC 7.5.0]
executable: /data1/mschroeder/miniconda3/envs/20-assdc/bin/python
machine: Linux-4.4.0-109-generic-x86_64-with-debian-stretch-sid
Python dependencies:
pip: 20.1.1
setuptools: 47.3.1.post20200616
sklearn: 0.22.2.post1
numpy: 1.18.5
scipy: 1.4.1
Cython: None
pandas: 1.0.5
matplotlib: 3.2.1
joblib: 0.15.1
Built with OpenMP: True
</code></pre></div> | 1 |
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">I should be able to return a single value from my view(that is, not a tuple) and have my value passed to my custom response class. In this case I have a response class that detects whether JSON or pickle data was requested by the client and dumps the return value appropriately. This allows me to simply return a list or dict from my view without having to detect and dump the appropriate type.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@mod.route('/')
def return_json_or_pickle():
return ['foo', 'bar', 'bat']"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">mod</span>.<span class="pl-en">route</span>(<span class="pl-s">'/'</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">return_json_or_pickle</span>():
<span class="pl-k">return</span> [<span class="pl-s">'foo'</span>, <span class="pl-s">'bar'</span>, <span class="pl-s">'bat'</span>]</pre></div>
<p dir="auto">As of Flask 0.12.2 this worked - make_response would pass the list to my custom response class and my client would get what it wanted.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">As of 1.0, commit <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="224177482" data-permission-text="Title is private" data-url="https://github.com/pallets/flask/issues/2256" data-hovercard-type="pull_request" data-hovercard-url="/pallets/flask/pull/2256/hovercard" href="https://github.com/pallets/flask/pull/2256">#2256</a> was merged which added an explicit check to see if the return value was a list; treating a list as a tuple return in that case. I now get a typeerror:</p>
<div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="TypeError: The view function did not return a valid response tuple. The tuple must have the form (body, status, headers), (body, status), or (body, headers)."><pre class="notranslate"><span class="pl-en">TypeError</span>: <span class="pl-s">The view function did not return a valid response tuple. The tuple must have the form (body, status, headers), (body, status), or (body, headers).</span></pre></div>
<p dir="auto">If I change my view function to return a tuple:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@mod.route('/')
def return_json_or_pickle():
return ['foo', 'bar', 'bat'], 200"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">mod</span>.<span class="pl-en">route</span>(<span class="pl-s">'/'</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">return_json_or_pickle</span>():
<span class="pl-k">return</span> [<span class="pl-s">'foo'</span>, <span class="pl-s">'bar'</span>, <span class="pl-s">'bat'</span>], <span class="pl-c1">200</span></pre></div>
<p dir="auto">the previous functionality is restored! This confirms that tuple handling is of course perfectly fine. I have a <a href="https://github.com/pallets/flask/pull/2737" data-hovercard-type="pull_request" data-hovercard-url="/pallets/flask/pull/2737/hovercard">pull request</a> prepared which should do a very nice job of resolving the issue - it simply omits <code class="notranslate">list</code> from the type check in make_response. Since a list is not a valid response anyway, there's no reason I can see for it to be there.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Python version: 3.6</li>
<li>Flask version: 1.0</li>
<li>Werkzeug version: n/a</li>
</ul> | <p dir="auto">I had written a simple wrapper to take all the response primitives, and jsonify them before returning to client like so:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class JSONifyResponseWrapper(Response):
default_mimetype = 'application/json'
@classmethod
def force_type(cls, rv, environ=None):
try:
rv = jsonify(rv)
finally:
return super(JSONifyResponseWrapper, cls).force_type(rv, environ)"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">JSONifyResponseWrapper</span>(<span class="pl-v">Response</span>):
<span class="pl-s1">default_mimetype</span> <span class="pl-c1">=</span> <span class="pl-s">'application/json'</span>
<span class="pl-en">@<span class="pl-s1">classmethod</span></span>
<span class="pl-k">def</span> <span class="pl-en">force_type</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">rv</span>, <span class="pl-s1">environ</span><span class="pl-c1">=</span><span class="pl-c1">None</span>):
<span class="pl-k">try</span>:
<span class="pl-s1">rv</span> <span class="pl-c1">=</span> <span class="pl-en">jsonify</span>(<span class="pl-s1">rv</span>)
<span class="pl-k">finally</span>:
<span class="pl-k">return</span> <span class="pl-en">super</span>(<span class="pl-v">JSONifyResponseWrapper</span>, <span class="pl-s1">cls</span>).<span class="pl-en">force_type</span>(<span class="pl-s1">rv</span>, <span class="pl-s1">environ</span>)</pre></div>
<p dir="auto">Then i set app.response_class to the class above.</p>
<p dir="auto">However, in flask 1.0 , the routes are required to return a tuple.<br>
This means if I have a route like this:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@base_blueprint.route('', methods=['Post'])
def hello():
a = {"hello":"world"}
return a"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">base_blueprint</span>.<span class="pl-en">route</span>(<span class="pl-s">''</span>, <span class="pl-s1">methods</span><span class="pl-c1">=</span>[<span class="pl-s">'Post'</span>])</span>
<span class="pl-k">def</span> <span class="pl-en">hello</span>():
<span class="pl-s1">a</span> <span class="pl-c1">=</span> {<span class="pl-s">"hello"</span>:<span class="pl-s">"world"</span>}
<span class="pl-k">return</span> <span class="pl-s1">a</span></pre></div>
<p dir="auto">The client receives a valid json object.</p>
<p dir="auto">But if I do this:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@base_blueprint.route('', methods=['Post'])
def hello():
a = [i for i in range(100)]
return a"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">base_blueprint</span>.<span class="pl-en">route</span>(<span class="pl-s">''</span>, <span class="pl-s1">methods</span><span class="pl-c1">=</span>[<span class="pl-s">'Post'</span>])</span>
<span class="pl-k">def</span> <span class="pl-en">hello</span>():
<span class="pl-s1">a</span> <span class="pl-c1">=</span> [<span class="pl-s1">i</span> <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">100</span>)]
<span class="pl-k">return</span> <span class="pl-s1">a</span></pre></div>
<p dir="auto">Flask will throw this error:</p>
<blockquote>
<p dir="auto">TypeError: The view function did not return a valid response tuple. The tuple must have the form (body, status, headers), (body, status), or (body, headers)`</p>
</blockquote> | 1 |
<p dir="auto"><a href="http://twitter.github.com/bootstrap/javascript.html#tooltips">http://twitter.github.com/bootstrap/javascript.html#tooltips</a></p>
<p dir="auto">The Four directions example has all four tooltips appearing on top.</p> | <p dir="auto">congrats on releasing 2.3.0!<br>
I was checking out some of the docs and saw that <a href="http://twitter.github.com/bootstrap/javascript.html#tooltips">tooltips data-placement</a> is not working correctly. I think its because of the one pull request that makes options set in javascript override the options that were set in the html but I'm not sure..</p> | 1 |
<p dir="auto">when i Click “visualize” and then ,display error "Visualize:java.lang.lllegalStateException:Field daVisualize",or i used dashboard module ,before logstash auto update index,it was normal;when time is 8:00 am,dashboard module will not work,and display the error.</p>
<p dir="auto">error details:</p>
<p dir="auto">1.kibana page error:<br>
Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"exception","reason":"java.lang.IllegalStateException: Field data loading is forbidden on path"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"logstash-2015.11.29","node":"ODyds4KgQsqrxczx1ana8A","reason":{"type":"exception","reason":"java.lang.IllegalStateException: Field data loading is forbidden on path","caused_by":{"type":"unchecked_execution_exception","reason":"java.lang.IllegalStateException: Field data loading is forbidden on path","caused_by":{"type":"illegal_state_exception","reason":"Field data loading is forbidden on path"}}}}]}} KbnError@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 64:30 RequestFailure@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 97:19 <a href="http://www.xxx.cn:80/bundles/k" rel="nofollow">http://www.xxx.cn:80/bundles/k</a> ... 05:57 <a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 91:28 <a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 60:31 map@[native code] map@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 59:34 callResponseHandlers@<a href="http://www.xxx.cn:80/bundles/k" rel="nofollow">http://www.xxx.cn:80/bundles/k</a> ... 77:26 <a href="http://www.xxx.cn:80/bundles/k" rel="nofollow">http://www.xxx.cn:80/bundles/k</a> ... 84:37 processQueue@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 09:31 <a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 25:40 $eval@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 53:29 $digest@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 64:37 $apply@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 61:32 done@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 10:54 completeRequest@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 08:16 requestLoaded@<a href="http://www.xxx.cn:80/bundles/commons.bundle.js:37749:25" rel="nofollow">http://www.xxx.cn:80/bundles/commons.bundle.js:37749:25</a></p>
<p dir="auto">2.elasticsearch error log:</p>
<p dir="auto">[2015-11-30 00:04:53,395][DEBUG][action.search.type ] [Thumbelina] [logstash-2015.11.29][2], node[acrTX4O0RciN8ppbSdfoww], [P], v[4], s[STARTED], a[id=ogwkZP0yQCCgatW0_tnvnw]: Failed to execute [org.elasticsearch.action.search.SearchRequest@aef2ffe] lastShard [true]<br>
RemoteTransportException[[Thumbelina][192.168.1.76:9300][indices:data/read/search[phase/query]]]; nested: QueryPhaseExecutionException[Query Failed [Failed to execute main query]]; nested: ElasticsearchException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: UncheckedExecutionException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: IllegalStateException[Field data loading is forbidden on response];<br>
Caused by: QueryPhaseExecutionException[Query Failed [Failed to execute main query]]; nested: ElasticsearchException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: UncheckedExecutionException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: IllegalStateException[Field data loading is forbidden on response];<br>
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:343)<br>
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:106)<br>
at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:363)<br>
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:375)<br>
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:368)<br>
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:365)<br>
at org.elasticsearch.shield.transport.ShieldServerTransportService$ProfileSecuredRequestHandler.messageReceived(ShieldServerTransportService.java:165)<br>
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:350)<br>
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)<br>
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>
at java.lang.Thread.run(Thread.java:745)<br>
Caused by: ElasticsearchException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: UncheckedExecutionException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: IllegalStateException[Field data loading is forbidden on response];<br>
at org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData.load(AbstractIndexFieldData.java:82)<br>
at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$FieldData.bytesValues(ValuesSource.java:195)<br>
at org.elasticsearch.search.aggregations.bucket.terms.StringTermsAggregator.getLeafCollector(StringTermsAggregator.java:73)<br>
at org.elasticsearch.search.aggregations.AggregatorBase.getLeafCollector(AggregatorBase.java:132)<br>
at org.elasticsearch.search.aggregations.AggregatorBase.getLeafCollector(AggregatorBase.java:38)<br>
at org.apache.lucene.search.MultiCollector.getLeafCollector(MultiCollector.java:117)<br>
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:763)<br>
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:486)<br>
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:324)<br>
... 11 more<br>
Vian 00:18:36<br>
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Field data loading is forbidden on response<br>
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)<br>
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)<br>
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4739)<br>
at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache.load(IndicesFieldDataCache.java:156)<br>
at org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData.load(AbstractIndexFieldData.java:76)<br>
… 19 more<br>
Caused by: java.lang.IllegalStateException: Field data loading is forbidden on response<br>
at org.elasticsearch.index.fielddata.plain.DisabledIndexFieldData.fail(DisabledIndexFieldData.java:68)<br>
at org.elasticsearch.index.fielddata.plain.DisabledIndexFieldData.loadDirect(DisabledIndexFieldData.java:54)<br>
at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache$1.call(IndicesFieldDataCache.java:163)<br>
at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache$1.call(IndicesFieldDataCache.java:156)<br>
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4742)<br>
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)<br>
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)<br>
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)<br>
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)<br>
… 23 more</p> | <p dir="auto">Hi,</p>
<p dir="auto"><strong>Elasticsearch version</strong>: 2.2.1 (from <code class="notranslate">docker pull elasticsearch</code>)</p>
<p dir="auto"><strong>JVM version</strong>: OpenJDK 1.8.0_72-internal (from <code class="notranslate">docker pull elasticsearch</code></p>
<p dir="auto"><strong>OS version</strong>: Debian 8.3 (from <code class="notranslate">docker pull elasticsearch</code></p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:</p>
<p dir="auto">Indexing some data were float64 data could be written as integer (by luck) makes elasticsearch refuse to index them.<br>
In a file were the first type indexed was a float type and then another in the collection could be written as integer will make the indexing fail.</p>
<p dir="auto">I think it should accept an integer in a floating point type, even if doesn't have the floating point format.<br>
On the other hand, I understand that it couldn't accept a floating point number in a integer type because it creates data loss.</p>
<p dir="auto"><strong>Steps to reproduce</strong>:</p>
<ol dir="auto">
<li><code class="notranslate">curl -X PUT localhost:9200/speed/record/1 -d '{ "speed_rec": [ { "speed": 61.23 }, { "speed": 61 } ] }'</code> will fail:<br>
<code class="notranslate">{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"illegal_argument_exception","reason":"mapper [speed_rec.speed] of different type, current_type [double], merged_type [long]"}},"status":400}</code></li>
<li><code class="notranslate">curl -X PUT localhost:9200/speed/record/1 -d '{ "speed_rec": [ { "speed": 61.23 }, { "speed": 61.0 } ] }'</code> will succeed <code class="notranslate">{"_index":"speed","_type":"record","_id":"1","_version":1,"_shards":{"total":2,"successful":1,"failed":0},"created":true}</code></li>
</ol> | 0 |
<p dir="auto">Symfony 2.0.4. When specifying "index" as a name for the route - exception "No route found for GET /" raised.<br>
`<br>
/**</p>
<ul dir="auto">
<li><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/route/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/route">@route</a>("/", name="index")<br>
*/<br>
public function indexAction()<br>
{<br>
}<br>
`</li>
</ul>
<p dir="auto">But renaming route to anything else solves the issue.</p> | <p dir="auto"><strong>Symfony version(s) affected</strong>: 4.2.*</p>
<p dir="auto"><strong>Description</strong></p>
<p dir="auto">According to Symfony <a href="https://symfony.com/doc/current/reference/constraints/UniqueEntity.html#message" rel="nofollow">UniqueEntity documentation </a> if the constraint is violated then I can create a custom message error by implementing the <code class="notranslate">__toString()</code> method on my Entity.</p>
<p dir="auto">I've attempted to create my custom message via the <code class="notranslate">validation.yaml</code> (which <strong>works</strong>) and I've implemented the <code class="notranslate">__toString()</code> method (which does <strong>not</strong> work)</p>
<p dir="auto">According to the docs:</p>
<blockquote>
<p dir="auto">Messages can include the {{ value }} placeholder to display a string representation of the invalid entity. If the entity doesn't define the __toString() method, the following generic value will be used: "Object of class <strong>CLASS</strong> identified by "</p>
</blockquote>
<p dir="auto"><strong>How to reproduce</strong></p>
<p dir="auto">To reproduce, clone my project and follow README.md guide:<br>
<a href="https://github.com/kemicofa/unique_entity_custom_message_tostring_bug">https://github.com/kemicofa/unique_entity_custom_message_tostring_bug</a></p>
<p dir="auto">Once, the project is installed run the WebCaseTest that I've implemented.</p>
<p dir="auto">Essentially my project will attempt to insert two users with the same email in the database.<br>
The first works as expected and the second fails as expected. However, the second response doesn't have the expected <code class="notranslate">__toString()</code> return message sent, only the default message is sent:</p>
<blockquote>
<p dir="auto">Object(App\Entity\User).email: /** more text here */</p>
</blockquote>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto"><strong>Additional context</strong></p> | 0 |
<p dir="auto">Not sure if this is a bug or there is simply a discrepancy between NumPy and Python. Though this is what I am seeing in some (not all) cases. FYI, similar (but not the exact same) behavior for <code class="notranslate">np.float128</code>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> import numpy as np
>>> a = np.float64(0.47140452079103168)
>>> round(a, 4)
0.47139999999999999
>>> a = np.float64(0.47140452079103168)
>>> round(float(a), 4)
0.4714
>>> a = 0.47140452079103168
>>> round(a, 4)
0.4714"><pre class="notranslate"><code class="notranslate">>>> import numpy as np
>>> a = np.float64(0.47140452079103168)
>>> round(a, 4)
0.47139999999999999
>>> a = np.float64(0.47140452079103168)
>>> round(float(a), 4)
0.4714
>>> a = 0.47140452079103168
>>> round(a, 4)
0.4714
</code></pre></div> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: np.array(.1)[()] == np.array(.1).item()
Out[1]: True
In [2]: np.array(.1)[()] # a np.float64
Out[2]: 0.10000000000000001
In [3]: np.array(.1).item() # a python (64-bit) float
Out[3]: 0.1"><pre class="notranslate"><code class="notranslate">In [1]: np.array(.1)[()] == np.array(.1).item()
Out[1]: True
In [2]: np.array(.1)[()] # a np.float64
Out[2]: 0.10000000000000001
In [3]: np.array(.1).item() # a python (64-bit) float
Out[3]: 0.1
</code></pre></div>
<p dir="auto">Python floats use the shortest repr that give the same value when eval'd since <a href="https://bugs.python.org/issue1580" rel="nofollow">https://bugs.python.org/issue1580</a> was accepted. It would be nice if numpy did the same.</p>
<p dir="auto">I realize it would require a nontrivial patch :)</p> | 1 |
<p dir="auto">A common pattern with collections is the "groupinds" pattern. The pattern consists of collecting the indices of the entries of the collection into subsets with common value. For example:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="v = [(1,2), (1,2), (1,3), (7,3)]"><pre class="notranslate">v <span class="pl-k">=</span> [(<span class="pl-c1">1</span>,<span class="pl-c1">2</span>), (<span class="pl-c1">1</span>,<span class="pl-c1">2</span>), (<span class="pl-c1">1</span>,<span class="pl-c1">3</span>), (<span class="pl-c1">7</span>,<span class="pl-c1">3</span>)]</pre></div>
<p dir="auto">could be grouped into:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[[1,2], [3], [4]]"><pre class="notranslate">[[<span class="pl-c1">1</span>,<span class="pl-c1">2</span>], [<span class="pl-c1">3</span>], [<span class="pl-c1">4</span>]]</pre></div>
<p dir="auto">because the two first indices of <code class="notranslate">v</code> have the same value <code class="notranslate">(1,2)</code>.</p>
<p dir="auto">Could we have this pattern implemented in Base? Below is a draft implementation by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jagot/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jagot">@jagot</a>:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function group_by(v; f=identity, by=identity)
isempty(v) && return [[]]
e = first(v)
m = Dict{typeof(by(e)),Vector{typeof(f(1=>e))}}()
for (i,e) in enumerate(v)
push!(get!(m, by(e), []), f(i=>e))
end
values(m)
end"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">group_by</span>(v; f<span class="pl-k">=</span>identity, by<span class="pl-k">=</span>identity)
<span class="pl-c1">isempty</span>(v) <span class="pl-k">&&</span> <span class="pl-k">return</span> [[]]
e <span class="pl-k">=</span> <span class="pl-c1">first</span>(v)
m <span class="pl-k">=</span> <span class="pl-c1">Dict</span><span class="pl-c1">{typeof(by(e)),Vector{typeof(f(1=>e))}}</span>()
<span class="pl-k">for</span> (i,e) <span class="pl-k">in</span> <span class="pl-c1">enumerate</span>(v)
<span class="pl-c1">push!</span>(<span class="pl-c1">get!</span>(m, <span class="pl-c1">by</span>(e), []), <span class="pl-c1">f</span>(i<span class="pl-k">=></span>e))
<span class="pl-k">end</span>
<span class="pl-c1">values</span>(m)
<span class="pl-k">end</span></pre></div> | <p dir="auto">When applying a restriction to a abstract type parameter a subtype it is possible to define a subtype that is not actually a subtype:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> abstract type AbstractFoo{T<:Integer} end
julia> struct Foo1{T} <: AbstractFoo{T} end
julia> struct Foo2{T <: Integer} <: AbstractFoo{T} end
julia> Foo1 <: AbstractFoo
false
julia> Foo2 <: AbstractFoo
true"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">abstract type</span> AbstractFoo{T<span class="pl-k"><:</span><span class="pl-c1">Integer</span>} <span class="pl-k">end</span>
julia<span class="pl-k">></span> <span class="pl-k">struct</span> Foo1{T} <span class="pl-k"><:</span> <span class="pl-c1">AbstractFoo{T}</span> <span class="pl-k">end</span>
julia<span class="pl-k">></span> <span class="pl-k">struct</span> Foo2{T <span class="pl-k"><:</span> <span class="pl-c1">Integer</span>} <span class="pl-k"><:</span> <span class="pl-c1">AbstractFoo{T}</span> <span class="pl-k">end</span>
julia<span class="pl-k">></span> Foo1 <span class="pl-k"><:</span> <span class="pl-c1">AbstractFoo</span>
<span class="pl-c1">false</span>
julia<span class="pl-k">></span> Foo2 <span class="pl-k"><:</span> <span class="pl-c1">AbstractFoo</span>
<span class="pl-c1">true</span></pre></div>
<p dir="auto">I believe this to be a bug as by definition <code class="notranslate">Foo1</code> is a subtype of <code class="notranslate">AbstractFoo</code>. Similarly definitions where the subtype attempts to expand the scope of the parameter should probably be disallowed:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct Foo3{T <: Real} <: AbstractFoo{T} end"><pre class="notranslate"><span class="pl-k">struct</span> Foo3{T <span class="pl-k"><:</span> <span class="pl-c1">Real</span>} <span class="pl-k"><:</span> <span class="pl-c1">AbstractFoo{T}</span> <span class="pl-k">end</span></pre></div> | 0 |
<p dir="auto">Issue: <b>81559c42-419d-739b-a6b7-43927bc5d585<b><br><br><em>Versions</em> <br>- 0.10.1-release<br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/94cba4eb314f52fd18b47b72459954fda65302d0/hovercard" href="https://github.com/microsoft/vscode/commit/94cba4eb314f52fd18b47b72459954fda65302d0"><tt>94cba4e</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/a4bfcb890dc97f3e0801d8d824d0653e31ab3d44/hovercard" href="https://github.com/microsoft/vscode/commit/a4bfcb890dc97f3e0801d8d824d0653e31ab3d44"><tt>a4bfcb8</tt></a><br><em>Stack</em> <br>[/vs/workbench/parts/debug/node/rawDebugSession.ts#L68:28 (RawDebugSession.send)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/rawDebugSession.ts#L68:28">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/rawDebugSession.ts#L68:28</a> %28RawDebugSession.send%29)<br>[vs/workbench/vs/base/common/winjs.base.raw.js#L1470:0 (onError)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1470:0">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1470:0</a> %28onError%29)<br>[vs/workbench/vs/base/common/winjs.base.raw.js#L1176:0 (_notify)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1176:0">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1176:0</a> %28_notify%29)<br>[vs/workbench/vs/base/common/winjs.base.raw.js#L1343:0 (enter)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1343:0">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1343:0</a> %28enter%29)<br>[vs/workbench/vs/base/common/winjs.base.raw.js#L1316:0 (_run)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1316:0">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1316:0</a> %28_run%29)<br>[/vs/workbench/parts/debug/node/v8Protocol.ts#L61:5 (V8Protocol.send)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L61:5">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L61:5</a> %28V8Protocol.send%29)<br>[/vs/workbench/parts/debug/node/v8Protocol.ts#L127:4 (V8Protocol.dispatch)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L127:4">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L127:4</a> %28V8Protocol.dispatch%29)<br>[/vs/workbench/parts/debug/node/v8Protocol.ts#L96:11 (V8Protocol.handleData)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L96:11">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L96:11</a> %28V8Protocol.handleData%29)<br>[/vs/workbench/parts/debug/node/v8Protocol.ts#L51:8 (V8Protocol.connect)](<a href="https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L51:8">https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L51:8</a> %28V8Protocol.connect%29)<br> at Socket. (out/vs/workbench/workbench.main.js:1593:24200)<br> at emitOne (events.js:77:13)<br></b></b></p> | <p dir="auto">In a node express app I have the following loop:</p>
<p dir="auto">var msg = 'hello world';<br>
var i = 0;<br>
while (i < 100) {<br>
msg = msg + i.toString();<br>
i++;<br>
}</p>
<p dir="auto">I set up the local and watch windows in the debugger so that I can see the msg variable in both.</p>
<p dir="auto">When stepping through the loop, if I press F10 very quickly, eventually the msg variable in the locals window will stop updating. See the screenshot below<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1704059/11182475/068041ca-8c63-11e5-9e27-842b4943cfbe.png"><img src="https://cloud.githubusercontent.com/assets/1704059/11182475/068041ca-8c63-11e5-9e27-842b4943cfbe.png" alt="snip_20151116130725" style="max-width: 100%;"></a></p>
<p dir="auto">When stepping through quickly, I sometimes see a message in the watch window that says 'Exception while processing request'</p>
<p dir="auto">This is on 0.10.0</p> | 1 |
<p dir="auto">Maximized state of window not correctly maximized. Width and height saved, but window out of workspace. [Win8.1, 0.117]<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4272432/3687259/5cc2e182-1324-11e4-9a49-134254bbafd4.jpg"><img src="https://cloud.githubusercontent.com/assets/4272432/3687259/5cc2e182-1324-11e4-9a49-134254bbafd4.jpg" alt="default" style="max-width: 100%;"></a></p> | <p dir="auto">When starting Atom, the maximized state of the window should be restored to what it was the last time Atom was closed.<br>
Atom is never maximized on startup although the height and width are restored, causing the window to slightly be overlapped by the Windows Taskbar.</p>
<p dir="auto">Using Atom 0.114.0 x64 on Windows.</p> | 1 |
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p>
<p dir="auto">bug</p>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">When I try to load dynamic module with <code class="notranslate">import('/path/to/my/module.js').then()</code> it work, but when i try to import module with <code class="notranslate">import(rootPath + '/' + myModuleName + '/index.js').then()</code> it doesn't work.</p>
<p dir="auto">I got:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" Error: Cannot find module '/Users/hubert_i/Emodyz/launcher-ezgames.eu/modules/test/index.js'.
at /Users/hubert_i/Emodyz/launcher-ezgames.eu/dist/electron/main.js:10475:9
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)"><pre class="notranslate"><span class="pl-c1"> Error: Cannot find module '/Users/hubert_i/Emodyz/launcher-ezgames.eu/modules/test/index.js'.</span>
<span class="pl-c1"> at /Users/hubert_i/Emodyz/launcher-ezgames.eu/dist/electron/main.js:10475:9</span>
<span class="pl-c1"> at <anonymous></span>
<span class="pl-c1"> at process._tickCallback (internal/process/next_tick.js:188:7)</span></pre></div>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Dynamic import with variable</p>
<p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.</strong></p>
<p dir="auto">webpack => 3.10.0<br>
npm => 5.6.0<br>
yarn => 1.5.1<br>
Node.js => v9.6.1<br>
Operating System => macOs High Sierra</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
Webpack 5.0 fails to build with the error: "Rule can only have one resource source".</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">I have create a minimal repro over at <a href="https://github.com/skaut/shared-drive-mover/tree/webpack-5-issue-repro">https://github.com/skaut/shared-drive-mover/tree/webpack-5-issue-repro</a><br>
This issue consist of many "moving parts", removing any of them leads to it not manifesting.</p>
<p dir="auto">My current behaviour of the repro is as follows:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ gulp build
[18:09:32] Using gulpfile ~/shared-drive-mover/gulpfile.js
[18:09:32] Starting 'build'...
[18:09:33] 'build' errored after 349 ms
[18:09:33] Error: Rule can only have one resource source (provided resource and test + include + exclude) in {
"exclude": {},
"use": [
{
"loader": "ts-loader",
"options": {
"appendTsSuffixTo": [
{}
]
},
"ident": "clonedRuleSet-1[0].rules[0]"
}
]
}
at checkResourceSource (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:167:11)
at Function.normalizeRule (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:198:4)
at /home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:110:20
at Array.map (<anonymous>)
at Function.normalizeRules (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:109:17)
at new RuleSet (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:104:24)
at new NormalModuleFactory (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/NormalModuleFactory.js:115:18)
at Compiler.createNormalModuleFactory (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:636:31)
at Compiler.newCompilationParams (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:653:30)
at Compiler.compile (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:661:23)
at /home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:321:11
at Compiler.readRecords (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:529:11)
at /home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:318:10
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/user/shared-drive-mover/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/home/user/shared-drive-mover/node_modules/tapable/lib/Hook.js:154:20)
at /home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:315:19"><pre class="notranslate">$ gulp build
[18:09:32] Using gulpfile <span class="pl-k">~</span>/shared-drive-mover/gulpfile.js
[18:09:32] Starting <span class="pl-s"><span class="pl-pds">'</span>build<span class="pl-pds">'</span></span>...
[18:09:33] <span class="pl-s"><span class="pl-pds">'</span>build<span class="pl-pds">'</span></span> errored after 349 ms
[18:09:33] Error: Rule can only have one resource <span class="pl-c1">source</span> (provided resource and <span class="pl-c1">test</span> + include + exclude) <span class="pl-k">in</span> {
<span class="pl-s"><span class="pl-pds">"</span>exclude<span class="pl-pds">"</span></span>: {},
<span class="pl-s"><span class="pl-pds">"</span>use<span class="pl-pds">"</span></span>: [
{
<span class="pl-s"><span class="pl-pds">"</span>loader<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>ts-loader<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>options<span class="pl-pds">"</span></span>: {
<span class="pl-s"><span class="pl-pds">"</span>appendTsSuffixTo<span class="pl-pds">"</span></span>: [
{}
]
},
<span class="pl-s"><span class="pl-pds">"</span>ident<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>clonedRuleSet-1[0].rules[0]<span class="pl-pds">"</span></span>
}
]
}
at checkResourceSource (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:167:11)
at Function.normalizeRule (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:198:4)
at /home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:110:20
at Array.map (<span class="pl-k"><</span>anonymous<span class="pl-k">></span>)
at Function.normalizeRules (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:109:17)
at new RuleSet (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/RuleSet.js:104:24)
at new NormalModuleFactory (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/NormalModuleFactory.js:115:18)
at Compiler.createNormalModuleFactory (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:636:31)
at Compiler.newCompilationParams (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:653:30)
at Compiler.compile (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:661:23)
at /home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:321:11
at Compiler.readRecords (/home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:529:11)
at /home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:318:10
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/user/shared-drive-mover/node_modules/tapable/lib/HookCodeFactory.js:33:10), <span class="pl-k"><</span>anonymous<span class="pl-k">></span>:6:1)
at AsyncSeriesHook.lazyCompileHook (/home/user/shared-drive-mover/node_modules/tapable/lib/Hook.js:154:20)
at /home/user/shared-drive-mover/node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js:315:19</pre></div>
<p dir="auto">This only happens when invoking webpack through webpack-stream, but the author of that thinks the issue lies in webpack. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="804751725" data-permission-text="Title is private" data-url="https://github.com/shama/webpack-stream/issues/233" data-hovercard-type="issue" data-hovercard-url="/shama/webpack-stream/issues/233/hovercard" href="https://github.com/shama/webpack-stream/issues/233">shama/webpack-stream#233</a>.</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">No crash and correct output in the <code class="notranslate">dist</code> directory - as it is with webpack@v4.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.21.2<br>
Node.js version: 14.15.5<br>
Operating System: Debian testing<br>
Additional tools: gulp, ts-loader, typescript, vue, vue-loader, webpack-stream</p> | 0 |
<p dir="auto">Hello,</p>
<p dir="auto">I've just updated from 0.193.0 to 0.200.0 (on Debian Jessie).</p>
<p dir="auto">When launched from the CLI, atom used to display the tree view of the current (CLI) directory, it is not the case anymore.</p>
<p dir="auto">On the first start, the tree view is closed. In order to display the tree view of a given directory, you have to manually open a file contained into it. From that moment on, no mater the (CLI) directory atom is launched from, it always opens the tree view for the directory containing the latest opened file.</p>
<p dir="auto">The only way to open a new directory in the tree view (from the GUI) is to right click the current one, select "remove project folder" than open a file contained into the desired directory.</p>
<p dir="auto">Is it a bug or a feature? Is there any way to get the previous behavior back?</p> | <blockquote>
<p dir="auto">Opening Atom without the command line (e.g. using the dock on OSX) now re-opens any previously opened windows</p>
</blockquote>
<p dir="auto">Would it be hard for me to do a PR to add a command-line option to open atom with the previous windows? I know my use-case is rare but I open X11 windows from the command-line and I have no desktop at all.</p>
<p dir="auto">I know this isn't going to happen but logically using <code class="notranslate">atom</code> would open previous windows and <code class="notranslate">atom .</code> would open the working directory.</p> | 1 |
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.3.2 (latest released)</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">We deployed the latest version of Airflow on our K8s cluster (AKS) and we noticed that the webserver is restarted every minute or so. The pod logs don't show the immediate problem, apart from a particular exception that's being raised several times by sqlalchemy which is the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR - Creation of Permission View Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_permission_id_view_menu_id_key"
DETAIL: Key (permission_id, view_menu_id)=(5, 15) already exists."><pre class="notranslate"><code class="notranslate">ERROR - Creation of Permission View Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_permission_id_view_menu_id_key"
DETAIL: Key (permission_id, view_menu_id)=(5, 15) already exists.
</code></pre></div>
<p dir="auto">We also noticed that the Google provider couldn't be imported but that shouln't be an issue since we don't use that. I'm trying to find out what is causing these restarts and how I can get the webserver to be stable.</p>
<p dir="auto">These are the pod logs of the webserver:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
Running the Gunicorn Server with:
Workers: 4 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
Access Logformat:
=================================================================
[2022-06-07 15:13:19,965] {webserver_command.py:231} DEBUG - [0 / 4] Some workers are starting up, waiting...
[2022-06-07 15:13:20,390] {settings.py:508} DEBUG - User session lifetime is set to 43200 minutes.
[2022-06-07 15:13:20,420] {settings.py:362} DEBUG - settings.prepare_engine_args(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=20
[2022-06-07 15:13:20,435] {logging_config.py:53} DEBUG - Unable to load custom logging, using default config instead
[2022-06-07 15:13:20,881] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-06-07 15:13:20,928] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-06-07 15:13:21,081] {settings.py:508} DEBUG - User session lifetime is set to 43200 minutes.
[2022-06-07 15:13:21,110] {settings.py:362} DEBUG - settings.prepare_engine_args(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=21
[2022-06-07 15:13:21,115] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-06-07 15:13:21,123] {logging_config.py:53} DEBUG - Unable to load custom logging, using default config instead
[2022-06-07 15:13:21,137] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-06-07 15:13:21,159] {settings.py:508} DEBUG - User session lifetime is set to 43200 minutes.
[2022-06-07 15:13:21,167] {settings.py:508} DEBUG - User session lifetime is set to 43200 minutes.
[2022-06-07 15:13:21,199] {settings.py:362} DEBUG - settings.prepare_engine_args(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=23
[2022-06-07 15:13:21,202] {settings.py:362} DEBUG - settings.prepare_engine_args(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=22
[2022-06-07 15:13:21,206] {logging_config.py:53} DEBUG - Unable to load custom logging, using default config instead
[2022-06-07 15:13:21,211] {logging_config.py:53} DEBUG - Unable to load custom logging, using default config instead
[2022-06-07 15:13:21,606] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-06-07 15:13:21,609] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py:1461 SAWarning: DELETE statement on table 'ab_permission_view' expected to delete 1 row(s); 0 were matched. Please set confirm_deleted_rows=False within the mapper configuration to prevent this warning.
[2022-06-07 15:13:21,645] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-06-07 15:13:21,647] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-06-07 15:13:21,818] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-06-07 15:13:21,819] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_permission_id_view_menu_id_key"
DETAIL: Key (permission_id, view_menu_id)=(5, 15) already exists.
[SQL: INSERT INTO ab_permission_view (id, permission_id, view_menu_id) VALUES (nextval('ab_permission_view_id_seq'), %(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 5, 'view_menu_id': 15}]
(Background on this error at: http://sqlalche.me/e/14/gkpj)
[2022-06-07 15:13:21,830] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-06-07 15:13:21,836] {manager.py:570} ERROR - Add Permission to Role Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key"
DETAIL: Key (permission_view_id, role_id)=(9646, 1) already exists.
[SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id]
[parameters: {'permission_view_id': 9646, 'role_id': 1}]
(Background on this error at: http://sqlalche.me/e/14/gkpj)
[2022-06-07 15:13:21,942] {manager.py:570} ERROR - Add Permission to Role Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key"
DETAIL: Key (permission_view_id, role_id)=(9646, 1) already exists.
[SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id]
[parameters: {'permission_view_id': 9646, 'role_id': 1}]
(Background on this error at: http://sqlalche.me/e/14/gkpj)"><pre class="notranslate"><code class="notranslate"> ____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
Running the Gunicorn Server with:
Workers: 4 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
Access Logformat:
=================================================================
[2022-06-07 15:13:19,965] {webserver_command.py:231} DEBUG - [0 / 4] Some workers are starting up, waiting...
[2022-06-07 15:13:20,390] {settings.py:508} DEBUG - User session lifetime is set to 43200 minutes.
[2022-06-07 15:13:20,420] {settings.py:362} DEBUG - settings.prepare_engine_args(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=20
[2022-06-07 15:13:20,435] {logging_config.py:53} DEBUG - Unable to load custom logging, using default config instead
[2022-06-07 15:13:20,881] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-06-07 15:13:20,928] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-06-07 15:13:21,081] {settings.py:508} DEBUG - User session lifetime is set to 43200 minutes.
[2022-06-07 15:13:21,110] {settings.py:362} DEBUG - settings.prepare_engine_args(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=21
[2022-06-07 15:13:21,115] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-06-07 15:13:21,123] {logging_config.py:53} DEBUG - Unable to load custom logging, using default config instead
[2022-06-07 15:13:21,137] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-06-07 15:13:21,159] {settings.py:508} DEBUG - User session lifetime is set to 43200 minutes.
[2022-06-07 15:13:21,167] {settings.py:508} DEBUG - User session lifetime is set to 43200 minutes.
[2022-06-07 15:13:21,199] {settings.py:362} DEBUG - settings.prepare_engine_args(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=23
[2022-06-07 15:13:21,202] {settings.py:362} DEBUG - settings.prepare_engine_args(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=22
[2022-06-07 15:13:21,206] {logging_config.py:53} DEBUG - Unable to load custom logging, using default config instead
[2022-06-07 15:13:21,211] {logging_config.py:53} DEBUG - Unable to load custom logging, using default config instead
[2022-06-07 15:13:21,606] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-06-07 15:13:21,609] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py:1461 SAWarning: DELETE statement on table 'ab_permission_view' expected to delete 1 row(s); 0 were matched. Please set confirm_deleted_rows=False within the mapper configuration to prevent this warning.
[2022-06-07 15:13:21,645] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-06-07 15:13:21,647] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-06-07 15:13:21,818] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-06-07 15:13:21,819] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_permission_id_view_menu_id_key"
DETAIL: Key (permission_id, view_menu_id)=(5, 15) already exists.
[SQL: INSERT INTO ab_permission_view (id, permission_id, view_menu_id) VALUES (nextval('ab_permission_view_id_seq'), %(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 5, 'view_menu_id': 15}]
(Background on this error at: http://sqlalche.me/e/14/gkpj)
[2022-06-07 15:13:21,830] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-06-07 15:13:21,836] {manager.py:570} ERROR - Add Permission to Role Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key"
DETAIL: Key (permission_view_id, role_id)=(9646, 1) already exists.
[SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id]
[parameters: {'permission_view_id': 9646, 'role_id': 1}]
(Background on this error at: http://sqlalche.me/e/14/gkpj)
[2022-06-07 15:13:21,942] {manager.py:570} ERROR - Add Permission to Role Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key"
DETAIL: Key (permission_view_id, role_id)=(9646, 1) already exists.
[SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id]
[parameters: {'permission_view_id': 9646, 'role_id': 1}]
(Background on this error at: http://sqlalche.me/e/14/gkpj)
</code></pre></div>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">The webserver shouldn't restart that often.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Install the official Apache Airflow helm chart (version 1.6.0). The values used are attached.</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 20.04.3 LTS</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">2.3.2</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Official Apache Airflow Helm Chart</p>
<h3 dir="auto">Deployment details</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "7"
meta.helm.sh/release-name: airflow2
meta.helm.sh/release-namespace: airflow
creationTimestamp: "2022-06-01T09:15:33Z"
generation: 9
labels:
app.kubernetes.io/managed-by: Helm
chart: airflow-1.6.0
component: webserver
heritage: Helm
release: airflow2
tier: airflow
name: airflow2-webserver
namespace: airflow
resourceVersion: "8081109"
uid: 6d68ebd7-1538-4297-95e7-53dfbeb92fcb
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
component: webserver
release: airflow2
tier: airflow
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
checksum/airflow-config: 2be5463333925fcbdf9f5f43e4be92639e42a0d83c4056a3297339be78dc1e40
checksum/extra-configmaps: 78ea18063ba5598229865ebb823ea30e8f8f40c7a04e44055ddff7ee4dd4d719
checksum/extra-secrets: bb91ef06ddc31c0c5a29973832163d8b0b597812a793ef911d33b622bc9d1655
checksum/metadata-secret: 0cb618586cd6fd8f6632ca0acb91fb04833ebbb8a8dd70749fdc445cb20c2ba1
checksum/pgbouncer-config-secret: 942354d328c2108390909975571ee165865e43b20615e7517675b134d618575a
checksum/webserver-config: 4a2281a4e3ed0cc5e89f07aba3c1bb314ea51c17cb5d2b41e9b045054a6b5c72
checksum/webserver-secret-key: 543ddc641c5724aae4527e71048538dd12d3b3e51c57482f8528c15204f3633b
creationTimestamp: null
labels:
component: webserver
release: airflow2
tier: airflow
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
component: webserver
topologyKey: kubernetes.io/hostname
weight: 100
containers:
- args:
- bash
- -c
- exec airflow webserver
env:
- name: AIRFLOW__LOGGING__LOGGING_LEVEL
value: DEBUG
- name: AIRFLOW__KUBERNETES_ENVIRONMENT_VARIABLES__AIRFLOW__LOGGING__LOGGING_LEVEL
value: DEBUG
- name: AIRFLOW__CORE__FERNET_KEY
valueFrom:
secretKeyRef:
key: fernet-key
name: airflow2-fernet-key
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW_CONN_AIRFLOW_DB
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW__WEBSERVER__SECRET_KEY
valueFrom:
secretKeyRef:
key: webserver-secret-key
name: airflow2-webserver-secret-key
image: privateimages.azurecr.io/private-airflow:2.3.2-python3.8
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 20
httpGet:
path: /health
port: 80
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 30
name: webserver
ports:
- containerPort: 80
name: airflow-ui
protocol: TCP
readinessProbe:
failureThreshold: 20
httpGet:
path: /health
port: 80
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 30
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/airflow/pod_templates/pod_template_file.yaml
name: config
readOnly: true
subPath: pod_template_file.yaml
- mountPath: /opt/airflow/airflow.cfg
name: config
readOnly: true
subPath: airflow.cfg
- mountPath: /opt/airflow/config/airflow_local_settings.py
name: config
readOnly: true
subPath: airflow_local_settings.py
- mountPath: /opt/airflow/logs
name: logs
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: acrsecretpublic
initContainers:
- args:
- airflow
- db
- check-migrations
- --migration-wait-timeout=60
env:
- name: AIRFLOW__LOGGING__LOGGING_LEVEL
value: DEBUG
- name: AIRFLOW__CORE__FERNET_KEY
valueFrom:
secretKeyRef:
key: fernet-key
name: airflow2-fernet-key
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW_CONN_AIRFLOW_DB
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW__WEBSERVER__SECRET_KEY
valueFrom:
secretKeyRef:
key: webserver-secret-key
name: airflow2-webserver-secret-key
image: privateimages.azurecr.io/private-airflow:2.3.2-python3.8
imagePullPolicy: IfNotPresent
name: wait-for-airflow-migrations
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/airflow/airflow.cfg
name: config
readOnly: true
subPath: airflow.cfg
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 0
runAsUser: 50000
serviceAccount: airflow2-webserver
serviceAccountName: airflow2-webserver
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: airflow2-airflow-config
name: config
- name: logs
persistentVolumeClaim:
claimName: logs
status:
conditions:
- lastTransitionTime: "2022-06-01T09:15:33Z"
lastUpdateTime: "2022-06-01T09:15:33Z"
message: Deployment does not have minimum availability.
reason: MinimumReplicasUnavailable
status: "False"
type: Available
- lastTransitionTime: "2022-06-07T14:31:39Z"
lastUpdateTime: "2022-06-07T14:31:39Z"
message: ReplicaSet "airflow2-webserver-55584fc9c4" has timed out progressing.
reason: ProgressDeadlineExceeded
status: "False"
type: Progressing
observedGeneration: 9
replicas: 2
unavailableReplicas: 2
updatedReplicas: 1"><pre class="notranslate"><code class="notranslate">apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "7"
meta.helm.sh/release-name: airflow2
meta.helm.sh/release-namespace: airflow
creationTimestamp: "2022-06-01T09:15:33Z"
generation: 9
labels:
app.kubernetes.io/managed-by: Helm
chart: airflow-1.6.0
component: webserver
heritage: Helm
release: airflow2
tier: airflow
name: airflow2-webserver
namespace: airflow
resourceVersion: "8081109"
uid: 6d68ebd7-1538-4297-95e7-53dfbeb92fcb
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
component: webserver
release: airflow2
tier: airflow
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
checksum/airflow-config: 2be5463333925fcbdf9f5f43e4be92639e42a0d83c4056a3297339be78dc1e40
checksum/extra-configmaps: 78ea18063ba5598229865ebb823ea30e8f8f40c7a04e44055ddff7ee4dd4d719
checksum/extra-secrets: bb91ef06ddc31c0c5a29973832163d8b0b597812a793ef911d33b622bc9d1655
checksum/metadata-secret: 0cb618586cd6fd8f6632ca0acb91fb04833ebbb8a8dd70749fdc445cb20c2ba1
checksum/pgbouncer-config-secret: 942354d328c2108390909975571ee165865e43b20615e7517675b134d618575a
checksum/webserver-config: 4a2281a4e3ed0cc5e89f07aba3c1bb314ea51c17cb5d2b41e9b045054a6b5c72
checksum/webserver-secret-key: 543ddc641c5724aae4527e71048538dd12d3b3e51c57482f8528c15204f3633b
creationTimestamp: null
labels:
component: webserver
release: airflow2
tier: airflow
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
component: webserver
topologyKey: kubernetes.io/hostname
weight: 100
containers:
- args:
- bash
- -c
- exec airflow webserver
env:
- name: AIRFLOW__LOGGING__LOGGING_LEVEL
value: DEBUG
- name: AIRFLOW__KUBERNETES_ENVIRONMENT_VARIABLES__AIRFLOW__LOGGING__LOGGING_LEVEL
value: DEBUG
- name: AIRFLOW__CORE__FERNET_KEY
valueFrom:
secretKeyRef:
key: fernet-key
name: airflow2-fernet-key
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW_CONN_AIRFLOW_DB
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW__WEBSERVER__SECRET_KEY
valueFrom:
secretKeyRef:
key: webserver-secret-key
name: airflow2-webserver-secret-key
image: privateimages.azurecr.io/private-airflow:2.3.2-python3.8
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 20
httpGet:
path: /health
port: 80
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 30
name: webserver
ports:
- containerPort: 80
name: airflow-ui
protocol: TCP
readinessProbe:
failureThreshold: 20
httpGet:
path: /health
port: 80
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 30
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/airflow/pod_templates/pod_template_file.yaml
name: config
readOnly: true
subPath: pod_template_file.yaml
- mountPath: /opt/airflow/airflow.cfg
name: config
readOnly: true
subPath: airflow.cfg
- mountPath: /opt/airflow/config/airflow_local_settings.py
name: config
readOnly: true
subPath: airflow_local_settings.py
- mountPath: /opt/airflow/logs
name: logs
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: acrsecretpublic
initContainers:
- args:
- airflow
- db
- check-migrations
- --migration-wait-timeout=60
env:
- name: AIRFLOW__LOGGING__LOGGING_LEVEL
value: DEBUG
- name: AIRFLOW__CORE__FERNET_KEY
valueFrom:
secretKeyRef:
key: fernet-key
name: airflow2-fernet-key
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW_CONN_AIRFLOW_DB
valueFrom:
secretKeyRef:
key: connection
name: airflow2-airflow-metadata
- name: AIRFLOW__WEBSERVER__SECRET_KEY
valueFrom:
secretKeyRef:
key: webserver-secret-key
name: airflow2-webserver-secret-key
image: privateimages.azurecr.io/private-airflow:2.3.2-python3.8
imagePullPolicy: IfNotPresent
name: wait-for-airflow-migrations
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/airflow/airflow.cfg
name: config
readOnly: true
subPath: airflow.cfg
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 0
runAsUser: 50000
serviceAccount: airflow2-webserver
serviceAccountName: airflow2-webserver
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: airflow2-airflow-config
name: config
- name: logs
persistentVolumeClaim:
claimName: logs
status:
conditions:
- lastTransitionTime: "2022-06-01T09:15:33Z"
lastUpdateTime: "2022-06-01T09:15:33Z"
message: Deployment does not have minimum availability.
reason: MinimumReplicasUnavailable
status: "False"
type: Available
- lastTransitionTime: "2022-06-07T14:31:39Z"
lastUpdateTime: "2022-06-07T14:31:39Z"
message: ReplicaSet "airflow2-webserver-55584fc9c4" has timed out progressing.
reason: ProgressDeadlineExceeded
status: "False"
type: Progressing
observedGeneration: 9
replicas: 2
unavailableReplicas: 2
updatedReplicas: 1
</code></pre></div>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.3.1 (latest released)</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">gunicorn log file is full of these messages.</p>
<p dir="auto">This behavior was present also in release 2.3.0</p>
<p dir="auto">I don't think that was a problem in Airflow 2.2.x</p>
<p dir="auto">The problem is that web server now is much weekier than before and it is the second time in a week that I found it not running.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-05-26 05:50:55,083] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:50:55,098] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:50:55,159] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:50:55,164] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:51:25,688] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:51:25,704] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:51:25,763] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:51:25,769] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:51:56,283] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:51:56,297] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:51:56,353] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:51:56,358] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:52:26,954] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:52:26,971] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:52:27,033] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:52:27,040] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:52:57,595] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:52:57,610] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:52:57,679] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:52:57,684] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:53:28,130] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:53:28,148] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:53:28,209] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:53:28,214] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin"><pre class="notranslate"><code class="notranslate">[2022-05-26 05:50:55,083] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:50:55,098] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:50:55,159] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:50:55,164] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:51:25,688] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:51:25,704] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:51:25,763] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:51:25,769] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:51:56,283] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:51:56,297] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:51:56,353] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:51:56,358] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:52:26,954] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:52:26,971] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:52:27,033] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:52:27,040] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:52:57,595] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:52:57,610] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:52:57,679] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:52:57,684] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-05-26 05:53:28,130] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 05:53:28,148] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 05:53:28,209] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 05:53:28,214] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
</code></pre></div>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">Log must be clear and gunicorn stable as a rock.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Just launch gunicorn</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 20.04.4 LTS</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apache-airflow-providers-celery==2.1.4
apache-airflow-providers-ftp==2.1.2
apache-airflow-providers-http==2.1.2
apache-airflow-providers-imap==2.2.3
apache-airflow-providers-microsoft-mssql==2.1.3
apache-airflow-providers-microsoft-winrm==2.0.5
apache-airflow-providers-mysql==2.2.3
apache-airflow-providers-openfaas==2.0.3
apache-airflow-providers-oracle==2.2.3
apache-airflow-providers-postgres==4.1.0
apache-airflow-providers-samba==3.0.4
apache-airflow-providers-sftp==2.6.0
apache-airflow-providers-sqlite==2.1.3
apache-airflow-providers-ssh==2.4.4"><pre class="notranslate"><code class="notranslate">apache-airflow-providers-celery==2.1.4
apache-airflow-providers-ftp==2.1.2
apache-airflow-providers-http==2.1.2
apache-airflow-providers-imap==2.2.3
apache-airflow-providers-microsoft-mssql==2.1.3
apache-airflow-providers-microsoft-winrm==2.0.5
apache-airflow-providers-mysql==2.2.3
apache-airflow-providers-openfaas==2.0.3
apache-airflow-providers-oracle==2.2.3
apache-airflow-providers-postgres==4.1.0
apache-airflow-providers-samba==3.0.4
apache-airflow-providers-sftp==2.6.0
apache-airflow-providers-sqlite==2.1.3
apache-airflow-providers-ssh==2.4.4
</code></pre></div>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Virtualenv installation</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">gunicorn is configured with AUTH_LDAP option</p>
<h3 dir="auto">Anything else</h3>
<p dir="auto">no</p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto"><strong>Error in dynamic import</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Module parse failed: 'import' and 'export' may only appear at the top level (45:8)
You may need an appropriate loader to handle this file type.
ngAfterViewInit() {
import('./df.tinymce.files')
.then(() => {"><pre class="notranslate"><span class="pl-v">Module</span> <span class="pl-s1">parse</span> failed: <span class="pl-s">'import'</span> <span class="pl-s1">and</span> <span class="pl-s">'export'</span> <span class="pl-s1">may</span> <span class="pl-s1">only</span> <span class="pl-s1">appear</span> <span class="pl-s1">at</span> <span class="pl-s1">the</span> <span class="pl-s1">top</span> <span class="pl-en">level</span> <span class="pl-kos">(</span><span class="pl-c1">45</span>:<span class="pl-c1">8</span><span class="pl-kos">)</span>
<span class="pl-v">You</span> <span class="pl-s1">may</span> <span class="pl-s1">need</span> <span class="pl-s1">an</span> <span class="pl-s1">appropriate</span> <span class="pl-s1">loader</span> <span class="pl-s1">to</span> <span class="pl-s1">handle</span> <span class="pl-smi">this</span> <span class="pl-s1">file</span> <span class="pl-s1">type</span><span class="pl-kos">.</span>
<span class="pl-en">ngAfterViewInit</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">'./df.tinymce.files'</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-c1">then</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span></pre></div>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
Until version 4.29.0 this was working as expected, it's only with this version that this error happens</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: v4.29.0<br>
Node.js version: v11.7.0<br>
Operating System: mac<br>
Additional tools: ts 3.2.2</p> | <p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br>
Feature Request</p>
<p dir="auto"><strong>What is the current behavior?</strong><br>
When <code class="notranslate">webpack --watch</code> is first run, the first thing it does it compile all of the entries.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
For webpack to simply start watching the files and not immediately compile. But given that this doesn't apply as much to single-entry instances, at least have an option for it.</p>
<p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong><br>
Given the number of entries (and if sourcemaps are enabled) this can can take a significant amount of time. With this feature one would be able to enable watching and immediately get to work without having to worry about whether it's finishing compiling and is actually watching, yet.</p>
<p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.</strong><br>
Node: 4.5.0<br>
Webpack: 2.6.1<br>
OS: Windows 10</p> | 0 |
<p dir="auto">Is there an api that can be <code class="notranslate">require</code> ed from node to compile file. eg</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var ts = require('typescript');
ts.compile(filePath, {options}, function(err, js) {
//etc
})"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">ts</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'typescript'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">ts</span><span class="pl-kos">.</span><span class="pl-en">compile</span><span class="pl-kos">(</span><span class="pl-s1">filePath</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>options<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">,</span> <span class="pl-s1">js</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">//etc</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> | <p dir="auto">I'm trying to use generic class in the TSX file and generic class is implemented in the another module. I have tried to use code like in the <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="96398755" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3960" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/3960/hovercard?comment_id=144529141&comment_type=issue_comment" href="https://github.com/microsoft/TypeScript/issues/3960#issuecomment-144529141">#3960 (comment)</a> but it doesn't work because old style casting is not allowed in the TSX file. Ok, I have changed it to the <code class="notranslate">as</code> operator but it emits incorrect code. It refers to the generic class directly without using <code class="notranslate">require</code>.</p>
<p dir="auto">After that I have created simple example without JSX which demonstrates that old style casting and <code class="notranslate">as</code> operator are different.</p>
<p dir="auto">File <strong>generic.ts</strong>: <code class="notranslate">export default class Generic<T> {}</code></p>
<p dir="auto">File <strong>sample.ts</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Generic from "./generic";
type Ctor = new() => Generic<number>;
const x = Generic as Ctor;"><pre class="notranslate"><code class="notranslate">import Generic from "./generic";
type Ctor = new() => Generic<number>;
const x = Generic as Ctor;
</code></pre></div>
<p dir="auto">Compile <code class="notranslate">tsc sample.ts --module commonjs</code>. Result:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var generic_1 = require("./generic");
var x = Generic;"><pre class="notranslate"><code class="notranslate">var generic_1 = require("./generic");
var x = Generic;
</code></pre></div>
<p dir="auto">As you see generic_1 variable isn't used at all and undeclared <code class="notranslate">Generic</code> variable is assigned to <code class="notranslate">x</code>.</p>
<p dir="auto">Workaround:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Generic from "./generic";
type Ctor = new () => Generic<number>;
const x = Generic;
const y = x as Ctor;"><pre class="notranslate"><code class="notranslate">import Generic from "./generic";
type Ctor = new () => Generic<number>;
const x = Generic;
const y = x as Ctor;
</code></pre></div>
<p dir="auto">Also please note that using old-style casting also helps:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Generic from "./generic";
type Ctor = new() => Generic<number>;
const x = <Ctor>Generic;"><pre class="notranslate"><code class="notranslate">import Generic from "./generic";
type Ctor = new() => Generic<number>;
const x = <Ctor>Generic;
</code></pre></div>
<p dir="auto">So it looks like it is the problem in the <code class="notranslate">as</code> operator only.</p> | 0 |
<h4 dir="auto">Code Sample</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
import os
import sys
import tempfile
import pandas as pd
from urllib.request import urlretrieve
# Settings
p_ext = 'https://ftp.ncbi.nlm.nih.gov/gene/DATA/gene_info.gz'
p_down = os.path.join(tempfile.gettempdir(), 'tmp_gene_info.gz')
p_out = os.path.join(tempfile.gettempdir(), 'tmp_gene_info.h5')
# Notify about usage of version of python and pandas, where error occurred
if sys.version.startswith('3.6.0 '):
print('You are using the same python version, where the problem occurred.')
if pd.__version__ == '0.19.2':
print('You are using the same pandas version, where the problem occurred.')
# Download dataset where error occurred
urlretrieve(p_ext, p_down)
# Get dataframe
df = pd.read_table(p_down, sep='\t', header=0)
df = df.drop_duplicates(['#tax_id', 'GeneID'])
# Attempt to save as Hdf5
# A process where kernel would die, approx. 2 seconds after memory usage
# approaches the limit of my machine (62GB out of 64GB)
df.to_hdf(
p_out,
'table',
mode='w',
append=True,
data_columns=['#tax_id', 'GeneID'])
"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">os</span>
<span class="pl-k">import</span> <span class="pl-s1">sys</span>
<span class="pl-k">import</span> <span class="pl-s1">tempfile</span>
<span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-k">from</span> <span class="pl-s1">urllib</span>.<span class="pl-s1">request</span> <span class="pl-k">import</span> <span class="pl-s1">urlretrieve</span>
<span class="pl-c"># Settings</span>
<span class="pl-s1">p_ext</span> <span class="pl-c1">=</span> <span class="pl-s">'https://ftp.ncbi.nlm.nih.gov/gene/DATA/gene_info.gz'</span>
<span class="pl-s1">p_down</span> <span class="pl-c1">=</span> <span class="pl-s1">os</span>.<span class="pl-s1">path</span>.<span class="pl-en">join</span>(<span class="pl-s1">tempfile</span>.<span class="pl-en">gettempdir</span>(), <span class="pl-s">'tmp_gene_info.gz'</span>)
<span class="pl-s1">p_out</span> <span class="pl-c1">=</span> <span class="pl-s1">os</span>.<span class="pl-s1">path</span>.<span class="pl-en">join</span>(<span class="pl-s1">tempfile</span>.<span class="pl-en">gettempdir</span>(), <span class="pl-s">'tmp_gene_info.h5'</span>)
<span class="pl-c"># Notify about usage of version of python and pandas, where error occurred</span>
<span class="pl-k">if</span> <span class="pl-s1">sys</span>.<span class="pl-s1">version</span>.<span class="pl-en">startswith</span>(<span class="pl-s">'3.6.0 '</span>):
<span class="pl-en">print</span>(<span class="pl-s">'You are using the same python version, where the problem occurred.'</span>)
<span class="pl-k">if</span> <span class="pl-s1">pd</span>.<span class="pl-s1">__version__</span> <span class="pl-c1">==</span> <span class="pl-s">'0.19.2'</span>:
<span class="pl-en">print</span>(<span class="pl-s">'You are using the same pandas version, where the problem occurred.'</span>)
<span class="pl-c"># Download dataset where error occurred</span>
<span class="pl-en">urlretrieve</span>(<span class="pl-s1">p_ext</span>, <span class="pl-s1">p_down</span>)
<span class="pl-c"># Get dataframe</span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_table</span>(<span class="pl-s1">p_down</span>, <span class="pl-s1">sep</span><span class="pl-c1">=</span><span class="pl-s">'<span class="pl-cce">\t</span>'</span>, <span class="pl-s1">header</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">drop_duplicates</span>([<span class="pl-s">'#tax_id'</span>, <span class="pl-s">'GeneID'</span>])
<span class="pl-c"># Attempt to save as Hdf5</span>
<span class="pl-c"># A process where kernel would die, approx. 2 seconds after memory usage</span>
<span class="pl-c"># approaches the limit of my machine (62GB out of 64GB)</span>
<span class="pl-s1">df</span>.<span class="pl-en">to_hdf</span>(
<span class="pl-s1">p_out</span>,
<span class="pl-s">'table'</span>,
<span class="pl-s1">mode</span><span class="pl-c1">=</span><span class="pl-s">'w'</span>,
<span class="pl-s1">append</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
<span class="pl-s1">data_columns</span><span class="pl-c1">=</span>[<span class="pl-s">'#tax_id'</span>, <span class="pl-s">'GeneID'</span>])</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Kernel dies while exporting DataFrame to HDF5. This death occurs on two different machines of mine. The error occurs both, in iPython notebooks, and when running the script through command line.</p>
<p dir="auto">I have not been facing problems with df.to_hdf on any other (and smaller) DataFrames (or subsets of the given DataFrame), which suggests that there might be some problem with the specific data set.</p>
<p dir="auto">Prior to the death of the kernel, RAM usage shoots up to around 62GB of 64GB. Thus I am not sure, if my issue relates to some bug, or whether it would be a request for the implementation of a low-memory fall-back.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">The DataFrame would become saved as an HDF5 file.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.0.final.0
python-bits: 64
OS: Darwin
OS-release: 16.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
<p dir="auto">pandas: 0.19.2<br>
nose: 1.3.7<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.11.3<br>
scipy: 0.18.1<br>
statsmodels: 0.6.1<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.5.1<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2016.10<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: 3.3.0<br>
numexpr: 2.6.1<br>
matplotlib: 2.0.0<br>
openpyxl: 2.4.1<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.2<br>
bs4: 4.5.3<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.1.5<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.4<br>
boto: 2.45.0<br>
pandas_datareader: None</p>
</details> | <p dir="auto">we have a <code class="notranslate">Categorical</code> section, but this mainly describes <code class="notranslate">.cat</code>. Maybe split this out into a separate section to document the actual <code class="notranslate">Categorical</code> methods / accessors (even though it is <em>slightly</em> duplicative.</p>
<p dir="auto"><a href="http://pandas-docs.github.io/pandas-docs-travis/api.html#categorical" rel="nofollow">http://pandas-docs.github.io/pandas-docs-travis/api.html#categorical</a></p>
<p dir="auto">also need to add other public methods (that are not available on <code class="notranslate">.cat</code>). This is actually a big list, things like:</p>
<p dir="auto"><code class="notranslate">isnull</code>, <code class="notranslate">unique</code>, <code class="notranslate">map</code>, <code class="notranslate">value_counts</code>, etc.</p>
<p dir="auto">These are all Series like methods / accessors.</p> | 0 |
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.): no</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): api namespace path slash missing</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): BUG REPORT</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.1", GitCommit:"8c6525e891be1c44cbdd6fcf53097a3adb11d68c", GitTreeState:"clean", BuildDate:"2016-11-21T05:16:10Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.1", GitCommit:"8c6525e891be1c44cbdd6fcf53097a3adb11d68c", GitTreeState:"clean", BuildDate:"2016-11-21T05:16:10Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.1", GitCommit:"8c6525e891be1c44cbdd6fcf53097a3adb11d68c", GitTreeState:"clean", BuildDate:"2016-11-21T05:16:10Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.1", GitCommit:"8c6525e891be1c44cbdd6fcf53097a3adb11d68c", GitTreeState:"clean", BuildDate:"2016-11-21T05:16:10Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}
</code></pre></div>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: Vagrant environment on Linux x86_64</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): RHEL clone</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux csos-builder.csos.io 4.8.8-1.el7.csos.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192559" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1">#1</a> SMP Wed Nov 16 08:51:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</li>
<li><strong>Install tools</strong>: Installed from RPMs generated with a build script</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
The selfLink namespace path doesn't have a slash between the end of the namespace and the resource itself.<br>
This was tracked down as a side effect of debugging why Heapster was no longer processing pod metrics. Here curl output (compacted with jq) from a fresh machine:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# curl -s -k https://172.27.1.10:6443/api/v1/namespaces
{"kind":"NamespaceList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/","resourceVersion":"1807"},"items":[{"metadata":{"name":"default","selfLink":"/api/v1/namespacesdefault","uid":"55a50c17-b068-11e6-a4d3-080027a649ab","resourceVersion":"6","creationTimestamp":"2016-11-22T04:01:24Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-system","selfLink":"/api/v1/namespaceskube-system","uid":"56333705-b068-11e6-a4d3-080027a649ab","resourceVersion":"26","creationTimestamp":"2016-11-22T04:01:25Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}}]}"><pre class="notranslate"><code class="notranslate"># curl -s -k https://172.27.1.10:6443/api/v1/namespaces
{"kind":"NamespaceList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/","resourceVersion":"1807"},"items":[{"metadata":{"name":"default","selfLink":"/api/v1/namespacesdefault","uid":"55a50c17-b068-11e6-a4d3-080027a649ab","resourceVersion":"6","creationTimestamp":"2016-11-22T04:01:24Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-system","selfLink":"/api/v1/namespaceskube-system","uid":"56333705-b068-11e6-a4d3-080027a649ab","resourceVersion":"26","creationTimestamp":"2016-11-22T04:01:25Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}}]}
</code></pre></div>
<p dir="auto">In addition this also affects the <code class="notranslate">watch</code> verb on a resource (output trimmed):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# curl -s -k https://172.27.1.10:6443/api/v1/watch/nodes
{"type":"ADDED","object":{"kind":"Node","apiVersion":"v1","metadata":{"name":"builder","selfLink":"/api/v1/nodesbuilder","uid":"55b6a17a-b068-11e6-a4d3-080027a649ab","resourceVersion":"4209","creationTimestamp":"2016-11-22T04:01:24Z","labels":"><pre class="notranslate"><code class="notranslate"># curl -s -k https://172.27.1.10:6443/api/v1/watch/nodes
{"type":"ADDED","object":{"kind":"Node","apiVersion":"v1","metadata":{"name":"builder","selfLink":"/api/v1/nodesbuilder","uid":"55b6a17a-b068-11e6-a4d3-080027a649ab","resourceVersion":"4209","creationTimestamp":"2016-11-22T04:01:24Z","labels":
</code></pre></div>
<p dir="auto">Running <code class="notranslate">kubectl</code> returns correct output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# kubectl get node
NAME STATUS AGE
builder Ready 59m"><pre class="notranslate"><code class="notranslate"># kubectl get node
NAME STATUS AGE
builder Ready 59m
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
Expected the REST interface to return the correct selfLink path</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br>
Build v1.5.0-beta.1 from git and run the above curl commands.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | <p dir="auto"><strong>Is this a request for help?</strong>: No</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): timeout, pd, persistent disk</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): BUG REPORT</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.6", GitCommit:"ae4550cc9c89a593bcda6678df201db1b208133b", GitTreeState:"clean", BuildDate:"2016-08-26T18:13:23Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.5", GitCommit:"5a0a696437ad35c133c0c8493f7e9d22b0f9b81b", GitTreeState:"clean", BuildDate:"2016-10-29T01:32:42Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.6", GitCommit:"ae4550cc9c89a593bcda6678df201db1b208133b", GitTreeState:"clean", BuildDate:"2016-08-26T18:13:23Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.5", GitCommit:"5a0a696437ad35c133c0c8493f7e9d22b0f9b81b", GitTreeState:"clean", BuildDate:"2016-10-29T01:32:42Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
</code></pre></div>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: GCE</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="BUILD_ID=8872.26.0
NAME="Container-VM Image"
GOOGLE_CRASH_ID=Lakitu
VERSION_ID=55
BUG_REPORT_URL=https://crbug.com/new
PRETTY_NAME="Google Container-VM Image"
VERSION=55
GOOGLE_METRICS_PRODUCT_ID=26
HOME_URL="https://cloud.google.com/compute/docs/containers/vm-image/"
ID=gci"><pre class="notranslate"><code class="notranslate">BUILD_ID=8872.26.0
NAME="Container-VM Image"
GOOGLE_CRASH_ID=Lakitu
VERSION_ID=55
BUG_REPORT_URL=https://crbug.com/new
PRETTY_NAME="Google Container-VM Image"
VERSION=55
GOOGLE_METRICS_PRODUCT_ID=26
HOME_URL="https://cloud.google.com/compute/docs/containers/vm-image/"
ID=gci
</code></pre></div>
<ul dir="auto">
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux gke-favega-pool-1-01f44ce6-xr0y 4.4.21+ <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192559" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1">#1</a> SMP Wed Oct 26 13:00:52 PDT 2016 x86_64 Intel(R) Xeon(R) CPU @ 2.60GHz GenuineIntel GNU/Linux</li>
<li><strong>Install tools</strong>: I don't know what this is</li>
<li><strong>Others</strong>: -</li>
</ul>
<p dir="auto"><strong>What happened</strong>: Early this morning I was woken up because all of our containers with GCE Persistent Disk volume mounts were down. I tried restarting the nodes in the cluster, which worked for all pods but one.</p>
<p dir="auto">The pod in question:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Name: postgresql-200534733-39m2y
Namespace: addressbooks
Node: gke-favega-pool-1-01f44ce6-xr0y/10.132.0.3
Start Time: Wed, 02 Nov 2016 14:34:35 +0100
Labels: app=addressbooks
pod-template-hash=200534733
role=db
Status: Pending
IP:
Controllers: ReplicaSet/postgresql-200534733
Containers:
postgres:
Container ID:
Image: postgres:9.5
Image ID:
Port: 5432/TCP
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment Variables:
POSTGRES_USER: addressbooks
POSTGRES_PASSWORD: addressbooks
PGDATA: /var/lib/postgresql/data/pgdata
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
postgres-volume:
Type: GCEPersistentDisk (a Persistent Disk resource in Google Compute Engine)
PDName: addressbooks-postgres-volume
FSType: ext4
Partition: 0
ReadOnly: false
default-token-mp5nw:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-mp5nw
QoS Tier: BestEffort
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
1h 1m 29 {kubelet gke-favega-pool-1-01f44ce6-xr0y} Warning FailedMount Unable to mount volumes for pod "postgresql-200534733-39m2y_addressbooks(183566c0-a101-11e6-bd04-42010a84016f)": timeout expired waiting for volumes to attach/mount for pod "postgresql-200534733-39m2y"/"addressbooks". list of unattached/unmounted volumes=[postgres-volume]
1h 1m 29 {kubelet gke-favega-pool-1-01f44ce6-xr0y} Warning FailedSync Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "postgresql-200534733-39m2y"/"addressbooks". list of unattached/unmounted volumes=[postgres-volume]"><pre class="notranslate"><code class="notranslate">Name: postgresql-200534733-39m2y
Namespace: addressbooks
Node: gke-favega-pool-1-01f44ce6-xr0y/10.132.0.3
Start Time: Wed, 02 Nov 2016 14:34:35 +0100
Labels: app=addressbooks
pod-template-hash=200534733
role=db
Status: Pending
IP:
Controllers: ReplicaSet/postgresql-200534733
Containers:
postgres:
Container ID:
Image: postgres:9.5
Image ID:
Port: 5432/TCP
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment Variables:
POSTGRES_USER: addressbooks
POSTGRES_PASSWORD: addressbooks
PGDATA: /var/lib/postgresql/data/pgdata
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
postgres-volume:
Type: GCEPersistentDisk (a Persistent Disk resource in Google Compute Engine)
PDName: addressbooks-postgres-volume
FSType: ext4
Partition: 0
ReadOnly: false
default-token-mp5nw:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-mp5nw
QoS Tier: BestEffort
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
1h 1m 29 {kubelet gke-favega-pool-1-01f44ce6-xr0y} Warning FailedMount Unable to mount volumes for pod "postgresql-200534733-39m2y_addressbooks(183566c0-a101-11e6-bd04-42010a84016f)": timeout expired waiting for volumes to attach/mount for pod "postgresql-200534733-39m2y"/"addressbooks". list of unattached/unmounted volumes=[postgres-volume]
1h 1m 29 {kubelet gke-favega-pool-1-01f44ce6-xr0y} Warning FailedSync Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "postgresql-200534733-39m2y"/"addressbooks". list of unattached/unmounted volumes=[postgres-volume]
</code></pre></div>
<p dir="auto">The deployment for the pod:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgresql
namespace: addressbooks
spec:
replicas: 1
template:
metadata:
labels:
app: addressbooks
role: db
spec:
containers:
- name: postgres
image: postgres:9.5
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: addressbooks
- name: POSTGRES_PASSWORD
value: addressbooks
- name: PGDATA
value: "/var/lib/postgresql/data/pgdata"
volumeMounts:
- mountPath: "/var/lib/postgresql/data/"
name: postgres-volume
volumes:
- name: postgres-volume
gcePersistentDisk:
pdName: addressbooks-postgres-volume
fsType: ext4"><pre class="notranslate"><code class="notranslate">apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgresql
namespace: addressbooks
spec:
replicas: 1
template:
metadata:
labels:
app: addressbooks
role: db
spec:
containers:
- name: postgres
image: postgres:9.5
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: addressbooks
- name: POSTGRES_PASSWORD
value: addressbooks
- name: PGDATA
value: "/var/lib/postgresql/data/pgdata"
volumeMounts:
- mountPath: "/var/lib/postgresql/data/"
name: postgres-volume
volumes:
- name: postgres-volume
gcePersistentDisk:
pdName: addressbooks-postgres-volume
fsType: ext4
</code></pre></div>
<p dir="auto">Note I can manually mount the PD on the node k8s is trying to schedule the pod on just fine with <code class="notranslate">gcloud</code>.</p>
<p dir="auto">Fishy journalctl:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Nov 02 13:55:37 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:37.185645 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:37 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:37.186721 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:41 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:41.521733 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/df702b83-a0f8-11e6-8de3-42010a84016f-default-token-5yom9" (spec.Name: "default-token-5yom9") pod "df702b83-a0f8-11e6-8de3-42010a84016f" (UID: "df702b83-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:55:41 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:41.523158 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/dfef300a-a0f8-11e6-8de3-42010a84016f-default-token-ck675" (spec.Name: "default-token-ck675") pod "dfef300a-a0f8-11e6-8de3-42010a84016f" (UID: "dfef300a-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:55:46 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:46.479252 1251 server.go:967] GET /healthz: (40.214µs) 200 [[curl/7.50.3] 127.0.0.1:51956]
Nov 02 13:55:46 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:46.551729 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/b88fbb51-a0fc-11e6-bd04-42010a84016f-default-token-9qv5p" (spec.Name: "default-token-9qv5p") pod "b88fbb51-a0fc-11e6-bd04-42010a84016f" (UID: "b88fbb51-a0fc-11e6-bd04-42010a84016f").
Nov 02 13:55:47 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:47.209007 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:47 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:47.209613 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:52 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:52.527417 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/df63b213-a0f8-11e6-8de3-42010a84016f-default-token-slpdg" (spec.Name: "default-token-slpdg") pod "df63b213-a0f8-11e6-8de3-42010a84016f" (UID: "df63b213-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:55:53 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:53.518538 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/df8a26b2-a0f8-11e6-8de3-42010a84016f-default-token-5yom9" (spec.Name: "default-token-5yom9") pod "df8a26b2-a0f8-11e6-8de3-42010a84016f" (UID: "df8a26b2-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:55:56 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:56.501685 1251 server.go:967] GET /healthz: (32.53µs) 200 [[curl/7.50.3] 127.0.0.1:52048]
Nov 02 13:55:57 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:57.272752 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:57 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:57.273347 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:58 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:58.593168 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/dfa7ae50-a0f8-11e6-8de3-42010a84016f-default-token-eobju" (spec.Name: "default-token-eobju") pod "dfa7ae50-a0f8-11e6-8de3-42010a84016f" (UID: "dfa7ae50-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:56:00 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:56:00.601068 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/e00fd33c-a0f8-11e6-8de3-42010a84016f-default-token-hwo5r" (spec.Name: "default-token-hwo5r") pod "e00fd33c-a0f8-11e6-8de3-42010a84016f" (UID: "e00fd33c-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:56:00 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:56:00.602974 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/e01041a6-a0f8-11e6-8de3-42010a84016f-default-token-hwo5r" (spec.Name: "default-token-hwo5r") pod "e01041a6-a0f8-11e6-8de3-42010a84016f" (UID: "e01041a6-a0f8-11e6-8de3-42010a84016f")."><pre class="notranslate"><code class="notranslate">Nov 02 13:55:37 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:37.185645 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:37 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:37.186721 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:41 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:41.521733 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/df702b83-a0f8-11e6-8de3-42010a84016f-default-token-5yom9" (spec.Name: "default-token-5yom9") pod "df702b83-a0f8-11e6-8de3-42010a84016f" (UID: "df702b83-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:55:41 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:41.523158 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/dfef300a-a0f8-11e6-8de3-42010a84016f-default-token-ck675" (spec.Name: "default-token-ck675") pod "dfef300a-a0f8-11e6-8de3-42010a84016f" (UID: "dfef300a-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:55:46 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:46.479252 1251 server.go:967] GET /healthz: (40.214µs) 200 [[curl/7.50.3] 127.0.0.1:51956]
Nov 02 13:55:46 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:46.551729 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/b88fbb51-a0fc-11e6-bd04-42010a84016f-default-token-9qv5p" (spec.Name: "default-token-9qv5p") pod "b88fbb51-a0fc-11e6-bd04-42010a84016f" (UID: "b88fbb51-a0fc-11e6-bd04-42010a84016f").
Nov 02 13:55:47 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:47.209007 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:47 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:47.209613 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:52 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:52.527417 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/df63b213-a0f8-11e6-8de3-42010a84016f-default-token-slpdg" (spec.Name: "default-token-slpdg") pod "df63b213-a0f8-11e6-8de3-42010a84016f" (UID: "df63b213-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:55:53 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:53.518538 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/df8a26b2-a0f8-11e6-8de3-42010a84016f-default-token-5yom9" (spec.Name: "default-token-5yom9") pod "df8a26b2-a0f8-11e6-8de3-42010a84016f" (UID: "df8a26b2-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:55:56 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:56.501685 1251 server.go:967] GET /healthz: (32.53µs) 200 [[curl/7.50.3] 127.0.0.1:52048]
Nov 02 13:55:57 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:57.272752 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:57 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:57.273347 1251 conversion.go:134] failed to handle multiple devices for container. Skipping Filesystem stats
Nov 02 13:55:58 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:55:58.593168 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/dfa7ae50-a0f8-11e6-8de3-42010a84016f-default-token-eobju" (spec.Name: "default-token-eobju") pod "dfa7ae50-a0f8-11e6-8de3-42010a84016f" (UID: "dfa7ae50-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:56:00 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:56:00.601068 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/e00fd33c-a0f8-11e6-8de3-42010a84016f-default-token-hwo5r" (spec.Name: "default-token-hwo5r") pod "e00fd33c-a0f8-11e6-8de3-42010a84016f" (UID: "e00fd33c-a0f8-11e6-8de3-42010a84016f").
Nov 02 13:56:00 gke-favega-pool-1-01f44ce6-xr0y kubelet[1251]: I1102 13:56:00.602974 1251 operation_executor.go:803] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/e01041a6-a0f8-11e6-8de3-42010a84016f-default-token-hwo5r" (spec.Name: "default-token-hwo5r") pod "e01041a6-a0f8-11e6-8de3-42010a84016f" (UID: "e01041a6-a0f8-11e6-8de3-42010a84016f").
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>: I expected the pod to start just fine, like every other pod in my cluster.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible): It only fails for this single pod, so I don't know how to reproduce it.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>: I don't think so.</p> | 0 |
<p dir="auto">Ability to add snippets from <code class="notranslate">.vscode</code> directory, instead of <code class="notranslate">%APPDATA%/Roaming/Code/User/snippets</code>.</p>
<p dir="auto">This would be nice for working with snippets in a specific project, then there is no need to create a snippet extension for private snippets, and install it separately because it's included in the project</p> | <ul dir="auto">
<li>VSCode Version: all</li>
<li>OS Version: all</li>
</ul>
<p dir="auto">We have a custom set of snippets written per-project and would like to include them in the project repo, like our launch.json, tasks.json. Right now we just include the json file and the dev has to copy+paste it into his user snippets, but the snippets are particular to a project, not to all projects.</p>
<p dir="auto">Also it would be great to have a way to define what extensions a developer should have installed to work on the project. We use several code quality and styling plugins to enforce our custom rules and it would be nice if there was a project definition file to suggest installation of the extensions we define.</p> | 1 |
<pre class="notranslate">While debugging a memory problem I found something that looks like temporaries from
previous scopes are sometimes not garbage collected.
In this case disabling compiler optimizations got rid of the leak.
I tried to strip down the problem as much as possible:
<a href="http://play.golang.org/p/HR-7R_0f-C" rel="nofollow">http://play.golang.org/p/HR-7R_0f-C</a>
go version: tip (321d42ff40d3)</pre> | <p dir="auto">If we can get some indication of the compiler or toolchain version into the build ID hash, it would let people flip between different toolchains with the same GOPATH more easily. In particular, when you flipped it would notice that all the things in $GOROOT/pkg are out of date and rebuild them, whereas today you have to use go install -a or else you get object version conflicts from the compiler and/or linker.</p>
<p dir="auto">[Please do not close this as a duplicate of some other issue. This one describes what I plan to do.]</p> | 0 |
<h3 dir="auto">Version</h3>
<p dir="auto">2.5.17</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://jsfiddle.net/onbzk0m6/" rel="nofollow">https://jsfiddle.net/onbzk0m6/</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Just load the vue instance. See link to reproduction.</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">whitespace character<br>
<code class="notranslate">Text: " Drehmaschinen"</code></p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">a string with <code class="notranslate">&nbsp;</code><br>
<code class="notranslate">Text: "&nbsp;&nbsp;&nbsp;Drehmaschinen"</code></p>
<hr>
<p dir="auto">If you remove the vuejs code or change the 'el' attribute, it will work.</p> | <h3 dir="auto">Version</h3>
<p dir="auto">2.6.14</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codepen.io/damaowife/pen/wvqyXrW" rel="nofollow">codepen.io</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">1.qtwebengine (navigator.userAgent :Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.6.3 Chrome/49.0.2623.111 Safari/537.36)<br>
2.vue version (2.6.14)<br>
3. someTimes click event not working (Open QT for a long time.)</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">work fine</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">When click event not working, we found something:<br>
at "vue/src/platforms/web/runtime/modules/events.js" lines 70: <code class="notranslate">e.timeStamp >= attachedTimestamp</code> is false</p> | 0 |
<p dir="auto">The context suggester is returning only one document when two documents have the same input (the higher score, I guess). Also the payload is wrong.</p>
<p dir="auto">1- create an index called "services" with suggest_field mapped as "completion" with payloads</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST services
{
"mappings": {
"service": {
"properties": {
"name": {
"type": "string"
},
"suggest_field": {
"type": "completion",
"payloads": true,
"context": {
"color": {
"type": "category"
}
}
}
}
}
}
}"><pre class="notranslate"><code class="notranslate">POST services
{
"mappings": {
"service": {
"properties": {
"name": {
"type": "string"
},
"suggest_field": {
"type": "completion",
"payloads": true,
"context": {
"color": {
"type": "category"
}
}
}
}
}
}
}
</code></pre></div>
<p dir="auto">2- index a document with id = 1. The input of the completion is "same_input" with weight = 100 and payload {"url": "first_document"}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PUT services/service/1
{
"name": "same_input",
"suggest_field": {
"input": "same_input",
"weight": 100,
"payload": {
"url": "first_document"
},
"context": {
"color": ["red", "yellow"]
}
}
}"><pre class="notranslate"><code class="notranslate">PUT services/service/1
{
"name": "same_input",
"suggest_field": {
"input": "same_input",
"weight": 100,
"payload": {
"url": "first_document"
},
"context": {
"color": ["red", "yellow"]
}
}
}
</code></pre></div>
<p dir="auto">3- index a document with id = 2. The input of the completion is "same_input" too with weight = 200 and payload {"url": "second_document"}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PUT services/service/2
{
"name": "same_input",
"suggest_field": {
"input": "same_input",
"weight": 200,
"payload": {
"url": "second_document"
},
"context": {
"color": ["red", "green"]
}
}
}"><pre class="notranslate"><code class="notranslate">PUT services/service/2
{
"name": "same_input",
"suggest_field": {
"input": "same_input",
"weight": 200,
"payload": {
"url": "second_document"
},
"context": {
"color": ["red", "green"]
}
}
}
</code></pre></div>
<p dir="auto">4- query for suggest using "same_input" as text</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST services/_suggest?pretty'
{
"suggest" : {
"text" : "same_input",
"completion" : {
"field" : "suggest_field",
"size": 10,
"context": {
"color": ["red"]
}
}
}
}"><pre class="notranslate"><code class="notranslate">POST services/_suggest?pretty'
{
"suggest" : {
"text" : "same_input",
"completion" : {
"field" : "suggest_field",
"size": 10,
"context": {
"color": ["red"]
}
}
}
}
</code></pre></div>
<p dir="auto">5 - the response includes only one document with the score 200, which is the weigth of the document id = 2 but with the payload of the document of id = 1 when using context "red".</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"suggest": [
{
"text": "same_input",
"offset": 0,
"length": 10,
"options": [
{
"text": "same_input",
"score": 200,
"payload": {
"url": "first_document"
}
}
]
}
]
}"><pre class="notranslate"><code class="notranslate">{
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"suggest": [
{
"text": "same_input",
"offset": 0,
"length": 10,
"options": [
{
"text": "same_input",
"score": 200,
"payload": {
"url": "first_document"
}
}
]
}
]
}
</code></pre></div> | <p dir="auto">When I create multiple documents which have the same output value in the completion field, a suggest completion request only retrieves one object.<br>
I guess it is a feature, however, once we may set different payloads to those documents, it would make sense to retrieve multiple suggestions with the same output.</p>
<p dir="auto">My environment settings:<br>
ElasticSearch version number: <code class="notranslate">1.0.0.Beta1</code><br>
Lucene version: <code class="notranslate">4.5.1</code></p>
<p dir="auto">In the following example, I create an index with two documents. Each document has a different value in the payload, but the same output and input.<br>
Performing a suggestion completion request, only one document is retrieved.</p>
<p dir="auto">Scripts:</p>
<h2 dir="auto">Create and populate index</h2>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="curl -XDELETE 'localhost:9200/notebookindex'
curl -XPUT localhost:9200/notebookindex
curl -XPUT localhost:9200/notebookindex/friend/_mapping -d '{
"friend" : {
"properties" : {
"name" : { "type" : "string" },
"suggestField" : { "type" : "completion", "payloads" : true }
}
}
}'
curl -XPUT 'localhost:9200/notebookindex/friend/1' -d ' {
"name": "james smith",
"suggestField": {
"input": ["james", "smith", "james smith"],
"output": "james smith",
"payload": {"id": "1", "phone": "555-55555"}
}
}'
curl -XPUT 'localhost:9200/notebookindex/friend/2' -d '{
"name": "james smith",
"suggestField": {
"input": ["james", "smith", "james smith"],
"output": "james smith",
"payload": {"id": "2", "phone": "444-44444"}
}
}'"><pre class="notranslate">curl -XDELETE <span class="pl-s"><span class="pl-pds">'</span>localhost:9200/notebookindex<span class="pl-pds">'</span></span>
curl -XPUT localhost:9200/notebookindex
curl -XPUT localhost:9200/notebookindex/friend/_mapping -d <span class="pl-s"><span class="pl-pds">'</span>{</span>
<span class="pl-s"> "friend" : {</span>
<span class="pl-s"> "properties" : {</span>
<span class="pl-s"> "name" : { "type" : "string" },</span>
<span class="pl-s"> "suggestField" : { "type" : "completion", "payloads" : true }</span>
<span class="pl-s"> }</span>
<span class="pl-s"> }</span>
<span class="pl-s">}<span class="pl-pds">'</span></span>
curl -XPUT <span class="pl-s"><span class="pl-pds">'</span>localhost:9200/notebookindex/friend/1<span class="pl-pds">'</span></span> -d <span class="pl-s"><span class="pl-pds">'</span> {</span>
<span class="pl-s"> "name": "james smith",</span>
<span class="pl-s"> "suggestField": {</span>
<span class="pl-s"> "input": ["james", "smith", "james smith"],</span>
<span class="pl-s"> "output": "james smith",</span>
<span class="pl-s"> "payload": {"id": "1", "phone": "555-55555"}</span>
<span class="pl-s"> }</span>
<span class="pl-s">}<span class="pl-pds">'</span></span>
curl -XPUT <span class="pl-s"><span class="pl-pds">'</span>localhost:9200/notebookindex/friend/2<span class="pl-pds">'</span></span> -d <span class="pl-s"><span class="pl-pds">'</span>{</span>
<span class="pl-s"> "name": "james smith",</span>
<span class="pl-s"> "suggestField": {</span>
<span class="pl-s"> "input": ["james", "smith", "james smith"],</span>
<span class="pl-s"> "output": "james smith",</span>
<span class="pl-s"> "payload": {"id": "2", "phone": "444-44444"}</span>
<span class="pl-s"> }</span>
<span class="pl-s">}<span class="pl-pds">'</span></span></pre></div>
<h2 dir="auto">Search 1: look for friends starting with <code class="notranslate">j</code></h2>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="curl -XPOST 'localhost:9200/notebookindex/_suggest?pretty' -d '{
"my-friends-suggest": {
"text": "j",
"completion": {
"field": "suggestField"
}
}
}'"><pre class="notranslate">curl -XPOST <span class="pl-s"><span class="pl-pds">'</span>localhost:9200/notebookindex/_suggest?pretty<span class="pl-pds">'</span></span> -d <span class="pl-s"><span class="pl-pds">'</span>{</span>
<span class="pl-s"> "my-friends-suggest": {</span>
<span class="pl-s"> "text": "j",</span>
<span class="pl-s"> "completion": {</span>
<span class="pl-s"> "field": "suggestField"</span>
<span class="pl-s"> }</span>
<span class="pl-s"> }</span>
<span class="pl-s">}<span class="pl-pds">'</span></span></pre></div>
<p dir="auto">Only one <code class="notranslate">James</code> is found, even though there are two documents matching the suggestion.</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"my-friends-suggest" : [ {
"text" : "j",
"offset" : 0,
"length" : 1,
"options" : [ {
"text" : "james smith",
"score" : 1.0, "payload" : {"id":"2","phone":"444-44444"}
} ]
} ]
}"><pre class="notranslate">{
<span class="pl-ent">"_shards"</span> : {
<span class="pl-ent">"total"</span> : <span class="pl-c1">5</span>,
<span class="pl-ent">"successful"</span> : <span class="pl-c1">5</span>,
<span class="pl-ent">"failed"</span> : <span class="pl-c1">0</span>
},
<span class="pl-ent">"my-friends-suggest"</span> : [ {
<span class="pl-ent">"text"</span> : <span class="pl-s"><span class="pl-pds">"</span>j<span class="pl-pds">"</span></span>,
<span class="pl-ent">"offset"</span> : <span class="pl-c1">0</span>,
<span class="pl-ent">"length"</span> : <span class="pl-c1">1</span>,
<span class="pl-ent">"options"</span> : [ {
<span class="pl-ent">"text"</span> : <span class="pl-s"><span class="pl-pds">"</span>james smith<span class="pl-pds">"</span></span>,
<span class="pl-ent">"score"</span> : <span class="pl-c1">1.0</span>, <span class="pl-ent">"payload"</span> : {<span class="pl-ent">"id"</span>:<span class="pl-s"><span class="pl-pds">"</span>2<span class="pl-pds">"</span></span>,<span class="pl-ent">"phone"</span>:<span class="pl-s"><span class="pl-pds">"</span>444-44444<span class="pl-pds">"</span></span>}
} ]
} ]
}</pre></div>
<h2 dir="auto">Removal and Search 2: remove the <code class="notranslate">James</code> (<code class="notranslate">id 2</code>) previously found and look for friends starting with <code class="notranslate">j</code></h2>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="curl -XDELETE 'localhost:9200/notebookindex/friend/2'
curl -XPOST 'localhost:9200/notebookindex/_suggest?pretty' -d '{
"my-friends-suggest": {
"text": "j",
"completion": {
"field": "suggestField"
}
}
}'"><pre class="notranslate">curl -XDELETE <span class="pl-s"><span class="pl-pds">'</span>localhost:9200/notebookindex/friend/2<span class="pl-pds">'</span></span>
curl -XPOST <span class="pl-s"><span class="pl-pds">'</span>localhost:9200/notebookindex/_suggest?pretty<span class="pl-pds">'</span></span> -d <span class="pl-s"><span class="pl-pds">'</span>{</span>
<span class="pl-s"> "my-friends-suggest": {</span>
<span class="pl-s"> "text": "j",</span>
<span class="pl-s"> "completion": {</span>
<span class="pl-s"> "field": "suggestField"</span>
<span class="pl-s"> }</span>
<span class="pl-s"> }</span>
<span class="pl-s">}<span class="pl-pds">'</span></span></pre></div>
<p dir="auto">The other <code class="notranslate">James</code> is found.</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"my-friends-suggest" : [ {
"text" : "j",
"offset" : 0,
"length" : 1,
"options" : [ {
"text" : "james smith",
"score" : 1.0, "payload" : {"id":"1","phone":"555-55555"}
} ]
} ]
}"><pre class="notranslate">{
<span class="pl-ent">"_shards"</span> : {
<span class="pl-ent">"total"</span> : <span class="pl-c1">5</span>,
<span class="pl-ent">"successful"</span> : <span class="pl-c1">5</span>,
<span class="pl-ent">"failed"</span> : <span class="pl-c1">0</span>
},
<span class="pl-ent">"my-friends-suggest"</span> : [ {
<span class="pl-ent">"text"</span> : <span class="pl-s"><span class="pl-pds">"</span>j<span class="pl-pds">"</span></span>,
<span class="pl-ent">"offset"</span> : <span class="pl-c1">0</span>,
<span class="pl-ent">"length"</span> : <span class="pl-c1">1</span>,
<span class="pl-ent">"options"</span> : [ {
<span class="pl-ent">"text"</span> : <span class="pl-s"><span class="pl-pds">"</span>james smith<span class="pl-pds">"</span></span>,
<span class="pl-ent">"score"</span> : <span class="pl-c1">1.0</span>, <span class="pl-ent">"payload"</span> : {<span class="pl-ent">"id"</span>:<span class="pl-s"><span class="pl-pds">"</span>1<span class="pl-pds">"</span></span>,<span class="pl-ent">"phone"</span>:<span class="pl-s"><span class="pl-pds">"</span>555-55555<span class="pl-pds">"</span></span>}
} ]
} ]
}</pre></div> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.