hasManyThrough requires relevant table's name

Laravel Version: 5.4
PHP Version: 7.1
Database Driver & Version: MySQL 5.6 InnoDB

Description
For hasManyThrough relationships, you need to provide the relevant table's name like the following:
$country->posts->where('posts.name', 'LIKE', "%{$query}")->get();

Otherwise, a SQL error will be thrown:

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'name' in where clause is ambiguous

Suggestion
I think the documentation should mention this for clarity.

Putting this up because I didn't find any related issues, and a way of asking for approval if I can send a PR for this. Let me know if I missed anything.

@srph we have a docs repo for suggestions for the doc. Kindly post it there. (laravel/docs)

Thank you, will do!


chinese support

Thank you for the PR.
But, it seems that this patch is inadequate as standard PR.
This patch contains too many superfluous lines to change the code, and the size is too big. Actually, you want to change only a few lines.
When you send a PR to any repository, you should check that contents.

PRs should follow coding styles of target, such as indent.
PRs should not change empty lines without reason.

Also, unfortunately, this PR seems not to work.

It has problem about dependency.
It doesn't cover some situations such as external programs.


SSLError has no attribute 'reason'

I ran across this error when the connection was timing out:
  File "C:\Python27\lib\site-packages\deluge_client\client.py", line 52, in connect     if e.reason != 'UNSUPPORTED_PROTOCOL' or not hasattr(ssl, 'PROTOCOL_SSLv3'): AttributeError: 'SSLError' object has no attribute 'reason'
added to line 52 a check for the reason attribute solves the surface issue.
if not hasattr(e, 'reason') or e.reason != 'UNSUPPORTED_PROTOCOL' or not hasattr(ssl, 'PROTOCOL_SSLv3'):
The underlying issue is my connection to deluge timing out, that's not something wrong with this project, but if you have any tips, I'm open ;) Perhaps adding an option for the user to set the timeout value.
  File "C:\Python27\lib\site-packages\deluge_client\client.py", line 50, in connect     self._socket.connect((self.host, self.port))   File "C:\Python27\lib\ssl.py", line 844, in connect     self._real_connect(addr, False)   File "C:\Python27\lib\ssl.py", line 835, in _real_connect     self.do_handshake()   File "C:\Python27\lib\ssl.py", line 808, in do_handshake     self._sslobj.do_handshake() ssl.SSLError: ('_ssl.c:574: The handshake operation timed out',)

It is partly my fault, nothing in the project handles timeout properly. If you send an invalid command it'll also wait forever for a reply.
I'll see if I can make an easy fix that handles both command and connection timeout.

Hit the same thing:
>>> client.connect()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-a9f21c90fee7> in <module>()
----> 1 client.connect()

/usr/local/lib/python2.7/site-packages/deluge_client/client.pyc in connect(self)
     50             self._socket.connect((self.host, self.port))
     51         except ssl.SSLError as e:
---> 52             if e.reason != 'UNSUPPORTED_PROTOCOL' or not hasattr(ssl, 'PROTOCOL_SSLv3'):
     53                 raise
     54

AttributeError: 'SSLError' object has no attribute 'reason'

Looks like SSLError.reason was added in python 2.7.9, which would explain the AttributeError being raised. Is there a consistent errno property that could be used instead that corresponds to that reason?


.whereIn() with multiple columns in mssql

Environment
Knex version: ^0.18.3
Database + version: ms sql server 11.0.6260.1
OS: WSL Ubuntu 18.04
Select applicable template from below.
For MSSql tag @smorey2.
Bug

Explain what kind of behaviour you are getting and how you think it should do
knex.whereIn(["column1","column2"], [["value1","value2"],["value3","value4"]
returns
select * from [mytable] where ([column1], [column2]) in ((?, ?), (?, ?))

which is not supported by mssql. This results in an UnhandledPromiseRejectionWarning coming from tedious for me.

Error message
(node:6296) UnhandledPromiseRejectionWarning: RequestError: An expression of non-boolean type specified in a context where a condition is expected, near ','.  at handleError (app/node_modules/mssql/lib/tedious.js:566:15)  at Connection.emit (events.js:198:13)  at Connection.EventEmitter.emit (domain.js:448:20)  at Parser.tokenStreamParser.on.token (app/node_modules/mssql/node_modules/tedious/lib/connection.js:716:12)  at Parser.emit (events.js:198:13)  at Parser.EventEmitter.emit (domain.js:448:20)  at Parser.parser.on.token (app/node_modules/mssql/node_modules/tedious/lib/token/token-stream-parser.js:27:14)  at Parser.emit (events.js:198:13)  at Parser.EventEmitter.emit (domain.js:448:20)  at addChunk (app/node_modules/mssql/node_modules/readable-stream/lib/_stream_readable.js:297:12)  at readableAddChunk (app/node_modules/mssql/node_modules/readable-stream/lib/_stream_readable.js:279:11)  at Parser.Readable.push (app/node_modules/mssql/node_modules/readable-stream/lib/_stream_readable.js:240:10)  at Parser.Transform.push (app/node_modules/mssql/node_modules/readable-stream/lib/_stream_transform.js:139:32)  at doneParsing (app/node_modules/mssql/node_modules/tedious/lib/token/stream-parser.js:80:14)  at token (app/node_modules/mssql/node_modules/tedious/lib/token/infoerror-token-parser.js:48:5)  at call.lineNumber (app/node_modules/mssql/node_modules/tedious/lib/token/infoerror-token-parser.js:13:19) From previous event:  at Client_MSSQL._query (app/node_modules/knex/src/dialects/mssql/index.js:291:12)  at Client_MSSQL.query (app/node_modules/knex/src/client.js:158:17)  at Runner.query (app/node_modules/knex/src/runner.js:136:36)  at app/node_modules/knex/src/runner.js:40:23 From previous event:  at Runner.run (app/node_modules/knex/src/runner.js:26:16)  at Builder.Target.then (app/node_modules/knex/src/interface.js:14:43)  at QueryBuilderService.execQuery (app/backend/src/persistence/query-builder.service.ts:11:58)  at Promise (app/backend/src/business/query-adapter.service.ts:12:37)  at new Promise (<anonymous>)  at QueryAdapterService.<anonymous> (app/backend/src/business/query-adapter.service.ts:11:17)  at Generator.next (<anonymous>)  at app/node_modules/tslib/tslib.js:110:75  at new Promise (<anonymous>)  at Object.__awaiter (app/node_modules/tslib/tslib.js:106:16)  at QueryAdapterService.execQuery (app/backend/src/business/query-adapter.service.ts:10:24)  at Promise (app/backend/src/controllers/data.ts:17:26)  at new Promise (<anonymous>)  at app/backend/src/controllers/data.ts:16:18  at Generator.next (<anonymous>)  at app/node_modules/tslib/tslib.js:110:75  at new Promise (<anonymous>) (node:6296) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:6296) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.
see number 1 - doesn't quite need more examples

Feature discussion / request

Explain what is your use case
I wanted to use knex for this, to automate the process of building my own string with where (column1=value1 and column2=value2)or(column1=value3 and column2=value4). This is useful because other than orWhere this can be done with an object of variable size.

Explain what kind of feature would support this

Give some API proposal, how the feature should work
where params is an object passed via a post request, e.g.:
params={columns:["col1","col2"],items:[["val1","val2"], ["val3","val4"]]}; columns = params["columns"];items=params["items"]
this would result in a parameterized query where one could later add their values

let filterstring:string=Object.keys(items).map(k=> 			"("+ 			Object.keys(items[k]).map(v=> 				columns[v]+" = '"+items[k][v]+"'" 			).join(" and ")+ 			")" 		).join(" or ");
the output for my example would be:
where (col1=@col10 and col2=col20) or (col1=@col11 and col2=col21)
and then the parameters would be added accordingly.

I recommend instead of chaining and and ors, the use of VALUES, such as the way Objection does.
SELECT * FROM [mytable]
WHERE EXISTS (
  SELECT * FROM (VALUES (?, ?), (?, ?), (?, ?)) AS V(c1,c2)
  WHERE col1 = c1 AND col2 = c2
)

I have the same problem. @manscrober did you manage to solve this? If so, can you share your knex call?

Unfortunately I "resolved" this by not using knex but implementing the logic myself. I might also have used another library, it's a long time ago - all I remember is I stopped using knex.


Only escape callable output

Fixes #1849
P.S. bro I think you need to rewrite whole package again, you use nesting extremely.

Thanks, can you please fix the failing tests?

you use nesting extremely

Yeah, will try to refactor more when I got the chance. :)

@yajra Done.
About "extremely nesting" I mean, "code extremely" in the whole of the project.
for example this function here.
you can combine it with escapeRow and make code cleaner.

@yajra I doubt if they are cause of my code.

Just tested this with my app and it breaks my DT with the same error on the tests. Please fix. Thanks!
exception: "Symfony\Component\Debug\Exception\FatalThrowableError"
file: "/www/yajra/dataTables/core/src/Processors/DataProcessor.php"
line: 241
message: "Argument 1 passed to Yajra\DataTables\Processors\DataProcessor::escapeRow() must be of the type array, integer given, called in /www/yajra/dataTables/core/src/Processors/DataProcessor.php on line 223"

