API to insert a single record into an existing table

Controlled by a new insert-row permission.

API design:
POST /db/table
Authorization: Bearer xxx
Content-Type: application/json
{
  "row": {
    "id": 1,
    "name": "New record"
  }
}

Returns:
201 Created
{
  "row": {
    "id": 1,
    "name": "New record"
  }
}

You can omit optional fields in the input, including the ID field. The returned object will always include all fields - and will even include rowid if your object doesn't have a primary key of its own.
I decided to use "row" as the key in both request and response, to preserve space for other future keys - one that tells you that the table has been created, for example.

Interesting open question: how should validation errors (if any) be returned?
The two forms of validation I can think of at first are:

Missing keys which are marked as not null in the schema
Keys that do not match to existing columns (if you didn't pass ?alter=1, an option I am considering)

How are you tying the bearer token to identity? I'm excited to see this feature, and since Sandstorm controls API access using the same header, it also will transparently support the API documentation here, but we strip the bearer before the request reaches the app (replacing it with our existing auth headers, of course).

This is going to tie into Datasette's existing permissions mechanism, so plugins will be able to define their own custom mechanisms for tokens to be attached to a specific identity: https://docs.datasette.io/en/stable/authentication.html
There's only one plugin for API tokens at the moment, which is this one: https://datasette.io/plugins/datasette-auth-tokens
I'm actually planning on adding another, default token mechanism to Datasette itself as part of this work:

#1852

It may well be that datasette-sandstorm-support needs to add something custom here too.

This could use a new plugin hook, too. I don't want to complicate your life too much, but for things like GIS, I'd want a way to turn regular JSON into SpatiaLite geometries or combine X/Y coordinates into point geometries and such. Happy to help however I can.

The datasette insert concept included plugin support, with the idea of being able to support things like SpatiaLite files:

#1160

I think this API mechanism is going to be a bit less exciting than that - it will be low-level for inserting rows, and if you want to do something fancier you can use a canned query that feeds incoming GeoJSON to a SpatiaLite function instead.

That's reasonable. Canned queries and custom endpoints are certainly going to give more room for specific needs.

This could use a new plugin hook, too. I don't want to complicate your life too much, but for things like GIS, I'd want a way to turn regular JSON into SpatiaLite geometries or combine X/Y coordinates into point geometries and such. Happy to help however I can.

@eyeseast Maybe you could do this with triggers? Like you can insert JSON-friendly data into a "raw" table, and create a trigger that transforms that inserted data into the proper table
Here's an example:
-- meant to be updated from a Datasette insert
create table points_raw(longitude int, latitude int);

-- the target table with proper spatliate geometries
create table points(point geometry);

CREATE TRIGGER insert_points_raw INSERT ON points_raw
  BEGIN
    insert into points(point) values (makepoint(new.longitude, new.latitude))
  END;

You could then POST a new row to points_raw like this:
POST /db/points_raw
Authorization: Bearer xxx
Content-Type: application/json
{
  "row": {
    "longitude": 27.64356,
    "latitude": -47.29384
  }
}

Then SQLite with run the trigger and insert a new row in points with the correct geometry point. Downside is you'd have duplicated data with points_raw, but maybe it could be a TEMP table (or have a cron that deletes all rows from that table every so often?)

That trigger solution is pretty neat!

Yeah, every time I see something cool done with triggers, I remember that I need to start using triggers.

Documentation for this first draft of the API: https://docs.datasette.io/en/1.0-dev/json_api.html#inserting-a-single-row
It currenly returns errors as HTML - it needs to return errors as JSON. Also the errors need comprehensive test coverage.
I'm also worried about what happens if you use it on a table that doesn't use an integer primary key - need to check that. I think this code may break:
https://github.com/simonw/datasette/blob/51c436fed29205721dcf17fa31d7e7090d34ebb8/datasette/views/table.py#L155-L171
Plus will rowid tables without an explicit primary key return the rowid column? They should.

Also need to think about transactions - it should use them!

And come up with a whole bunch of tests for weird table shapes, surprising column names etc.

Also need a test for invalid JSON (currently triggers a 500 HTML error).

I'm going to change the design of this to:
{
    "insert": {
        "title" :"..."
    }
}

Renaming "row" to "insert".
This will  be consistent with adding "drop": true for dropping a table, and maybe other verbs like for modifying the schema.

I should probably refactor this to use sqlite-utils, since I'm going to want to use that later for the feature that automatically creates tables.
Might make it easier to solve the rowid issues too:

Updated docs: https://docs.datasette.io/en/1.0-dev/json_api.html#inserting-a-single-row

Need to implement the new URL design from:

#1868

This is now going to be /db/table/-/insert - and it will eventually handle bulk inserts as well as single inserts.

I'm going to change the incoming JSON back to {"row": {...}} - no need to POST {"insert": ...} to something with /-/insert in the URL already.

And the response to "inserted": [{...}] - it will be the same for bulk inserts.

So new API design is:
POST /db/table/-/insert
Authorization: Bearer xxx
Content-Type: application/json
{
  "row": {
    "id": 1,
    "name": "New record"
  }
}

Returns:
201 Created
{
  "inserted": [{
    "id": 1,
    "name": "New record"
  }]
}

I'm going to use this endpoint for bulk inserts too, so I'm closing this issue and continuing the work here:

#1866


Fix feature state tags on admission controller

They were rendering incorrectly because they were inline with the headers.
Preview link

Thanks for fixing, @celestehorgan .
/lgtm

/approve


ds/tests

[x] test assetNameRegExp against ExtractTextPlugin outputs
[x] test assetNameRegExp against ExtractTextPlugin source files
[x] test cssProcessor call
[x] test cssProcessor output

note that while writing these tests a new major version of the plugin was released to support webpack v4. a pull request to bring the test suite up to date with the latest version is here: https://github.com/cnerepo/optimize-css-assets-webpack-plugin/pull/4

believe this was merged upstream? anyway, closing


Unable to run Git.it executable

I've downloaded the files & unzipped them, but when I click the Git.it executable nothing happens, it does not run. Any advice on how to run the Git.it executable?

I also can't run it on Ubuntu 18-04 by clicking on Git-it. Any help? :)

You need to install https://atom.io/ :)

You need to install https://atom.io/ :)

Atom is just a text editor, you cannot solve the problem by installing it. I have the same problem on Windows 10 x64. Downloaded the files but I'm unable to run it. It comes like an Icon file not executable.

I am not sure if this the issue you're facing or not but you might have downloaded the source code instead of the executable. It is in the releases tab right here [(https://github.com/jlord/git-it-electron/releases)].

I am not sure if this the issue you're facing or not but you might have downloaded the source code instead of the executable. It is in the releases tab right here.


Windows support

Adds initial Windows support for the agent. Also, to make things easier to review, this PR is only concerned with the implementation. Other things will be added in different PRs:

Testing: https://github.com/semaphoreci/agent/pull/145
Installation script: https://github.com/semaphoreci/agent/pull/146

The main changes in this PR are explained below.
Docker compose executor support
docker-compose executor support will not be added in this PR, so we fail early on Executor.Prepare() if a docker-compose executor job is running on Windows. Also, we skip docker-compose executor unit tests in windows.
PTY support
Using a PTY to run commands isn't an option (see https://github.com/creack/pty/issues/95). To address that limitation, after every command, we dump the environment, and use that environment dump to update our state of the environment.
File injection

File injection for shell executor does not use a temporary file anymore, as that's only needed for docker-compose executor.
Zebra uses either 0644 or 0600, so there is no real need for us to support file modes like +x, so that is not supported anymore.
File modes in Windows do not work like in UNIX-based systems. Windows manages file permissions through ACLs, which are not implemented in this PR. Instead, we rely on os.Chmod's behavior: 04xx creates a read-only file and 06xx creates a read-write file.

Stopping jobs
Since we don't have a PTY for windows, we don't have a parent process which we can kill and will kill all its child processes for us. We need a way to keep track of all processes that are started, so we could kill them all once the job finishes or is stopped. We do that using job objects. When the shell starts, we create a job object to which we assign each command's process. When the job finishes or is stopped, we close the job object handle, which will terminate all the processes associated with it.
Other changes

Shutdown hook path can specify a powershell script
We now use job.Executor.ExportEnvVars() to set the SEMAPHORE_JOB_RESULT environment variable. These changed the job output a little bit. All the changes in the E2Es are related to this.
We can't use hardcoded /tmp's anymore, we use os.TempDir() instead
New env.go to help managing environment variables
.env files used to expose environment variables now use a .env.{EpochNanos} name and are removed once the job is finished.

Local development
A new Vagrantfile with a provisioning script are added to help with local development and testing.

Looks good. 👏 🍻
I've left some minor comments above, nothing major that would stop the release.


Link Codepen demos

I have an idea for a new feature for jQuery Terminal

[ ] Create a collection of all Terminal Codepen demos
[ ] Link from each demo to the collection

Collection: https://codepen.io/collection/LPjoaW


Implement ODIM HDF5 exporter

Exporter for writing nowcasts in the ODIM HDF5 format needs to be implemented.

I'm closing this issue because the file format for nowcasts is not currently defined in the ODIM HDF5 specification (http://eumetnet.eu/wp-content/uploads/2019/01/ODIM_H5_v23.pdf).


Add rmc-compiler binary to drive rust compilation

Description of changes:
I have created a new compilation driver (rmc-compiler) that no longer depends on a modified version of the rust compiler, neither depends on the bootstrap script.
Resolved issues:
Resolves #42 and #658
Call-outs:
I'm not quite happy with a few things in this change, but it is getting way too big to manage in a separate branch. It is also getting quite big to be reviewed. Thus, I created the following issues to track a few improvements:

#719: Improve the layout of our packages and create a new workspace.
#720: Improve how we are building our libraries. For now, the rmc-compiler has a build-dependency that ensures the libraries get built with the same toolchain as rmc-compiler.
#721: Improve the interface between cargo rmc and the rmc-compiler. The solution here is a bit hacky. There are a few tricky things here. Cargo invoke rustc to retrieve its version as well as to compile build scripts which shouldn't use the goto-c backend.

Testing:

How is this change tested? All our tests.

Is this a refactor change? Yes

Checklist

[ ] Each commit message has a non-empty body, explaining why the change was made
[ ] Methods or procedures are documented
[ ] Regression or unit tests are included, or existing tests cover the modified code
[ ] My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Also, if I'm not mistaken, if we eliminate our remaining use of x.py (just compiletest and dashboard/bookrunner, right?) CI runtimes are about to be outstanding!

Also, if I'm not mistaken, if we eliminate our remaining use of x.py (just compiletest and dashboard/bookrunner, right?) CI runtimes are about to be outstanding!

For sure! This change reduced the CI in about 10min. @adpaco-aws and I are working on the second piece. After that, we should be able to prune our repository, remove the bootstrap script and no longer depend on the rust upstream. :)

