Password protected project errors

Password protected projects are showing the login page like this:

If I roll back this commit about workspace branding then these errors don't show & the page works as expected.

@FayCross I was wondering if this might have been a php version issue but I just created a quick test file on xot.xerte.org.uk and set that to password protected and sure enough that shows the same problem https://xot.xerte.org.uk/play.php?template_id=183

login_library.zip
@FayCross can you try the attached login_library.php and confirm if that resolves the issue?

Thanks Ron - yes that removes the errors but I can't check right now whether actually logging in still works (only have access to my xampp version right now)

Thanks @FayCross I've committed the change and hopefully @torinfo can quickly check that all is correct?
I've tested the revised file on one of my sites that was showing the same errors and the commit fixes the issue and allows login to view the LO. However this is not something I have used very often or encouraged others to use and I think we need to have a look at how this looks and works for a future release.

@ronm123 I could reproduce as well. I don't see your commit yet, so cannot comment yet.

@torinfo https://github.com/thexerteproject/xerteonlinetoolkits/commit/96bf73f3ef27f5254aff37b9b900c3c957b60d20

@ronm123 @FayCross COmitted alternate fix that sill loads branding.css. Otherwise braning.css would not be loaded in the normal case of login, i.e. with Db authentication

@torinfo I committed a tiny change to your updated file just adding a space between the password string and the input field.
I think the language string where it currently says login area should probably change unless this is used somewhere else too? If's it's only used for LOs set to password protected then perhaps the language string should change to something like:
To view this project please login.
Also the styling of this login area seems like it dates back to very early styling. If I add the following to a branding.css file it works fine:
#playitcontainer {     padding: 10px;     background-color: #4D585E !important; } .top_left.sign_in_TL.m_b_d_2_child {     background-color: #EDEDED !important; } .bottom_left.sign_in_BL.m_b_d_2_child {     padding: 10px; }
But when I tried adding that to frontpage.css it didn't seem to have any effect?

For reference this is what it looks like now:

and with the additional css

@ronm123 I'll have a look. The function login_prompt is used for the login of password protected LO's. The function login_form is for the regular login.


UserDefindedLogicalNode::from_template does not return a Result<...>.

Is your feature request related to a problem or challenge?
This is really a feature request but more of a question.
Currently UserDefinedLogicalNode::from_template only returns Arc<dyn Self> but i have noticed that LogicalPlan::with_new_exprs does return a Result. So when it calls from_template on an Extension node, it just wraps it in an Ok().
In the example of UserDefinedLogicalNodeCore where TopK is implemented, the implementation of from_template first asserts the inputs and exprs.
I have also tried to implement a custom LogicalPlan node and my own implementation of from_template also has several error cases (not just asserting the new values) which i unfortunately have to unwrap.
Is this expected behaviour, or is it maybe nicer to return Results
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response

I agree it would be much better to change the API and return an Result<..>
Thank you for the report

I don't see this as a really difficult API change. Is it ok if I do this?

I don't see this as a really difficult API change. Is it ok if I do this? Edit: there is a PR already,did not see it, sorry.