@yajra Bro I fixed the error, and improved the package a lot.
please test the PR and merge it.
this will make the life for developers easier.
also I hope you will work on the package and improve other parts too.
thank you

@sharifzadesina thanks but it's failing on the indexColumn. I think it should be the last item on row manipulations as per the original code before PR.

@yajra I did that, but it is still failing, if you check commits it started failing when I merged selectOnlyNeededColumns, and it fails at filteredRecourds part. I don't know why cause it is not related to my changes?

The changes looks good. However, there are some columns on my project that should be raw but are being escaped. It's not blade but a closure that returns a view.
->rawColumns(['filename_html', 'deleted_html', 'cooked_html']);

Need to review this further. I think we are missing some tests on raw columns.

@yajra This should be fixed now.

Still not working and I think I found where the issue was:

escapeRow should be last one to be called since added & edited columns are not yet processed.

        foreach ($this->results as $row) {
            $data  = Helper::convertToArray($row);
            $value = $this->addColumns($data, $row);
            $value = $this->editColumns($value, $row);
            $value = $this->setupRowVariables($value, $row);
            $value = $this->selectOnlyNeededColumns($value);
            $value = $this->removeExcessColumns($value);
            $value = $this->addIndexColumn($value);
            $value = $this->escapeRow($value);

            $this->output[] = $object ? $value : $this->flatten($value);
        }

Since our goal is to not escape blade string from add/edit column, we can modify our checker to something like:

    protected function shouldEscapeColumn($key)
    {
        foreach ($this->appendColumns as $column) {
            if ($column['name'] == $key && is_string($column['content'])) {
                return false;
            }
        }

        foreach ($this->editColumns as $column) {
            if ($column['name'] == $key && is_string($column['content'])) {
                return false;
            }
        }

        if ($this->escapeColumns === '*') {
            return ! in_array($key, $this->rawColumns); // escape if is not a raw column
        } elseif (is_array($this->escapeColumns)) {
            return in_array($key, array_diff($this->escapeColumns, $this->rawColumns));
        } else {
            return true;
        }
    }

@yajra we are not doing escaping at "escapeRow", cause we don't know the content was a blade string or a callable, we need to escape output of callables, that's why we only escape database data using escapeRow.

@sharifzadesina we can identify the content by checking the append columns structure:
foreach ($this->appendColumns as $column) {
            if ($column['name'] == $key && is_string($column['content'])) {
                return false;
            }
        }

that's why we only escape database data

Good point on this one.

But I think we should still escape added/edited columns since we can still directly return a database value from a closure.

@yajra
Imagine I've added this callable using addColumn:
function () {
    return 'XSS';
}

The content will be string and we won't escape it. this should not happen.
Can you please send your full code? I think it should work with the changes I made.

For closure like that, I would still prefer to be explicit and add it on the rawColumns.
For a straight blade string, It's ok to be raw.
addColumn('xss', function () {
    return 'XSS'; // should be added to rawColumns
})

addColumn('xss', '{{ $xss }}'); // can bypass escape

Already created the gist.
Yes, we should by default escape all rows for xss protection unless explicitly set as raw column.That is why I agreed of allowing blade templates to be raw since the argument is we are using {{ }} on our template. It's a different case for closure though.

@yajra no I mean the script you use to test my PR

It's just a standard dataTable with multiple addColumns. Anyways, I added it on the gist.

@yajra Bro I tested the PR on my own apps, it works without problem, are you sure you are using whole pull request?
cause there were also some changes at Helper.php file.

It's still failing the last time I checked. For now I think the safest implementation would be:

Allow raw columns on the following condition:

String template

->addColumn('extra', 'some string')
->editColumn('extra', 'some string')

Blade template

->addColumn('extra', 'path.to.blade')
->editColumn('extra', 'path.to.blade')

Do not allow raw columns on closure:

->addColumn('extra', function($model) {
   return 'html';
})
->rawColumns(['extra'])

@yajra It is exactly like that, that's why I told "this is not a BC".

It seems to work well now but it breaks the index column. Reverting, please resubmit the PR and fix the index column part. Thanks!

Or you can alternatively send another PR to fix the index column? Will hold the revert and release of this feature until it's fixed. Thanks!

Fixed the index column and added some tests. Released on v8.13.0 🚀
If you can, please also submit a PR on docs. Thanks!