LGTM. Think DSN should review too?

I think it would be nice to have someone else reviewing it. Let me ping @danielsn.


Add threading support

This patch adds threading for ESP32 variants, allowing more sensors on a single ESP chip.
At current stage, threading mainly separates network packet building and networking stack from sensor operations.
Depending on #314

Rebased after #314 merging

Maybe we should put this behind a #define?

Maybe we should put this behind a #define?

#define switches are up -w-


Fix NestedBlockDepth false negative

Fix #2085
I also improve the tests a bit simplifing the code and using compileAndLint()

Codecov Report

Merging #2086 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #2086      +/-   ##
============================================
+ Coverage     80.86%   80.86%   +<.01%
  Complexity     2010     2010
============================================
  Files           336      336
  Lines          5779     5780       +1
  Branches       1060     1060
============================================
+ Hits           4673     4674       +1
  Misses          546      546
  Partials        560      560

Impacted Files
Coverage Δ
Complexity Δ

...rbosch/detekt/rules/complexity/NestedBlockDepth.kt
93.61% <100%> (+0.13%)
5 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6800a8c...8b695b6. Read the comment docs.

@BraisGabin please commit my test case naming suggestions from the code review, if you are okay with those.

Thanks again for the great PR.It kinda feels wrong to hold back all the good improvements and fixes from the community :/. I try to finish https://github.com/arturbosch/detekt/issues/1921 this WE and release a new version soon.

Done. Sorry for the late update. Busy days.


Add blog post on PTLC payments in exchange for content

Cross-posted from here: https://github.com/squeaknode/squeak/blob/master/docs/trustless-lightning-payments-for-content.md

Cool! Thanks for cross-posting this. I'll review!

There is a preview for this PR here https://deploy-preview-10--bitcoin-dev-blog-preview.netlify.app/

@0xB10C Thank you for reviewing! I just resolved the open issues.
I also did a bit more editing to make the blog post flow more smoothly.

Thanks! I'll revisit this in the next days and do another round of review before merging.

closing this for now as there hasn't been any activity since January

@0xB10C Thanks. I will try to update this PR and reopen in a few weeks when I get some time.


Disable delete_from_registry plugin

Deleting content from the registry after pulp finishes syncing is
convenient so the next pulp sync will not take longer (pulp iterates
over the repository tags fetching all referenced content). However,
removing content may confuse the docker distribution registry, which
leads to failing builds.
Signed-off-by: Athos Ribeiro<EMAIL_ADDRESS>

For now, we should perform manual garbage collection.

@mlangsdorf, any thoughts?

Added entry to realease notes to inform the plugin was disabled


Increasing number of items increases execution time exponentially

For the given workflow definition: https://gist.github.com/batk0/32e03d360903cdfcdb8075267419b892 execution time increases exponentially with increasing number of items.
For example:
14 items = 84s
32 items = 181s
76 items = 813s
101 items = 1566s
Also CPU usage of st2workflowengine is sustained at 100% while WF is running

@batk0 Thanks for the report. I'm actively working on a fix for this issue though it will be a little longer before it is out as it will require a refactor of some pretty involved parts of Orquesta. I will keep you posted and post against this issue as we resolve it.

@bigmstone Just trying to help out here. I did reproduce the problem. It's caused by MongoDB write conflict in workflow service handle_action_execution_completion method.  When the action executions for each item completes, they compete with each other to update the task and workflow execution.  If we use coordination service to do a lock (test using file driver), then the run time increasing from 10 items to 100 items is linear (down to little over 100 seconds).  Here's the change I made to test.  We can talk more on Slack this Monday. Let's think about it. If we are using coordination service to fix this, we may as well use coordination service everywhere in the workflow service instead of the write conflict and retry mechanism currently.
   720	    if task_ex_db.itemized:
   721	        from st2common.services import coordination as coordination_service
   722	        coordinator = coordination_service.get_coordinator()
   723
   724	        with coordinator.get_lock(str(task_ex_db.id)):
   725	            # Update task execution if completed.
   726	            update_task_execution(task_ex_id, ac_ex_db.status, ac_ex_db.result, ac_ex_db.context)
   727
   728	            # Update task flow in the workflow execution.
   729	            update_task_flow(
   730	                task_ex_id,
   731	                ac_ex_db.status,
   732	                ac_ex_result=ac_ex_db.result,
   733	                ac_ex_ctx=ac_ex_db.context.get('orquesta')
   734	            )
   735
   736	            # Request the next set of tasks if workflow execution is not complete.
   737	            request_next_tasks(wf_ex_db, task_ex_id=task_ex_id)
   738
   739	            # Update workflow execution if completed.
   740	            update_workflow_execution(wf_ex_id)
   741	    else:
   742	        # Update task execution if completed.
   743	        update_task_execution(task_ex_id, ac_ex_db.status, ac_ex_db.result, ac_ex_db.context)
   744
   745	        # Update task flow in the workflow execution.
   746	        update_task_flow(
   747	            task_ex_id,
   748	            ac_ex_db.status,
   749	            ac_ex_result=ac_ex_db.result,
   750	            ac_ex_ctx=ac_ex_db.context.get('orquesta')
   751	        )
   752
   753	        # Request the next set of tasks if workflow execution is not complete.
   754	        request_next_tasks(wf_ex_db, task_ex_id=task_ex_id)
   755
   756	        # Update workflow execution if completed.
   757	        update_workflow_execution(wf_ex_id)

Fix at https://github.com/StackStorm/st2/pull/4595. The solution requires a distributed lock and users will have to configure the coordination service in st2 for the solution to take effect.


bug: colrev data --add colrev_built_in.prisma crashes on TypeError