@lewiszlw  beats us to it!
(BTW if anyone wants a workaround for this in older versions that does not requier a panic, they could potentially return a node that would generate a runtime error if the arguments to from_template didn't error)


Image cell focus state improvements

Fixes

Fixes #1004 by @zackkrida
Description

This PR makes several improvements to the ImageCell component:

Adds a pink focus ring
Unifies the hover/focus state that shows the CC license icons
Renames to VImageCell. The existing VImageCell in the VAllResults grid is reamed to VImageCellSquare.
Removes unnecessary custom styles
Removes the unused shouldContainImage prop
Gives the license icons the correct color in the production build
Updates the gap between images in the VImageGrid to match the VAllResults grid

This PR also makes it quite evident that we should be able to unify the two image cell components, with an aspect-ratio prop for switching between square and aspect ratio appearances. The differences should be pretty straightforward to extract into a composable and some conditional logic in the template; I'll create a new issue for that as well.
Finally, this PR adds an offset to the BoxAudio focus ring, to match the ImageCell components.
Screenshots

Testing Instructions

pnpm build && pnpm start, then bavigate through the All results and image views via keyboard. Observe:

Correct focus states for  images and boxed audio
Correct icon color

Look at related images and verify correct styles there too.

Checklist

[x] My pull request has a descriptive title (not a vague title like Update index.md).
[x] My pull request targets the default branch of the repository (main) or a parent feature branch.
[x] My commit messages follow best practices.
[x] My code follows the established code style of the repository.
[x] I added or updated tests for the changes I made (if applicable).
[x] I added or updated documentation (if applicable).
[x] I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

LGTM from a technical perspective. Tested on FF on Linux and Chromium and Chrome on Windows. Can someone confirm a test in Safari?

@panchovm updated the size!

@sarayourfriend I noticed that on search-staging.openverse.engineering and localhost, I can't even tab through image results 😬! On all results, it skips to tabbing between the audio items. On the image only grid it jumps straight to the load more button.
Since that doesn't relate to this PR, I'll make a new issue ASAP.
Edit: Actually, it's safari in-general, not specifically voiceover!

Ah, okay, when I enable Preferences > Advanced > Press tab to highlight each item on a page" in Safari, it reads the image titles perfectly!

Unfortunately on macOS you have to enable a few different settings to get the OS to behave as expected for keyboard navigation :confused:

should we add a tabindex to all of our links then?

If we can make the site work as expected without having to rely on users enabling OS level preferences (aside from the basic "use keyboard navigation" one that is disabled by default) that would be ideal. Please do create another issue for that if you think it's possible.

@WordPress/openverse-frontend if folks can review this Monday, I think it would be good to merge prior to the deploy, since it fixes an accessibility problem.

It looks great on desktop and mobile.
A nitpicky comment. The internal border goes inside the image area, masking it with its 3px white border. As seen in the horizontal and vertical rules of this image.
However, the comment above should not block its merge, and we can make the change in the future.


Api not available error for az vm list-ip-addresses

root@api-b-1-stage-cae-vm:/home/ubuntu# az vm list-ip-addresses --ids /subscriptions/XXXXX/resourceGroups/Api-B-Stage-Cae-Rg/providers/Microsoft.Compute/virtualMachines/Api-B-0-Stage-Cae-Vm /subscriptions/XXXXX/resourceGroups/Api-B-Stage-Cae-Rg/providers/Microsoft.Compute/virtualMachines/Api-B-1-Stage-Cae-Vm
/subscriptions/XXXXX/resourceGroups/Api-B-Stage-Cae-Rg/providers/Microsoft.Compute/virtualMachines/Api-B-0-Stage-Cae-Vm: "APIVersion 2019-04-01 is not available"
/subscriptions/XXXXX/resourceGroups/Api-B-Stage-Cae-Rg/providers/Microsoft.Compute/virtualMachines/Api-B-1-Stage-Cae-Vm: "APIVersion 2019-04-01 is not available"

root@api-b-1-stage-cae-vm:/home/ubuntu# az vm list-ip-addresses
The command failed with an unexpected error. Here is the traceback:

APIVersion 2019-04-01 is not available
Traceback (most recent call last):
  File "/opt/ansible/env/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/ansible/env/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 603, in execute
    raise ex
  File "/opt/ansible/env/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 661, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/ansible/env/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in _run_job
    six.reraise(*sys.exc_info())
  File "/opt/ansible/env/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
  File "/opt/ansible/env/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 631, in _run_job
    result = cmd_copy(params)
  File "/opt/ansible/env/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 305, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/ansible/env/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 485, in default_command_handler
    return op(**command_args)
  File "/opt/ansible/env/lib/python3.6/site-packages/azure/cli/command_modules/vm/custom.py", line 777, in list_vm_ip_addresses
    nics = network_client.network_interfaces.list_all()
  File "/opt/ansible/env/lib/python3.6/site-packages/azure/mgmt/network/network_management_client.py", line 2022, in network_interfaces
    raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2019-04-01 is not available

To open an issue, please run: 'az feedback'

root@api-b-1-stage-cae-vm:/home/ubuntu# az --version
azure-cli                         2.0.71

command-modules-nspkg               2.0.3
core                              2.0.71
nspkg                              3.0.4
telemetry                          1.0.3

Python location '/opt/ansible/env/bin/python'
Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

working in 2.0.71 - closing

Could you add --debug to the end of your command and provide the output? Thanks.


Exclude examples specified by several values of the same tag

Exclude examples specified by several values of the same tag
There should be the ability to do rspec --tag ~type:model --tag ~type:controller and have rspec understand it should exclude {:type =>['model', 'controller']}
Your environment

Ruby version: 2.5
rspec-core version: 3.8

Expected behavior
RSpec outputs Run options: exclude {:type=>['model', 'controller']}
Actual behavior
RSpec outputs Run options: exclude {:type=>"controller"}
(The last flag overrides the previous ones)

This is a duplicate of #1622 the current behaviour has always been AND not OR, see discussion there and possible feature extensions.


Zlef/en 36401/dbq socket timeout 2

[x] styleCheck passes
[x] unit tests pass
[x] integration tests pass
[x] manual tests pass
~- [ ] API docs updated~

This build looks good.

This build looks good.

This build looks good.

This build looks good.


remove old docstring info, unneeded pylint suppression

minor cleanups...
ready for review.

Looks good to me.

@galbramc, it looks like this is failing due to recently added git status check

Indeed it is. So do you consider this a real or fake error. From what you told me earlier this means there is some sort of error with the examples. I have not added the test to gpki_Push, but the error is in the master branch so all PRs will fail with this test.

What order are the solvers tested? I'm guessing it's either the mosek interface or mosek_ci. That is falling. I added the check to depends as well, but it looks like the last solver is overwriting the incorrect results with correct ones.

Oh, yeah, that's the problem -- we generate the examples output with a specific solver (cvxopt). So the git status check should happen on the cvxopt machines only.
the ouput can be different for mosek due to numerical precision.

test this please
Only the cvxopt solver now checks for modified files

Sines this is a cleanup PR, maybe the handful of pylint warnings in the gpkit/test folder could be fixed? Suppress or move import statement warnings?

Nice. Fixed another 10 warnings!
Of course, pylint will fail for all other PRs until this is merged...

haha. ok - @bqpd was happy, so merging.


welcome screen - display app version

What would you like to be added:
Display app version on welcome screen. Currently, there's no way to determine the app version if you're not on wallet context (e.g, About Screen)

About Screen uses the following terminology: v1.8.2
The mockup uses the following terminology: Version 1.8.2
I think we should unify that and also use Version 1.8.2 in the about screen.

Agree - thanks for the suggestion. This new treatment on the version display is the most updated treatment - of which we can also apply in the About us Screen. Sharing design links for assistance


maxNumberOfUploadedFiles - Error still returned on subsequent upload attempts even within allowable limits.

Hello!
I'm using maxNumberOfUploadedFiles to restrict the number of uploads.
If I attempt to upload more than the specified max number of uploads, I get the MAX_FILES_EXCEEDED error returned as you would expect. So far, so good.
However, if I then attempt to upload a number of files within the max allowable - even just a single file - I still get the MAX_FILES_EXCEEDED error returned.
It's as though Transloadit still has in memory the files from the previous attempt.
This is the code I'm using...
$('#vehicle-images-form').transloadit({
    wait: true,
    autoSubmit: false,
    triggerUploadOnFileSelection: true,
    processZeroFiles: false,
    maxNumberOfUploadedFiles: 2,
    params: {
      auth: { key: "xxx" },
      template_id: "xxx"
    },
    onError: function(assembly) {
        console.log(assembly);
        // handle error
    },
    onSuccess: function(assembly) {
        console.log(assembly);
        // do something
    }
});

Hey there,
I have checked the code and it is properly resetting this._fileCount when start() is called. Which version of SDK are you running?

Hi Tim,
Thanks for your response. I'm using v3 latest. Here is the complete code, boiled down for testing.
<form id="pdfs-form" method="post" action="x.php">
	<input type="file" name="pdf_uploads" multiple="true" />
</form>

So, if I first select 3 files to upload, I get the max files exceeded error as expected. I then only select 1 file, but I still get the error response. Tested in the latest versions of both Chrome and Firefox on a mac, with the same result.

Hey there,
I pushed a fix. It will be deployed today.

Brilliant. Thanks, Tim!

Sorry Tim, I've just discovered that this does not work when using the Transloadit drop area to perform the uploads, rather than the traditional HTML file element.
Code as above, but adding the following to the form...

I'm hoping as it's related, it'll be an easy fix. Thanks!

Added to my todo for Friday.
On Tue, May 5, 2020 at 11:12 PM Richard T<EMAIL_ADDRESS>wrote:

Sorry Tim, I've just discovered that this does not work when using the
Transloadit drop area to perform the uploads, rather than the traditional
HTML file element.
Code as above, but adding the following to the form...

I'm hoping as it's related, it'll be an easy fix. Thanks!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/transloadit/jquery-sdk/issues/74#issuecomment-624308722,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAADVHLYLAXYHSIQD3AYKX3RQB6KPANCNFSM4MJ4LGRQ
.

Hi @tim-kos , sorry to bother you - just wondering if you managed to make any progress with this?

Sorry, not yet as I was sick. :/
But I will work on this today.

Hey Richard,
So I think the problem is that you are assuming another drag/drop will replace the previously dragged files with the ones you just dragged again.
That's not true, though. Subsequent drag/drops will add files (even the same ones) to the list of files-to-upload. This is to make it easier for the user to drag/drop files from multiple folders/locations. Does this make sense?
If you add

right below the drop-area this will become more apparent and you can then also choose to "Remove" certain files again.

Hi Tim,
No worries - sorry to hear you were ill, and hope you're feeling a lot better now!
Ok, thanks. It's not totally desirable to have the preview area, at least in our case for a few reasons.

It looks like all files are queued successfully for upload without problem, even though we already know at this stage there are too many of them to succeed.

We automatically trigger the upload to transloadit as soon as the files are added, rather than on  submission of the main form. So having the preview list prior to the upload sort of breaks the flow.

We already have our own preview area, which shows thumbnails once successfully uploaded (on callback form Transloadit).

Is there perhaps a function we can call manually to clear the files in the drag and drop area, upon receiving the max upload error? Even if we have to loop over the files one by one, removing each as we go?

Hi @tim-kos Any thoughts on the above? I still have a client waiting, so eager to solve this.

Still on my todo. I'll try to get to it on the weekend. If not, then on
Monday.
On Fri, May 22, 2020 at 6:34 PM Richard T<EMAIL_ADDRESS>wrote:

Hi @tim-kos https://github.com/tim-kos Any thoughts on the above? I
still have a client waiting, so eager to solve this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/transloadit/jquery-sdk/issues/74#issuecomment-632788182,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAADVHOP32N5LXW2THULID3RS2SSHANCNFSM4MJ4LGRQ
.

Hi @tim-kos Any progress with this? (sorry to ping you again on it!)

Sorry about the delay again.
The SDK has a reset() function, which is what you need. So something like this (untested):
const $el = $('#pdfs-form')
$el.transloadit({
        wait: true,
        autoSubmit: false,
        triggerUploadOnFileSelection: true,
        processZeroFiles: false,
        maxNumberOfUploadedFiles: 2,
        params: {
          auth: { key: "-redacted-" },
          template_id: "-redacted-"
        },
        onError: function(assembly) {
            console.log(assembly);
            alert(assembly.message);
            $el.data('transloadit.uploader').reset()
        },
        onSuccess: function(assembly) {
            console.log(assembly);
        }
    });

Notice the $el.data('transloadit.uploader').reset().

Excellent. Works :) Thanks so much @tim-kos !