@yajra what`s wrong on last version (rawColumns) with rawColumns() because now it displays columns without escape.

Resume discussion on https://github.com/yajra/laravel-datatables/issues/1916.


Add fluent-bit dependency and config values

Adds fluent-bit chart dependency and basic configuration values to kubernikus-system.

In upstream config template is broken. The following PRs exists regarding this topic:
https://github.com/helm/charts/pull/8166
https://github.com/helm/charts/pull/7878
https://github.com/helm/charts/pull/7694
https://github.com/helm/charts/pull/7413
For now only kubernetes container logs are working. It seems we have systemd journal already in place in /var/log/journal and kernel log is in there as well. We need to adapt input config to log this to Elasticsearch as well. I'm going to move the chart here and change config accordingly.

I added the chart to the repo with fixed config template and systemd logging capabilities.

@databus23 I added official fluent-bit chart dependency, configmap and values for configuration.

@jknipper before we can merge this we need to add the required values to cc/secrets. Can you create a PR for that?

It's already there.


Simulation fails when using Native setup

[x] I have checked that this issue has not already been reported.

Bug summary
When trying to run simulations using the Native setup, the process fails when trying to run the scenario in REISE.jl (after the scenario has been created). The most surprising part is that a simulation can be set up using PowerSimData and then successfully run in the standalone version of REISE.jl.
Code for reproduction
This occurs sometime after using the launch_simulation functionality of a scenario in the execute state. It does not fail immediately or throw an error. The only way you know it failed is through the print_scenario_status and check_progress functions. The scenario that was created for this example closely matches the one listed in the documentation, with the exception that a change table was not created.
Actual outcome
The following output is obtained by using the check_progress functionality on the scenario:
{1: {'scenario_id': '1',
  'output': ['Validation complete!',
   'Launching scenario with parameters:',
   "{'num_segments': 1, 'interval': 24, 'n_interval': 3, 'start_index': 1, 'input_dir': 'C:\\\\Users\\\\LaneSmith\\\\ScenarioData\\\\tmp\\\\scenario_1', 'execute_dir': 'C:\\\\Users\\\\LaneSmith\\\\ScenarioData\\\\tmp\\\\scenario_1\\\\output', 'threads': None, 'julia_env': None, 'solver_kwargs': None}",
   "Exception 'LoadError' occurred while calling julia code:",
   'const PyCall = Base.require(Base.PkgId(Base.UUID("438e738f-606a-5dbb-bf0a-cddfbfd45ab0"), "PyCall"))'],
  'errors': [],
  'status': None}}

The simulation starts fine, as can be seen by the fact that validation is completed and the settings are printed (both of which occur in REISE.jl/pyreisejl/utility/launchers.py), indicating that there isn't a problem with finding the REISE.jl directory (specified as ENGINE_DIR in the config.ini file).
Expected outcome
The expected outcome is for the simulation to be executed successfully. As mentioned in the initial summary, that is the outcome that is observed when running the standalone version of REISE.jl, indicating that the bulk of the functionality is sound (at least most of it anyway, the standalone version does not need to run REISE.jl/pyreisejl/utility/app.py) and the scenario files are not formatted incorrectly. It appears that the simulation is failing when entering the init_julia function in REISE.jl/pyreisejl/utility/launchers.py.
Environment
Please specify your platform and versions of the relevant libraries you are using:

Operating system: Windows 10
Python version: Python 3.8.3
Jupyter version: Julia 1.5.4

I'm using the current develop branches of both PowerSimData and REISE.jl.
Additional context
As I mentioned above, one of the main differences between running a simulation through the PowerSimData-REISE.jl interface and the standalone version of REISE.jl is that the PowerSimData-REISE.jl interface uses REISE.jl/pyreisejl/utility/app.py. Within app.py, there appears to be a copy of the system environment that is created (via the run_script function). Perhaps the copied system environment doesn't actually have the Julia-related dependencies installed? If that is the case, then having the ability to specify the Julia environment probably doesn't do much good (which I've worked on extending from only being in REISE.jl to being specifiable in PowerSimData) unless we also set up the functionality to install the dependencies in the copied system environment. Is there a way for the Native setup to work without creating the copied system environment?

@jon-hagg and I were able to find a solution to this problem. It appears that REISE.jl needs to be activated and instantiated (see option 3 in our REISE.jl documentation and the related discussion in the Julia documentation), as opposed to just dev-ed, which is how I initially had it set up and how it originally worked with my standalone version of REISE.jl. I'm still not fully sure why the dev-ing process works with the standalone version of REISE.jl, but not when trying to use REISE.jl through PowerSimData.
While there might need to be some more research into the merits of add-ing vs. dev-ing vs. activating and instantiating REISE.jl, we will probably need to update the documentation for the Native setup and potentially the REISE.jl documentation.

@jon-hagg and I were able to find a solution to this problem. It appears that REISE.jl needs to be activated and instantiated (see option 3 in our REISE.jl documentation and the related discussion in the Julia documentation), as opposed to just dev-ed, which is how I initially had it set up and how it originally worked with my standalone version of REISE.jl. I'm still not fully sure why the dev-ing process works with the standalone version of REISE.jl, but not when trying to use REISE.jl through PowerSimData.
While there might need to be some more research into the merits of add-ing vs. dev-ing vs. activating and instantiating REISE.jl, we will probably need to update the documentation for the Native setup and potentially the REISE.jl documentation.

I am working on the documentation. Should we simply drop the adding and deving of REISE.jl in the installation notes? What do you think @danielolsen and @BainanXia?

Sounds good

My understanding of our debugging session was that we would need to activate, then instantiate, then add GLPK (or preferred solver). The add will update the project and manifest toml files, so might also be worth adding common solvers to those to save a step. Also we learned that st or status is basically a bunch of pointers to packages defined by Manifest.toml, so undoing the changes made by adding a solver is immediately reflected in the julia environment. I'm not really sure how dev works, maybe it still does. Also, I think the JULIA_PROJECT environment variable passed by powersimdata is what tells julia to use the REISE environment instead of the default (just wanted to confirm this since we were unclear on that before).

My understanding of our debugging session was that we would need to activate, then instantiate, then add GLPK (or preferred solver). The add will update the project and manifest toml files, so might also be worth adding common solvers to those to save a step.

I went back and retested with Gurobi not being included in the REISE environment and it still worked in both the Native setup and the standalone version of REISE.jl. I think this still works because when packages are imported for the different launchers (as seen in pyreisejl/utility/launchers.py), each solver is specified independently of the REISE module. Perhaps the REISE not found error was being thrown because REISE, as a module, needs to be activated and instantiated whereas the solver packages only need to be added (i.e., present in the list of base Julia packages but not necessarily in the environment)?
@danielolsen, I'm curious about your comment on the commercial solvers being a pain to always install. Wouldn't the package (e.g., the Gurobi package) only need to be installed when you first activate and instantiate REISE? Even on future instantiations, the commercial solver package would probably only need to be reinstalled if its version changed. Do all of the packages in the environment get compiled when you use a particular environment or only when specified (i.e., through import or using)?

Wouldn't the package (e.g., the Gurobi package) only need to be installed when you first activate and instantiate REISE?

My thinking is: we do this every time we test the package. It would be nice to avoid unnecessarily downloading something that won't be used, and can't be used without a license key.

Thanks for clarifying, I hadn't thought about testing.

This issue was closed by REISE.jl PR #174.


Error in glob: glob pattern '**/*.tar.gz' didn't match anything

Globbing error when trying to build an apko image.
ERROR: Traceback (most recent call last):
	File "/private/var/tmp/_bazel_sophiephoon/76c6cae5b629354128e9543a800610a2/external/apko_images_b933654299_unzip_aarch64_6.0-r14/BUILD.bazel", line 4, column 16, in <toplevel>
		srcs = glob(["**/*.tar.gz", "**/*.apk"]),
Error in glob: glob pattern '**/*.tar.gz' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).

Fix suggested here


Add translation format.

These need to pull from translation files not the default site.
ГОЛОС
СИЛА ГОЛОСА
ЗОЛОТОЙ
If i find anymore that need to be added ill update this.

GOLOS
GOLOS POWER
GOLD BACKED GOLOS

Yes those are the translations but the translation files don't have them and they can't be changed in them.

I have updated the files in my pull request to include a format for currency translate.

Closed with coming HF


Attention

adds attention cnp
fixes a bug in model retrieval

closes #220

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.26%. Comparing base (57ee46f) to head (c4c1a09).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #259      +/-   ##
==========================================
+ Coverage   93.76%   94.26%   +0.49%
==========================================
  Files          55       58       +3
  Lines        3097     3313     +216
==========================================
+ Hits         2904     3123     +219
+ Misses        193      190       -3

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Is there a way to lazy load the storyblok client in nuxt?

We don't want to add 110kb to our client in production just to make a few api calls, but it would be acceptable to dynamically lazy load it when required for editing.
We know we can call the api urls directly, but also don't want to loose the great user experience for our editors.

+1

Hello :). By lazy you mean async? Or to have the choice of adding the bridge or api? Or more?

Hello :). By lazy you mean async? Or to have the choice of adding the bridge or api? Or more?

I mean that only the minimal code is loaded for each user's usecase.
Let's say I build a JS bundle for my nuxt app for production. In that bundle there is ideally close to zero code from storyblok, I just want to call some APIs.
Then an editor comes to the app, want's to edit a page. In that case I don't want to give him a separately built JS bundle because this requires extra maintenance.
Instead, the app recognizes that the app now needs additional JS from storyblok to make editing possible. It "lazely" loads it at that moment and enables the cool live-editing UX we all love.

I mean that only the minimal code is loaded for each user's usecase.
Let's say I build a JS bundle for my nuxt app for production. In that bundle there is ideally close to zero code from storyblok, I just want to call some APIs.
Then an editor comes to the app, want's to edit a page. In that case I don't want to give him a separately built JS bundle because this requires extra maintenance.
Instead, the app recognizes that the app now needs additional JS from storyblok to make editing possible. It "lazely" loads it at that moment and enables the cool live-editing UX we all love.

Ok, I think that's what I have understood.
thanks for clarifying :).

Ok, I think that's what I have understood.
thanks for clarifying :).

Has anyone figured this out or is there even an officially recommended way nowadays?

Hi are there any updates on this? Is it in the pipeline? @f3ltron

Hi, @hamsterbacke23 thanks a lot for this issue, I was investigating a little bit the Nuxt docs for modules https://nuxt.com/docs/guide/going-further/modules/#async-modules and I don't see any reference to the possibility of lazyloading modules
What I do see is useLazyFetch which would help you achieve it without the SDK tho.
Fetching is done at https://github.com/storyblok/storyblok-js level, not by the vue or nuxt SDKs so probably this is something that you could request as a feature there if you still interested,
Since sadly is not something we can do at this level, I will close the ticket

Hey thanks for the feedback. I think with the new Storyblok API it might be possible to lazyload editing js client-only, but need to look into it.


BUG: doesnt show search results

When i try to type something in the search engine no search results will show

Is this a duplicate of #209 ?

I believe this is a duplicate of 209


[ZEPPELIN-3403] Zeppelin documentation not pointing to correct url

What is this PR for?
Zeppelin documentation not pointing to correct URL.
Zeppelin documentation is redirecting to http://zeppelin.apache.org/docs//index.html and this URL doesn't exist.
The available doc for 0.8.0 is http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/index.html
What type of PR is it?
[Bug Fix]
What is the Jira issue?

ZEPPELIN-3403

Questions:

Does the licenses files need update? N/A
Is there breaking changes for older versions? N/A
Does this needs documentation? N/A

@zjffdu  Can you help review this.

LGTM

Will merge this to master and branch-0.8 if no more discussion.


Condition inclusion of analytics based on environment

Currently, Academic is including analytics.js conditionally depending on whether hugo is running in server mode or not.
https://github.com/gcushen/hugo-academic/blob/92c1bca1a9f1b53d03fc402796d5aa1b8e5dd68a/layouts/partials/site_head.html#L119)
If the intent is to disable analytics in development, I think it might be worth considering using hugo's support of configuration environments since that might be a better fit.
A couple of ways to do that are

having a production subdirectory in the configuration directory where the analytics id would be specified (instead of being in the base file)
introducing a separate setting to toggle analytics on or off and have that overridden in the production environments (unclear how much better it is than the previous one)

The issue with isServer is that it can't be overridden when developing locally, whereas hugo supports specifying which environment to use via command line flags (e.g. hugo server --environment production) while picking sensible defaults (i.e. hugo server runs with the development environment, while hugo uses production)
Let me know if any of the above does not make sense

Please can you clarify your use case. Why do you wish to execute the analytics script when you run Hugo locally in a development environment?

I added support for custom event reporting via the analytics API and I could not find a way to test this locally without making code changes with the current code setup.

This enhancement will now be included in #1349 .

Sounds good, thanks


Update PutFile.java: fix path traversal vulnerability

Check if filename contains path traversal
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Enables X functionality; fixes bug NIFI-YYYY.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[ ] Has your PR been rebased against the latest commit within the target branch (typically main)?

[ ] Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

[ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[ ] Have you written or updated unit tests to verify your changes?
[ ] Have you verified that the full build is successful on JDK 8?
[ ] Have you verified that the full build is successful on JDK 11?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.

For things which are vulnerabilities the proper handling process is documented here: https://nifi.apache.org/security.html
For this item I am not comfortable with us calling this a vulnerability. The processor by intent allows a NiFi process running as a particular OS user to perform a recursive listing including following symlinks to authorized resources.  If another user with access to that location includes a link which goes beyond that directory this is a reasonable thing.  We could add a property to attempt to prevent such a thing but it would be purely based on managing user intent/expecation/control.  It isn't about a vulnerability.

Sorry to clarify this is not on recursive listing...this is on file placement.  The user nifi runs as will attempt to resolve the directory location specified in flowfile metadata with the actual authorized path on the system.  There are certainly cases where an admin would want such control.  I'd be fine with an option to prevent writing to a different location but we need to not just do it as a default thing.

I agree with @joewitt. I wouldn't call this a vulnerability unless you're running NiFi as root or something (and let's be honest, this is the least of your worries if that's the case).

Thanks for your comments.
Do you agree to add a boolean property witch called "AvoidPathEscapes"?
The default value will be false as @joewitt mentioned.

Yep I am fine with that - perhaps 'prevent' is better than 'avoid'  The display name would be 'Prevent Path Escape' and the name would be 'preventpathescape' or something consistent with how others do it.  Default of false is good.  Description will let the user know the purpose of the property if true is to detect whether the resolved path (including following symlinks) still appears inline with the intended specified target directory.   Where this could be confusing is when the base dir itself is a symlink and resolves to something else.  But the more context you can give the user on the intent and so long as this is purely optional it is fine.

I have done the changes. What do you think?

@joewitt @MikeThomsen What do you think? What are the next steps?

@azgron The current commit includes a checkstyle violation on line 250, causing failures on Linux and MacOS.  The PR checklist includes several steps that will help streamline the review process, including prefixing the PR and commit messages with an associated Jira issue number, adding unit tests, and including a displayName() setting on new properties.  Based on previous feedback, it may be better to close this PR, create a Jira issue, and then create a new PR after working through the applicable checklist steps.


setup.py: wip put up to date

This pr start putting up to date setup.py as well as adding openv-cli to easliy run the cli.

@TimothyClaeys

I'm going to close this PR, okay? I don't think we need it any longer.

Yes!


gpsd 3.20 breaks gpsd_client

with file: gpsd_client/src/client.cpp: I get compile errorss:
gpsd_client/src/client.cpp:88:11: error: no match for ‘operator!’ (operand type is ‘timespec_t’ {aka ‘timespec’})
   88 |       if (!p->online)
      |           ^~~~~~~~~~
gpsd_client/src/client.cpp:88:11: note: candidate: ‘operator!(bool)’ <built-in>
gpsd_client/src/client.cpp:88:11: note:   no known conversion for argument 1 from ‘timespec_t’ {aka ‘timespec’} to ‘bool’
gpsd_client/src/client.cpp: In member function ‘void GPSDClient::process_data_gps(gps_data_t*)’:
gpsd_client/src/client.cpp:156:27: error: cannot convert ‘timespec_t’ {aka ‘timespec’} to ‘gps_common::GPSFix_<std::allocator<void> >::_time_type’ {aka ‘double’} in assignment
  156 |         fix.time = p->fix.time;
      |                    ~~~~~~~^~~~
      |                           |
      |                           timespec_t {aka timespec}
gpsd_client/src/client.cpp:178:22: error: ‘struct gps_data_t’ has no member named ‘epe’
  178 |         fix.err = p->epe;
      |                      ^~~
gpsd_client/src/client.cpp: In member function ‘void GPSDClient::process_data_navsat(gps_data_t*)’:
gpsd_client/src/client.cpp:200:50: error: no matching function for call to ‘isnan(timespec_t&)’
  200 |       if (use_gps_time && !std::isnan(p->fix.time))

last version where it is buildable is 3.18
but with 3.20 got errors related to changes in gpsd
for example:
as mentioned here https://fossies.org/linux/gpsd/gps.h
gps_data_t has changed and has no more a member epe

I'm running into this too. From /usr/include/gps.h:
 * 8.0 - Change shape of rawdata_t.
 *       Remove epe from gps_data_t, it duplicates gps_fix_t eph
 *       Added sep (estimated spherical error, 3D)
 *       Note: Some GPS call eph as epe, others call sep as epe
 *       Add gps_fix_t datum string, and qErr

See #26 for a patch for the epe issue so that gps_umd builds against gpsd-3.19. The other two issues must occur between 3.19 and 3.20.

The remaining issue to support 3.20 is the timespec_t support from gpsd commit:
https://gitlab.com/gpsd/gpsd/-/commit/1d4a09541a18c453c5586e6f57d3eb5fec9526ed#fbec23e759c01a5d296e7d1e3a17e9b131df6ae4

#if GPSD_API_MAJOR_VERSION >= 9
      if (!p->online.tv_sec && !p->online.tv_nsec) {
#else
      if (!p->online) {
#endif
          ROS_WARN("!p->online");
          return;
      }

#if GPSD_API_MAJOR_VERSION >= 9
        fix.time = (double)(p->fix.time.tv_sec) + (double)(p->fix.time.tv_nsec) / 1000000.;
#else
        fix.time = p->fix.time;
#endif

fix.err = p->fix.eph;

Thanks, that looks good to me!


CSGen, SILGen: Fix delegations to Optional initializers

Resolves #57012 and more.
There remains a family of malfunctioning edge cases that I'm not sure what to make of. Specifically, when the constructed Optional value is force-unwrapped:
extension Optional {
  init(nonFailable: Void) { ... }
  init?(failable: Void) { ... }

  init(delegation1: Void) {
    self.init(nonFailable: ())! // this
  }

   init(delegation2: Void) {
    self.init(failable: ())!! // or this
  }
}

extension Optional where Wrapped == Optional<Bool> {
  init(delegation3: Void) {
    self.init(nonFailable: ())!! // or this
  }
}

I guess we should either deal with them using optional injections or ban them.

@swift-ci please test source compatibility

@jckarter ping

I think we should reject those other cases involving Optional that unwrap into the constructed value itself. The ! as part of a self.init(...)! is really only intended to let us delegate from a non-failable to a failable initializer of the same type. It shouldn't be possible to force-unwrap into the constructed value itself in the case where self is Optional.

@swift-ci Please test

Thanks! Will put the addition of a tailored diagnostic for these force-unwraps on my radar.

@jckarter Could this (or maybe just the parts that resolve #57012) be nominated for inclusion in the release at this point?


File upload process not showing in Uppy/Tusd Go

Hi,
File upload process not showing.
Everything works well. But while the file does not load shows 0 and how to complete the download 100 percent, there are no intermediate values.
I do not understand the error in the client or server?
client uppy: 1.9.3,
server:
tusd:v1.1.0 in docker (https://upload.life2film.com/), local file storage
Ubuntu, Nginx 1.14
command: "tusd -behind-proxy --hooks-http http://****:5000/files/upload --hooks-http-retry 1 --hooks-http-backoff 1 -upload-dir /srv/***"

VUE.js
<template>

</template>

example metadata in info
cat ff2944aacfe3d9d3e07d41459d3ab1ee.info
{"ID":"ff2944aacfe3d9d3e07d41459d3ab1ee","Size":398509286,"SizeIsDeferred":false,"Offset":0,"MetaData":{"filename":"VID_20200324_120103.mp4","filetype":"video/mp4","film_slug":"GsvMgvjxuP243qyk3XVZ","name":"VID_20200324_120103.mp4","relativePath":"null","token":"eyJ0e.FIxiPYOTbxNRiht4fuF4DJP7ZSYD-Dlm9nFgrpHXPFo","type":"video/mp4"},"IsPartial":false,"IsFinal":false,"PartialUploads":null,"Storage":{"Path":"/srv/tusd-data/ff2944aacfe3d9d3e0759d3ab1ee","Type":"filestore"}}

How many minutes does the upload for this particular file take?
Also, did you setup Nginx as described in https://github.com/tus/tusd/blob/master/docs/faq.md#can-i-run-tusd-behind-a-reverse-proxy? Especially, the "Disabling request buffering" part.

How many minutes does the upload for this particular file take?
1-2 min.

Also, did you setup Nginx as described in https://github.com/tus/tusd/blob/master/docs/faq.md#can-i-run-tusd-behind-a-reverse-proxy? Especially, the "Disabling request buffering" part.
Yes, i use this

server {
        server_name upload.life2film.com;
        charset utf-8;

        client_max_body_size 1G;
        client_body_buffer_size 1024k;

        access_log                      /var/log/nginx/upload-access.log;
        error_log                       /var/log/nginx/upload-error.log;
        rewrite_log                     on;

        location / {
                proxy_pass http://<IP_ADDRESS>:1080;

                # Disable request and response buffering
                proxy_request_buffering  off;
                proxy_buffering          off;
                proxy_http_version       1.1;

                # Add X-Forwarded-* headers
                proxy_set_header X-Forwarded-Host upload.life2film.com;
                proxy_set_header X-Forwarded-Proto $scheme;

                proxy_set_header         Upgrade $http_upgrade;
                proxy_set_header         Connection "upgrade";
                client_max_body_size     0;

        }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/upload.life2film.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/upload.life2film.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

Are you uploading multiple files at the same time? If so, does the same behavior occur when only uploading a single file?

Are you uploading multiple files at the same time? If so, does the same behavior occur when only uploading a single file?

Yes,  no difference. Any browsers

Does the behaviour also occur when setting the endpoint to Https://master.tus.io/files/?

@Acconut
I still can’t solve this problem ...
but I realized that if use this api "https://master.tus.io/files/" then the problem persists
but if use simple code without django (only html), then it works ...http://uppy-dev.life2film.com/
For all services i use docker-compose and docker.

<link href="https://transloadit.edgly.net/releases/uppy/v1.9.3/uppy.min.css" rel="stylesheet">

Does it mean the proxy settings for the frontend?
upstream dev_ws_server {
    server <IP_ADDRESS>:5016;
}

server {
	server_name dev.life2film.com;
	charset utf-8;

	client_max_body_size 10G;
        client_body_buffer_size 1024k;

        access_log                      /var/log/nginx/sansibay-dev-access.log;
        error_log                       /var/log/nginx/sansibay-dev-error.log;
        rewrite_log                     on;

        location /static {
                autoindex on;
                alias /srv/dev_sansibay/staticfiles;
        }

        location /media {
               #autoindex on;
               alias /srv/dev_sansibay/backend/media;
        }

	location / {
		proxy_pass http://localhost:5006;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $host;
                proxy_redirect off;

	}

	location /websocket/ {
	        try_files $uri @proxy_to_app;
	}

    location @proxy_to_app {
        proxy_pass http://dev_ws_server;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $server_name;
    }

 # managed by Certbot

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/dev.life2film.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/dev.life2film.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {
    if ($host = dev.life2film.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

	server_name dev.life2film.com;
    listen 80;
    return 404; # managed by Certbot

}

I realized that the issue is in HTTPS on the client,
if remove the certificates in nginx and use http, then the upload is normal.
The question is how to do it at the front now over https?

AFAIK the recommended best practice is to implement a reverse-proxy between, in your case, the Vue client app and the Tus instance.
Here is the guidance: https://github.com/tus/tusd/blob/master/docs/faq.md (see first faq).

@netaisllc
Thank you, but it was done, on the side of tusd+nginx+https there is no problem like.
The problem is in the certificate between vue(html) and nginx+https (http no problem).

but I realized that if use this api "https://master.tus.io/files/" then the problem persists

If the problem also persists for master.tus.io then it is quite likely that something in your local network setup does not work properly? Maybe you have a company proxy installed that intercepts HTTPS requests? Does the demo at https://tus.io/demo.html work for you?
Also, can you send a screenshot from the network tab inside the browser's developer console where you see what the HTTP request end up doing?


Cannot open file outside workspace in output window with ctrl-click

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.67.0 (system setup)
OS Version: Windows_NT x64 10.0.19044

Steps to Reproduce:

Open a workspace folder, say /home/juxeii/projects/myproject
Create an empyt file, say gtestLog_testfoo and save this under /home/juxeii/projects/myproject and under /home/juxeii
Create a simple vsc extension and write both file paths to an output channel like so:

const outputChannel = vscode.window.createOutputChannel('MyExt');
const testfileuriBad = vscode.Uri.file(path.join('/home/juxeii', 'gtestLog_testfoo'));
outputChannel.appendLine(testfileuriBad);
const testfileuriGood = vscode.Uri.file(path.join('/home/juxeii/projects/myproject, 'gtestLog_testfoo'));
outputChannel.appendLine(testfileuriGood);

On my extension it looks like this
[5/10/2022, 12:57:31] INFO: Log file: file:///home/juxeii/projects/myproject/gtestLog_testfoo
[5/10/2022, 12:57:31] INFO: Test file file:///home/juxeii/gtestLog_testfoo

The output channel provides two file link, both of which I can click.
But only the first link file:///home/juxeii/projects/myproject/gtestLog_testfoo opens the file, while the second fails:

This occurs both when working with remote ssh on wsl2 on windows, and with a remote linux machine.
Is this intended behavior not letting open files outside the workspace?
The error log in the output window gives Log (Window)
[2022-05-10 13:21:40.864] [renderer3] [error] Error: File not found
    at g.handleSetInputError (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2701:95592)
    at async g.setInput (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2701:94832)
    at async doSetInput (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2699:6429)
    at async doOpenEditor (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2699:4791)
    at async d.openEditor (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2699:3783)
    at async vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2906:16950
    at async C.doOpenCodeEditor (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1360:31342)
    at async m.open (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:594:51701)
    at async open (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:594:53162)

EDIT: open the folder /home/juxeii as workspace root, and I can open the file again. This confirmes that somehow the workspace root is in play here, which has a problem with links in the output window to files outside the workspace.

I actually have the Same problem but this is also Happening when the Problems try to Redirect to the Editor.
It display a "The editor could not be Opened because the File was not Found" Error.
When Checking the Logs:
[2022-05-25 14:26:36.240] [renderer1] [error] Error: File not found     at g.handleSetInputError (vscode-file://vscode-app/c:/Users/lgarcia/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2701:95592)     at async g.setInput (vscode-file://vscode-app/c:/Users/lgarcia/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2701:94832)     at async doSetInput (vscode-file://vscode-app/c:/Users/lgarcia/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2699:6429)     at async doOpenEditor (vscode-file://vscode-app/c:/Users/lgarcia/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2699:4791)     at async d.openEditor (vscode-file://vscode-app/c:/Users/lgarcia/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2699:3783)     at async vscode-file://vscode-app/c:/Users/lgarcia/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2906:16950
So I do have a Workspace with only 1 Folder and the Extension I use are for Saleforce Extension Pack.
Now doing some debugging I did also find that the Folder that is being Tryied to Display Stores on the VS Root Folder rather than taking the Relative Path within the Workspace.
Openning in File Explorer command does also crash and cannot actually show or display the File in question and when I follow the Suggestion of Created a new File it did show me that the file was created on C://relativePath

Does this reproduce when not using remote? I wonder if we need to properly convert file paths for opening when clicking on the output because they originate from the remote and cannot be opened locally. I.e. a file link that gets written to from a remote should result in a vscode-remote link for opening?

@bpasero Yes, it is not dependent on any remote setting. Just create an simple extension with an output channel and write two uri's to it. One within project root and one outside.

I wonder if something with the paths is messed up, when you click "Create File" where does it store the file to?

I recall, it created it locally(in the remote setting) and what was also weird, it also changed from "/" to "" as path delimiter.
Again, I think the output window parser has a problem with files outside workspace root.

I cannot reproduce, even from an empty window, I can open both paths. My extension code:
const outputChannel = vscode.window.createOutputChannel('MyExt');
const testfileuriBad = vscode.Uri.file(path.join('/Users/bpasero/', 'gtestLog_testfoo')).toString();
outputChannel.appendLine(testfileuriBad);
const testfileuriGood = vscode.Uri.file(path.join('/Users/bpasero/Desktop', 'gtestLog_testfoo')).toString();
outputChannel.appendLine(testfileuriGood);

I have a file gtestLog_testfoo both in /Users/bpasero/ and /Users/bpasero/Desktop.

I don't know how to help. I have created an empty extension.
Here is extension.ts
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import * as path from 'path'

// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {

    const outputChannel = vscode.window.createOutputChannel('MyExt');
    const testfileuriBad = vscode.Uri.file(path.join('/home/juxeii/projects/gtest-cmake-example', 'gtestLog_testfoo')).toString();
    outputChannel.appendLine(testfileuriBad);
    const testfileuriGood = vscode.Uri.file(path.join('/home/juxeii/projects', 'gtestLog_testfoo')).toString();
    outputChannel.appendLine(testfileuriGood);
}

// this method is called when your extension is deactivated
export function deactivate() { }

The extension project lives in /home/juxeii/projects/path in an Ubuntu WSL2.
When I hit F5 to debug the extension, a new VSC window opens with a project living in
/home/juxeii/projects/gtest-cmake-example
I created dummy files gtestLog_testfoo both under /home/juxeii/projects/gtest-cmake-example and /home/juxeii/projects.
I can only open the first one form the output window.

Do you have some Windows machine with WSL2 to test?

Thanks for the steps, so it is happening in a remote WSL environment. I suspect that maybe we do some special mapping of the paths for the workspace folder so that files outside of the workspace cannot be opened, but I let Martin chime in as well.

Just for the records: it is not only happening in a WSL environment, but it is the same issue in a remote SSH setting.

I wonder if it is output channel related issue because the files in workspace are being opened. I suspect some where inside while opening the file there could be a validation to not to allow file outside workspace?

I am able to reproduce and believe this is a bug in how we transform URLs. In my testing, only a link that points into a file inside the workspace is being converted to vscode-remote, while links outside the workspace remain file scheme. The link detector should not make assumptions about the location of the file imho.

In my testing, only a link that points into a file inside the workspace is being converted to vscode-remote, while links outside the workspace remain file scheme.

@bpasero The URI converter converts all URIs unrelated if they belong in a workspace or not. I think the difference is explained by this special casing of workspace folders in the output link computer.

@alexdima 🤔 but the link is there even for the non-workspace case, so link detection seems to work, but maybe we do the rewriting conditionally.

Oh I see, the links are indeed different:

the first one is correctly detected as a link inside the workspace and properly handled
the second one is just detected with our default link detector (the same that is used for web sites for example)

As such it makes sense that for the second link we just try to open it.

Turning into a feature as this works as intended currently. We need to expand the output link detection to handle file links if we want to support this scenario.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

Turning into a feature as this works as intended currently. We need to expand the output link detection to handle file links if we want to support this scenario.

Is there any reason why it should not be supported? At least a little documentation about this behaviour would be needed.

Is there any reason why it should not be supported?

Nope, no reason I can think of.

👍


CI CD improvement: set CI CD process, support versioning (WIP)

Hi 👋
Really nice tool! 🎉
The Reason behind
Here are some improvements that might get this project a bit more mature, in terms of versioning and deployment.
My goal is to allow users to install this tool within a CLI command, without the need to download via GitHub assets, as well as to be able to get version updates on the fly.
Example of the end goal
See my other tool for reference

Note
This is still WIP - we need to be able to run the workflows and understand what needs to be fixed.
The release step under .github/workflows/release.yaml should contain the output of the previous step - see the comment there. All assets should be declared by the .releaserc file.

Hey @Avivbens - can you provide more context as to what functionality this enables? Specifically, what does the following mean?

allow users to install this tool within a CLI command

Downloading Go binaries is indeed not the optimal way - perhaps we can consider other alternatives. The ones I'm familiar with are:

distribution through package management tools (brew, nix, apt, etc). This is what most mature tools do, as it also provides an upgrade path for users.
curl-pipe-shell, which isn't always the most secure, but is easy regardless of OS, unless Windows.
Sometimes, direct downloads do the trick (it is a single, statically compiled binary after all)
I assume this PR introduces a way different from the 3 listed above, happy to learn more about it.

Additionally, if we can find a way to avoid adding 8,000 lines of Node package metadata (and ideally, node, in general) - that would be preferred.

Hey @Avivbens - can you provide more context as to what functionality this enables? Specifically, what does the following mean?

allow users to install this tool within a CLI command

Downloading Go binaries is indeed not the optimal way - perhaps we can consider other alternatives. The ones I'm familiar with are:

distribution through package management tools (brew, nix, apt, etc). This is what most mature tools do, as it also provides an upgrade path for users.
curl-pipe-shell, which isn't always the most secure, but is easy regardless of OS, unless Windows.
Sometimes, direct downloads do the trick (it is a single, statically compiled binary after all)
I assume this PR introduces a way different from the 3 listed above, happy to learn more about it.

Additionally, if we can find a way to avoid adding 8,000 lines of Node package metadata (and ideally, node, in general) - that would be preferred.

Sure thing! 👍
Here is a short explanation of what I think might be just as good as needed:
Q1
I think we need to use brew here (or apt for Linux users). It is much more mature.
For that, we still need some version management, which would be acquired by this PR in the future. In this way, we would be able to push new versions via the package managers described above 🎉
Q2
For my own tool, I use curl-pipe-shell due to the understanding that it should be installed even before brew - this is the idea of it. It should set up your machine without any additional stuff needed (under the hood would also install brew).
For cz - no need for such a thing.
Q3
It could be, but probably a lot easier to allow pushing releases by the CI / CD, and allow brew or any other package manager to grab the suitable binary by the machine type.
Q4
Well, I see your point. We can come up with some alternatives, but as far as I know - NodeJS for CI / CD is so easier than any alternative. GitHub itself provides some native features only with JS. This is not a production code, but just some dev tools, so I think it is just fine to use them (semantic-release is super handy from my experience)

LMK how can I change things so it'll fit into your vision 🎉


[Question]

Hi,
I never once entered location - so how does it know what precipitation values to use?
Thanks!

Gah, forgot to add a title. Can't edit one in. Sorry!

it takes the Home Assistant lat/lon as the location.


Button icon justification

Description
This PR ensures that buttons are justify-center by default, and any time an icon is used alongside text, that button has margin-left: auto; which justifies the icon right, and the text left.

@lauchness is this correct?

@lauchness is this correct?

Nope
Looking at this now

@wilsoncusack fixed


typo stops special fx

just a typo ruins the best part.
i love you, always keep working hard.
never forget me.

Thanks for the PR!


Allow multiple queues per worker configuration

Take a look at this enhancement.  This change allows for you to run multiple queues for a given worker application.
In my use case, I run multiple SAQ workers as a component of an "Agent" daemon that runs on groups of servers.  Each API process can service multiple groups of the agent workers.  This allows me to send tasks to particular groups of workers or create a "high priority" worker queue in addition to the default.

Nice, I just started thinking about this yesterday as I worked through exposing the job configs. An easy way to scope the keys beneath the application slug makes a lot of sense!

Closing in favor of #227 (changing base branch - using semantic releases makes me want to group commits into a release branch if I have a few things to work on. I still have work to do on a good default workflow for this).


Nccopy was overriding default chunking when it should not.

Fixes https://github.com/Unidata/netcdf-c/issues/1398
re: esupport NDY-294972

The new chunking code added to nccopy missed one case.
In the event that there are no chunking specifications
of any kind, and the input is not netcdf-4, and the output
is netcdf-4 and must be chunked, then use the default chunking
that the library computes as part of the nc_def_var() function.
Misc. changes:

add some chunking debug code to hdf5var.c

Thanks Dennis!


Invalid image kills thumbnail creation

Hi,
I was running sigal build and noticed that it died on thumbnail creation when the image file was not a valid image file. What had happened, was that the offending image was accidentally replaced with a text file, only the with the name of the original image file.
The failure occurred in image.py's generate_thumbnail-function when it ran the line
img = PILImage.open(source)
I think that a simple try-exceptaround that area would be OK, no need for a fancy rollback, just log the offending file name, or something alone those lines.

Hi,
Which version of sigal are you running ? This case should be handled in the latest version at least.
If you are using the latest and still have the error, can you run in debug mode and paste the full log ?
Thanks

Hi,
I have an Ubuntu 14.04.1 LTS system, and sigal 0.9.1 was installed via sudo pip install sigal.
Here's the log. When I try-excepted the offending PILImage.open(source) and just returned from there, after a image failed -message, the processing went fine.
INFO - Reading settings ...
DEBUG - Settings file: sigal.conf.py
DEBUG - Rewrite source : torpantie -> /raid/home/juruotsa/Pictures/torpantie
DEBUG - Rewrite destination : _build -> /raid/home/juruotsa/Pictures/_build
DEBUG - Settings:
{'albums_sort_reverse': False,
 'autorotate_images': True,
 'colorbox_column_size': 4,
 'copy_exif_data': False,
 'destination': u'/raid/home/juruotsa/Pictures/_build',
 'files_to_copy': (),
 'google_analytics': '',
 'ignore_directories': [],
 'ignore_files': [],
 'img_processor': 'ResizeToFit',
 'img_size': (800, 600),
 'index_in_url': False,
 'jpg_options': {'optimize': True, 'progressive': True, 'quality': 85},
 'keep_orig': True,
 'links': '',
 'locale': '',
 'make_thumbs': True,
 'medias_sort_attr': 'filename',
 'medias_sort_reverse': False,
 'orig_dir': 'original',
 'orig_link': False,
 'output_filename': 'index.html',
 'plugin_paths': [],
 'plugins': [],
 'source': u'/raid/home/juruotsa/Pictures/torpantie',
 'theme': 'galleria',
 'thumb_dir': 'thumbnails',
 'thumb_fit': True,
 'thumb_prefix': '',
 'thumb_size': (280, 210),
 'thumb_suffix': '',
 'title': '',
 'use_orig': True,
 'video_size': (480, 360),
 'webm_options': ['-crf', '10', '-b:v', '1.6M', '-qmin', '4', '-qmax', '63'],
 'write_html': True,
 'zip_gallery': False,
 'zip_media_format': 'resized'}
INFO -       Source : /raid/home/juruotsa/Pictures/torpantie
INFO -  Destination : /raid/home/juruotsa/Pictures/_build
INFO -        Theme : galleria
DEBUG - Plugin paths: []
INFO - Using 1 cores
DEBUG - Albums:
[<Album>(path='.', title=u'torpantie')]
INFO - Processing /raid/home/juruotsa/Pictures/torpantie/./empty.jpg
Traceback (most recent call last):
  File "/usr/local/bin/sigal", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sigal/__init__.py", line 133, in build
    gal.build(force=force)
  File "/usr/local/lib/python2.7/dist-packages/sigal/gallery.py", line 601, in build
    process_file(media_item)
  File "/usr/local/lib/python2.7/dist-packages/sigal/gallery.py", line 638, in process_file
    ret = processor(*args[3:])
  File "/usr/local/lib/python2.7/dist-packages/sigal/image.py", line 156, in process_image
    fit=settings['thumb_fit'], options=options)
  File "/usr/local/lib/python2.7/dist-packages/sigal/image.py", line 119, in generate_thumbnail
    img = PILImage.open(source)
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 2028, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file

Hmm interesting, if I understand correctly your traceback, the exception is raised in https://github.com/saimn/sigal/blob/master/sigal/image.py#L155, but it should have failed a few lines before (https://github.com/saimn/sigal/blob/master/sigal/image.py#L149) and the exception would be catched in this case.
I cannot reproduce this behavior, maybe you can take a look to see why it isn't failing in generate_image (L149) ? Do you have an empy.jpg file generated in the output directory ?

Hi,
Sure I can test this tonight when I get back home from work.

Ah indeed, with these options the image is not read in generate_image and that's why it fails after inside generate_thumbnail. I saw your pr, thanks for your time to have worked on this, but I will push another fix soon.


Cannot set extra parameters while using api search

Hey, I have been using semantic ui recently only, and I wanted to make a search call based on the input val and another parameter which has also been dynamically set.
But I am unable to do so in Semantic.
apiSettings: {             url: HOST + 'api.example.com?action=get-stuff&search_param{query}&date=' + window.date         }
And this is not working as it is always taking the default value of window.date which is being dynamically set everytime. I also tried to modify the value of {query} variable here but that is not working either

Hi @shubh3794, can you please fork this JSFiddle to show the front-end that you wrote?


Outdated version on crates.io

"Last Updated
10 months ago"

While I would still recommend pulldown-cmark for the time being I'll try to get this updated on crates.io...


firebase-app-distribution 1.0.0

New Pull Request Checklist
Please mark the points which you did / accept.

[x] I will not move an already shared step version's tag to another commit
[x] I read the Step Development Guideline
[x] I have a test for my Step, which can be run with bitrise run test (in the step's repository)
[x] I did run bitrise run audit-this-step (in the step's repository - note, if you don't have this workflow in your bitrise.yml, you can copy it from the step template.)
[x] I read and accept the Abandoned Step policy

Hi @d-date,
I’m from Bitrise. Apologies for jumping in late. We’ve been working with another user on a community step (https://github.com/bitrise-io/bitrise-steplib/pull/2152) for some time earlier and was planning to release it on Monday.

 Although your contribution is much appreciated, we decided to pull in the other step for the following reasons:

Step test CI is set up for both platforms
Step does input validation
Step employs our usual step practices, such as config printing, colored logging

Sorry for the awkward situation.

Hi @koral--,
Thanks for your efforts in the review of the PR. Sorry for the inconvenience. :(


Update the QA repo in GitHub with the BrowserStack logo and get the free licenses

Describe the issue
BrowserStack will provide 5 free licenses to any Open Source GitHub project that displays their logo in their ReadMe.md file.  One needs to do this first, then ask BrowserStack for the free license.
Additional context

See example https://github.com/bcgov/mds (see bottom of this page)

Definition of done

Copy the code from the MDS readme and apply to the https://github.com/BCDevOps/aws-sea-autotest repo

This respository contains a library of GitHub Actions to help  integrate test suites with the BrowserStack device cloud.
https://github.com/browserstack/github-actions

Successfully enrolled  the https://github.com/BCDevOps/aws-sea-autotes site to BrowserStack free program

Modified ReadMe file to incorporate the logo
https://github.com/BCDevOps/aws-sea-autotest/blob/main/README.md


Custom Eval Engine

This pull request...

[X] Fixes a bug
[X] Introduces a new feature
[ ] Improves an existing feature
[ ] Boosts code quality or performance

Description
Allows setting the eval engine in the config, and adds an error message if the provided engine does not exist
Purpose
Later versions of Java don't include the Nashorn engine; this PR allows setting the engine to be used.
Relevant Issue(s)
This PR closes issue #1501, #945

This is technically good-to-go but I feel like I want to change how we do things in the config just a little bit:
Instead of:
eval = true
evalengine = "Nashorn"

I'd like to do:
eval {
  enabled = true
  engine = "Nashorn"
}

However, this would cause backwards-compatibility issues that I'm not immediately sure how to solve. We'd need to investigate how HOCON handles overrides when the data type changes entirely.

I'm going to opt to continue with how we currently do things, without nesting. I still think we might want to make this change later, but maybe all at once as part of a 'config update'


➕ 🏷  Add Cost Allocation Tags

Raised in relation to this ticket.
TLDR: required to consume Cost Allocation Tags in the Cost and Billing Explorer.

Closing as pick up in other PR


feat: auto fetch latest articles in news API

What type of PR is this? (check all applicable)

[ ✅ ] 💡 Feature
[ ] 🐛 Bug Fix
[ ] 📝 Documentation Update
[ ] 🎨 Style
[ ] 🧑💻 Code Refactor
[ ] 🔥 Performance Improvements
[ ] ✅ Test

Description

feature: auto fetch latest articles from sources
Fixes #192

Screenshots (if appropriate)

Added tests?

[ ] 👍 yes
[ ] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help

Added to documentation?

[ ] 📜 README.md
[ ] 🙅 no documentation needed

Also you can remove --detectOpenHandles in package.json -> test: jest --detectOpenHandles so that it will force exit jest. Read more here.

Well spotted @TAKANOME-DEV !! Very glad to have you around my man :pray:

Also you can remove --detectOpenHandles in package.json -> test: jest --detectOpenHandles so that it will force exit jest. Read more here.

Well spotted @TAKANOME-DEV !! Very glad to have you around my man :pray:

Maybe it's time to give a go #182 so that tests will run on PR and Push :+1:

hi @MizouziE @TAKANOME-DEV I have made the requested changes.

Nice one @chinmaykumbhare it looks great!
Also thanks for giving the new test workflow a tryout 😅


Fixed broken reference to utils/Meta

I ran the build and the tests. This should fix the problem I'm having.

👍


Appstudio update test-component-pac-qpxd

Pipelines as Code configuration proposal

Pipelines as Code CI/test-component-pac-qpxd-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
9 seconds
appstudio-init

✅ Succeeded
14 seconds
clone-repository

✅ Succeeded
16 seconds
sast-snyk-check

✅ Succeeded
16 seconds
appstudio-configure-build

✅ Succeeded
33 seconds
build-container

✅ Succeeded
21 seconds
sanity-inspect-image

✅ Succeeded
22 seconds
deprecated-base-image-check

✅ Succeeded
23 seconds
sbom-json-check

✅ Succeeded
16 seconds
clair-scan

✅ Succeeded
50 seconds
clamav-scan

✅ Succeeded
14 seconds
sanity-label-check

✅ Succeeded
11 seconds
sanity-optional-label-check

✅ Succeeded
6 seconds
show-summary

Pipelines as Code CI/test-component-pac-qpxd-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
10 seconds
appstudio-init

✅ Succeeded
18 seconds
clone-repository

✅ Succeeded
16 seconds
appstudio-configure-build

✅ Succeeded
16 seconds
sast-snyk-check

✅ Succeeded
33 seconds
build-container

✅ Succeeded
18 seconds
deprecated-base-image-check

✅ Succeeded
44 seconds
clamav-scan

✅ Succeeded
12 seconds
clair-scan

✅ Succeeded
20 seconds
sanity-inspect-image

✅ Succeeded
19 seconds
sbom-json-check

✅ Succeeded
15 seconds
sanity-label-check

✅ Succeeded
16 seconds
sanity-optional-label-check

✅ Succeeded
8 seconds
show-summary


Explore: "Load more" and "error occurred while loading images"

In Explore (both Featured and Uploaded via mobile) used to show more pictures simply by scrolling.
In master, instead a "Load more" button appears after the first 10 pictures. Even worse, tapping that button shows "error occurred while loading images" and does not load pictures.
The ideal behavior (which was happening until a month or two ago) is to endless scrolling: automatically load more images each time the user nears the bottom.

Hi @nicolas-raoul can I work on this ?

@nicolas-raoul this issue is visible on production app. In the beta flavour, am getting 4 fixed images. And no 'Load more' button. Can you suggest how can I recreate ?

@bosankus Maybe you are using the testDebug flavor?
If yes, you should have more luck with the prodDebug flavor.

Hi @nicolas-raoul , I was able to reproduce the issue.
I was able to see that in abstract class PagingDataSource<T> under method performWithTryCatch(function: () -> Unit), I was receiving java.lang.IllegalStateException: closed.
Reason:

As per documentation, if we use response.body().string() method then connection will be closed and response wont be consumed.
Also adding try block to store rsp.body() and throw IOException is probably a redundant step, when we are already getting the response body rsp.peekBody(ERRORS_PREFIX.length()).

Old Code I am referring to : https://github.com/commons-app/apps-android-commons/blob/6dec69147fa78d7ced3c4546a403ed59ca7e043b/app/src/main/java/fr/free/nrw/commons/OkHttpConnectionFactory.java#L89
New Changed code: #5122

You are right, I do not see the same error anymore. Thanks for pointing out!


Invoke a function defined in a required decision/BKM

I can invoke a function that is defined in a required decision or BKM, for example, in a context.
See also https://github.com/dmn-tck/tck/blob/master/TestCases/compliance-level-3/0031-user-defined-functions/0031-user-defined-functions.dmn
Note that the existing test is not correct. It invokes a function that is different somewhere else.

Invoke function from

required decision with function literal or function definition: decisionName()
required decision with context: decisionName.fun()
required BKM (with function literal or function definition) : bkmName().fun()

Related TCK tests:

0030-user-defined-functions
0031-user-defined-functions
0092-feel-lambda


about raw results

Hi,
I want to cite this work and make some comparisons. Could you provide the raw results?
I also notice that you have included TNL2k in your code.
Have you re-trained the model using this dataset?
Could you provide the new model and the evaluation result on this dataset?

I didn't train the model on TNL2K. I will upload the raw results once I get back from my internship. (around September)

BTW, the TNL2K have a lot of scene cut cases, and the current model is not performing very well on those cases.


Update Upgrading.md

the linked repo can help significantly ease the upgrade process.

Thanks! We're going to improve this process soon.
cc @ncuillery
@facebook-github-bot shipit


Add reservation-based methods

Add computeIfAbsent, computeIfPresent, compute
I have a suspicion that ReservationNode could also be used to implement an Entry-API like the one on std::collections::HashMap, so that may be worth looking into.

I've been thinking about the entry API considerably over the last few days, thinking through the outstanding problems with the API proposed. To reiterate the issues outstanding as I see them, they are:

Locks are taken out on the entire bin (not just for the single BinEntry) and held by the Entry until the Entry is dropped
Misuse of the entry API can cause a deadlock on the current thread

IMO more sophisticated deadlocks scenarios which could be contrived which span coordination across multiple threads should not be considered in any solution and simply documented that they can occur. Due to the Entry requiring a hold on a Guard to work, it will automatically be !Send and !Sync so a user would need to go out of their way to deadlock in this situation.
I have not been able to think of a solution to the first problem. I think if there was a straight forward way to only allow the single BinEntry to be locked and still allow for inserts and removals, the Java ConcurrentHashMap would already be using it.
In terms of the misuse of the entry API, I don't think its possible to prevent via the type system but it could detect the misuse at runtime and panic using a reentrantlock.
Given these outstanding problems, I'm thinking it may be better to avoid the entry API, at least for now, and build APIs similar to those on the Java API:
impl HashMap {
    pub fn insert_if_absent<'g>(&'g self, key: K, value: V, guard: &'g Guard) -> Option<&'g V> {
        todo!()
    }
    pub fn compute_if_absent<'g, F: FnOnce() -> V>(&'g self, key: K, value: F, guard: &'g Guard) -> &'g V {
        todo!()
    }
    pub fn default_if_absent<'g>(&'g self, key: K, guard: &'g Guard) -> &'g V where V: Default {
        todo!()
    }
}

At least the insert_if_absent has a benefit for existing anyway irrespective of the entry API as it can allow for lock-free insertion under the happy path which the entry API cannot achieve.

@jhinch Sorry it took me so long to get back to this -- yes, I agree with you, we should probably stick with the Java API for now. I think deadlocks are just as likely (people will end up doing something blocking in the compute_if_absent method), but it's maybe slightly less likely.
One alternative is to implement an internal entry-based API, and then for the time being just expose the Java-like versions. I think that should be about the same complexity.

No worries. Thanks for your response! Sounds like a plan then. I might take a look over the next few days. If no one hears from me over the next week, I likely haven't had the time and people should feel free to go ahead and pick this up.


Swapping between a file and a Markdown file causes the Markdown to scroll up each time

Issue Type: Bug
As per the embedded GIF below:

Create an untitled file. Create another untitled file, set to Markdown language.
The Markdown file should have a few dozen lines, to easily test. Scroll down near the bottom.
Swap between the two files, using Ctrl-Tab. Each time you focus on the Markdown file, it will scroll up a few lines.

This started happening since VSC 1.57. All extensions disabled.

VS Code version: Code 1.57.0 (b4c1bd0a9b03c749ea011b06c6d2676c8091a70c, 2021-06-09T17:22:31.215Z)
OS version: Darwin x64 19.6.0
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz (8 x 2300)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
2, 3, 3

Memory (System)
16.00GB (0.18GB free)

Process Argv
-psn_0_187781898 --crash-reporter-id 33166f13-0cd4-4333-aabf-41b2210e787b

Screen Reader
no

VM
0%

Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt678:30270856
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30311713
vspre833:30267464
pythonptprofiler:30281270
vshan820:30294714
vscoreces:30290705
pythondataviewer:30285071
vscus158:30286553
vscgsv2:30307504
vscorehov:30309549
vscod805cf:30301675
binariesv517:30312825

I'm having this same—or a very similar—bug after updating to 1.57.
When I am editing the same Markdown file open in two panes of split view, the scroll position seems to be linked. Note: this is editing in two panes, not an editor and a preview pane. For instance, I'll have the same file open in two panes when I'm writing an academic paper in markdown and want to easily compare the introduction and the conclusion.
Let's say the left pane is scrolled to line 10 of the introduction, then I go into the right pane and scroll down to line 300 in order to edit the conclusion. When I click onto the left pane again, the scroll position jumps down to line 300, even though the cursor in that pane will stay at line 10 (or wherever it was previously). It will also select a lot of the text in the middle.
I'm pretty certain that 1.57 introduced this behavior. I usually have the same file open in two panes like this since I use VS Code as a bullet journal / task manager as well as a standard code editor, but I've never seen this behavior until right after updating. I can't find any scroll position or other settings that will stop it, so I don't think it's an intended behavior.

I can reproduce:
Splitting on the same Markdown file (such that you have the same file open in a horizontal split or vertical split) will have the behavior @ryan-p-randall reports. That is, even if you have scrolled independently to different points of the file in the two splits, when you switch from one split to the other, the scrolled position is matched, regardless of where you were. This makes simultaneously editing two parts of the same Markdown file impossible. I can also confirm that the cursor position is not changed even when the display position is updated.
I can further specify that this appears to be unique to Markdown files. The same behavior is not observed with plain text files or Org files, or any other filetype I have tried other than Markdown (.cs, .py, etc.)

My system info:

I too am pretty sure 1.57 introduced this issue, but I can't be positive. I know things didn't used to be this way (i.e., Markdown files behaved like all other files in this regard), but I only noticed it yesterday, so I can't be more specific than that. I can verify that older version(s) of VSCode don't have the same problem, though. The version of VSCode on my company-IT-controlled work laptop is 1.56.2, and the problem is evidently not present on that version.
I've reproduced the issue on my computer even after clearing all settings and removing all extensions, and also reproduced it on a colleague's computer stock -- downloading VSCode 1.5.7 for the very first time on that computer.

@andreamah Can you please check if this is the same issue as #126178

Yes, the issues should be related to #126178 and will be fixed in #126293.


Discussion for merge of API with command

Please leave a comment after your finish a certain API(e.g on model)
If can, please state your api method
Also, please enter your forecast command format.
@bluein-green @scottljw @Lunastryke

Analysis APIs updated:

analyseRevenue - format: revenue
analyseProfit - format: profit
(originally there: analyseCosts) - new format: costs

For the above commands, I'll be adding an enum class for the parser to choose between analysis for: day, week, month.
additional parameters in command:

day: (none)
week: -w
month (meaning 30 days): -m

See my PR (later) for the enum class.

hmmm , for example , analyseRevenue -m, which api should I call? analyseRevenue()? how do it know it is by month?


manual_optimization does not work with dp

🐛 Bug
We can run dp backend with manual optimization, but the gradients seem to be messed up hence the model can't learn anything.
To Reproduce

Change optimization to manual in basic gan bolt, then change the backend to dp.
Set batch_size = 2, compare experiments on 1 GPU vs 2 GPUs
When using 1 GPU everything is fine, but using 2 GPUs will fail the training.

I haven't really test it yet, but since I've done many experiments on my own implementations (which is too heavy to paste them here and hard to extract), I think it should be able to reproduce.

Expected behavior
Performance under 2 GPUs with dp backend should be identical to the 1 GPU one.
Environment
(Should be ) Any.
Additional context
This bug comes from my experiments on GANs but should be affecting other models as long as the manual optimization is utilized.

Hey @carefree0910,
manual_optimization with more than 1 gpus is broken right now. We are working on fix.
We apologise for the inconvenience.
Best regards,
T.C

@carefree0910 mind trying master? this might have been fixed with https://github.com/PyTorchLightning/pytorch-lightning/pull/4976

I'm quite busy these days so I hardly have time to test it 😭
Since the problem should be a general problem, I think it should stand out on ordinary GANs if the issue remains. Anyway I'll try it out ASAP!

Feel free to reopen if needed!

Feel free to reopen if needed!


change occurences to the word "share" to "publish"

proof-read (including inflections)

Closing because of module refactoring


If it's in the same channel with you can @ it  or you can just DM it which is what I do mostly.
For the public version I just restricted what channel it was at


Automated Package Upgrade

:tada: This PR is included in version 5.3.57 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


More instructions about exclude_from_externals

Hi @halt-hammerzeit,
Thanks for this awesome lib first.
I ran into a problem when my app requires some css file from a library in node_modules, it has taken me quite some time to figure out exclude_from_externals can deal with this
(I had to look in to server configuration.js's source code, seen your comments there)
From the docs I read, I can understand its about webpack, people shall learn this setting from webpack docs, but still a little more instructions can make people aren't webpack experts like me 's life easier
maybe something like:
When requiring non-js files from node_modules, you must mark them as non-external so webpack buildings for server side can process them

Hello.
exclude_from_externals option is described in the README, but it is only described for the use case of JS files.
I didn't think that someone would use it for CSS.
I have updated the README with your suggested instructions

Looks great to me, thanks


About training time

Hi, Thank you for your impressive work!
I started training on 8 V100s with all default Settings and the following command, showing that training time for 100 epochs takes one week, is this normal?
accelerate launch --mixed_precision fp16 --gpu_ids all --num_processes 8 --num_machines 1 --main_process_port 29501 tools/train.py +exp=224x400 runner=8gpus

I noticed that you mentioned that 2s/it speed is relatively normal, is there some problem with my 5s/it speed on the V100?Everything followed the default Settings.
If I try the cache files in h5 format for BEV maps, Will the speed be increased to 2s/it？

Duplicate with #14, #9
Let me be specific. If there is existing issues for the same problem, please use it. Opening new issues is really annoying and hard for others to locate the correct place for follow-ups.
Thank you for your understanding.

I'm terribly sorry, I think I misunderstood you just now.