Bug Report
colrev version:
Tested in 0.7.0 and in https://github.com/CoLRev-Ecosystem/colrev/commit/e18459fe5ca3e703817316ce6d6810844d05dbe5
Current behavior:
Running colrev data --add colrev_built_in.prisma crashes and corrupts settings.json
Expected behavior:
Running colrev data --add colrev_built_in.prisma sets up a nice PRISMA diagram
Steps to reproduce:
Run colrev data --add colrev_built_in.prisma
Related code:
colrev data --add colrev_built_in.prisma
2023-03-07 13:28:21 [INFO] Add colrev_built_in.prisma data endpoint
Traceback (most recent call last):
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/bin/colrev", line 8, in <module>
    sys.exit(main())
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/colrev/ui_cli/cli.py", line 1634, in data
    colrev.ui_cli.add_packages.add_data(
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/colrev/ui_cli/add_packages.py", line 190, in add_data
    data_operation.add_data_endpoint(data_endpoint=default_endpoint_conf)
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/colrev/ops/data.py", line 201, in add_data_endpoint
    self.review_manager.save_settings()
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/colrev/review_manager.py", line 153, in save_settings
    colrev.settings.save_settings(review_manager=self)
  File "/home/blair/00blair-wsl/gitrepos-colrev/.venv_colrev_git/lib/python3.10/site-packages/colrev/settings.py", line 694, in save_settings
    json.dump(exported_dict, outfile, indent=4)
  File "/usr/lib/python3.10/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/usr/lib/python3.10/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.10/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/usr/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.10/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/usr/lib/python3.10/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/usr/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type PosixPath is not JSON serializable

Other information:
This seems to happen because custom_asdict_factory(...) in utils.py does not process the list of PosixPath objects in diagram_path for the PRISMA configuration portion of settings.json.
Placing the following hacky code in save_settings(...) in settings.py - immediately after exported_dict = asdict(...) - seems to be a working workaround, albeit very ugly:
xi = 0
for x in exported_dict["data"]["data_package_endpoints"]:
    if x["endpoint"] == "colrev_built_in.prisma":
        yi = 0
        for y in exported_dict["data"]["data_package_endpoints"][xi]["diagram_path"]:
            exported_dict["data"]["data_package_endpoints"][xi]["diagram_path"][yi] = str(y)
            yi += 1
    xi += 1

Thank you for catching this. I have suggested a modification of the custom_asdict_factory. Does that resolve the bug?


Support playoutbee possible?

Hi,
would it be possible to support playoutbee?
( https://playoutbee.com/ )
Cheers,
sebastian

In theory, playoutbee should already work, since it supports the hyperdeck protocol. But I don't have a copy of PlayoutBee to test so can't confirm this, or workout why it doesn't work if that seems to be the case.
However, there is also a dedicated PlayoutBee companion module, so I am not sure it is is necessary to support it through the hyperdeck module? Perhaps there is a use case I am not thinking of?

Hi @sphlabs , first at all, thanks for your quick answer.
As I have three licences I could send you one installation file (e.g. for Windows) so you could try.
But it might be maybe possible without it according to the logs:
22.05.07 00:53:21 instance(hyperdeck): Slot 2 recording time parse error: RangeError: Invalid time value
22.05.07 00:53:21 instance(hyperdeck): Slot 1 recording time parse error: RangeError: Invalid time value
22.05.07 00:53:21 instance(hyperdeck): Connection error - 200 ok
22.05.07 00:53:10 instance(hyperdeck): Slot 2 recording time parse error: RangeError: Invalid time value
22.05.07 00:53:10 instance(hyperdeck): Slot 1 recording time parse error: RangeError: Invalid time value
22.05.07 00:53:10 instance(hyperdeck): Connection error - 200 ok

It seams that you just need to disable the recording section in you module as this causes reconnections every 10 seconds.

Perhaps there is a use case I am not thinking of?
Yes! In those 10 second sections I can set the play speed with your module (e.g. 90% or 110%) and it works great!
That is not possible with the other module. As I have one hyperdeck, too, it would be nice just to use one integration for both.
So would it be possible to add a configuration/type without recording?

Sebastian

It seems more logical that, since there is a specific module for playoutbee that is tailored just for that software, it would be more logical to request the missing features be added to that module; rather than adding special cases into the Hyperdeck module to accommodate it.
I don’t see any issues from you requesting this on the playoutbee issue queue, so maybe that would be worth trying.
I am reluctant to start coding in support for non-Blackmagic devices. Although it is intended to support the Hyperdeck protocol it is clearly only a subset, and, especially given that the protocol is not as thoroughly documented as it could be, it is likely that there would be (now or in the future) implementation differences that cause unexpected behaviour.

Just to add to my previous comment; what seems to be happening, and the reason that you are seeing those error messages, is that playoutbee is returning the 'recording time': variable in response to a transport info request, but that the value is not a valid, expected value (number of seconds remaining).
If that is the case -- if, because I can't verify this without running tests on a playoutbee device -- then it is not correctly emulating the HyperDeck API in this instance. If playoutbee simply didn't return 'recording time' at all then I don't think you would be seeing these errors.
So, as things stand, I won't be adding specific support for playoutbee. I still thing your best approach to get the features you want would be to request that they be added to the playoutbee module itself.


Add Caleb's python loadability test to coreir python tests

https://github.com/cdonovick/SMT-PNR/blob/master/src/design/core2graph.py

Do we have a test file we can use for this?

I think all of these are tested in unit tests.


gen-html: take local screenshots using selenium

I want us to move away from Browserstack since they haven't updated their screenshot browsers for many years.
My end goal is to use a github actions matrix so we can take screenshots on different platforms. I have a prototype which is working nicely. I may try and roll it out to google/fonts this week if I have the time.
Once I've got this sorted, I will happily reaccept the MVAR table, https://github.com/googlefonts/fontbakery/issues/3413

Closing this since I've got something similar in diffenator2


Image view now shows the correct image when the cell is reused

This fixes a bug that causes an image brick cell to not properly reset before reusing it.

Codecov Report

Merging #177 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
+ Coverage   93.45%   93.46%   +<.01%
==========================================
  Files          40       40
  Lines        4247     4253       +6
  Branches      348      348
==========================================
+ Hits         3969     3975       +6
  Misses        277      277
  Partials        1        1

Impacted Files
Coverage Δ

Source/Bricks/Image/ImageBrick.swift
82.91% <100%> (+0.67%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17bfb7d...035ca8b. Read the comment docs.


Provide DEFAULT on update capability

Is your feature request related to a problem? Please describe.
Ideally, timestamps are database-managed.
If you have a struct like this:
type User struct {
    Name       string    `db:"name"`
    CreatedAt  time.Time `db:"created_at" goqu:"skipinsert,skipupdate"`
    ModifiedAt time.Time `db:"modified_at" goqu:"skipinsert"`
}

created_at is taken care of and is a write-once, update-never column, assuming the schema defaults it to now().
modified_at works well on insert, but thereafter either must be set to a zero-value and used with goqu:"defaultifempty" on update, or be set to time.Now() which is sub-optimal.
Describe the solution you'd like
I'd like to implement goqu:"defaultonupdate" in order to always set the column's value to DEFAULT on update - thoughts? I can't think of a circumstance where I'd want this aside from "last modified" timestamp values but that's something that most people care about, and which currently requires per-update boilerplate.
defaultonupdate would be lower-precedence than skipupdate, as well.

@doug-martin thoughts?


Adding cypress tests for showing errors, time range filter, and verbose name

This PR adds some tests for bugs we've recently fixed.

Turns back on the flaky test "Clear metric and set custom sql adhoc metric" so that it no longer uses the functionality that's flaky
A test for time range filter
A line chart test to make sure verbose name is showing in the legend
A unit test to make sure the time_range 5 days : now works as expected (the same as "5 days ago")

Codecov Report

Merging #6407 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #6407   +/-   ##
=======================================
  Coverage   77.31%   77.31%
=======================================
  Files          67       67
  Lines        9581     9581
=======================================
  Hits         7408     7408
  Misses       2173     2173

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b2cae0...5445be1. Read the comment docs.


Chart not showing up until I open up dev tools

Expected Behaviour
Chart to always show up
Actual Behaviour
Chart only showing up
Steps to Reproduce:
I'm just importing it and using it regularly. One catch is I'm using with with web components with shadow dom via StencilJS.
Here is my whole component
import { Component, ComponentInterface, Host, h } from '@stencil/core';
import { Chart } from "frappe-charts"

@Component({
  tag: 'ta-line-graph',
  styleUrl: 'ta-line-graph.css',
  shadow: true,
})
export class TaLineGraph implements ComponentInterface {
  chartEl: HTMLDivElement;

  chart: Chart;

  componentDidLoad() {
    const data = {
      labels: ["12am-3am", "3am-6pm", "6am-9am", "9am-12am",
        "12pm-3pm", "3pm-6pm", "6pm-9pm", "9am-12am"
      ],
      datasets: [
        {
          name: "Storage", type: "line",
          values: [25, 40, 30, 35, 8, 52, 17, -4]
        },
        {
          name: "Bandwidth", type: "line",
          values: [25, 50, -10, 15, 18, 32, 27, 14]
        },
      ]
    }

    this.chart = new Chart(this.chartEl, {
      data: data,
      type: 'line',
      height: 250,
      colors: ['#38bdd3', '#fe6e71', '#53c78e', '#fce170']
    })

  console.log(this.chart) // this logs the chart object properly every time.
  }

  render() {
    return (
      <Host>
        <div
          ref={(el) => this.chartEl = el}
          class="ct-chart ct-perfect-fourth"></div>
      </Host>
    );
  }

}

NOTE: Add a GIF/Screenshot if required.
https://www.loom.com/share/cfc8ae7d6b994ed69f2372f0193036ec
Frappé Charts version: 1.3.0

If I add a timeout to append the chart of even 200ms everything works fine
setTimeout(() => {
      this.chart = new Chart(this.chartEl, {
        data: data,
        type: 'line',
        height: 250,
        colors: ['#38bdd3', '#fe6e71', '#53c78e', '#fce170']
      })
    }, 200)

You'll have to wait for your component and html div to mount onto the dom with its width and height all set.

same as #289

@threeaccents are you still facing the issue. I haven't been able to replicate the issue just yet. We have a few projects where we use Frappe Charts with Vue, and it works pretty much fine, charts playground is an example of that.
You can try the React Wrapper for charts

@scmmishra Yea but the timeout workaround even though it's slightly "ugly" works fine for us.

@threeaccents thanks for being patient with this, if you can set up a small example on code sandbox and share it with me, I can find a way to get this replicated. I have used chart for a few projects outside Frappe Framework, but haven't faced such an issue.
P.S. It is important for the parent element to have a height and width when rendering the chart.
P.P.S. There is also the draw() method that can be used to rebuild the chart, in your example above it'll be this.chart.draw()


Reports don't get displayed.

I have setup  my new working environment as described in the procedure, but the report doesn't get displayed, no errors nothing, all blank page.

Please check my answer at #65. You may have a server setup issue. Make sure you setup all required software from the Installation section in README.md


🐛 [Bug]: 能否增加类似antd mobile的FloatingPanel 浮动面板组件?

Which React Vant packages are impacted?

[X] react-vant (React Vant core)
[ ] react-vant-icons(React Vant Icon)

What version of React Vant are you using?
3.1.4
Reproduce live demo(codesandebox or stackblitz)?
No response
Descripition
希望作者能考虑新增类似antd mobile的FloatingPanel 浮动面板组件

忙于工作，最近实在没精力来新增feature，欢迎pr👏🏻


Update to System.IdentityModel.Tokens.Jwt v4.0.0

Hello,
I have an MVC4 app that uses the latest version (v4.0.0) of System.IdentityModel.Tokens.Jwt. I'd like to use the CORS pieces of Thinktecture.IdentityModel.45 in my app, but I can't seem to get that going unless both are on the latest System.IdentityModel.Tokens.Jwt package.
This PR updates to the latest version.

This library has been discontinued - I would recommend you take whatever code you need and integrate into your own code base.


postgresql "SELECT 'x'" where x is character string fails without specifying type conversion

What language are you using?
Python 3.9.5
What database are you using?
PostgreSQL, Oracle, MSSQL Server
Can you describe your bug?
Selecting a constant string fails unless the string type (text/varchar/char) is specified.
What are the steps to reproduce the behavior?
import connectorx as cx
conn = ... # setup your connection string
cx.read_sql(conn, "SELECT 1 AS value")            # suceeds
cx.read_sql(conn, "SELECT True AS value")         # suceeds
cx.read_sql(conn, "SELECT 'Y' AS value")          # fails
cx.read_sql(conn, "SELECT 'Y'::CHAR AS value")    # succeeds
cx.read_sql(conn, "SELECT 'Y'::VARCHAR AS value") # succeeds
cx.read_sql(conn, "SELECT 'Y'::TEXT AS value")    # succeeds

What is the error?
thread '<unnamed>' panicked at 'not implemented: unknown', D:\a\connector-x\connector-x\connectorx\src\sources\postgres\typesystem.rs:100:22
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Projects\project-slim\venv_slim\lib\site-packages\connectorx\__init__.py", line 224, in read_sql
    result = _read_sql(
pyo3_runtime.PanicException: not implemented: unknown

Show the error result here.

Hi @mcrumiller , that's weird I tried query SELECT 'Y' AS a on my local postgres instance in it works with the following result:

Is it related to the setup of the db? I'm using official docker image of postgres locally.

@wangxiaoying that is odd indeed. I'll add that I'm using Greenplum, which is a fork of Postgres.


Update security.md

The part on general security tips has been significantly improved. Added a guide to basic server security.

I think pages with huge bright red or yellow banners with exclamation points are not serious style. Warnings at such a strong level about what every cryptan should already know - makes our site less mature.  Otherwise why write it there? From this I propose to conclude - that bright red highlights should be used only where there is a) temporary necessity b) it is really much more important than everything else that is written on the page.


Crosswalk View within View

Hi,
I'm trying to put my crosswalk view within a normal react view.
If i do this i get nothing instead of where the crosswalk view should show.
I'm doing the following
class nativeMixing extends Component {
  render() {
    const url = 'http://www.google.fr'

    return (
      <View>
              <Text style={styles.welcome}>
                Welcome to React Native!
              </Text>
              <CrosswalkWebView
                localhost={ false }
                style={{ flex: 1 }}
                url={url} />
      </View>

    );
  }
}

But if i get rid of the View and just use my crasswalk web view, it works. Any idea on what i'm doing wrong ?

Hi Tom, changing  to <View style={{ flex: 1 }}> solved this for me.

Brilliant, thanks @timofischer81  !


Windows support, checkpoints, mix-to-vocals

These are several small changes that may be of general interest.
I realize mixing issues in a single PR is not ideal, but didn't want to separate them in case you weren't interested altogether.
Changes

Windows support

Wrapped code in if __name__ == '__main__' (needed for multiprocessing)
Removed lambdas (needed for pickling for multiprocessing)

Fixed some inconsistencies in checkpoint loading/saving

When saving, save state dict of module wrapped by nn.DataParallel, not the wrapper itself
When loading, remove module. prefix from state dict keys if nn.DataParallel wrapper was saved (the provided pretrained weights for instance)
There was some confusion about storing step or state (training loop state) in the checkpoints. Changed to whole state.

Allow separating just vocals from input mixture

Added --instruments command line argument, rather than hard coding the list.
Changed random_amplify so it doesn't assume instruments sum to mix.

Thanks for your contribution! I just looked at the code and it seems to all work fine. Going to merge this pull request now.
May I ask what you are working on currently that you are using my model? :)


Add pagination or load more for blog posts in - posts & series

Additional context
Right now the existing blog query is retrieving the first 10 blog posts, this is the initial state to get things going.
A pagination needs to be implemented that when the user navigates to the next page a different query is used to retrieve the next 10 posts and the next and so on.
In the query this is done by specifying after 10  I believe.

I did some research in the HashNode API documentation, in publication querying only the cursor based pagination is possible which is ideal for infinite scrolling. Is it okay for you that we will have load on scroll mechanism for these views? @monacodelisa @cleancodecraft

@czBalazs98 I am very pleased to hear that you looked it up :)
one more thing to do now did you check if it has been implemented in one of the other app versions ad the guide from discussions advises