Okay, great!
On Wed, May 27, 2020 at 1:26 PM Richard T<EMAIL_ADDRESS>wrote:

Excellent. Works :) Thanks so much @tim-kos https://github.com/tim-kos !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/transloadit/jquery-sdk/issues/74#issuecomment-634597909,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAADVHORRTHZVWE7USI3IG3RTT2HDANCNFSM4MJ4LGRQ
.


Pl/petab

We can now create InverseProblems for many benchmark cases. We cannot import benchmark cases for

timepoint specific noise and observableParameter overrides (I don't think we should support this, as it is rather niche, rather complicated and may slow down cost function evaluation).
preequilibration (supported once https://github.com/JuliaComputing/JuliaSimModelOptimizer.jl/pull/577) is merged).
I think ca. 2 other models, that would need some bugfixing I was not able to finalize.

I think we can now import more than enough benchmarks to test which (combination of) methods work best for most systems biology problems. Caveat: I have not properly tested if calibration actually runs in a meaningful way. But: to get meaningful results, it will be important to not use/randomise the starting point for the optimizer. It could be that the nominalValue in the parameter tables gives hints.
Additionally, @SebastianM-C, if you want to reproduce Nina Schmid's UDE presentation, you can refer to the Boehm case.

Thanks for adding this. I'll run this locally and investigate how we want to do CI.

But: to get meaningful results, it will be important to not use/randomise the starting point for the optimizer.

Can you add more details? You mean that the random starting points would provide unreliable results or that the starting points might be in a region that would lead to wrong results?

It could be that the nominalValue in the parameter tables gives hints.

You mean to say to start form the nominalValue or some rand value around it?

I'll run this locally and investigate how we want to do CI.

Not sure if this needs CI. I'd just stick to the structure of the other tests. In particular, this means that at some point you may want to get rid of the .jl file and make .jmd files out of it.

Can you add more details? You mean that the random starting points would provide unreliable results or that the starting points might be in a region that would lead to wrong results?

No, I actually mean that there is a risk that the nominalValue (fed to the PEtabDefaults in JSMO) might be a good guess. Perhaps the value has even been fitted by the authors of the respective benchmark case. That would be an unfair advantage for any algorithm that exploits this information. To benchmark algorithms, we need to find a workaround. Idk how they came up with the nominalValues in the benchmark, I just wanted to point out that this could skew the results.

You mean to say to start form the nominalValue or some rand value around it?

Neither, just pick one or multiple values from a uniform distribution within the search_space.


Port  v1.1.1 changelog to main

What type of PR is this?

What this PR does / why we need it:
When we released v1.1.1, we merged the changelog directly in the release-1.1 branch. This PR cherry picks that commit to updating the CHANGELOG in main as well.
Which issue(s) this PR fixes:

Fixes #
Does this PR introduce a user-facing change?:

NONE

/lgtm


Multiple map problems

Using winpmem v3.3.rc1, we created a memory image of an arch linux vm.
The idx file references a non-existent stream. (suspect the idx file has been truncated or not fully written correctly).
The idx file has multiple duplicate entries.
The map references the non-existent stream.
The map idx looked as follows:
0 => aff4://52470487-b665-46e6-97de-071325d32dbd/PhysicalMemory/data
1 => aff4://52470487-b665-46e6-97de-071325d32dbd/PhysicalMemory/data
2 => aff4://52470487-b665-46e6-97de-071325

0 => aff4://52470487-b665-46e6-97de-071325d32dbd/PhysicalMemory/data
1 => aff4://52470487-b665-46e6-97de-071325d32dbd/PhysicalMemory/data
2 => aff4://52470487-b665-46e6-97de-071325
[0x00000000:0x00001000] => SPARSE
[0x00001000:0x0009e000] => stream 1 [0x00000000:0x0009e000]
[0x0009f000:0x00061000] => SPARSE
[0x00100000:0x00300000] => stream 1 [0x0009e000:0x00300000]
[0x00400000:0x00001000] => stream 2 [0x00000000:0x00001000]
[0x00401000:0x00bfe000] => stream 1 [0x0039e000:0x00bfe000]
[0x00fff000:0x00001000] => SPARSE
[0x01000000:0x00001000] => stream 2 [0x00000000:0x00001000]
[0x01001000:0x003ff000] => stream 1 [0x00f9c000:0x003ff000]
[0x01400000:0x00001000] => stream 2 [0x00001000:0x00001000]
[0x01401000:0x3ebef000] => stream 1 [0x0139b000:0x3ebef000]
information.yaml:
Imager: WinPmem 3.3rc1
Registers:
CR3: 114032640
NtBuildNumber: 2600
KernBase:<PHONE_NUMBER>
NtBuildNumberAddr:<PHONE_NUMBER>
Runs:

start: 4096
length: 647168
start: 1048576
length: 15724544
start: 16777216
length:<PHONE_NUMBER>

Linpmem uses a different implementation of WriteMapObject_ than Winpmem because Winpmem needs to be able to handle failed reads (for VSM support). We need to update it to the new refactored code base. Thanks for reporting.


[#999] improvement: apply REST principles in the urls of the http interfaces

What changes were proposed in this pull request?
Apply REST principles in the urls of the http interfaces
Why are the changes needed?
Fix: #999
Does this PR introduce any user-facing change?

UT

Codecov Report

Merging #1000 (2c6c6b2) into master (b759588) will increase coverage by 1.17%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #1000      +/-   ##
============================================
+ Coverage     53.57%   54.74%   +1.17%
+ Complexity     2511     2510       -1
============================================
  Files           378      359      -19
  Lines         20528    18174    -2354
  Branches       1773     1773
============================================
- Hits          10997     9950    -1047
+ Misses         8835     7598    -1237
+ Partials        696      626      -70

Impacted Files
Coverage Δ

...niffle/coordinator/web/resource/AdminResource.java
0.00% <0.00%> (ø)

...uniffle/coordinator/web/resource/BaseResource.java
0.00% <0.00%> (ø)

...iffle/coordinator/web/resource/ServerResource.java
0.00% <0.00%> (ø)

... and 21 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@slfan1989 @yl09099 Will this change affect the module cli?  Do we need another modification for the module cli?

@slfan1989 @yl09099 Will this change affect the module cli? Do we need another modification for the module cli?

Mine doesn't. That's what I'm trying to do

@Kwafoor

The ut has one failure, maybe there's some flaky test.

Yes. https://github.com/apache/incubator-uniffle/issues/409


Suggestion: Better singularization of table names

I noticed when you have a table named like foo_properties it will generate struct FooPropertie.
There are ways to get the singular form from a plural, but no rust crates I'm aware of. But maybe we can find a suitable english dict text file with the necessary info.
In the meantime, as a quick fix heuristic, I suggest to do this:
If the table name ends in "ies", replace it by "y", not "ie".
This solves all the cases I've come across in my usage of diesel_cli_ext.
Although there are other cases, e.g. singular "ox", plural "oxen" that can't be solved without a lookup.
:)

To be maximally useful, diesel_cli_ext should strive to get to a point where it requires no manual post-processing.

EDIT: Another temporary but totally sufficient fix would be to allow passing singular forms in on the cmd line as flags!
-p 'ox oxen' (p for "plural")
-p 'property properties'
So it will not just work with a table called "properties", but for ALL tables ending in "properties"!
E.g. this mapping will work for "foo_properties" and "bar_properties".
I think this is the best solution for now.

updated in 0.2.9


Update Composer dependencies (2020-06-11-00-08)

Visual regression test passed!
View the visual regression test report


g8storclient being built as binary (which is now out-of-date, libssl1.0.0 not available)

Traceback (most recent call last):
  File "jstest.py", line 47, in <module>
    compare('j', jgen, dj, 2)
  File "jstest.py", line 45, in compare
    compare("%s.%s" % (tree, subname), subobj1, subobj2, depth-1)
  File "jstest.py", line 43, in compare
    subobj1 = getattr(obj1, subname)
  File "/usr/local/lib/python3.6/dist-packages/jumpscale.py", line 18, in _lazyprop
    setattr(self, attr_name, fn(self))
  File "/usr/local/lib/python3.6/dist-packages/jumpscale.py", line 573, in flist
    return FListFactory()
  File "/usr/local/lib/python3.6/dist-packages/jumpscale.py", line 338, in FListFactory
    from JumpscaleLib.data.flist.FListFactory \
  File "/usr/local/lib/python3.6/dist-packages/JumpscaleLib/data/flist/FListFactory.py", line 14, in <module>
    from .manipulator.flist_manipulator import FlistManipulatorFactory
  File "/usr/local/lib/python3.6/dist-packages/JumpscaleLib/data/flist/manipulator/flist_manipulator.py", line 7, in <module>
    from .path import Path
  File "/usr/local/lib/python3.6/dist-packages/JumpscaleLib/data/flist/manipulator/path.py", line 7, in <module>
    import g8storclient
  File "/usr/local/lib/python3.6/dist-packages/g8storclient/__init__.py", line 1, in <module>
    from .g8storclient import encrypt, decrypt
ImportError: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
[Fri10 07:44] - ErrorHandler.py   :257 :j.core.errorhandler  - ERROR    - libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
root@debianuc:/home/lkcl/src/jumpscale_core# ^C

so what's going on is, normally, installing g8storclient would "fix" the problem.  except.... g8storclient doesn't actually have the source code (at all), it has a binary.... which was not statically linked against libcrypto, so is broken.

moved the import actually into the module so that it at least will run... for people who have libssl1.0.0 (which is almost nobody these days)


Additional Steps for BQ_Source

Please verify the Scenarios.

Description:
Updated the BigQuery plugin to include additional steps for better handling.
Modified property locators in Cdfplugin property locators.java to support new BigQuery functionality.
Updated the errorMessage.properties and pluginParameters.properties file to ensure proper error handling and parameter management for the new configuration.
Modified Files:
Cdfplugin property locators.java
errorMessage.properties
pluginParameters.properties
File Modified:
src/e2e-test/java/io/cdap/plugin/utils/CdfPluginPropertyLocator.java
Unit Tests:
No changes made to unit tests.
Verified that all new test cases pass successfully.

Build with unit tests is still failing, there are a bunch of checkstyle errors, for eg:
/tmp/google-cloud/google-cloud/src/e2e-test/java/io/cdap/plugin/utils/E2ETestConstants.java:20:68: '=' is not preceded with whitespace. [WhitespaceAround]

Please check and fix the same


Provide descriptions for hidden (invisible) actions

The description can still be seen from find action... dialog:

ensure that our actions ("rotating" in particular) have their descriptions
provide them if missing

@mkondratek amirite that Action disable due to undefined GM repo in the example above is incorrect yet still visible?

Let's first check if it's still a nuisance (as the issue is rather ooold)

@mkondratek, @PawelLipski - please help me understand this issue:

which actions are "hidden (invisible)" (and which are NOT) ?
"our actions ("rotating" in particular)" - which actions are "rotating"? What does it mean? Where can I find them?

+1, 🎅🏻: would be good to explain what you meant by rotating 😅

Ok, so this is about actions that are (disabled and) hidden (see in code setenabledandvisible). The actions are still visible in the find action results. The issue is that we are not sure if the actions (disabled and invisible from toolbar/disabled in context-menu) have proper descriptions in the find action results.
By "rotating" I meant actions that appear and disappear in the toolbar depending on the currently checked out branch (its status to parent/remote; e.g. fast forward is available for the green edge but not for red edge).
Is it clear?

Yes, thank for explanations! :)

@mkondratek - just to make it 100% clear - do I get it right that all our actions are available under the
frontend/actions/src/main/java/com/virtuslab/gitmachete/frontend/actions
directory?

:yes:, we don't keep actions anywhere else

For some of the disabled actions both description from the bottom bar and from the pop-up text box are the same:

For others however - there is a standard description on the bottom bar. But the text that is displayed in the pop-up text box is not a description, but an info for the user - it tells, why this action is not available now:

Anyway - it all looks good to me. The disabled actions do have descriptions and (sometimes) additional info with the reason why they are not available right now. However, sometimes it happens that when using the Find -> Actions way in IntelliJ, we do not get proper descriptions on the pop-up text boxes... But a misleading "Action disabled due to undefined Git Machete repository" info. This seems to be a bug. For example - I tried to check it 3 times in a row (without doing anything else in IDE nor in git on the repo) - and the result was:

first time I got "Action disabled due to undefined Git Machete repository" (NOT OK)
second time I got proper descriptions + useful info (OK)
third time I got "Action disabled due to undefined Git Machete repository" (NOT OK)
I don't know what is the reason for such behavior. And if this is a bug with our plugin or maybe a bug in IDE itself.

So, as described above - looks like we have proper descriptions for all actions (active and disabled/hidden). But the problem is that sometimes descriptions for disabled actions are replaced by the "Action disabled due to undefined Git Machete repository" info (which is sad). @mkondratek, @PawelLipski - do you know what could be the cause of such situations? I can try to fix this bug in this issue.

I did some more teting and it looks like:

if the Git tool window in the lower left corner of the screen is opened - then almost always descriptions are displayed properly in pop-up text boxes for disabled actions
if the Git tool window in the lower left corner of the screen is NOT opened - then  we get the "Action disabled due to undefined Git Machete repository" info

if the Git tool window in the lower left corner of the screen is NOT opened - then we get the "Action disabled due to undefined Git Machete repository" info

Huh looks like update() isn't triggered on our actions when Git tool window is hidden... sounds like a reasonable optimization from IntelliJ's side. Can you verify this is indeed the case?

@PawelLipski - do you have the com.intellij.dvcs.repo.Repository.update() (https://github.com/JetBrains/intellij-community/blob/master/platform/dvcs-api/src/com/intellij/dvcs/repo/Repository.java#L113) method in mind? Or something else?

Sorry, I meant com.intellij.openapi.actionSystem.AnAction#update, overridden on our side by com.virtuslab.gitmachete.frontend.actions.base.BaseProjectDependentAction#update

Hmmm 🤔 but let's take a look onto some git4idea actions. Push/pull/smth, some of them are available with Find Action, some of them are not, but do they have proper description no matter if the git tool window is opened? If so I would take a close look into some of them (git4idea actions) and see how they handle proper descriptions.

I'm not sure, which actions are git4idea actions, but here's what I've found:

Open the Search Everywhere window and got to the Actions tab
Search for actions using the "Git" string
Hover the mouse pointer (cursor) over a Git action (not Git Machete action) provided by IntelliJ IDEA itself
No description is displayed - neither for active ones (like Clone...) nor for disabled ones (like Abort Cherry-pick)

By git4idea actions I mean actions that are provided from this plugin so probably all git-related actions that are not ours (Push, Cherry Pick, Clone, as you mentioned).
By Find Action I mean exactly the place you mentioned - search everywhere/actions (there is a direct shortcut for it ⇧ ⌘ A).
Lack of description among git4idea actions in that place may be a result of their oversight, idk.

The problem is as follows (needs more investigation for sure):

If the Git tool window in the lower left corner of the screen is opened - then com.virtuslab.gitmachete.frontend.actions.expectedkeys.IExpectsKeyGitMacheteRepository#getGitMacheteRepositorySnapshot is not null
If the Git tool window in the lower left corner of the screen is not opened - then com.virtuslab.gitmachete.frontend.actions.expectedkeys.IExpectsKeyGitMacheteRepository#getGitMacheteRepositorySnapshot is null

is it a rule in general or e.g. only before opening Git tool window for the first time during IDE instance run?

It happens every time I close the Git tool window (during the same IDE instance run)

In fact, following part of mentioned method resolves to null in these situations:
anActionEvent.getData(DataKeys.KEY_GIT_MACHETE_REPOSITORY_SNAPSHOT)
Looks like this is defined by IntelliJ code, not ours

It is WE who set this data (probably in EnhancedGraphTable.java).
anyway, I am wondering if is it necessary to be limited like that. probably we can provide the snapshot all the time 🤔 I do not remember the logic behind it, and it might be a separate issue starting here. on the other hand we can just agree that the actions are not available at this state and provide proper message in description (it could include "open Git Machete to possible enable this action" - but it sounds strange)


[ISPN-7480] JDBC cache store doesn't work on Sybase

See: https://issues.jboss.org/browse/ISPN-7480
The logger was probably a copy&paste error, hence correcting it together.

Merged to master


New titlebar breaks top bar

Since the new discord update added a title bar, the top bar it shows on servers and DMs are now grey.
Pic for reference.

@Liz-chan thanks for the heads up should be fixed now.

Sweet, it's back to being themed now, thanks!


Errors dependent on FS File?!

Hello, I have been experimenting with cxsd and I am facing the following issue with files that are exact copies of each other.
when I run:
npm run cxsd http://localhost:3000/some-file.xsd
I get error:
TypeError: Cannot read property 'id' of undefined
but when i run:
npm run cxsd http://localhost:3000/some-other.xsd
everything goes well

the files have exactly the same content! (copy+paste)
both are accessible using the corresponding url
both have exactly the same OS permissions/owner etc

of course i can avoid this problem in development by making copies of "good files" and editing (when i create a new file it also works as expected) but if i don't know the root cause in can cause problems hard to troubleshoot in the future .
Thanks beforehand. Best regards.

The problem was the cache directory used by cxsd (i haven't noticed it before). One filename was in cache (therefore changes weren't even processed) and the other wasn't.


Please generate HTML docs!

Please, please, PLEASE generate HTML docs for PyUSB.
The useability of pydoc is complete crap compared to a web page - With a web page, I can easily have multiple tabs open to different sections of the documentation, there is an actual navigation interface, etc... While PyDoc works, it's minimal at best, and straight out of the 80's at worst.
PyDoc can natively generate somewhat ugly, but quite functional documentation, and github can do the hosting.

For my own use, and because I don't want to use pydoc from the CLI, I wrote a little batch file:
python -m pydoc -w usb
python -m pydoc -w usb.backend
python -m pydoc -w usb.core
python -m pydoc -w usb.control
python -m pydoc -w usb.util
python -m pydoc -w usb.legacy
python -m pydoc -w usb._debug
python -m pydoc -w usb._interop
python -m pydoc -w usb._lookup
python -m pydoc -w usb._objfinalizer

This generates a few (10) HTML files, with functional internal links for types and such.

I mean, yeah, but my point was stick that on github pages or something.

But there are many broken links in the generated HTML files. So it does not seem to be a simple task.

Sphinx could probably parse it and get better (looking and producing) documentation , you should take a look(still can be hosted on github pages)


Histogam: add mean to each count

If in addition to each count we also accumulate the sum of samples, we'll be able to compute the mean for each accumulated bucket. This, in turn, should increase the precision when computing integrals over the approximated p.d.f. if the x points are taken not as a middle of each bucket, but as an actual mean.
The downside of this is that a histogram can no longer be accurately recreated solely by the counts, and the accumulated sums also need to be used in copying. This may affect the way histograms are accumulated in parallel - when multiple histograms need to be merged together. So, instead of AddCounts we'd need to write AddHistogram to merge both counts and sums.

Also add Xs() method to get the slice of means, to be used in place of .Buckets().Xs(0.5).


Nuke Elements from DreamPath

We should just rely on the path string for everything and add some handy things to cover most usecases like vars to track element count and the last element.

The plan is to nuke DreamPath from the runtime anyways so I'm not really worried about this anymore.


react-hot-loader doesn't work properly with<EMAIL_ADDRESS>

It does not cause hot-updates, only after refresh

After some investigation I found out, that it has broken in<EMAIL_ADDRESS>

Given react-hot-loader has been deprecated, you most likely want to try out a react-transform-hmr based setup instead.

I see, thanks!


Playground Editor - Code Isolation Mode

Feature design for the Playground Monaco Editor that allows the user to view code isolated into smaller chunks to help development comprehension for long playgrounds. The feature should allow the following:

The ability to isolate sections of code for viewing. This should either dim or prevent display of code that is not part of the focused content
Supply a method for navigation similar to a ToC approach. This may be either auto generated from available classes if allowed by Monaco, or may need some tagging system created by the user.
Potential for enabling a split view of code to isolate one second of code in a tab while still viewing full playground in editor so that the user may see code from two places in the playground at once.
Solution must not break intellisense
ToC must always be available to the user to quickly navigate around, so there must be a concession for UI in the header bar. Ideally, this would display at the top of the Monaco Editor.
Possibility for a link to a particular class? Being able to "tag" code and then provide a link to that code in an isolated mode could be helpful
Isolated view should retain line numbers from full playground to help with navigation from isolated view back to full playground.
Maybe we need a custom comment tag to create custom isolation?
Isolation view may need a "quick find" button that quickly navigates the main PG to the same range as the isolation mode?

This feature is aimed at providing an experience similar to isolating classes into individual files with related classes to prevent the monolithic nature of a long playground to speed development and comprehension of code.

Should we close the Tab related issues then as this sounds redundant ? even if we end up reopening after the design phase ?

@sebavan I think that is probably best. The design phase may morph what it is we need to make so opening new issues based on the design is probably better in the long run.


Update examples

I'm trying these examples:
Get OAuth2 Permissions/delegated permissions
(Get-AzureADServicePrincipal -filter "DisplayName eq 'Microsoft Graph'").OAuth2Permissions
Get App roles/application permissions
(Get-AzureADServicePrincipal -filter "DisplayName eq 'Microsoft Graph'").AppRoles
And as a result I'm getting:
PS L:> (Get-AzureADServicePrincipal -filter "DisplayName eq 'Microsoft Graph'").AppRoles
Get-AzureADServicePrincipal : The term 'Get-AzureADServicePrincipal' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:2

(Get-AzureADServicePrincipal -filter "DisplayName eq 'Microsoft Graph ...

 + CategoryInfo          : ObjectNotFound: (Get-AzureADServicePrincipal:String) [], CommandNotFoundException
 + FullyQualifiedErrorId : CommandNotFoundException

PS L:> (Get-AzureADServicePrincipal -filter "DisplayName eq 'Microsoft Graph'").OAuth2Permissions
Get-AzureADServicePrincipal : The term 'Get-AzureADServicePrincipal' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:2

(Get-AzureADServicePrincipal -filter "DisplayName eq 'Microsoft Graph ...

 + CategoryInfo          : ObjectNotFound: (Get-AzureADServicePrincipal:String) [], CommandNotFoundException
 + FullyQualifiedErrorId : CommandNotFoundException

I have just updated AzureRm module.
ModuleType Version    Name

Script     5.3.4      AzureRM.profile
Script     6.3.0      AzureRM.Resources
Manifest   <IP_ADDRESS>    Microsoft.PowerShell.Management
Manifest   <IP_ADDRESS>    Microsoft.PowerShell.Utility
When trying this CmdLet Get-AzureRmADServicePrincipal, it doesn't return anything with AppRoles:
Get-AzureRmADServicePrincipal -DisplayNameBeginsWith 'Microsoft Graph'
ServicePrincipalNames : {https://dod-graph.microsoft.us, https://graph.microsoft.com/, https://graph.microsoft.us,
https://canary.graph.microsoft.com...}
ApplicationId         : 00000003-0000-0000-c000-000000000000
DisplayName           : Microsoft Graph
Id                    : c58559a1-ddb4-459c-853b-294e9e122b13
Type                  : ServicePrincipal
¿how can I get all my App's permissions details with Powershell?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 5fcc8fa3-4aa5-341a-2eff-2cfb1240686a
Version Independent ID: 13eec2b6-7b89-2b83-0ddb-f15a8bd6d93e
Content: Permissions in Azure Active Directory
Content Source: articles/active-directory/develop/v1-permissions-and-consent.md
Service: active-directory
GitHub Login: @CelesteDG
Microsoft Alias: celested

@adumont Thanks for your feedback! We will investigate and update as appropriate.

@adumont  Please install the PowerShell "AzureAD" module by running the below PowerShell cmdlet -
Install-Module -Name AzureAD in your PowerShell Command window.

That did the trick. Sorry to bother.


add inotify doc

Summary
add more information to introduce inotify
Impact
Testing

@guohao15 please squash into one patch


Navbar design

The first header element after the body element isn't supposed to be there

As I am reviewing the changes made, kindly ensure that PR are made to development branch and not the main branch

The first header element after the body element isn't supposed to be there
index.txt

Hi Mathani,
After some check and review
kindly ensure that after pulling the repo to local machine install node modules "npm install" then run build and watch scripts for tailwind "npm run build" and "npm run watch"
Hopefully this solves the issue.
Do inform me if it does not work
Also link your logo files correctly; either   or move the images folder into pages directory
Attached is some changes I made on your file to test if tailwind was not working properly,

Here is logo file used

The navbar is now responsive. Good work.


Cannot read property 'then' of undefined

Issue Id: facdca22-e2e1-78a3-fb88-4dc2de6dacf0Versions - 1.25.0Stack TypeError: Cannot read property 'then' of undefined/vs/editor/contrib/codeAction/codeActionWidget.ts#33:24 (show)/vs/editor/contrib/codeAction/codeActionCommands.ts#104:31 (_onCodeActionsEvent)/vs/editor/contrib/codeAction/codeActionCommands.ts#70:42 (call)/vs/base/common/event.ts#140:15 (fire)/vs/editor/contrib/codeAction/codeActionModel.ts#192:112 (_signalChange)/vs/editor/contrib/codeAction/codeActionModel.ts#105:8 (_createEventAndSignalChange)/vs/editor/contrib/codeAction/codeActionModel.ts#46:14 (trigger)/vs/editor/contrib/codeAction/codeActionModel.ts#201:33 (trigger)/vs/editor/contrib/codeAction/codeActionCommands.ts#128:21 (triggerFromEditorSelection)/vs/editor/contrib/codeAction/codeActionCommands.ts#173:12 (showCodeActionsForEditorSelection)/vs/editor/contrib/codeAction/codeActionCommands.ts#198:9 (run)/vs/editor/browser/editorExtensions.ts#186:14 (runEditorCommand)/vs/editor/browser/editorExtensions.ts#134:15 (apply)/vs/platform/instantiation/common/instantiationService.ts#57:20    at t.invokeWithinContext (out/vs/workbench/workbench.main

Duplicate of #53831


python run of 2to3 applied

@DaanHoogland have you perform manual tests against ipmitool with this PR for both py2 and py3?

Lgtm

Sorry didn't work for me, I'll accept the other PR which worked on testing with both python3 and python2.


{Storage} Fix typo (capitalization) in docs ADLS Gen2

Related command

Description

Fix capitalization typo FOr -> For in the docs page storage/docs/ADLS Gen2.md.
Testing Guide

History Notes

This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

[x] I adhere to the Error Handling Guidelines.

Thank you for your contribution! We will review the pull request and get back to you soon.

Hopefully fixed title and description of PR cfr requirements.

Please fix CI issues

Is ok now. Had to close/reopen PR to trigger CI again to validate the PR title/body again.


Possible initialization issue - model isn't being loaded in time for application

So, I posted in the google groups an issue I was having extending Articles. I discovered that one of my errors was not really an error as much as JSHint just using 'Comment' as a reserved word. So, I added the lines
/* jshint:ignore start */
var Comment = mongoose.model('Comment');
/* jshint:ignore end */

and hacked together a way to get my code to keep running even though JSHint wanted to throw errors at every mention I make of Comment elsewhere in my code. However, I still get the error
MissingSchemaError: Schema hasn't been registered for model "comments".
when I try to populate the 'comments' field of my Articles model.
I am having trouble believing that this is an error with anything on your guys' side, as in with the initialization and whatnot, but I can not find my bug in my code. Besides this being a bug in my code, I can only guess that if it IS caused by resources not being loaded on time, then the bug would probably lie somewhere in the configuration. I'm currently porting a project from Rails to a MEAN stack and chose MeanJS to be my base, so I'm very very against hacking together a solution on my end when there is possibly a bug in the code somewhere. Any help is greatly appreciated

@h3xc0ntr0l Can you post the code where you define the Comment Schema?

@h3xc0ntr0l I'm closing this issue. however, feel free to reopen if it's still an issue.


[SMALLFIX] Journal the creation of the root directory

Otherwise the following could happen:

Start master
Take snapshot (snapshotted next inode id = 0)
Create root inode with id 0, next inode id should be 1
Restart master, loading snapshot which thinks next inode id is 0
Create directory /x, it gets assigned id 0
Try to delete /x, fails because it thinks it's the root inode

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/20696/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/20697/
Test PASSed.


Payment requests (BIP21)

https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki
When user want to receive payment, they should be allowed to create a payment requests.
The metadata should be stored for both sender and receiver.
Also investigate other or newer BIPs if available.

BIP21 library: https://github.com/bitcoinjs/bip21

https://github.com/bitcoin/bips/blob/master/bip-0121.mediawiki
See references below on this BIP, like BIP120.

This has now been implemented, we do not rely in BIP21 library. We should consider having our own payment library on npmjs later on.


feat: add backend for getting work flows from data index service

Hi @caponetto
Please approve or provide feedback of this PR, which is worked upon after your upstream updates.
Thanks.

Hi @caponetto / @tiagodolphine,
Are there any more comments or feedback here to take care of?
If not, can we please merge this one?
Thanks.


Polkadot Smart Chain

Project Abstract
Polkadot Smart Chain (PSC) is an Ethereum-compatible smart contract parachain which uses directly DOT as the native gas fee.
Grant level

[x] Level 1:  Up to $10,000, 2 approvals
[ ] Level 2:  Up to $30,000, 3 approvals
[ ] Level 3:  Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied and aptly renamed (project_name.md).
[x] I have read the application guidelines.
[x] A BTC, Ethereum (USDC/DAI) or Polkadot/Kusama (aUSD/USDT) address for the payment of the milestones is provided in the application.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[x] The initial PR contains only one commit (squash and force-push if needed).
[x] The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
[ ] I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @_____:matrix.org (change the homeserver if you use a different one)

Let me know if I should take another look at the application.

Thank you for your application. Bridges even between technologies raise security concerns. What is the plan to secure these bridges? This is in the scope of this grant request or is it a future work?

Unlike statemint using teleport xcm instructions, PSC uses reserve xcm instructions, which obviously does not pose any security risks to the relaychain network.
In the scope of this grant request, only related to xcmp, substrate technology.
Please refer to pallet-assets-bridge for details, it is a bridge on PSC of wasm assets into evm tokens, it is not a cross-chain bridge.
We do have plans similar to cross-chain bridges in the future, and PSC will be a partial chain of the DOLA protocol.

Thanks for pinging me. But could you still remove the DOT token from the application? Maybe replace it with “substrate native token” or something like that and "substrate account" instead of "DOT account", etc. We basically only care about the technical development and that we can test it on a local substrate chain.

Thank you for your reply. We have removed the DOT token.
You can quickly start the local test network through zombienet, and need recompile this polkadot.
We will provide a basic tutorial that explains how to complete the cross-chain asset transfer of Native Currency between relaychain and PSC through DMP/UMP, and how to deploy and call the evm contracts on PSC.

@icodezjb I still believe that even though it is not a cross-chain bridge it can bring security issues for the users, not for the relay chain, and some security analysis needs to be performed in the pallet and contracts involved. Can be as future work.

Thank you for your suggestion, we are calling evm call in wasm now, it is cryptographically safe, we will do more security analysis in the future to ensure the security of user assets.

One more question, if you already have the code developed pallet-assets-bridge, why are you applying for a grant?

First, our community users voted for us to get a parachain, and they suggested that we apply for this grant.
Second, We do encounter some financial difficulties now, and we don’t even have enough DOT to endorse for proposal 21

Thank you for your review. We have replaced.

And to clarify: Have you already finished all the development for this grant?

This grant still has some documentation and testing not done.
The current grant is just the beginning of our grant requests, and we will have a grant request about the Dola protocol next.

Thanks for your review. We have replaced.

And to clarify: Have you already finished all the development for this grant?

This grant request still has some documentation and testing not done.
The current is just the beginning of our grant requests, and we will have a grant request about the DOLA protocol next

You should answer: The content of this grant has not been completed, wait for the grant to agree, and then start to complete the development, and then organize documents, codes and tests.
As you mentioned later, the development of dola is the next grant, which has nothing to do with this grant. After this grant is over and delivered, apply for the next dola-related development grant

@gguoss
Thank you for your addition, avoiding unnecessary ambiguity.
@Noc2
Thanks for your review and support.
We will seriously consider your suggestion about DOLA.


[GPU] Garbage values in output when unused inputs are present

What happened?
I have an mlir input that I compile using iree-compile and run via rocm using iree-run-module where the number of inputs messes with the output of the program even if it is unused.
I include a reproducer below which takes an unused input (arg0) and writes the constant 1.0 into the output.
When executed, the reproducer produces only garbage values. Commenting in the 4 lines to use arg0 and copy some values into shared memory makes the output work as expected. The input is not used in any other way.
Removing arg0 from the program entirely, such that there are no inputs at all makes the program work as well.
This makes me think that the handling of the output buffer in the dispatch somehow depends on the input buffers and their usage.
Steps to reproduce your issue
This is my input IR:
#translation = #iree_codegen.translation_info<None workgroup_size = [128, 2, 1] subgroup_size = 64>
module {
  stream.executable private @func {
    stream.executable.export public @func workgroups() -> (index, index, index) {
      %c2 = arith.constant 2 : index
      %c1 = arith.constant 1 : index
      stream.return %c2, %c2, %c1 : index, index, index
    }
    builtin.module {
      func.func @func(%arg0: !stream.binding,  %arg2: !stream.binding) attributes {translation_info = #translation} {
        %c19 = arith.constant 19 : index
        %c18 = arith.constant 18 : index
        %c17 = arith.constant 17 : index
        %c3 = arith.constant 3 : index
        %c2 = arith.constant 2 : index
        %c1 = arith.constant 1 : index
        %c4 = arith.constant 4 : index
        %c64 = arith.constant 64 : index
        %c32 = arith.constant 32 : index
        %c16 = arith.constant 16 : index
        %c0 = arith.constant 0 : index
        %workgroup_id_0 = stream.dispatch.workgroup.id[0] : index
        %workgroup_id_1 = stream.dispatch.workgroup.id[1] : index
        %thread_id_x = gpu.thread_id  x
        %thread_id_y = gpu.thread_id  y

        // Commenting in these 4 lines makes the program work
        // %alloc_0 = memref.alloc() : memref<4x4xf32, #gpu.address_space<workgroup>>
        // %0 = stream.binding.subspan %arg0[%c0] : !stream.binding -> memref<128x256xf32>
        // %2 = vector.load %0[%c0, %c0] : memref<128x256xf32>, vector<4xf32>
        // vector.store %2, %alloc_0[%c0, %c0] : memref<4x4xf32, #gpu.address_space<workgroup>>, vector<4xf32>

        // writing 1.0 to all positions in the output
        %cst = arith.constant dense<1.000000e+00> : vector<1xf32>
        %4 = arith.divsi %thread_id_x, %c64 : index
        %5 = arith.muli %4, %c32 : index
        %6 = arith.muli %workgroup_id_0, %c64 : index
        %7 = arith.remsi %thread_id_x, %c16 : index
        %8 = arith.remsi %thread_id_x, %c64 : index
        %9 = arith.divsi %8, %c16 : index
        %10 = arith.muli %9, %c4 : index
        %11 = arith.muli %thread_id_y, %c32 : index
        %12 = arith.muli %workgroup_id_1, %c64 : index
        %13 = arith.addi %7, %12 : index
        %14 = arith.addi %13, %11 : index
        %15 = arith.addi %14, %c16 : index
        %16 = stream.binding.subspan %arg2[%c0] : !stream.binding -> memref<128x128xf32>
        %17 = arith.addi %6, %5 : index
        %18 = arith.addi %17, %10 : index
        vector.store %cst, %16[%18, %14] : memref<128x128xf32>, vector<1xf32>
        %19 = arith.addi %18, %c1 : index
        vector.store %cst, %16[%19, %14] : memref<128x128xf32>, vector<1xf32>
        %20 = arith.addi %18, %c2 : index
        vector.store %cst, %16[%20, %14] : memref<128x128xf32>, vector<1xf32>
        %21 = arith.addi %18, %c3 : index
        vector.store %cst, %16[%21, %14] : memref<128x128xf32>, vector<1xf32>
        vector.store %cst, %16[%18, %15] : memref<128x128xf32>, vector<1xf32>
        vector.store %cst, %16[%19, %15] : memref<128x128xf32>, vector<1xf32>
        vector.store %cst, %16[%20, %15] : memref<128x128xf32>, vector<1xf32>
        vector.store %cst, %16[%21, %15] : memref<128x128xf32>, vector<1xf32>
        %22 = arith.addi %18, %c16 : index
        vector.store %cst, %16[%22, %14] : memref<128x128xf32>, vector<1xf32>
        %23 = arith.addi %18, %c17 : index
        vector.store %cst, %16[%23, %14] : memref<128x128xf32>, vector<1xf32>
        %24 = arith.addi %18, %c18 : index
        vector.store %cst, %16[%24, %14] : memref<128x128xf32>, vector<1xf32>
        %25 = arith.addi %18, %c19 : index
        vector.store %cst, %16[%25, %14] : memref<128x128xf32>, vector<1xf32>
        vector.store %cst, %16[%22, %15] : memref<128x128xf32>, vector<1xf32>
        vector.store %cst, %16[%23, %15] : memref<128x128xf32>, vector<1xf32>
        vector.store %cst, %16[%24, %15] : memref<128x128xf32>, vector<1xf32>
        vector.store %cst, %16[%25, %15] : memref<128x128xf32>, vector<1xf32>
        return
      }
    }
  }
  func.func @isolated_benchmark(%arg0: tensor<128x256xf32>) -> tensor<128x128xf32> {
    %2 = flow.dispatch @func::@func(%arg0) : (tensor<128x256xf32>) -> tensor<128x128xf32>
    return %2 : tensor<128x128xf32>
  }
}

Compiled using:
iree-compile example.mlir \
    --iree-hal-target-backends=rocm \
    -o example.vmfb

Ran using:
iree-run-module \
  --device=rocm://0 \
  --device_allocator=caching \
  --module=example.vmfb \
  --function=isolated_benchmark \
  --input=4xf32 \

What component(s) does this issue relate to?
No response
Version information
Built from commit161be85aeb4b5003a1a19053967c35f2bd00c762
Additional context
No response

You're changing the ABI and inducing undefined behavior :)
You cannot change the function interface after the dispatch has been formed. A flow.dispatch must be consistent with the target of the dispatch (in this case, your function).

When I remove the input I change the dispatch as well, so without the input my dispatch looks like this:
  func.func @isolated_benchmark() -> tensor<128x128xf32> {
    %2 = flow.dispatch @func::@func() : () -> tensor<128x128xf32>
    return %2 : tensor<128x128xf32>
  }

When I change the layout of inputs, without adjusting the dispatch I get an error about the type mismatch as expected.
Or are you referring to another portion of the code?

Before "codegen" the IR looks something like this when the binding is not used
module attributes {hal.device.targets = [#device_target_rocm]} {
  hal.executable private @func {
    hal.executable.variant public @rocm_hsaco_fb target(#executable_target_rocm_hsaco_fb) {
      hal.executable.export public @func ordinal(0) layout(#pipeline_layout) attributes {hal.interface.bindings = [#hal.interface.binding<0, 0>, #hal.interface.binding<0, 1>]} {
      ^bb0(%arg0: !hal.device):
        %c2 = arith.constant 2 : index
        %c1 = arith.constant 1 : index
        hal.return %c2, %c2, %c1 : index, index, index
      }
      builtin.module {
        func.func @func() attributes {translation_info = #translation} {
          %cst = arith.constant dense<1.000000e+00> : vector<1xf32>
          ...
          %12 = hal.interface.binding.subspan set(0) binding(1) type(storage_buffer) alignment(64) offset(%c0) : memref<128x128xf32>
          ...
          vector.store %cst, %12[%21, %11] : memref<128x128xf32>, vector<1xf32>
          return
        }
      }
    }
  }
  util.func public @isolated_benchmark(%arg0: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub, iree.reflection = {iree.abi.declaration = "sync func @isolated_benchmark(%input0: tensor<128x256xf32>) -> (%output0: tensor<128x128xf32>)"}} {
    %c65536 = arith.constant 65536 : index
    %c131072 = arith.constant 131072 : index
    %c0 = arith.constant 0 : index
    %c256 = arith.constant 256 : index
    %c128 = arith.constant 128 : index
    %element_type_f32 = hal.element_type<f32> : i32
    %dense_row_major = hal.encoding_type<dense_row_major> : i32
    hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("input0") shape([%c128, %c256]) type(%element_type_f32) encoding(%dense_row_major)
    %0 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<128x256xf32> in !stream.resource<external>{%c131072}
    %result, %result_timepoint = stream.resource.alloca uninitialized : !stream.resource<external>{%c65536} => !stream.timepoint
    %1 = stream.cmd.execute await(%result_timepoint) => with(%0 as %arg1: !stream.resource<external>{%c131072}, %result as %arg2: !stream.resource<external>{%c65536}) {
      stream.cmd.dispatch @func::@rocm_hsaco_fb::@func {
        ro %arg1[%c0 for %c131072] : !stream.resource<external>{%c131072},
        wo %arg2[%c0 for %c65536] : !stream.resource<external>{%c65536}
      }
    } => !stream.timepoint
    %2 = stream.timepoint.await %1 => %result : !stream.resource<external>{%c65536}
    %3 = stream.tensor.export %2 : tensor<128x128xf32> in !stream.resource<external>{%c65536} -> !hal.buffer_view
    util.return %3 : !hal.buffer_view
  }
}

Looking at this, the pipeline layout includes both bindings (as does the dispatch) but the kernel only uses one of the bindings.
The llvm func we produce for rocm only takes a single argument however
llvm.func @func(%arg0: !llvm.ptr {llvm.align = 16 : i32, llvm.noalias}) attributes {translation_info = #iree_codegen.translation_info<None workgroup_size = [128, 2, 1] subgroup_size = 64>} {

I'm not sure if the input IR should be considered valid, but it does look like rocm might not be obeying the pipeline layout when constructing the llvm function.

That's believable - the LLVMGPU lowerings have always been sketchy. Today I strongly suspect any difference between the dispatch and the dispatchee will not work correctly. It should, but that requires fixes.

that's odd as SPIR-V should definitely allow that since we're using Vulkan/SPIR-V's binding model - if there's one codegen target I'd expect to work it'd be that one :P

ah wait the problem on SPIR-V is with FlattenMemrefSubspan. Let me try 1d memrefs.

Conversion to SPIR-V crashes somewhere in the type converter...

ok this IR is unfriendly to SPIR-V lowerings (we expect more things like memory space annotations on memrefs and such) but after some modifications it looks like SPIR-V is doing this properly. We get the single set 0 binding 1
spirv.GlobalVariable @__resource_var_0_1_ bind(0, 1) : !spirv.ptr<!spirv.struct<(!spirv.array<16384 x f32, stride=4> [0])>, StorageBuffer>

which the driver handles fine. So does look like a rocm bug.