I believe that the - angular version includes an implementation of this feature.
If i remember correctly the implementation is the same as the one you are intending for, if it is what you have in mind and it is already implemented in another app version you are safe to go for it 👍
of course too if you believe you have any better suggestions feel free to share them too

ah yes I see now, didn't have that in mind sorry, I will check it, thank you!

@czBalazs98 every fix and feature is temporary - until we find a better one :)


issue #131 : Update paradox documentation

Description

Update documentation
Github Pages site: https://super-flat.github.io/lagom-pb-docs/
GCP site : To be added
Looking for an alternative to Github Pages that hosts paradox sites.

Issue

issue #131

@Sharonsyra this PR has been here almost 18 days now. Kindly close it if it is no longer needed or speed up the task. Thanks

closing this PR


Change minions path to /kubernetes.io/minions/

Storage paths were changed and also made to be configurable, /kubernetes.io/minions/ is the new default. This should probably be made configurable but given the other changes coming soon I've just done this for now.

Better fix in #66


add Coding: On Software Design Process book

Hey again,
I was not aware of this book, but looks interesting!
Thank you for the reference.
Kr
Mahmoud


Remove extra warnings and fix invite form validation

Issue that this pull request solves
Closes: #572
Proposed changes
Brief description of what is fixed or changed
Types of changes
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update (Documentation content changed)
[ ] Other (please describe):

Checklist
Put an x in the boxes that apply

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] My changes does not break the current system and it passes all the current test cases.

Screenshots
Please attach the screenshots of the changes made in case of change in user interface

Other information
Any other information that is important to this pull request

Hey @garvitgupta13 Just a suggestion. Please try to make a new branch before working on an issue. It's not a good practice to work on the main/master branch

Hey @garvitgupta13 Just a suggestion. Please try to make a new branch before working on an issue. It's not a good practice to work on the main/master branch

Sure mam, I will note it. This was by mistake, I realised it after pushing it.
Wont be repeating it again


Suggestion:

Suggestion for the category Office:
Single file PHP libraries for reading and writing Excel files

https://github.com/shuchkin/simplexlsxgen
https://github.com/shuchkin/simplexlsx
https://github.com/shuchkin/simplexls
https://github.com/shuchkin/simplecsv

Please open a PR. Thanks.


please add supported programs/email servers in Reedme or wiki

Awesome idea, thx for this tool.
Could you update description with:

compatibility ?
maybe you know any alternative tools that suggest similar?

About email clients supported, it's all here https://mjml.io/faq#email-clients
The closest tool we've found to MJML is http://foundation.zurb.com/emails.html but it is still close to regular HTML and requires to with it (less than plain HTML though).
Hope it helps!

@arnaudbreton thx, somehow miss that section
is there any plans to support blackberry ?


Avoiding error logs when using class_exists

Since PHP 8.0 @ doesn't mute the errors, which makes for a lot of clutter on the error log when you are using class_exists() and it doesn't.
Adding this verification solves the problem.

Any reason why stream_resolve_include_path is used instead of file_exists?

Any reason why stream_resolve_include_path is used instead of file_exists?

file_exist doesn't know about the include path. stream_resolve_include_path tries to find the prefix/class.php on the different possibilities of the include_path.

Gotcha, okay looks great


new design for public notification

spelling change and some doc updates...more doc work will need to be done but this takes care of a lot of the current ones I'm working on. Since this PR is so large want to go ahead and get it in so we can avoid conflict annoyance. Will do some more doc work once I'm back on components work


How to format the Elm code when working in ellie?

I have a question to ellie users:
How do you format your Elm code in ellie? Is there a function somewhere to have it formatted directly in ellie?
Or do you copy&paste to perform the formatting with another editor?
I did not find a tool to do the formatting directly in ellie. Also, I did not find information about this in the readme and the issues list on github
Thank you in advance for sharing your experience.

There is a button on the top right of the Elm editor's header. Maybe this could be made more obvious, perhaps having the text "FORMAT" would be better instead of or beside the icon?

There is a button on the top right of the Elm editor's header.

Nice. And on the tooltip I also found the keyboard command SHIFT + F to format. 👍

Maybe this could be made more obvious, perhaps having the text "FORMAT" would be better instead of or beside the icon?

In my case, having the text Format there would have made it easier to find this button. Also, having the text in the button enables finding it with text search in chrome (Chrome text search does not seem to pick up the 'Format' text contained in the buttons title property)
I remember that I was using other buttons (for example the ones on the left, way larger) to see if I can find some kind of guide or a list of keyboard commands.


Investigate Capistrano Rake Task Improvements for Alembic migrations

With the PR 1195 being merged, the Capistrano Rake tasks for Alembic migration tasks now are making two alembic calls, one each for VMA and Digital Bookplates databases. With the calls all being concatenated with && making the logs hard to determine what migration is being run. It might be nice to run only the migration for specific database but also continue having a task that runs all of the migration.
These are the implicated Rake tasks:

alembic:migration
alembic:current
alembic:history

Fixed by #1201


functional: allow ssh port number and channel name to be overridden

With these changes, users are now able to override channel name
as well as the local ssh port number. For example:
 $ COREOS_SSH_PORT=2245 COREOS_CHANNEL=alpha ./run-in-qemu

Additionally BASE_IMAGE should be set according to the channel name,
to avoid potential file naming conflicts.
This PR depends on https://github.com/coreos/fleet/pull/1476
/cc @kayrus

@dongsupark lgtm! could you please rebase and update with a git push -f on endocode:dongsu/qemu-override-env-vars same branch ? thanks

@tixxdz rebased.
And I also updated the naming scheme of BASE_IMAGE, from coreos_production_qemu_image_${COREOS_CHANNEL}.img to coreos_${COREOS_CHANNEL}_production_qemu_image.img, as suggested by @kayrus.

@dongsupark actually after some thoughts on this, I think it would be better to just follow the same thing that's provided here: https://coreos.com/os/docs/latest/booting-with-qemu.html http://stable.release.core-os.net/amd64-usr/current/coreos_production_qemu.sh  and use arguments for port -p and possibly print help only for "--help"
It seems that scripts is autogenerated, but we won't add much arguments just the port and a possible channel ?  thoughts ?

Updated.
As @tixxdz suggested, added support for command-line parameters for channel as well as ssh port number, also added help messages.
As @kayrus suggested, changed the naming scheme of $IMAGE to reflect correct channel name.

@tixxdz Updated the help message


Fontsize not listed in FileMenu

In Filemenu the font sizes don't get listed

d

I assume steps to replicate are install file menu plugin then this plugin and it happens?

btw you might find our discord channel useful, I feel like lots could be handled there :)


BUG: Inversions on stirling ruptsets fail

Something odd in the fault polygon setup is raising a Null Pointer Exc. i.e.  in the inversion set phases
To reproduce just try to run an inversion with any rupture set built w Stirling FM e.g. http://simple-toshi-ui.s3-website-ap-southeast-2.amazonaws.com/FileDetail/RmlsZTo4OTIuMGtHWmpo

fix merged into upstream


Bug - Hey Josh tony Here pico flasher is getting a misread on trinity consoles. I am getting header wrong when i use a jrunner there is no problems but obviously there is a problem with the header dump on the pico flasher

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behaviour:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behaviour
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System (please complete the following information):

OS:
Version:

Additional context
Add any other context about the problem here.

Please fill out the template properly if you report a bug
That's not a J-Runner issue, it's an issue with your wiring, soldering or the Pico itself.

Kind Regards,
Josh


GPT Model say's, Undefined,

Hello, I already know this problem and it will be fix in the next version. You can check on OpenAI website for the current chatgpt version


ARN not mapped after applying CRD

I am having an issue where IAMIdentityMapping resources are being created but then I get an error saying the ARN is not mapped.
I applied this yaml
apiVersion: iamauthenticator.k8s.aws/v1alpha1
kind: IAMIdentityMapping
metadata:
  name: sso-developer-access
spec:
  arn: "arn:aws:iam::0123456787910:role/SSODeveloperAccess"
  username: lonnix
  groups:
  - system:masters

Then I confirmed that it was created
time="2021-10-18T21:14:59Z" level=info msg="successfully synced sso-developer-access"

and
~: kubectl describe iamidentitymappings.iamauthenticator.k8s.aws
Name:         sso-developer-access
Namespace:
Labels:       <none>
Annotations:  <none>
API Version:  iamauthenticator.k8s.aws/v1alpha1
Kind:         IAMIdentityMapping
Spec:
  Arn:  arn:aws:iam::012345678910:role/SSODeveloperAccess
  Groups:
    system:masters
  Username:  lonnix

However when I use a kubeconfig file for that AWS role I get this error
time="2021-10-18T21:17:08Z" level=warning msg="access denied" arn="arn:aws:iam::012345678910:role/SSODeveloperAccess" client="<IP_ADDRESS>:40378" error="ARN is not mapped" method=POST path=/authenticate

Thanks! After doing that I found that because I had
value: arn:aws:iam::012345678910:role/SSODeveloperAccess

instead of
value: "arn:aws:iam::012345678910:role/SSODeveloperAccess"

it wasn't comparing properly. I created that string via helm so I just made a few adjustments to make sure its quoted properly and the account number is not converted to a decimal.
It seems to be working now.


Can you please specify a little bit more on how to install Qt6? Everything i get is errors while trying to build the application with cmake tool.

I'm sorry that this issue slipped through the cracks. I hope you found a solution.
Briefly, assuming you're working on something open source (like this project), you can download the free Qt Installer. Run that and install Qt. The default settings should mostly be OK.
You'll need a Qt account for the download to work.
Then you'll need to tell CMake where to find Qt. Some basic instructions are here. If you need further instruction then we'll need a lot more detail, such as what platform you're on, what IDE you're on, what compiler you're using, what platform you're targeting, etc.


chore(docs): add value for color tokens where missing

Closes #84
This PR adds an expandable row for color tokens without references in order to still have a way to view the resolved color value of the token.  Currently the preview swatch displays the color, but the table does not actually list the value of the color for these tokens.

Preview link:  https://pf-tokens-pr84.surge.sh/tokens/all-patternfly-tokens


Mention address tag support in the documentation

Address tags (the ability to redirect<EMAIL_ADDRESS>to<EMAIL_ADDRESS>mailbox) are a great way to avoid SPAM. Since it's supported and enabled by default in this container (the default delimiter is +), it might be a good idea to mention this feature either in the wiki or in the readme.
I was looking for a way to enable this (and found a cool guide at https://www.stevejenkins.com/blog/2011/03/how-to-use-address-tagging-usertagexample-com-with-postfix/) only to find out it's already enabled.
If you want, I can write up a description, just let me know where to put it.

You can do it here.
We did not write this because it's not docker related, but it's a postfix general configuration option.

We did not write this because it's not docker related, but it's a postfix general configuration option.

I assumed this was the case. I've added a small mention of address tags to the wiki page you've mentioned. If it's ok, you can close the issue.

Perfect, thanks @mrPjer!


espflash save-image always creates a binary which is the bootloader, partition table and factory image concatenated together

I.e. invoking (via the command line, or via the espflash API):
espflash save-image --chip esp32s3 target/xtensa-esp32s3-espidf/debug/my-firmware my-firmware.bin

... would output a my-firmware.bin which - sequentially:

Contains an optional empty page (4096 bytes of 0xff) for those chips where the bootloader starts at offset 0x1000
Contains the bootloader itself - either the embedded one or whatever the user had supplied on the command line
Contains the partition table padded to 4096 bytes
Contains empty space (0xff) until the offset where the app factory image starts in the partition table
Contains the app factory image itself

Now, I get it that this way it is maybe simpler for the user - in un-sophisticated scenarios - to flash the binary by just doing then espflash write-bin --chip esp32s3 0 my-firmware-.bin but this is making it difficult for that very same user to cover the scenario where she just wants her .ELF to be converted to .bin on the command-line without any bootloader and partition-table concatenations in-between.
Even when using the espflash API rather than the command line, it is a bit weird, as I still have to deal with the bootloader and the partition table, even though - as mentioned - I just want to convert the .ELF to bin no extra stuff included thank you very much :-)
Also the question is a bit - in those un-sophisticated scenarios - the user is likely not going through the two step process of "save-image" and "write-bin" anyway. She probably just wants to do espflash flash --chip esp32s3 target/xtensa-esp32s3-espidf/debug/my-firmware (optionally passing a custom bootloader image and part-table on the command line) and then the "concatenation" is invisible anyways as it happens internally to espflash. Which is fine.
So why not supporting a variant of "save-image" which is doing the "no-thrills" stuff of outputting a binary app image and that's it?
And then separate commands for converting and outputting the embedded bootloader to .bin and the embedded or externally-passed partition-table CSV to .bin?

By coincidence I was finally getting around to posting some of my patches I've had because I needed to sign and encrypt individual partitions and found this report posted on the same day. I'm not sure my patch addresses everything listed above though.
$ espflash save-image --help
Generate a binary application image and save it to a local disk

If the '--merge' option is used, then the bootloader, partition table, and all application segments
will be merged into a single binary file. Otherwise, each segment will be saved as individual
binaries, prefixed with their intended addresses in flash.

Actual:
$ espflash save-image --chip esp32c3 --bootloader target/riscv32imc-esp-espidf/release/bootloader.bin --partition-table partitions.csv --partition-table-offset 0x000c000 target/riscv32imc-esp-espidf/release/my-project /tmp/espflash/my-image.bin

$ tree /tmp/espflash
/tmp/espflash
└── my-image.bin # <-- only a single image is generated even though --merge is not specified

1 directory, 1 file

Expected each segment to be saved as individual binaries. This is critical for signing and encrypting partitions individually
With my proposed patch:
$ espflash save-image --chip esp32c3 --bootloader target/riscv32imc-esp-espidf/release/bootloader.bin --partition-table partitions.csv --partition-table-offset 0x000c000 target/riscv32imc-esp-espidf/release/my-project /tmp/espflash/my-image.bin

$ tree /tmp/espflash
/tmp/espflash
├── 0x0000000_my-image.bin # bootloader image
├── 0x000c000_my-image.bin # partition table
└── 0x0010000_my-image.bin # factory app image

1 directory, 3 files

NOTE: the default output now matches the documentation but if anyone has built any automation around the current behavior, they will break.

Thank you for chiming-in! Glad to see other folks are also looking into this.
An alternative might be to keep write-bin as-is, and then introduce three new sub-commands:

write-firmware [?? --chip CCC] [--secure-pad-v2] <input-elf> <output-bin-path> - Takes an ELF file and converts to .BIN format. Does not consult the partition table, does not check flash size etc. etc. If --secure-pad-v2 is present, pad the image as described in #713. If write-firmware is not capable of secure-padding, it would be useless anyway for the purposes of Secure Boot V2 and signing images, so you'll have to use the esptools tool ... equivalent;
write-bootloader --chip CCC [--part-table-offset XXX] [--flash-size YYY ] <output-bin-path> - Writes a default bootloader .BIN image, possibly patched to support partition table offset XXX and flash size YYY;
write-part-table [?? --chip CCC] <part-table-csv> <output-bin-path> - Converts a .CSV partition table to a .BIN format.

BTW - and for the super-short-term (I'm really pressed by time) - there is now as mentioned esptools which has the esptool feature, so you can do (some) of the above stuff by just doing cargo install --git https://github.com/ivmarkov/esptools; esptools tool -h
You'll need esptools (or at least the espefuse binary or .py anyway) if you are looking into secure boot, as you need to burn efuse-es in the factory, and having an espefuse equivalent into espflash might be quite a bit of a lift-and-shift and a trash can full of wasted esp chips until we get it right...

I actually have a full working writeup on how to enable encryption and save images with espflash except for espsecure for efuses and one esptool command. I'm trying to get stuff ready as soon as I can. Maybe we can streamline it a bit with some tooling suggestions, especially for writing multiple partitions at once. All in good time.
No need for anyone to trash a bunch of ESPs anymore. The worst I did to mine was permanently enable Secure Download Mode and disable JTAG.

I actually have a full working writeup on how to enable encryption and save images with espflash except for espsecure for efuses and one esptool command. I'm trying to get stuff ready as soon as I can. Maybe we can streamline it a bit with some tooling suggestions, especially for writing multiple partitions at once. All in good time.

I'm in the mid-to-end of my own journey in doing this. I'm using the following:

esptool - for converting the firmware ELF to .BIN, as I do need secure padding, and even with the proposed fix here, espflash would still be useless for that task, as it cannot properly pad the image, as per #713
espsecure - for signing the images (actually, I do use my own pure-Rust espsign thing but I might switch temporarily to espsecure if I hit a roadblock / bugs I can't fix on time in my own espsign code)
espefuse - for burning the efuse signing key RSA hash / for flipping various efuse bits => still to be tested
espflash - for flashing, because it has better progress reporting than esptool

How do you deploy the whole circus at the factory premises?
I did over-design a bit and rather than a python/shell script that glues it all together, I have a WIP Rust tool - espfactory - that can pull from s3/http/filesystem something called a "bundle" (really, just a zip of the CSV partition table + all .BIN files + all e-fuses) and then just flash and burn those, while showing to the user an interactive UI rather than just a bunch of log lines. But this is still a bit WIP...

No need for anyone to trash a bunch of ESPs anymore. The worst I did to mine was permanently enable Secure Download Mode and disable JTAG.

No by trashing a bunch of ESPs what I mean is only if we (or somebody) tries to re-write espefuse.py into Rust and then merge this code into espflash, so that we have a pure-Rust tooling for burning efuses. Just using the Espressif Python tool (espefuse.py) is of course quite easy.


Revert ksonnet/ksonnet-specific changes since last kubecfg release

This change is a big rewind and selective cherrypick of just the kubecfg-specific changes since the last kubecfg release.  "ksonnet" has now been forked into its own project, and this completes the kubecfg-side of the fork process.
Selectively picking commits is inherently error prone, we might have some further cleanup to do.  I am super-grateful for all the excellent commit descriptions that made something like this achievable.
/cc @hausdorff @jessicayuen

Note there is one original commit in this stack: I switched Trim -> TrimSuffix in the server minor version code.

Oh and if anyone reading this is missing any of the code/features removed in this PR, that probably means they should switch to the ksonnet/ksonnet codebase.


Globs and other issues

Hi, thanks for this module, I'm trying it but I can't get it working :(
I pass a glob like this:
./node_modules/hashmark/bin/hashmark -l 8 build/public/**/* {dir}/{name}.{hash}.{ext}

but it outputs only the first matched file.
Other questions:

The README refers to a bashmark, but i can't find it in the /bin dir. Is that just a typo?
How do you change the assets path in your css files?
Is it possible to not rename the file and produce only the assets json? on my web server i use a rewrite to serve hashed filenames

Thanks :+1:

wrap the path that contains the glob in quotes ? ...  'build/public/**/*'
otherwise the shell seems to be globbing the path into an array before it gets to bin/hashmark and then when hashmark tries to expand it with files = cli.glob.sync(cli.args[0]);, cli.args[0]  is actually the first filename in the array rather than the original path with wildcards.

@withdust that seems like a bug too. I think it should probably consume all of cli.args - as the remaining args should all be file references. Probably a throwback from an early version when it only accepted 1 file .

@keithamus so no need to use cli.glob then ?

Still a need to use cli.glob, as Windows users will need the support. More a case that cli.glob needs to be passed the whole cli.args array.

Would someone fix this soon? The tool is not very useful when it cannot handle blob. Also one more thing I'd like to report: the tool does not try to create the folder and fails even for a single file when the target folder does not exists.
I read http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/ and then try to switch from grunt to pure npm. @keithamus , do you feel grunt / gulp actually have some value?

Hopefully I'll get the time to fix this tonight.

@withdust @keithamus I can confirm that the quotes around the paths are completely necessary. Without them hashmark does weird things. With them, recursive globby goodness works just fine.
I used the following command to get hashmark to hash all files in the current directory and all files in all subdirectories with the extension '.txt', with the hash shortened to 4 characters. hashmark -l 4 '**/*.txt' '{dir}/{name}.{hash}.{ext}'
The '{dir}/{name}.{hash}.{ext}' puts each hashed file back where it was found, and names the hashed file like 'example.1h56.txt'.

Since I never got around fixing it, I'm glad to see there's a workaround.

@lydell Is it really a workaround though? In my mind it seems like proper usage would entail always putting that arg in quotes. The destination arg already is, why not source?

Is it really a workaround though?

Yes, it is a workaround.

In my mind it seems like proper usage would entail always putting that arg in quotes.

No, that's not proper. No other CLI programs requires quoting.

The destination arg already is, why not source?

The destination arg does not need quoting. (It might help, though, if your shell requires escaping otherwise.)

When not using quotes for the source, and using a glob, you let the shell do some work in passing the files to hashmark.

Exactly. That's the point.

Without quotes around the source, the full arg is never passed to hashmark, so cli and glob cannot help you. Am I right?

Yes, that's the point. hashmark should not have to think about globs at all, because that's a shell feature. However, just like a few other CLI programs, hashmark has decided to include glob expansion for Windows users (Windows' default shell hasn't got glob support).

I didn't have the time to test it, but changing https://github.com/keithamus/hashmark/blob/master/bin/hashmark#L52-L54 into something like the following might do the trick.
if (cli.args.length) {
    if (process.platform === 'win32' && !process.env.TERM) {
        files = cli.args.reduce(function(files, pattern) {
            return files.concat(cli.glob.sync(pattern));
        }, []);
    } else {
        files = cli.args;
    }
}

Most of this boils down to the fact that the CLI only takes 1 file argument bin/hashmark#L53, which is a bug.
While glob exists for Windows compatibility, IMO there is no need to detect the platform and perform the globbing only if the platform is windows, as Bash et al do not always have the advanced globbing features that npm-glob has.
Just replacing L53 with the following will fix this issue:
        files = cli.args.reduce(function(files, pattern) {
            return files.concat(cli.glob.sync(pattern));
        }, []);

Anyone who has commented here is encouraged to make a PR to that effect, and back it up with a few tests. They will be rewarded a million internet points, and a commemorative plaque on our heroes page: https://github.com/keithamus/hashmark/graphs/contributors.

No unix shell user would ever expect globs to work in a specific program but not in the rest of the shell. Besides, foo \*.js should hash a file named *.js, not all .js files in the current directory. So IMO the platform check is needed.

You make a good point. Feel free to make a pr for the code sample you suggested that includes the platform check then.

Sure, I could make a PR. The problem is that I don't have a Windows machine to test on. It would be great if somebody could run node -p 'process.platform === "win32" && !process.env.TERM' on Windows. That should print 'false' in cmd.exe and in PowerShell, but 'true' in MinGW ("Git bash") and cygwin.

Yes, that's the point. hashmark should not have to think about globs at all, because that's a shell feature. However, just like a few other CLI programs, hashmark has decided to include glob expansion for Windows users (Windows' default shell hasn't got glob support).

Yes, hashmark mark does indeed need to think about globs, because recursive globbing is not a shell feature for many (most?) Unix users. Only bash > 4 supports recursive globs. I and many others have an older version of bash than 4 on my system and cannot do recursive globs in the shell.

No unix shell user would ever expect globs to work in a specific program but not in the rest of the shell.

This is exactly what I expect.

While glob exists for Windows compatibility, IMO there is no need to detect the platform and perform the globbing only if the platform is windows, as Bash et al do not always have the advanced globbing features that npm-glob has.

Keith is right, and this is why he chose to include npm-glob in the module.

Some equally good points there too.
To look at some examples of other projects - e.g. tape, they use glob() without doing platform detection - so I think it is a reasonable thing to do.
Let's just do the simplest thing - globbing without platform detection. If real issues arise from doing this, then we can look at fixing those or worst case reverting the change.

Nice to see that we've settled on something. Unix users escaping globs to pass in weirdly named files sure is an edge case.

Worst case scenario, we can turn off argument globbing after a -- right? so if users need to pass weird filenames they can do something like hashmark *.js -- \*.js

Yeah, that could be a way to go. But let's do like you said and not worry about it until real issue arise.

@keithamus I tested the new L53 code

files = cli.args.reduce(function(files, pattern) {
return files.concat(cli.glob.sync(pattern));
}, []);

Results are that hashmark can accept more than one specified file, with or without quotes, but double glob source still only works with quotes. Double glob destination works fine without quotes.

@michaeljwilliams sounds like a limitation of your shell. Not sure how we can avoid that problem. Suggestions welcome.

This is a good debugging script:
console.dir(process.argv)

Then run node testfile.js arg1 **/*.js arg3 etc.

@keithamus >sounds like a limitation of your shell. Not sure how we can avoid that problem. Suggestions welcome.
I really have no idea, but I think we ought to at least put the workaround in the documentation, if not fix it, because I'm using the same Bash that shipped with my MacBook Pro, and I imagine tons of developers use MacBook Pros.

Sounds like quoting it is going to have to be a thing. As I think bash will pick up any glob syntax before it hits the cli app. This should be well documented in the readme, as you suggest.

But first we should try things out, not just guess. Try my test script (or echo) to see what the JS actually gets. I can try out bash and sh on Ubuntu.

Seems like both bash and sh have ** enabled by default on my machine -.-

It is more of an educated guess than you might believe. You've likely got the globstar shell option switched on. If you run shopt | grep globstar you'll likely see globstar on. With globstar set to on, doing ** will expand through folders, while off it'll behave like *.
See this article for more: http://www.linuxjournal.com/content/globstar-new-bash-globbing-option
Summary: without quotes, bash will swallow all glob control characters, and may or may not use them as implied by their feature.

@keithamus @lydell Here's the official explanation for why the quotes are needed. From the Bash manual:

<IP_ADDRESS> Single Quotes
Enclosing characters in single quotes (‘'’) preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash.

Using the quotes passes the asterisks as actual asterisks, and they get handled by the glob module.

Thanks @michaeljwilliams :smile:

If a glob doesn’t match anything, bash sends the glob expression through unmodified. For example, echo *.js will print a list of all .js files, unless there are none; then *.js is printed. This led me to believe that echo ** would print ** if you turn of shopt -u globstar. However, that seems to have the same effect as echo *. Why? I finally figured it out. echo *a* prints a list of all files containing an 'a'. In other words, files which start with anything, then has an 'a' and then ends with anything are matched. echo ** works the same way: Files which start with anything, then has an empty string an then ends with anything are matched (which in effect is equivalent to echo *).
I also seem to have missed the point of adding JS-powered glob support. I thought it was to make things more convenient for Windows users, but in fact the most important point is writing cross-platform npm scripts.
I suggest the following:

Skip the platform check.
Windows users can use glob patterns without quoting.
Most unix users can use glob patterns without quoting too, since unix shells usually support globs out of the box.
If your unix shell does not support ** but does support * and you want to use the JS-powered **, you’re best off quoting.
If you want to write a really robust npm script, quote the glob patterns.


Request: enabled/disabled field for options

I'm on the early stages of making a visual novel with Clyde, and loving it so far.
By default, Clyde won't return an option that's now available. While this works just fine, it's not very transparent or flexible. It would be better if it returns all the options regardless, but marking the enabled/disabled ones with an additional field in the choice json.
The idea is that you can decide which ones to show, rather than leaving that to Clyde. For example you might want to show the player that a given option is on the choice menu... but disabled for some reason. It would serve to let the player know that there are more choices to unlock in the future: * {apples >= 3} [Trade apples for letter] , or perhaps that some options are locked because of previous player actions * {murdered_merchant} [Trade apples for letter].

Thanks @jcandres. I'm glad it's being helpful.
This is a good point. I've seen many games with this format. I wouldn't change the current behaviour as it adds complexity to the consumer, but we can think on alternatives for this.
This could fit well as an interpreter configuration, to always return disabled options.
A simpler solution would be adding a new method to the interpreter to get all the options regardless state. When you get an option type content you could call this method and get all of them.
The second idea looks cleaner, but also more verbose, so maybe the interpreter option is a better fit. Thoughts?

Adding a new method to get all the options could work, even if it means that the user has to juggle a bit with the output... but it feels a bit like a corner-case workaround.
Passing an optional parameter to get_content would be great -- keeps the default behaviour intact but adds flexibility and transparency should you need it. I'm not sure if this would be easy to implement

This is available in the newest version. It can be configured via:
dialogue.configure({ "include_hidden_options": true })


Bump Julia to v1.9 in JMTE image

Context
Ticket ref: https://2i2c.freshdesk.com/a/tickets/751
A request to bump the version of Julia in JMTE has come in.

Are we fully managing the image or should we be encouraging them to attempt this kind of bump themselves?
I don't think the JMTE image repo has been migrated over to the 2i2c GitHub org - where does it live?

Proposal
No response
Updates and actions
No response

@sgibson91 it lives currently in https://github.com/pangeo-data/jupyter-earth, and we are currently responsible for the image as well.

I have:

[ ] Opened https://github.com/pangeo-data/jupyter-earth/issues/167 to split the image off that repo, move it into this org
[ ] Opened https://github.com/pangeo-data/jupyter-earth/pull/165 to pin the image to a specific base version, so upgrading Julia doesn't also bring in 6 months of changes for everything else
[ ] Opened https://github.com/pangeo-data/jupyter-earth/pull/166 to upgrade version of Julia

Closing as per https://github.com/pangeo-data/jupyter-earth/pull/166.

Not deployed yet

Done!


bug: page scrolls when some components are closed after opening them

Describe the bug
When some components (in the video the DropdownMenu component is used) are closed after being opened and you have scrolled on a page, it makes the page scroll to the top and back to where you were.
This behaviour isn't quite noticeable when scroll-behavior: smooth; isn't set, however, it does still happen.
Weirdly, the Popover component does not trigger this behavior.
This also only happens on iOS Safari (and other webkit-based browsers on iOS) and doesn't happen (in normal and responsive modes) on desktop browsers, including macOS Safari.
https://github.com/huntabyte/shadcn-svelte/assets/47110839/d6c0a5ff-fb7f-43c2-b0f4-d0b25ffc8f43
Reproduction
https://github.com/DarthGigi/shadcn-safari-mvce
Logs
No response
System Info
System:
    OS: macOS 14.5
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 715.43 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.13.1 - /usr/local/opt/node@20/bin/node
    npm: 10.5.2 - /usr/local/opt/node@20/bin/npm
    pnpm: 9.1.1 - /usr/local/bin/pnpm
    bun: 1.1.8 - /usr/local/bin/bun
  Browsers:
    Brave Browser: <IP_ADDRESS>
    Chrome: 125.0.6422.61
    Safari: 17.5

Severity
annoyance

I'm gonna bump this issue if that's ok

I'm currently having this same issue in one of my applications but not specifically with Safari.
For some reason I can't reproduce it with your repro.
In my case preventScroll was not working. I am not exactly sure why this fixed it but I removed the following from my global css file:
html {
   overflow-x: hidden;
}

Now my scroll properly locks.
However... now it does something weird
https://github.com/user-attachments/assets/570e66ee-f0d5-4076-afbc-32f4d48780a4
When I hover an item the page gradually scrolls up, super weird. Similarly when I close the menu the scroll unlocks (as expected) and then rockets me back to the top of the page as you have shown. I'd like to emphasize I never scrolled up in the video.
I would love a second opinion on this. This issue probably belongs in bits-ui.

This issue probably belongs in bits-ui.

I agree, I just made a new repo using only bits-ui, and the issue (at least mine) is still there: https://github.com/DarthGigi/bitsui-safari-mvce
This issue should probably be transferred to the bits-ui repository instead.

Is your repro still working only for safari or does it work for you on chromium?

@ieedan The bug is only present in mobile Safari. On macOS Safari, Chromium-based browsers, and Firefox it works fine.

This may be related:
https://github.com/user-attachments/assets/522f2bda-7454-491a-8eca-ddc30dbed4ef

@babakfp What exactly are you showcasing?
That the dropdown is changing positions when you scroll?
If so that’s intentional behavior from Floating UI: https://floating-ui.com/docs/flip.
It can be turned on or off with the avoidCollisions property: https://www.bits-ui.com/docs/components/dropdown-menu

That the dropdown is changing positions when you scroll?

When I scroll down/up and the calendar goes out of view (and it's still open), I click outside, and the calendar gets closed, and the page position jumps to the position of the calendar.

Can you still reproduce this using bits-ui@next and shadcn-svelte@next ?

I couldn't reproduce the bug with Svelte 5, bits-ui and shadcn-svelte next

Amazing!


Shelly Pro 3EM product ID, firmware version etc. missing

Behaviour is similar  with Shelly Plus PM Mini.
Output of ./dbus_shelly.py --debug seems to show the devices are communicating but nothing shows up (apart from Connected=Yes) - see annexed cerbo_log.txt & diagnostics-shelly-pluspmmini-debug-log.txt
Cerbo Firmware; v3.11~2
Shelly firmware: 20231010-145121/1.0.7-beta1-gdac487c (1.03 stable seems to yield similar results)
cerbo_log.txt
diagnostics-shelly-pluspmmini-debug-log.txt

Anyone who got this working with the Shelly Plus 1PM Mini? This is at least gen2 device


Extra whitespace in output when macro ends with an if statement

Running with trim_blocks=True and lstrip_blocks=True, whitespace from if statements is usually removed. Seems to generally works as expected, except in cases where a macro ends with an if statement
Expected Behavior
No blank line when macro ends with an if statement and trim_blocks=True
Actual Behavior
Extra blank line in output. Happens regardless of whether condition evaluates to true or false.
If statements at beginning of macro don't produce any blank lines.
Template Code
{# produces 3 lines of output #}
{% macro foo() %}
foofoo
{% if true %}
barbar
{% endif %}
{%- endmacro %}

{# produces 2 lines of output #}
{% macro foo2() %}
{% if true %}
bar2bar2
{% endif %}
foo2foo2
{%- endmacro %}

aaaaa
{{ foo() }}
aaaaa

bbbbb
{{ foo2() }}
bbbbb

Full Traceback

aaaaa
foofoo
barbar

aaaaa

bbbbb
bar2bar2
foo2foo2
bbbbb

Your Environment

Python version: 3.7.3
Jinja version: 2.10.1

We've discovered the minus sign (or whitespace strip operator), when appended to the beginning of the if control and prepended to the end of said control, will remove those blank lines:
{% macro foo() %}
foofoo
{% if true -%}
barbar
{%- endif %}
{%- endmacro %}

So you could use this for now, but I will continue research in the docs to determine an answer to this question: should this whitespace strip operator, when appended and prepended to the macro, apply the strips to controls inside the macro?
If yes, then as you expect, you would not need to apply the operator for that if control.

So you could use this for now, but I will continue research in the docs...

I haven't found a definitive stance.  Tell me if this "workaround" is good for you @adambousley

As far as I can tell, this only works when the if statement evaluates to true. When the if statement evaluates to false, the extra blank line is still present:
{% macro foo() %}
foofoo
{% if false -%}
barbar
{%- endif %}
{%- endmacro %}

aaaaa
{{ foo() }}
aaaaa

gives
aaaaa
foofoo

aaaaa

For my purposes I was able to work around the issue by adding "|trim" to all my macro calls, but obviously this wouldn't work if you actually wanted a specific amount of whitespace out of the macro...

I'll take a look at this. Working at Pycon 2019 Sprints.

Here's a rough and quick explanation of why this is occurring in your most recent example. I haven't looked into the original examples yet to determine how they are being parsed, but it's possible the logic might be similar.
{% macro foo() %}
foofoo
{% if false -%}
barbar
{%- endif %}
{%- endmacro %}

Gets parsed by the system and when whitespace is made more obvious, becomes
{% macro foo() %}\nfoofoo\n{% if false -%}\nbarbar\n{%- endif %}\n{%- endmacro %}

Which when whitespace stripping is applied, is equivalent to
{% macro foo() %}foofoo\n{% if false %}barbar{% endif %}{% endmacro %}

Note the extra \n after foofoo. This wouldn't be stripped by trim_blocks because it does not happen at the beginning or the end of a block, and it wouldn't be stripped by lstrip_blocks because it is not left padding for a block.
So when it's used in a template like
aaaaa
{{ foo() }}
aaaaa

It is equivalent to
aaaaa\nfoofoo\n\naaaaa

Which is where you are getting the additional whitespace from. You can fix this by stripping the whitespace from before the {% if %} block by doing
{% macro foo() %}
foofoo
{%- if false -%}
barbar
{%- endif %}
{%- endmacro %}

Note the extra - operator at the beginning of the {% if %} block. This should strip the whitespace that occurs before it, up to the "foofoo" in the template, which is what you are looking for.

It's also important to note that the output appears to be correct when the statement evaluates to true because you are expecting the whitespace to be there in that case. It sounds like you are actually expecting to be using {%- if %} to get the extra whitespace when the statement is true (so the words are separated) but not have the additional whitespace when the statement is false.

In that case, you would end up with "foofoobarbar" on one line when the if statement evaluates to true.
However, your explanation led me to the following solution, which gives the result I am looking for in both cases:
{% macro foo() %}
foofoo
{%- if false %}

barbar
{%- endif %}
{%- endmacro %}

{% macro foo2() %}
foofoo
{%- if true %}

barbar
{%- endif %}
{%- endmacro %}

aaaaa
{{ foo() }}
aaaaa

bbbbb
{{ foo2() }}
bbbbb

It seems like the solution would be to trim the macros after if statements have been evaluated (thus removing the trailing newline automatically in both cases), but I have no idea how feasible that is.

I just did some testing with this using Environment().compile(template_string, raw=True) to see what the underlying Python looked like, and discovered that this is not a bug and it matches the docs.

The first template code:
{% macro foo() %}
foofoo
{% if true %}
barbar
{% endif %}
{%- endmacro %}

Is equivalent to
{% macro foo() %}\nfoofoo\n{% if true %}\nbarbar\n{% endif %}\n{%- endmacro %}

Which after the whitespace operators are applied is equivalent to
{% macro foo() %}\nfoofoo\n{% if true %}\nbarbar\n{% endif %}{% endmacro %}

And after trim_blocks is applied, is equivalent to
{% macro foo() %}foofoo\n{% if true %}barbar\n{% endif %}{% endmacro %}

Note that trim_blocks only trims the first \n following the opening block tag. This is one thing I assumed was different before, and then I read the docs again and was surprised.
So when this macro is used in the following template
aaaaa
{{ foo() }}
aaaaa

It's equivalent to
aaaaa\nfoofoo\nbarbar\n\naaaaa

Which is where the extra \n comes from. It's part of the barbar\n and can be stripped out by using {%- endif %} to close off the conditional.

The second template code
{% macro foo2() %}
{% if true %}
bar2bar2
{% endif %}
foo2foo2
{%- endmacro %}

Is equivalent to
{% macro foo2() %}{% if true %}bar2bar2\n{% endif %}foo2foo2{% endmacro %}

You'll notice that there isn't an extra \n after foo2foo2 because it was stripped out by the whitespace operator on {%- endmacro %}.

Closing this off since this isn't a bug, according to how the parsing logic works. But if you want to submit a pull request that makes the docs clearer, we're happy to review it.


[CodeCompletion] Remove redundant entries from possible callee analysis

This used to cause duplicated results in call signature completions. For example, in the following case, (coder: NSCoder) was duplicated.
AlertViewController(#^HERE^#

This was because collectPossibleCalleesByQualifiedLookup() didn't remove redundant results.
rdar://problem/65081358

@swift-ci Please smoke test

@swift-ci Please smoke test

Windows:

@swift-ci Please smoke test

Windows:


Recursive Neo blocks support?

Hey y'all! This is a great idea for a plugin - thanks for the work!
I've run in to an issue however - our neo field supports recursive blocks, and I believe that is freezing up this plugin.
My recursive blocks I mean something like I have a Container block type, whose children can also be Container.
This freezes craft-block-usage entirely.
I'm not sure what the best solution would be - maybe loading block types per level?

Hey, ha yeah that's pretty weird edge case. We can take a look at this but we'll probably need a more substantial rewrite for C5 support anyway.

I'm not sure I agree it's a weird edge case - but either way, I filed a PR #7 that will fix up this issue and another issue I found 😁

I'll second this; we use Neo's block nesting heavily in nearly every major Neo field we create. Container with various "content" blocks, Tabs with Tab children and "content" grandchildren, etc.


Compilation error in Angular

What version of OpenTelemetry are you using?
0.6.1
What version of Node are you using?
13.11.0
What did you do?
Tried to use @opentelemetry in an Angular project. Just:
1 - include the dependency:

npm i @opentelemetry/tracing

2 - Try to use it:
import { SimpleSpanProcessor } from '@opentelemetry/tracing';
What did you expect to see?
Compile OK
What did you see instead?
Compilation error:
ERROR in<EMAIL_ADDRESS>Module not found: Error: Can't resolve 'path' in './node_modules/@opentelemetry/core/build/src/trace/instrumentation'
Additional context
File<EMAIL_ADDRESS>line 19 imports "path":
const path = require("path");
Commenting this lines 19, 77 and 80 solves the problem.

@obecny I think it may be time to split the BasePlugin into specific node/web versions

/cc @mayurkale22

we can just split it to 3 files, base abstract and then node and web using the platform folder ?

Just wondering what has changed recently that this is not working anymore ?. As it was fine quite recently

It's probably some issue with his specific bundler or something like that. The BasePlugin definitely uses the path module, though it should only actually use it in node plugins. It looks like he is using some sort of static analysis that looks at the source and sees the path module may be used.

anyway we should split it asap ;)

https://github.com/open-telemetry/opentelemetry-js/issues/967

@gpra the fix for this should go out with the release today


Bump tailscale version

Proposed Changes
Bump version of tailscale from 1.14.3 to 1.14.4
Related Issues

(Github link to related issues or pull requests)

@frenck  I think I need a label on this PR in order for it to pass tests


Disable slow unit tests

Cut ~40s off azkaban-common test runtime. Now they run in ~5s for me. Still leaves room for improvement..

Thanks for this PR!
We should regularly review the test runtime. I remember both intellij and gradle have nice reports regarding test run times.

Can I do something more to get this merged? It would be really nice to be able to run all tests quickly without some personal test run setup.

@juhoautio left comments.

@HappyRay thanks.. I have resolved all slow tests properly, 3 commits added ^

@juhoautio Thanks. It seems that you changed the metrics related tests implementation to make it faster instead of ignoring it. Shouldn't the PR description be updated to reflect the new changes?
@kunkun-tang could you also review since you are most familiar with this test?

Updated PR title, original description works.

@juhoautio Thanks.
@kunkun-tang Ping.
The sooner we merge this PR, the sooner we can get the benefits.

@juhoautio, @kunkun-tang
Thanks!


Fix typo in mysql password parameter

Describe changes
I fixed the naming of the password parameter in the docs.
Pre-requisites
Please ensure you have done the following:

[x ] I have read the CONTRIBUTING.md document.
[x ] If my change requires a change to docs, I have updated the documentation accordingly.
[ ] If I have added an integration, I have updated the integrations table.
[ ] I have added tests to cover my changes.

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ x] Other (add details above)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@pafpixel thanks for the PR! Could you please sign the CLA so we can merge?


Remember the new fragment radio tile selection

This allows user to just click create when performing the action they commonly do.
Export window does something similar.
The selection should be stored in local storage via global settings context.

Hello @zvonimirfras . I would like to work on this issue. Please assign it to me.

@Yaswanth820 Have fun! 🙂


CEQ-6792 JVM-only extensions should also be listed on code.quarkus.redhat.com

https://issues.redhat.com/browse/CEQ-6792

Blocked by https://issues.redhat.com/browse/QUARKUS-3153 If we get a proper JVM-only tag also in the community, we can perhaps stop unlisting our JVM only extensions by default.

@ppalaga this could be closed sinec we already had some fixes in cq-maven-plugin to mark supported-in-jvm extensions as unlisted:false.


[CodeFlow] Hardcoded branch name breaks new sandbox creation

Describe the bug
Creating a new CodeFlow repo will fail if your default branch name is set to something other than "main".
Link to the blitz that caused the error
https://stackblitz.com/
Steps to reproduce

Create a new WebContainer sandbox
Click move to CodeFlow

Expected behavior
Repo should be created with the configured/localized  branch name used by upstream, whether it be master, trunk, development, dev, zhu, next, shujin, domini, default, etc.
Parity with Local

[X] I have run the project in my local machine and I could not reproduce the issue.

Screenshots

Additional context
Potential solutions:

use 'push.autoSetupRemote' config in git. This will squash user localization/settings.
use GitHub API and then run

git branch -m [name] before initial commit, and git push --set-upstream origin [name] after the remote "origin" has been added.

You appear to be partially using the GitHub API / CLI server side to push your sandbox... As Standard cannonical git has no way of telling what GitHub's settings are. Switching to standard git could also fix this proprietary git issue.

The SB classic update removed the option, and now it uses "main" regardless of GH settings. This works.


keras is very slow with theano

platform: i5 7500, 1080ti, newest keras and backends, windows 10
Model(MNIST, CNN):
https://github.com/minimaxir/keras-cntk-benchmark/blob/master/test_files/mnist_cnn.py
model = Sequential()
model.add(Conv2D(20, (5, 5), activation='relu',
input_shape=input_shape))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Conv2D(40, (5, 5), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.5))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(num_classes, activation='softmax'))
this model takes 2s per epoch with tensorflow, 3s with cntk and 11s with theano.
I have my own simple code to train MNIST and takes 1.3s per epoch with theano, 2.0s with tensorflow and 3.1s with cntk.

Did you setup theano correctly? In my experiments theano is faster than TF.
Here is my .theanorc config:
[global]
floatX=float32
device=cuda0

[nvcc]
flags=-D_FORCE_INLINES

[cuda]
root=/usr/local/cuda/bin

[dnn]
enabled=True

[gpuarray]
preallocate=.90

This problem is solved. I changed backend by using “os.environ” before and didn't set "image_data_format" to "channels_first".  Backend should be changed by modifying ~/.keras/keras.json.