[WIP] Reworking formatters

Hi,
addressing #345
This PR implements a super simple way to make exports for tex and texminted work.
I'm not saying that this is the best way to do it but I just started this PR as a proof of concept.
It may be worth reorganizing the types around the docformats to account for the similarities (such as shown here).

nice, thanks for your try.
so can this PR produce valid tex files for tex and texminted formats, as is ?

It may be worth reorganizing the types around the docformats to account for the similarities (such as shown here).

sounds good, might be good to start in another PR, tho ;)

nice, thanks for your try.
so can this PR produce "valid" tex files for tex and texminted formats, as is ?
If so, I'm totally okay to merge this, while it would be super great if you could tell any problem you notice.

Yeah, in my initial tests this did seem to produce a valid .tex file.
But I'll check again to make sure.

great,

However currently there is no good way to include a different template file for texminted by default..

I guess you can add one more isa condition and define render2texminted or something here. We are using this template for md2pdf (which internally converts a doc to .tex file first) format, and please feel free to add your own to match minted package.

Also, given that the tests now fail it seems that the old behaviour was intended, though it's not clear what for.

yeah we have tons of old and very fragile (and annoying tbh) end2end tests, and I guess this PR can fail some of them, but don't care it. We can manually update them later (or even remove them). see #326 for the context if you want.

or, if only the minted is needed and any other part doesn't to be modified, I have an idea to reuse the existing template in a way we add minted only for texminted format

fwiw, rebasing against master will make it easier to run tests locally (skip Plots.jl and Gadfly.jl integration tests, which would take long time to finish otherwise)

so the loading of minted is the only modifcation that should be added to our existing template ? If so I have an idea to reuse the existing template in a way we add minted only when we weave to texminted format.

Yeah, I also thought about that.
Right now the md2pdf.tpl loads the listings package. One could either copy the file and edit it or alternatively find a way to dynamically add the corresponding line. On the other hand this does not scale well, if we end up needing to edit more lines...

alternatively find a way to dynamically add the corresponding line.

yep, we can do that, see this README section in Mustache.jl, a template engine we use.
I pushed some commits, and now texminted::TexMinted generates .tex files which loads minted, ... but I found they're not really valid tex files.
In other word, they can't be compiled, since now format_hoge (e.g. format_chunk) produces some tex string, but all of them assume that they use listing package. So the next thing we need to do is to overload those functions with TexMinted format to produce tex strings, which can be compiled when joined.

okay, I updated this PR to #355 .
Sorry if the previous rebasing makes you unable to push/pull this PR.
Deleting your local branch and pulling again from your repository will make it work. I will make sure I merge master rather than rebasing in the future ;)

No worries.
So I'm restructuring the files right now and moving code back and forth.
I really don't like the fact that we have these weird types that are all the same because they just contain a dictionary. This seems like an unnecessary bit of indirection.
Since no part of Weave.jl is performance critical (and since the current approach isn't exactly type stable either) I propose that we do away with the dictionary in between and define untyped
structs with many fields leveraging Base.@kwdef for instantiation.

My thoughts on the following lines of code. (at Weave.jl line 210 ish)
This is really un-julian style.
doctype = doc.doctype
    if doctype == "pandoc2html"
        mdname = outname
        outname = get_outname(out_path, doc, ext = "html")
        pandoc2html(rendered, doc, highlight_theme, outname, pandoc_options)
        rm(mdname)
    elseif doctype == "pandoc2pdf"
        mdname = outname
        outname = get_outname(out_path, doc, ext = "pdf")
        pandoc2pdf(rendered, doc, outname, pandoc_options)
        rm(mdname)
    elseif doctype == "md2pdf"
        run_latex(doc, outname, latex_cmd)
        outname = get_outname(out_path, doc, ext = "pdf")
    end

I think we could instead implement a postprocessing function that generally does nothing
but runs the external commands for the formats for which something else is defined.
post_processing!(::WeaveFormat) = nothing
post_processing!(::Pandoc2HTML) = stuff

Oh, I found a proper issue that will make working with minted or else harder..
https://github.com/JuliaDocs/Highlights.jl/blob/fc1d9494f06a3ec9db923cda7c9369b63cc96e44/src/Format.jl#L121
Highlights.jl works with lstlisting and only with that.
If we want to make texminted available at all we will have to disable Highlight themes with that.

ok, so I'm finally starting to understand what is happening here:
In md2tex:

code and term chunks are highlighted using Highlights.jl. This package automatically wraps the highlighted code in lstlistings environments. (and does not seem to be able to use minted)
This is why in JMarkdown2tex codestart == codeend == ""
output is not highlighted but only wrapped in docformat.outputstart , docformat.outputend

This means that if we want to make texminted and tex output valid tex files we have to skip the highlight part. That is definitely a downside but without implementing new highlighting themes for Highlights.jl this seems to be the only option.

By now a lot of files have changed.
Here's a quick summary:

Reworked the types. <: WeaveFormats don't contain a dict anymore but instead a lot of untyped fields. If you don't like that we can go back to dicts but keep the new access pattern by overloading getproperty(df::WeaveFormat, symbol) = df.symbol

all formats currently weave without errors but since I don't know what all the formats are meant to do I can't say that they do what they are supposed to do

texminted compiles without errors but due to missing highlighting (see above) it is not as pretty

Tex outputs a decent looking tex file but without a proper template that defines the code environments it won't compile

md2tex & md2pdf produce pretty pdfs

Things that remain to be done:

Implement better argument parsing to properly support the new structure
use that to pass around fewer arguments in function signatures
Make argument parsing test for sensible values (?)
make preserving header a field of the format instead of
const HEADER_PRESERVE_DOCTYPES = ("github", "hugo")
code could do with more polishing

Thanks for your work on this, again. Most of your suggestions sound so nice.
Before discussing details, I would like to ask if you would mind splitting this PR into separate PRs, one for general refactoring format/rendering logic, one for actually improving Tex output format ?
That way, we can see if your refactoring keeps backward compats or breaks something, etc. Having said that, we don't necessary keep backward compats, and I would really want to your refactoring to get in. It will just make it easier to review/merge easily.

Here are comments on refactoring parts:

EDIT: all these asserts are only necessary for user passed types. But this is not the intended usage anyway, since then she would need to implement all the methods anyway? The more likely/intended case is that users pass a modified instance of one of the implemented types.
Any then Base.@kwdef does asserts along with defaults for us.

I like it. Actually I had the exact same idea before (maybe a week ago) but at that time I withdraw it for some reason. I forgot the detail already but I guess at that time we did something like merge!(formatdict, something) in somewhere, but now I can't find it anywhere and I also don't think such a merging and modifying instantiated formats are necessary, so let's go that way.

I think we could instead implement a postprocessing function that generally does nothing
but runs the external commands for the formats for which something else is defined.

sounds nice.

Implement better argument parsing to properly support the new structure

yeah, we can do smarter processing of rendering-related arguments/options according to output formats.

make preserving header a field of the format instead of const HEADER_PRESERVE_DOCTYPES = ("github", "hugo")

yeah, sounds good.

hm, that is a very good point.
I'm not super sure on how to best split this stuff into different PRs though..
I'll give it a try.

It's really okay to include some tex-related stuff into the refactoring PR; like type definition, etc.
The purpose of splitting is to try to make it easier to see the diffs.

ok, it turns out that just about all of my code changes concern the refactoring.

I will happily resubmit those changes as a new PR once this one is merged.

great

I will happily resubmit those changes as a new PR once this one is merged.

if you want you can create another PR on top of this branch. If you set base branch to this PR, the diff will be taken from here.

if you want you can create another PR on top of this branch. If you set base branch to this PR, the diff will be taken from here.

Ah, ok. I've never done that before. I'll give it a try

https://github.com/JonasIsensee/Weave.jl/pull/1

So I created a new PR but since the branch of this PR lives in my own fork of Weave,
the new PR lives in my fork entirely...
This is not what we wanted, no?

ah, sorry, that is only possible if you can push a brach into this repository, so let's do tex stuff in another PR after this PR gets merged.

I pushed two commits into this PR since I can't make another PR merging into this PR: each does:

refactoring

reorder/move things so that format-specific rendering methods are defined close to each format
separate common rendering methods from format specific methods
fix using location

set rendering options with dispatch, which enables us:

remove unused field defs
in theory extensible, once documented
fix test
start to change terminology, format -> render

So can you kindly review on this ?

And, imho, this kind of refactoring PR should be merged soon as possible, so I think I will move to quickly merge this if you approve and we pass tests.

Ah, you started outsourcing the argument handling already. Nice!
I like your changes. I think we can merge.

@JonasIsensee okay, I will move to merge this once CI passes.
We've dropped LTS compatibility support, but who complains.
Looking forward to your another tex improvements PR ! (well, take your time, as always ;))


Most recent pip no longer supports constraints with pre-compiled wheels

We are using pip --constraints  to make sure that some pre-compiled geo libraries are used instead of binary version from pypi. This feature has been removed from latest version of pip>=20.3.
pip does not provide reasonable mechanisms for using cached locally compiled wheels. One can use --no-binary=pyproj to force installation of pyproj from source, but this ALWAYS compiles a fresh copy and that behaviour is by design (I have asked).
So, env-build-tool needs to be redesigned to work around those implementation constraints of pip.
As a short term measure we can freeze pip at 20.2.* version for now, this requires updating lines like these:
https://github.com/opendatacube/geobase/blob/08454271629404e03ab9a45129c04a75c7e1aa67/base/wheels/env-build-tool#L49
https://github.com/opendatacube/geobase/blob/08454271629404e03ab9a45129c04a75c7e1aa67/base/wheels/env-build-tool#L72
https://github.com/opendatacube/geobase/blob/08454271629404e03ab9a45129c04a75c7e1aa67/base/wheels/env-build-tool#L95
to have pip==20.2.4 instead.

hi ODC folks,
I was just looking into the status of this issue and checking to see if I might be able to fix it whilst I'm doing some other build related work. I noticed the reference to datacube-core PR 1051.
Is that approach the intended fix for this issue in which case why isn't it part of geobase?
Just trying to get my head around the ecosystem before looking at possible fixes.

I feel like approach in a linked PR is the way to go, except it's a bit more complicated than what is usually needed, as above is building a python environment such that it has all the dependencies of datacube but not datacube itself. If all you have instead is a requirements.txt and constraints.txt then things are way simpler.
I have come to realize that this whole :wheels layer was a mistake, and having pre-compiled wheels is not worth the trouble. We should get rid of that layer and instead provide templates for building wheelhouse from requirements.txt+constraints.txt in an incremental fashion while providing suggestion for which libraries

need compiling (rasterio, shapely, pyproj, pygdal, netcdf, h5py, and more)
worth compiling (yaml, zstandard, hdstats, .)
better installed in binary mode (scipy, matplotlib, tensorflow)

FYI I have a new build operating this way based off the geobase-3.1.3 builder image. It's out in beta form in our EASI Hubs but so far seems to be working fine. The GA fc library had to be removed due to builds failing with numpy 1.19.5 which we require for our tensorflow support. It looks like the error is common to a lot of libraries and is an upstream change in numpy imports. I may revisit this later and see if I can diagnose it better and/or supply a fix but other priorities are currently in play.
I believe we should commit to this change in approach and make decisions on PRs #50 and #51 and which would in turn close out this issue.

This is now fixed, we no longer pre-compile any wheels, but we do force compilation of important geo libraries so long as one uses env-build-tool utilities.


mypy error: skipping analyzing "arango.database"

Steps to reproduce:

In an empty directory, create a virtual environment with a method of choice
pip install mypy python-arango
echo "from arango.database import StandardDatabase" >> temp.py
mypy temp.py
Observe the following:

❯ mypy temp.py
temp.py:1: error: Skipping analyzing "arango.database": module is installed, but missing library stubs or py.typed marker
temp.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)

Workaround
Include the following snippet in a mypy.ini file (or setup.cfg / pyproject.toml):
[mypy-arango.*]
ignore_missing_imports = True

Permanent Solution Proposal
Consider adding a py.typed file under arango/, and update setup.py accordingly, as suggested here: https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages

Hey @joowani, just wondering if this is something you've come across before and considered?

Hi @aMahanna,
I should be able to add a py.typed. Thanks for pointing this out.


Allow hooks to be triggered after "gps pull"

Sometimes certain hooks should be triggered after a gps pull. Looking for the ability to add one or more hooks to trigger after gps pull is ran.
The idea is I have some setup scripts that are part of our lifecycle and should/need to be ran after each pull. Sometimes other devs miss these or only run them partially. So this could enforce our lifecycle.
These hooks should be able to be configured on/off as well as part of gps's repo or local settings.

Builds and migrations would be nice here.
A nice-to-have would be to have a list of all files changed since the last pull, this way the script could check for certain files or types of files to be changed to conditionally run code -- like running a migration when migration files come in, npm install when package-lock.json changes, or freezed files in dart repos.

It might also be that there needs to be a lifecycle hook for something else other than just pull because some of these things you are talking about you really want to do anytime the state of your stack changes.

it could change the state under it has changed in the case of a gps pull
it could change because you added a patch on top of it gps c
it could change because you appended changes to a patch on top of it gps a
it could change because of something you did in a gps rebase

Maybe the hook should really do some more general hook around stack changed.


p3x-onenote: 2020.10.111 -> 2023.4.113

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/p3x-onenote/versions.
meta.description for p3x-onenote is: Linux Electron Onenote - A Linux compatible version of OneNote
meta.homepage for p3x-onenote is: https://github.com/patrikx3/onenote
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2023.4.113 with grep in /nix/store/apdmhkcyn3ngvwdh26yhk3chms6lng9a-p3x-onenote-2023.4.113
found 2023.4.113 in filename of file in /nix/store/apdmhkcyn3ngvwdh26yhk3chms6lng9a-p3x-onenote-2023.4.113

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
p3x-onenote

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/apdmhkcyn3ngvwdh26yhk3chms6lng9a-p3x-onenote-2023.4.113 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A p3x-onenote https://github.com/r-ryantm/nixpkgs/archive/01575ae0bdab7da63553201a45b0d533df96ed47.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/apdmhkcyn3ngvwdh26yhk3chms6lng9a-p3x-onenote-2023.4.113
ls -la /nix/store/apdmhkcyn3ngvwdh26yhk3chms6lng9a-p3x-onenote-2023.4.113/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

p3x-onenote

Maintainer pings
cc @tiagolobocastro for testing.

Please rebase.


fix(ngAnimate): ensure that "element" caintains html node

Ensure that "element" jqlite wrapper contains html node. It results in an error if it is defined but empty.

Thanks for the PR. Can you please:

show the bug / scenario / issue that is fixed by this change
write a test that shows the problem

Sure @Narretz, I will try to reproduce the problem in an isolated case, though I will need some days for that as it happened in my project at work.

+1 :)

Closing because we have no demo of the problem :(


Hello? Have your project finished?

Hi, the complete code is now available. Sorry for the inconvenience.


Attempt to fix cutoff logs

Included are a few changes to the Jupiter Brain log writer setup to attempt to fix the issue where the end of the logs aren't being sent to travis-logs. I'm not 100% confident that this will fix it, since these bugs would be in the GCE backend too, but the bug doesn't seem to be there from what I can see.

:+1:


Webview doesn't fillMaxSize with pullToRefresh

I know we talked about this on the previous issue, but I figured I'd open it so that others using the library know that this is an open issue. But essentially any webpage that should open full screen with centered content won't work with the webview.
i.e. val initialUrl = "https://www.thelinehotel.com/wp-admin"
leads to a UI that looks like this

even though in a browser does take up the full screen

This seems to be a known issue with the original accompanist webview
See: https://stackoverflow.com/questions/75751943/implement-pullrefresh-on-top-of-webview-accompanist-in-compose

For web pages that are longer than the screen it works like a charm. But for shorter pages I couldn't get them to work in fullscreen yet.

The only solution is seemingly to do the pull to refresh in using AndroidView as well, see https://stackoverflow.com/a/78096034/1048909
Ben Trengrove from google basically said here that they won't work on this https://github.com/google/accompanist/issues/1670
I asked Ben about this ~last week and he said

~Probably an issue having to do with nested scrolling but would take a bit to work out

So it seems like it has something to do with nested scrolling support. Since this is the "spiritual successor" to accompanist webview, I think it would be cool to have a webview in compose that can support pull to refresh like You can do in the View System. If I try to do webview + pull to refresh in the view system you can see that it works as expected.

I went the other way.
created a WebView where I made the ability to disable touch setTouchDisable  (to disable scrolling and selecting)
then added to the current compose WebView setOnTouchListener
var startY = 0f
var deltaY = 0f
wv.setOnTouchListener { view, event ->
    when (event.action) {
        MotionEvent.ACTION_DOWN -> {
            if (isWebViewAtTop) {
                startY = event.y
                deltaY = 0f
                targetSnap = 0f
            }
        }
        MotionEvent.ACTION_MOVE -> {
            if (isWebViewAtTop) {
                val currentY = event.y
                if (startY == 0f) startY = currentY
                val nDeltaY = currentY - startY
                val isDirectionDown = nDeltaY > deltaY
                if (isDirectionDown) {
                    webView.setTouchDisable(true)
                } else if (s.distanceFraction == 0f) {
                    webView.setTouchDisable(false)
                }
                deltaY = nDeltaY
                if (s.distanceFraction < 2.5f || !isDirectionDown) {
                    val target = deltaY / hPx * 10
                    if (target < 2.5f) {
                        targetSnap = target
                    }
                }
            }
        }
        MotionEvent.ACTION_UP -> {
            startY = 0f
            wv.postDelayed({
                webView.setTouchDisable(false)
            }, 500)
            if (s.distanceFraction > 1.8f) {
                targetSnap = 2f
                refresh()
            } else {
                targetSnap = 0f
            }
        }
    }
    false
}

and already there I control targetSnap (via the finger movement distance), and then I use the standard indicator
val s = rememberPullToRefreshState()
fun snapTo(targetSnap: Float, delay: Long = 0) = refreshScope.launch {
    if (delay > 0) delay(delay)
    s.snapTo(targetSnap)
}
PullToRefreshDefaults.Indicator(
    state = s,
    isRefreshing = refreshing,
    containerColor = MaterialTheme.colorScheme.onPrimary,
    color = MaterialTheme.colorScheme.tertiary)


bulloak check panics

Ok, here is the weirdest bug report I’ve ever submitted :smile:
Say I have the following tree:
Foo
├── when a
│   └── it X
├── when b
│   └── it Y
└── when the method is called a second time
    └── it Z

bulloak scaffold ./test/Foo.tree -w writes the following file at ./test/Foo.t.sol:
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.0;

contract Foo {
    function test_WhenA() external {
        // it X
    }

    function test_WhenB() external {
        // it Y
    }

    function test_WhenTheMethodIsCalledASecondTime() external {
        // it Z
    }
}

So far so good.
Now say requirements change and now my tree looks like this:
Foo
├── when b
│   └── it Y
└── when a
    └── it X

Notice, two things change in the tree:

when b moves above when a
when the method is called a second time gets removed

I run bulloak check ./test/Foo.tree --fix and get the following error:
thread 'main' panicked at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bulloak-0.6.3/src/check/violation.rs:418:33:
should parse solidity string: [Diagnostic { loc: File(0, 734, 735), level: Error, ty: ParserError, message: "unrecognised token '}', expected \"(\"", notes: [] }]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

If I don’t reorder when b and when a, bulloak does not panic. So bulloak check ./test/Foo.tree --fix with the following tree works:
Foo
├── when a
│   └── it X
└── when b
    └── it Y

Here comes the surprising part: when I do reorder when a and when b statements, bulloak check only panics if the removed when statement has TheMethod string in it.
Given a modified tree:
Foo
├── when b
│   └── it Y
└── when a
    └── it X

Solidity test files bulloak check works with correctly:
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.0;

contract Foo {
    function test_WhenA() external {
        // it X
    }

    function test_WhenB() external {
        // it Y
    }

-    function test_WhenTheMethodIsCalledASecondTime() external {
+    function test_WhenC() external {
        // it Z
    }
}

Solidity test files bulloak check panics with:
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.0;

contract Foo {
    function test_WhenA() external {
        // it X
    }

    function test_WhenB() external {
        // it Y
    }

-    function test_WhenTheMethodIsCalledASecondTime() external {
+    function test_WhenTheMethod() external {
        // it Z
    }
}

What seems to be causing trouble is TheMethod part of the last test case name.
bulloak version 0.6.3

Oooh, great find! I need to do some digging to understand why this happens. Thanks for bringing this up!

Here is another wired case where bulloak panics.
Given the following test file:
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.20;

contract Foo {
    function test_WhenB() external {
        // it reverts
    }

    function test_GivenA() external {
        // it reverts
    }

    function test_WhenC() external {
        // it X
    }
}

and the following new tree:
Foo
├── given a
│   └── it reverts
└── when b
    └── it reverts

bulloak check ./test/Foo.tree --fix works. But it panics with the following changes to the test file:
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.20;

contract Foo {
    function test_WhenB() external {
        // it reverts
    }

    function test_GivenA() external {
        // it reverts
    }

    function test_WhenC() external {
-        // it X
+        // it need allowance
    }
}

thread 'main' panicked at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bulloak-0.6.3/src/check/violation.rs:418:33:
should parse solidity string: [Diagnostic { loc: File(0, 772, 773), level: Error, ty: ParserError, message: "unrecognised token '}', expected \"(\", \"++\", \"--\", \".\", \"[\", \"case\", \"constant\", \"default\", \"external\", \"immutable\", \"internal\", \"leave\", \"override\", \"private\", \"public\", \"revert\", \"switch\", \"{\", identifier", notes: [] }]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

And a different panic message with the following test file:
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.20;

contract Foo {
    function test_WhenB() external {
        // it reverts
    }

    function test_GivenA() external {
        // it reverts
    }

    function test_WhenC() external {
-        // it X
+        // it doesn’t for token
    }
}

thread 'main' panicked at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bulloak-0.6.3/src/check/violation.rs:418:33:
should parse solidity string: [Diagnostic { loc: File(0, 777, 778), level: Error, ty: ParserError, message: "unrecognised token '}', expected \"(\"", notes: [] }]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Oooh, great find! I need to do some digging to understand why this happens. Thanks for bringing this up!

These issues occurred in bigger test files about 2 weeks ago, finally had time to distill to minimal reproducible examples and report. Happy to help :slightly_smiling_face:

Okay, I fixed the three of them https://github.com/alexfertel/bulloak/commit/f753b7abc326eb7e72f4b206412f51f997ddf447. The issue was kind of tricky to debug cause check --fix's implementation is brittle. Hopefully, in the future I'll have time to refactor it a bit and improve the test suite.
Let me know if you find any other bug, you are being extremely helpful @matmilbury so thank you!
Will push a new version in a bit


A validator that can access the values and require a certain field to be of a specific value

Feature description
I'd like to be able to write a validator so I can check the values of list so it can be of status: 'done'. Is this possible?
Input
type Foo = {
  status: 'done' | 'failed'
}

type Bar = {
  /**
   * @minimum 1 There must be at least one Foo
   * @tstype {Foo[] & { [list.length - 1]: { status: 'done' } }}
   */
  list: Foo[]
}

Output
const fooSchema = z.object({
  status: z.enum(['done', 'failed'])
})

const barSchema = z.object({
  list: z
    .array(fooSchema)
    .min(1, { message: 'There must be at least one Foo' })
    .refine(list => list[list.length - 1]?.role === 'user', {
      message: 'The last foo must have the status "donea"',
    })
})

Hello,
The best way to add this kind of validation is to use the @schema tag:
type Foo = {
  status: "done" | "failed";
};

type Bar = {
  /**
   * @minimum 1 There must be at least one Foo
   * @schema .refine(list => list[list.length - 1]?.status === 'done', { message: 'The last foo must have the status "done"', })
   */
  list: Foo[];
};

This will append the .refine(...) bit to the generated code

Thanks for the quick reply! Did not know you could do that. Is there expanded documentation around the @schema tag?

Documentation is in this section
Could be a bit more extensive I guess 😄


V3

🤖 AutoRest automatic publish job 🤖
> will publish once PR gets merged

Port of https://github.com/Azure/autorest.go/pull/90.


changes theme button name to edit theme

Can anyone tell me how to add an icon?
How can I access this one? editor/icons/icon_edit.svg
theme_menu->set_icon(get_icon(??, ??));

closes #12151

@AlexHolly get_icon("Edit", "EditorIcons"), but you have to do it on a notification like 'READY or EDITOR_THEME_CHANGED (not sure if thats the one)', also i would suggest to add the "Theme" icon and making it a non flat button

Looking good thanks.

also usually .. is appended to menu buttons so Edit theme.. would be even better

Could you also TTR around tooltip text? Thanks!

Merged manually as a9876869d with added TTR().


Kafka Consumer group goes into rebalancing state often

We are using Amazon MSK for kafka service. We are using consumer group to consume the messages. When there is fast incoming messages or large number of them, node kafka stops receiving for some time. When I debug what happened, the consumer group says it is rebalancing. the node kakfa automatically resumes after some time, because of this, the incoming data is duplicated. I believe some of the messages from the last fetch before it stopped were not committed and it caused the issue

Though we have consumer group, currently only one node server reads the responess
Autocommit is enabled
sessiontimeout ms set in consumer group object is 30000
one topic per  consumer group object i.e new consumergroup(topic)
kafka node version is 4.1.3
kafka version is <IP_ADDRESS>
there are 3 partitions and 3 brokers and 15+ topics. Only one node server is listening this

Below are the kafka logs. We can see that every 30 seconds (same as session timeout value) there is a member in the group left message logged. I believe this is what causing the stopping of message. Due to this if the the producer sends 20k messages it is receives atleast 25k message.
Is it that not having back pressure is the reason? Can u help here @hyperlink . Stuck on it for more than a week time.

[2020-09-24 07:02:15,636] INFO [GroupCoordinator 2]: Member[group.instance.id None, member.id kafka-node-client-036b4f2a-e7ab-4512-82bf-07371d410331] in group NodeWorkerGrp3 has left, removing it from the group (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:15,636] INFO [GroupCoordinator 2]: Preparing to rebalance group NodeWorkerGrp3 in state PreparingRebalance with old generation 480168 (__consumer_offsets-24) (reason: removing member kafka-node-client-036b4f2a-e7ab-4512-82bf-07371d410331 on LeaveGroup) (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:17,632] INFO [GroupCoordinator 2]: Stabilized group NodeWorkerGrp3 generation 480169 (__consumer_offsets-24) (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:17,640] INFO [GroupCoordinator 2]: Assignment received from leader for group NodeWorkerGrp3 for generation 480169 (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:41,909] INFO [GroupCoordinator 2]: Member[group.instance.id None, member.id consumer-1-cb6abb48-ec70-4f3f-a957-6c09cf249a5e] in group console-consumer-92440 has left, removing it from the group (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:41,909] INFO [GroupCoordinator 2]: Preparing to rebalance group console-consumer-92440 in state PreparingRebalance with old generation 1 (__consumer_offsets-30) (reason: removing member consumer-1-cb6abb48-ec70-4f3f-a957-6c09cf249a5e on LeaveGroup) (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:41,909] INFO [GroupCoordinator 2]: Group console-consumer-92440 with generation 2 is now empty (__consumer_offsets-30) (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:47,654] INFO [GroupCoordinator 2]: Member[group.instance.id None, member.id kafka-node-client-05bb56f2-db9e-4e09-bf95-954bbd0c43dd] in group NodeWorkerGrp3 has left, removing it from the group (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:47,654] INFO [GroupCoordinator 2]: Preparing to rebalance group NodeWorkerGrp3 in state PreparingRebalance with old generation 480169 (__consumer_offsets-24) (reason: removing member kafka-node-client-05bb56f2-db9e-4e09-bf95-954bbd0c43dd on LeaveGroup) (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:49,658] INFO [GroupCoordinator 2]: Stabilized group NodeWorkerGrp3 generation 480170 (__consumer_offsets-24) (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:02:49,666] INFO [GroupCoordinator 2]: Assignment received from leader for group NodeWorkerGrp3 for generation 480170 (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:03:04,756] INFO [GroupCoordinator 2]: Preparing to rebalance group console-consumer-23592 in state PreparingRebalance with old generation 0 (__consumer_offsets-42) (reason: Adding new member consumer-1-e9dbe9b0-1ffd-4e4d-b058-46195a569c2e with group instanceid None) (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:03:07,757] INFO [GroupCoordinator 2]: Stabilized group console-consumer-23592 generation 1 (__consumer_offsets-42) (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:03:07,762] INFO [GroupCoordinator 2]: Assignment received from leader for group console-consumer-23592 for generation 1 (kafka.coordinator.group.GroupCoordinator)
[2020-09-24 07:03:19,676] INFO [GroupCoordinator 2]: Member[group.instance.id None, member.id kafka-node-client-144e56b7-0778-485b-b327-94156c50ad93] in group NodeWorkerGrp3 has left, removing it from the group (kafka.coordinator.group.GroupCoordinator)

Did you figure out what the issue is? I'm encountering the same frequent re-balancing, blocking consumes from handling messages.
It doesn't look like this repo is still maintained?

Hi @JordanPawlett  it is because the frequency of incoming messages are very high and the node couldn't process the messages and gets exhausted. We have to apply back pressure to kafka to prevent consumer from getting exhausting.
An excerpt from our implementation looks like this
1.create consumer
2. create async queue
3. once you receive a chunk of messages from consumer, pause the consumer immediately after the first payload and push them to the async queue
4. Let the async queue process the messages
5. Once the async queue is drained, again resume the consumer.
6 Then again the above steps from step #3 will get repeated
import * as asyncUtil from 'async';
CONST QUEUE_SIZE = 25;
const consumer =  new ConsumerGroup(groupOptions, topic);
    const queue = asyncUtil.queue(async (msg, callback) => {
      try {

      } catch (error) {
      } finally {
        callback();
      }
    }, QUEUE_SIZE);
    queue.drain(() => consumer.resume());
    consumer.on('message', (msg) => {
        consumer.pause();
        queue.push(msg);
    });
    consumer.on('error', (err) => Logger.error(err));

@aspire-shatheesh thank you for your insight!
Unfortunately in my situation i'm certain the node-process handling the messages can handle the frequency. As on this topic it is only producing around 1 message a second.
In my example the only reason i could see back-pressure occurring is if the consumer autoCommit functionality isn't working as expected (or i've misinterpreted it).
        const consumerOptions = {
          id: 'default-kafka-consumer',
          kafkaHost: this.opts.host,
          groupId: consumerGroupId,
          fromOffset: 'latest',
          encoding: 'buffer',
          autoCommit: true
        };

        const Kafka = require('kafka-node');
        const consumerGroup = new Kafka.ConsumerGroup(consumerOptions, topics);

        consumerGroup.on('message', message => {
          onMessage(message);
        });

This is an example of how my consumer is setup.

Oh okay. are you sure you need           encoding: 'buffer', because that is for binary data and is it intentional? We are using encoding: 'utf8'. If all good, then I suspect  the issue could be in your kafka setups or configuration? something like fetchMaxBytes or retention.time or something else in kakfka.
If you are using Amazon MSK for Kafka, do check this too

Yep definitely require encoding 'buffer', i'm sending binary data over the topic. There's a serialization / deserialization process before and after the message goes onto the bus.
Using wurstmeister/kafka:2.11-1.1.0 docker image currently as my kafka broker currently for integration testing purposes. I'll try swapping out kafka, maybe it's not a client issue.


Map object is not stored

Describe the bug
When trying to store an object that contains a Map, it's being stored as {"_constructor-name_":"Map"} instead of the actual value.
How To Reproduce (best to provide workable code or tests!)
import { caching } from 'cache-manager';
import { redisInsStore } from 'cache-manager-ioredis-yet';
import { Redis } from 'ioredis';

(async () => {
  const redis = new Redis('redis://localhost:6379');
  const cache = await caching(redisInsStore(redis));

  const map = new Map();
  map.set('foo', 'bar');
  map.set('baz', 'qux');
  const data = {
    foo: 'bar',
    map: map
  };

  // Set a value
  await cache.set('data', data);

  // Get a value
  const value = await cache.get('data');
  console.log(value); // Prints out: { foo: 'bar', map: Map {} }
})().then().catch();

I just saw an error about a Map on another cache-manager plugin today and if default serialization is JSON.stringify, there's additional work needed to serialize transparently: https://github.com/rolandstarke/node-cache-manager-fs-hash/issues/14#issue-1635979064

@zph seems like the library already uses some form of replacer, because the Map is being serialized as "map": {"_constructor-name_":"Map"}, by default it's just an empty object "map": {}

@alko89 have you tried using the redis driver instead of ioredis?

hmm no, I haven't tried using different drivers, always use ioredis

@alko89 - please try it on redis as we added more around how to support things like this.


Move integration templates to e2e templates

towards https://github.com/giantswarm/giantswarm/issues/3390

Closing in favour of #107


ISPN-7754 forEach method

https://issues.jboss.org/browse/ISPN-7754

Temporarily closing because of CI overload


request.endpoint always None in SessionInterface.open_session

Expected Behavior
Session Interface should have access to request.endpoint from open_session. In Versions before 1.1.0, this worked fine.
Actual Behavior
Our SessionInterface subclass looks at request.endpoint to determine if it should open a new session - opening a new is only appropriate on some endpoints. Now this is always None, so it cannot make this distinction anymore.
I believe #3104 (issue #3088) broke this.
Environment

Python version: 3.8.5
Flask version: 1.1.2
Werkzeug version: 0.16.1

I would love to work on this @teymour-aldridge

Added a PR here which is simple enough - URL matching was happening immediately after session creation, now it happens immediately after.

Planning to roll this back, see #4053


Update with X-Ray, more sensible timeouts

@jrrudge I updated the memory and corresponding timeouts on items as well.


Data preparation for the time series regression

I'm trying to adopt CfC network from your PyTorch example (person_atcivity) to make a timeseries regression. Given one dimensional array of floating-point numbers (lets consider them equally spaced in time) how can I feed them into the network? As I understand your current PyTorch implementation works as a classifier, that is the Labels array should be finite number of classes. But in case of regression we have floating point values as output. Also how should we structure the inputs? Lets say we have 10 last values of the timeseries as input and we want to predict 11th value, how do we do that? If you can provide a short pseudocode example it would be much appreciated. Thanks.

Agreed, a simple pseudocode example would be great.
When this paper was reviewed for Nature, was there additional code supplied to the review team? If so, I would be happy to make a PR with some documentation.

@PolKul My latest PR does simple X,y prediction but includes significant refactoring.

@PolKul @nightvision04 the code in this repo is for reproducing/documenting the experiments of the paper.
A cleanup ready-to-use implementation of the CfCs with examples can be found here: https://ncps.readthedocs.io/en/latest/
I hope you will find the docs there useful

Closing this issue with Mathias's link to our documentation page: https://ncps.readthedocs.io/en/latest/


URL safe base64 output

It would be nice if URL safe base64 output is supported, which uses '-' and '_' instead of '+' and '/'.

OK, that seems a good solution, thnx.

Cool!


extract offset ordering to trait, use in EventMessage

Codecov Report

Merging #4 into master will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master       #4      +/-   ##
==========================================
+ Coverage   60.38%   60.53%   +0.15%
==========================================
  Files          18       19       +1
  Lines         260      261       +1
  Branches        5        4       -1
==========================================
+ Hits          157      158       +1
  Misses        103      103

Impacted Files
Coverage Δ

...serdisc/mysql/binlog/checkpoint/BinlogOffset.scala
100.00% <100.00%> (ø)

...d/app/io/laserdisc/mysql/binlog/event/Offset.scala
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


APP6B issue in 1.x.1 Space Track and 1.X.2 Air Track

We are reviewing all the symbols represented dall'App6B and I would like to present in this repository  the various issue that we find.
The tests were carried out with:

ArcGIS Runtime SDK for Java 10.2.4
dictionary app6b.dat version<PHONE_NUMBER>

The families of symbols as grouped in the same Hierarchy find in  APP-06 (B) Joint Symbology.pdf

1.x.1 Space Track
symbols represented correctly
1.x.2 Air Track

Description
Hierarchy
Sym-id
Correct Symbol
Wrong Symbol
Note

MEDEVAC
1.X.<IP_ADDRESS>
SFA-MFO--------

The symbol appears higher than the other

ELECTRONIC SURVEILLANCE MEASURES
1.X.<IP_ADDRESS>.2
SFAPMFRZ-------

The symbol appears higher than the other

ANTI SURFACE WARFARE/ASUW
1.X.<IP_ADDRESS>.1
SFAPMFPN-------

The symbol appears higher than the other

AIR TO SURFACE MISSILE (ASM)
1.X.<IP_ADDRESS>.1
SFAPWMAS-------

The symbol appears higher than the other

AIR TO AIR MISSILE (AAM)
1.X.<IP_ADDRESS>.2
SFAPWMAA-------

The symbol appears lower than the other

geomessage for test

Thanks for the information - feel free to add to/edit this issue.
An important note: the updates/fixes are being done in the next version of the standard 2525D/APP6C (which combine the 2 standards - and I have not seen this issue there). However 2525D won't be available in Runtime until the next release.
@abouffard - this does raise the issue if we have a way to convert an App6B SIDC to 2525D/APP6C? Is that something that would need added?

@csmoore , we do not currently have a way to convert APP-6(B) to 2525D/APP-6(C), just as we don't have a way to convert 2525B (in any of its variants).
We have an issue on the JMSML repo to add these backward compatibility capabilities to our data, so it is on the to-do list.  The question is prioritizing this against other tasks on our list.

@csmoore Thanks for the information

We are currently setting up several tables, similar to the previous one, for all the APP-6(B) symbol families (1.x.3 , 1.x4, 1.x4, 1.x5, 2.x.1, 2.x.2, 2.x.3), some of them contain a lot of symbols with rendering problems, putting all these tables in this issue would make it long and unreadable, so I'd rather open a single issue per family. Let me know how to proceed.

From what you wrote, I understand that all updates/fixes will be implemented in the next version of the standard (2525D/APP-6C)!!!
For better understanding,  I can tell that the availability of a APP-6(C)  rendering engine is useful, but unfortunately all the systems I know so far (Land, Air, maritime, Incident, ecc..) send tracks in APP-6(A) or APP6-B format!!!! Of course I mean systems sending tracks in real time. I know about no system using or sending tracks in APP6C format.

One issue per major section/area will be fine - I was just hoping to avoid too many new, or fine-grained, issues (something like <= 10)
On doing the fixes, changes in the next standard version - that is a legitimate, important issue for the fielded legacy systems that will need addressed (hopefully by the standards committee since the only openly available, licensed dataset, with the fixes, is the 2525D version).

Assigned support ID: BUG-000087786

I can confirm that this is still an issue with the latest stylx (red dot denotes center point). Some air are centered on top some on bottom of dot - probably just needs to be made consistent (make whatever is used most common):

Adding dev tag and re-estimating.  Additional note - this should be verified in Pro or on map showing symbol center points to be able to see non-centered symbols.

@dfoll @ACueva @topowright Please read all comments in this issue, understand the issue, and identify the remaining work that needs to be completed.

Checked in Pro 2.2 to see which Air symbols were offset.
Determined that there were three that needed fixing.
SFAPMFRZ------
SFAPMFPN------
SFAPWMAS------
Offset Y axis of symbol by 18% for each.

Applied -2% offset to Air to Air missile symbol.

SFAPWMAA

@csmoore - updated Medevac rotary wing symbol that was showing up too large.

I think with that last change, this issue is done. Removing the Dev tag.
Still needs verified.

Issue_73_test_data.zip
Images and test script to generate them with the runtime app.

APP6B Standard

Verified SFAPMFO--------in Pro 2.2 Daily Build 11859

Runtime 100.2

Output

In addition to verifying the symbols draw in Pro 2.2 and Runtime 100.2, the symbols align properly in relation to other symbols.

@topowright I've manually tested these items.  2 labels are still present. QC- Verify (Automated) and QC-Verify (Checklist).  I am not sure if these are applicable.
If they are not, this issue can be moved to Done.


Unable to make small straight line on straight lined brush

When tried to make small straight line from straight lined brush in 90 degree(straight vertical) it is unable to be drawn till a certain limit.

This is what we have made it ...  50 pixel tolerance.
On Thu 11 Oct, 2018, 10:48 AM Biswajeet-chimple<EMAIL_ADDRESS>wrote:

When tried to make small straight line from straight lined brush in 90
degree(straight vertical) it is unable to be drawn till a certain limit.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/chimple/tahiti/issues/219, or mute the thread
https://github.com/notifications/unsubscribe-auth/AjIOO1nVe5e6YbDymeaHX2bl9i1wN974ks5ujtS0gaJpZM4XWzFq
.

Should be fixed now


Support solidity 0.8.25

Would it be possible to update the version of solc-typed-ast so that we can use solidity 0.8.25?
I understand that solc-typed-ast has not yet released a new version for solidity 0.8.26 but it would be already good to support 25.

@beeb done ser, please try v1.1.2 and let us know if you need anything else.

Seems like the package still depends on the outdated version
https://github.com/defi-wonderland/natspec-smells/blob/a7e47bca42799863fb6b13f04996cdb9240099ff/package.json#L31
It should read 18.1.6

My bad! The change must have gotten lost in the branch-switching shenanigans. We'll fix that asap.

@beeb please check out v1.1.3, it supports Solidity 0.8.25

All good now! thanks


Removing base group from Config subgroup list

LGTM will deploy the TF changes in the morning to avoid disruption then we can get this out soon!

Awaiting a Manager Seal of Approval, will start the deploy in the morning and once we get the MSA deploy out to customer.


timing_hash.rb:8:in `each': comparison of Fixnum with String failed (ArgumentError)

I've just installed wbench on Ubuntu 12, but i recieve this error:
wbench -b firefox https://www.desktoppr.co/
/var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/timing_hash.rb:8:in each': comparison of Fixnum with String failed (ArgumentError) 	from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/timing_hash.rb:8:in min_by'
from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/timing_hash.rb:8:in initialize' 	from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/timings/browser.rb:9:in new'
from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/timings/browser.rb:9:in result' 	from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/benchmark.rb:32:in browser_results'
from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/benchmark.rb:20:in block (3 levels) in run' 	from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/browser.rb:26:in visit'
from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/benchmark.rb:20:in block (2 levels) in run' 	from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/benchmark.rb:18:in times'
from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/benchmark.rb:18:in block in run' 	from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/benchmark.rb:17:in tap'
from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/benchmark.rb:17:in run' 	from /var/lib/gems/1.9.1/gems/wbench-0.4.0/lib/wbench/benchmark.rb:4:in run'
from /var/lib/gems/1.9.1/gems/wbench-0.4.0/bin/wbench:39:in <top (required)>' 	from /usr/local/bin/wbench:19:in load'
from /usr/local/bin/wbench:19:in `'
any ideas?

Hi Thank you for a great product!
But I receive this error since July 23nd, 2015 (JP time).
It always error occurs.
It did not receive an error until July 22, 2015 (JP time).
Mac : OS X Yosemite 10.10.4
Ruby : ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
Chrome : 44.0.2403.107 (64-bit)
$ ./bin/wbench -l 1 http://www.google.com
/Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/timing_hash.rb:8:in `each': comparison of Hash with<PHONE_NUMBER>940 failed (ArgumentError)
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/timing_hash.rb:8:in `min_by'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/timing_hash.rb:8:in `initialize'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/timings/browser.rb:9:in `new'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/timings/browser.rb:9:in `result'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/benchmark.rb:32:in `browser_results'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/benchmark.rb:20:in `block (3 levels) in run'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/browser.rb:34:in `visit'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/benchmark.rb:20:in `block (2 levels) in run'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/benchmark.rb:18:in `times'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/benchmark.rb:18:in `block in run'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/benchmark.rb:17:in `tap'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/benchmark.rb:17:in `run'
        from /Users/toshiyuki_hasegawa/workspace/wbench/lib/wbench/benchmark.rb:4:in `run'
        from ./bin/wbench:43:in `<main>'

Could you tell me if you have an idea that can be resolved?


⚠ Samsung has degraded performance

In 390b1e8, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2465 ms

Resolved: Samsung performance has improved in f6b62b6.


diskover ce v2.0-rc.4 unusable -- 500 error after login

valid credentials or not, either way the login page redirects to a 500 error. nothing thrown to container log.
Confirmed with another user via Discord.
had to pull docker image with this tag in order to get past this issue: lscr.io/linuxserver/diskover:version-v2.0-rc.3
** assuming this issue is with the release and not the docker package!

It appears to be a lsio docker container issue, php is missing sqlite3 extension which is now required in rc4, a db file gets created to store encrypted diskover user password in web root named diskoverdb.sqlite3.
https://discord.com/channels/354974912613449730/506925392603512839/945989781152743444
Forwarded this onto the lsio dev who looks after the docker container.
Appears to be another issue with the container as well:
https://discord.com/channels/354974912613449730/506925392603512839/946602422439137310

That is for the update! I posted something to them as well.
On Feb 24, 2022, 23:51, at 23:51, Chris Park @.***> wrote:

It appears to be a lsio docker container issue, php is missing sqlite3
extension which is now required in rc4, a db file gets created to store
encrypted diskover user password in web root named diskoverdb.sqlite3.
https://discord.com/channels/354974912613449730/506925392603512839/945989781152743444
Forwarded this onto the lsio dev who looks after the docker container.
Appears to be another issue with the container as well:
https://discord.com/channels/354974912613449730/506925392603512839/946602422439137310
--
Reply to this email directly or view it on GitHub:
https://github.com/diskoverdata/diskover-community/issues/98#issuecomment-1050547380
You are receiving this because you authored the thread.
Message ID:
@.***>

lsio updated the docker container to include php sqlite


[3.24.0] Regression - Cannot specify both api_user_service_key and api_token

Confirmation

[X] My issue isn't already found on the issue tracker.
[X] I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version
Terraform v1.2.9
Cloudflare provider v3.24.0
Affected resource(s)

cloudflare_origin_ca_certificate

Terraform configuration files
resource "cloudflare_origin_ca_certificate" "test" {}

Link to debug output
N/A
Panic output
No response
Expected output
Resource cloudflare_origin_ca_certificate requires api_user_service_key but not other resources.
Actual output
│ Error: Invalid combination of arguments
│
│   with provider["registry.terraform.io/cloudflare/cloudflare"],
│   on  line 0:
│   (source code not available)
│
│ "api_user_service_key": only one of
│ api_key,api_token,api_user_service_key can be specified, but
│ api_token,api_user_service_key were specified.
Steps to reproduce

Try to use cloudflare_origin_ca_certificate and cloudflare_record in the same Terraform configuration.

Additional factoids
No response
References
No response

this is not a regression. you only need to provide one of these auth methods when making API calls and sending both makes the internals difficult (and time consuming) to debug.

Hmm, ok. Quite a breaking change. So, I guess we need to create an alias provider for cloudflare_origin_ca_certificate.
btw, documentation still state: This resource requires you use your Origin CA Key as the [api_user_service_key](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/index#api_user_service_key), in conjunction with an api_token or email and api_key.

an alias provider will also work with separate credentials.
feel free to send over a PR updating the docs and I'll get it merged. check out https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/registry-documentation.md on how the documentation generation works.

Maybe I am missing some workaround, but this change has broken the use of cloudflare_origin_ca_certificate resource. If the token + api_user_service_key are specified together, the provider throws an error that only one of auth methods can be specified. If only the token is used, I get error finding OriginCACertificate "<my certificate ID>": Authentication error (10000). And if only api_user_service_key is specified the provider errors with error creating new Cloudflare client: invalid credentials: key & email must not be empty

Maybe I am missing some workaround, but this change has broken the use of cloudflare_origin_ca_certificate resource. If the token + api_user_service_key are specified together, the provider throws an error that only one of auth methods can be specified. If only the token is used, I get error finding OriginCACertificate "<my certificate ID>": Authentication error (10000). And if only api_user_service_key is specified the provider errors with error creating new Cloudflare client: invalid credentials: key & email must not be empty

IMHO, this kind of breaking change should not have been included in 3.x but anyway, this is what you need to do now::
provider "cloudflare" {
  alias  = "api_user_service_key"
  api_user_service_key = var.cloudflare_api_user_service_key
}

resource "cloudflare_origin_ca_certificate" "aks_ingress" {
  provider = cloudflare.api_user_service_key
}

Ref: https://www.terraform.io/language/providers/configuration#alias-multiple-provider-configurations

@eyedvabny that is a slightly different to what is mentioned here however, that was definitely an oversight. i've pushed up #1923 which will allow setting it when it is the only provider configuration offered. otherwise, you're free to use the workaround mentioned above.

any idea when 3.25.0 will be available? we're running into this issue

@jacobbednarz I don't see any workaround, you ether end up with a Authentication error (10000) or a key & email must not be empty

@jacobbednarz I don't see any workaround, you ether end up with a Authentication error (10000) or a key & email must not be empty

Yeah I ended up having to downgrade to 3.22 I believe and reverting to key and email.

Why is this closed?

@jacobbednarz I don't see any workaround, you ether end up with a Authentication error (10000) or a key & email must not be empty

I think that the workaround that Jacob is referencing is the one given by @uncycler in which an alias provider has to be given. After 3.25 is released, you'll be able to create a provider with only api_user_service_key which can then be used with cloudflare_origin_ca_certificate resources while other resources can use a provider with api_token. You'll be unable to use environment variables to pass the credentials in this scenario.

v3.25.0 was released yesterday so updating will resolve the underlying problem here.
you will need to still split the configuration based on the authentication mechanism (either with an alias or separate directory provider setup).

The workaround by @uncycler does not work for me. Error is "api_key": only one of 'api_key,api_token,api_user_service_key' can be specified, but 'api_key,api_user_service_key' were specified.. Using v3.25.0.
I can't wrap my head around why I can't just pass both keys and have TF working. Can you please provide a working example how to use this monstrosity?

Got it working. Won't run with env variables, I guess.
For all the people wasting time to get this working, here is a ready example:
terraform {
  required_version = ">= 1.0.2"
  required_providers {
    cloudflare = {
      source = "cloudflare/cloudflare"
      version = "~> 3.0"
      configuration_aliases = [ cloudflare.abomination ]
    }
  }
}
provider "cloudflare" {
  api_key = "your_api_key_here"
  email =<EMAIL_ADDRESS>}

provider "cloudflare" {
  alias  = "abomination"
  api_user_service_key = "origin ca key here. the one from the very bottom of api tokens page. called service key nowhere on the internet"
}

(...)

resource "cloudflare_origin_ca_certificate" "origin_cert" {
  provider = cloudflare.abomination
  csr                = tls_cert_request.testreq.cert_request_pem
  hostnames          = [ "*.mydomain.com", "mydomain.com" ]
  request_type       = "origin-rsa"
  requested_validity = 365
}

You could use tfvars, but still this is a pain to configure. I'm struggling to pass the provider alias to a module, this change is just increasing complexity for the user without any direct benefit.

If you're using Terragrunt, you can automate the pain points with something like in your terragrunt.hcl parent config:
generate "terraform_cloudflare_provider_fix" {
  path      = "terraform_cloudflare_provider_fix.tf"
  if_exists = "overwrite_terragrunt"
  contents  = <<EOF
## TODO: See how to fix this once upstream finds a solution.
## This is a workaround for using certain resources like cloudflare_origin_ca_certificate without issues.
## See more info: https://github.com/cloudflare/terraform-provider-cloudflare/issues/1919

variable "CF_API_TOKEN" {
  type      = string
  sensitive = true
}

variable "CF_API_USER_SERVICE_KEY" {
  type      = string
  sensitive = true
}

provider "cloudflare" {
  api_token = var.CF_API_TOKEN
}

provider "cloudflare" {
  alias                = "cf-origin-cert-workaround"
  api_user_service_key = var.CF_API_USER_SERVICE_KEY
}
EOF
}

@orlandothoeny you can use env vars to pass variable values to Terraform using the prefix TF_VAR_.
@pielgrzym I was able to configure two Cloudflare providers and pass them both to a local module. The local module should have the [configuration_aliases](https://www.terraform.io/language/providers/configuration#alias-multiple-provider-configurations) keyword.
I've created a gist to show how I am using TF_VAR env vars and Cloudflare provider aliases in a module.
Not a great experience but it is still possible to get functionality that we had prior to version ~3.18.

@mattmichal thanks for sharing this - I also did manage to configure this, but I passed the service token via module variable - I'll try removing this part if per your suggestion :)
I actually migrated away from env variables thanks to this issue - tfvars file work better for me since I have a lot of different CF/AWS accounts to manage.

@mattmichal ah, you pass whole providers block to the module. I just redefined them there and passed only the var with service key.  Why can't we just have a dedicated provider variable for the ca stuff? It's probably like 3 lines of go instead of hundreds of lines of useless boilerplate all over tf setup :angry:

@mattmichal your approach is much better. creating a local provider declaration in a module causes issues while removing the module (one needs to manually perform a targetted destroy before removing the module from tf file).

Here's my take on getting all resources available today (as of v3.26.0) working with vanilla terraform (I might add a few terragrunt examples later on):
# main.tf
terraform {
  required_version = "~> 1.0"
  required_providers {
    cloudflare = {
      source                = "cloudflare/cloudflare"
      version               = "~> 3.26"
      configuration_aliases = [cloudflare.user_service_key, cloudflare.email_api_key, cloudflare.fixed_account_id]
    }
  }
}

# providers.tf
provider "cloudflare" {
  api_token = var.cloudflare_api_token
}

provider "cloudflare" {
  alias                = "user_service_key"
  api_user_service_key = var.cloudflare_api_user_service_key
}

provider "cloudflare" {
  alias                = "email_api_key"
  api_key              = var.cloudflare_api_key
  email                = var.cloudflare_email
}

provider "cloudflare" {
  alias                = "fixed_account_id"
  account_id           = var.cloudflare_account_id
  api_token            = var.cloudflare_api_token
}

# api_tokens.tf
data "cloudflare_api_token_permission_groups" "all" {
  provider = cloudflare.email_api_key
}

# origin_ca_certificates.tf
resource "cloudflare_origin_ca_certificate" "example" {
  provider = cloudflare.user_service_key
  …
}

# worker_scripts.tf
resource "cloudflare_worker_script" "example" {
  provider = cloudflare.fixed_account_id
  …
}

# workers_kv_namespaces.tf
resource "cloudflare_workers_kv_namespace" "example" {
  provider = cloudflare.fixed_account_id
  …
}

Then create a terraform.tfvars with:
cloudflare_account_id = ""
cloudflare_api_key = ""
cloudflare_api_token = ""
cloudflare_api_user_service_key = ""
cloudflare_email = ""

Everything else will use the default cloudflare provider configured with an API Token. Some of these resources will be fixed once v4 is released.

this is completely backwards
instead of pushing the complexity of creating separate provider (for just the one resource) on the user, the provider should be smart enough to choose which credentials to use for which resource
I'm sticking to 3.22 until this is properly fixed

Looking at the code for the provider it should be possible to set one or the other to a string empty value which would eliminate it, however it does not seem like that is working.
Because the first check is a null check (https://github.com/cloudflare/terraform-provider-cloudflare/blob/eeb7b33accaa91dee5b1ce0a698ab6c47ccd0853/internal/framework/provider/provider.go#L273), and the second check is a string empty check (https://github.com/cloudflare/terraform-provider-cloudflare/blob/eeb7b33accaa91dee5b1ce0a698ab6c47ccd0853/internal/framework/provider/provider.go#L279)
However there is a regex validation for the apikey so that never gets that far. That check does not exist on the APIUserServiceKey, however even when that is set to an explicit "" in the provider config, it still picks up the environment variable.
I would be cool to allow an explicit "" for both api_token and api_user_service_key that way the providers could be configured like this:
provider "cloudflare" {
  alias                = "user_service_key"
  api_user_service_key = var.cloudflare_api_user_service_key
  api_token = "" #explicitly set to ""
}

provider "cloudflare" {
  alias                = "fixed_account_id"
  account_id           = var.cloudflare_account_id
  api_token            = var.cloudflare_api_token
  api_user_service_key = "" #explicitly set to ""
}


Fixing call specific options

Major change is call-specific options are not supported and tested. They weren't working at all for me.
Applied mix format
Better docs on call-specific reporting
Tests now pass on CI. Cut out some older CI versions and included new elixir versions.
Fixed some deprecation warnings on Elixir 1.11

Coverage increased (+5.7%) to 58.434% when pulling dedc9875e29e2c74225eed99381002346b018562 on call-specific-options into de000e82dd075c9985670ee7f84e75ea61152325 on master.


RuntimeError: Calculated padded input size per channel: (6). Kernel size: (7). Kernel size can't be greater than actual input size

I always get:
RuntimeError: Calculated padded input size per channel: (6). Kernel size: (7). Kernel size can't be greater than actual input size
Here is the code. I tried both load_speaker and create_speaker
from outetts.v0_1.interface import InterfaceHF, InterfaceGGUF
Initialize the Hugging Face model
model_name = "OuteAI/OuteTTS-0.1-350M"
interface = InterfaceHF(model_name)
Define your input text
text = "Hello world. How are you doing? Let's hope this works..."
Initialize the speaker from a file
#speaker = interface.load_speaker("maarten.pkl")
speaker = interface.create_speaker(
"voice.wav",
"Filler text (also placeholder text or dummy text) is text that shares some characteristics of a real written text, but is random or otherwise generated. It may be used to display a sample of fonts, generate text for testing, or to spoof an e-mail spam filter. The process of using filler text is sometimes called greeking, although the text itself may be nonsense, or largely Latin, as in Lorem ipsum."
)
Generate TTS output
output = interface.generate(
text=text,
speaker=speaker,
temperature=0.1,
repetition_penalty=1.1,
max_length=4096  # Ensure this matches or exceeds the length of your input
)
Play the generated audio
output.play()
Save the generated audio to a file
output.save("output.wav")

This issue occurs when get_audio produces an empty output, which means it was unable to find audio tokens. This can happen if your speaker input is too long and exceeds the context length of 4096, or if the model returns EOS token too early. I suggest using a shorter speaker input, ideally between 5-15 seconds. I’ll implement a fix soon that will display an error message when audio generation fails due to empty output.

Thanks for clarifying. My audio was long so will try with a shorter one.

Just to confirm that a shorter audio worked. Thanks for the help.


Adding a tenant to a record persisted with tenant nil

I have a case where I persist a record of request input (email processing) before evaluating which tenant it should be assigned to.
When trying to add a tenant id later, persistence silently fails due to
https://github.com/citusdata/activerecord-multi-tenant/blob/4512aeeb72504d401f4ed3a869039ee075a2208e/lib/activerecord-multi-tenant/query_rewriter.rb#L227-L233
seeing MultiTenant.with_write_only_mode_enabled? false and a tenant (temporarily) set, so the update has a WHERE clause for the target id when the database record currently has nil.
The tenant is temporarily set by
https://github.com/citusdata/activerecord-multi-tenant/blob/4512aeeb72504d401f4ed3a869039ee075a2208e/lib/activerecord-multi-tenant/model_extensions.rb#L96-L110
I considered whether such code should generally use attribute_was like
        around_update -> (record, block) {
          if MultiTenant.current_tenant_id.nil?
            MultiTenant.with(record.attribute_was(partition_key)) { block.call }
          else
            block.call
          end
        }

But that might be vulnerable. perhaps it should only allow changing from untenanted nil to tenanted like
        around_update -> (record, block) {
          record_tenant = record.attribute_was(partition_key)
          if MultiTenant.current_tenant_id.nil? && !record_tenant.nil?
            MultiTenant.with(record_tenant) { block.call }
          else
            block.call
          end
        }

Or perhaps be further restricted to some setting on the model to allow nontenant=>tenant.
Perhaps this would be a useful pattern for upgrading a single model/table to tenanted, rather than setting an app-wide MultiTenant.enable_write_only_mode
Thoughts/Suggestions?

This is hitting us too, I personally like the second solution
        around_update -> (record, block) {
          record_tenant = record.attribute_was(partition_key)
          if MultiTenant.current_tenant_id.nil? && !record_tenant.nil?
            MultiTenant.with(record_tenant) { block.call }
          else
            block.call
          end
        }


test-branch/execute-job/wrong-commit-sha-on-pr/b1b68f8d-e172-4610-8f5c-5be8e1f823b8

PR for testing 551bc202497da49dfed9da5a44f7bd6047a08655

/canonical/self-hosted-runners/run-workflows 931ad21dd9ace68aaa0a7d341e94de96ad93fa6b


Change page export validity check on client and server in development

Resolves #4055
Credit: https://github.com/zeit/next.js/pull/5095
I didn't use the ignore webpack plugin from the original PR and tested bundle size with https://github.com/zeit/next.js/pull/5339 - seems to be safe on that front.
Was able to get tests to pass locally, unsure of what goes wrong in CI 🤷♂
Questions

The initial PR didn't include changes to next-server/lib/router in getRouteInfo(). Should the same changes be made within?

Should we add a test for rendering a component created via forwardRef()?

component-with-forwardedRef:
export default React.forwardRef((props, ref) => <span {...props} forwardedRef={ref}>This is a component with a forwarded ref</span>);

some test:
test('renders from forwardRef', async () => {
  const $ = await get$('/component-with-forwardedRef')
  const span = $('span')
  expect(span.text()).toMatch(/This is a component with a forwarded ref/)
})

Yes we should definitely add that test. Also a test for memo( would make sense

So these two fail:
✕ should recover after exporting an invalid page (30575ms)
✕ should recover after a bad return from the render function (30526ms)

You can run them using:
yarn testonly --testPathPattern="basic" -t "should recover after exporting an invalid page"

Thanks for this 👍
I think we also need to update lib/router/router.js: https://github.com/zeit/next.js/blob/82c5cc38d59e65d98c74f5012c3780e2832880c6/packages/next-server/lib/router/router.js#L263-L265

-_-
the tests are failing, but the error is firing correctly?

I just investigated why the tests failed and realized that you had changed the value of export default "something" to export default undefined incidentally this exposed a bug in HMR where if undefined is the component being exported we don't apply the changes. It might be interesting to investigate this further, but for the current PR I've changed undefined to {}

I am trying to upgrade my reason-react project from 7.0.2 to latest canary and getting The default export is not a React Component in page: "/".  The error seems related to things talked about in this ticket...if that is true, could you give me your advice on this issue:
https://github.com/zeit/next.js/issues/5929


AZ-551: Add CLI tool for key and validator rotation

Also added some minimal documentation to the command that was lacking it @deuszx . Probably insufficient for informed external usage, but I believe we will keep developing this tool and we should build up a better documentation on the way when more commands appear and the interface becomes more standardized.


PLAT-78043: Updated Checkbox style a little bit

Checklist

[x] I have read and understand the contribution guide

[x] A CHANGELOG entry is included

[ ] At least one test case is included for this feature or bug fix

[x] Documentation was added or is not needed

[ ] This is an API breaking change

Issue Resolved / Feature Added
Checkbox and CheckboxItem are round and those shenanigans just don't fly anymore! #ComeOnNowHey
Resolution
Updated the styles to match the latest designs, squaring the corners and tuning the colors for better contrast. :sogood:

The checkmark seems tight, primarily for FormCheckbox, compared to the spec. Are you seeing the same?

Also, should DaySelector return to circular checkboxes as well?

Yes, this is expected, as is DaySelector. The tight tolerance is why @viodragon2, above, suggested verifying with GUI, which I signed up to do. The direction we were given during the Tuesday CC was to change exclucively the shape, not any other sizes/colors.


Question regarding reproducibility of train, validation splits

Are the train, validations splits of the dataset guaranteed? From what I see, if I'm not
missing something, randomness depends on random_split that uses PyTorch default_generator if a new PyTorch version changes this, is it possible that 2 different versions of the MNISTDataModule for example with 2 torch versions have different splits?
Thanks and sorry if this is obvious!

@alejandrodumas hey, thanks for the question.
The main idea here is that the test set for these data modules are already separate. For datasets with an even distribution of examples across classes, having a random split for train-val should not matter. It also tests your model's generalization capabilities if you are training on separate train-val splits for different runs. You models should be able to give similar performance on random splits. (Also, for unsupervised learning, this should not be an issue at all)
However, we can look into this for unbalanced datasets which have limited examples for certain classes.

Thanks @ananyahjha93 for the clarification, I have one more doubt regarding this subject if you don't mind, if we read this line  and compare it with this  we call in two different instances the function random_split shouldn't the generation of the train and validation be related? Could it be the case that we're mixing examples that could be present on both classes? I think that we should store the indices of the train set so the validation set is aware. Thanks again!

@alejandrodumas looking into this!

@alejandrodumas The splits you linked to will be encouraged to be done in the datamodule's setup hook, similar to how you would do something like that in a LightningModule. This way you'd only make one call instead of two as you showed above. Great catch on that btw 😄 .
The LightningDataModule will come packaged directly with lightning in version 0.9.0 and will be removed from bolts. You can find the docs on the latest version of the built-in datamodule class in the lightning docs here.
@ananyahjha93 Let's close this once we remove calls to random_split from dataloader hooks across this repo (if you think that's reasonable). That way there is less confusion.

@alejandrodumas , yes the random_split needs the generator arg to make it deterministic. I've updated those in bolts now. Otherwise you will have also trained on val data during training. Looks like pytorch 1.6 added that support.


"Rollback" authentication policy version to v1alpha1.

As K8s CRD does not allow multiple version co-exist, rolling up config version require manual removal for the old CRD. This may cause trouble for users using 0.6
As authentication policy is not yet release to public (both alpha1 and 2), we will rollback the version, but still make change to the API. Following steps will be done:

[ ] Copy alpha2 API to alpha1.
[ ] Update pilot API Sha, then change ProtoSchema back to v1alpha1, together with other import changes. As proto are the same, no other code changes needed.

@qiwzhang @lei-tang FYI, please not update proxy API sha while this is in progress. I'll fix proxy code as soon as pilot problem is resolved. Thanks.


HOMC seed issue

Results from the HOMC memory process cannot be replicated when setting seed. This issue is isolated to the HOMC as MC is reproducible when setting seed.

This was fixed in version 1.1.0

This was fixed in version 1.1.0


Fix oob fuzz test failure

One could fix and rewrite this in many ways, but to keep small changes this is my proposal.

Fix for #586


[style]: Adding animated Loader to the 3D models while they completely load.

What's the style idea?
Enhance user experience with a sleek loading animation integrated into your 3D models, providing visual feedback as content loads. Elevate engagement by keeping users informed and entertained during the loading process, ensuring a polished and dynamic interface. In this way, we can Immerse audience in a seamless transition from anticipation to enjoyment as they explore fully-loaded 3D creations.
Add screenshots
Add screenshots

Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I have read the Contributing Guidelines
[X] I agree to follow this project's Code of Conduct
[ ] I'm a GSSoC'23 contributor
[X] I want to work on this issue

We have issue #120 where I've mentioned the recommended solution for the issue. You can take a look there.

@ShwetKhatri2001 I have seen the issue, can you assign me to work on this issue under swoc'24?

Sure, I'm assigning you that issue. If you want to improve it more than the mentioned requirements there then come back to this issue.

Hey @Akshanshkaushal , I see you've shown interest to work on many issues. But I can assign you one at a time.
So, I'm giving a chance to others for now. You may improve on their implementation later.

hey @ShwetKhatri2001 but I have solved this one and implemented the required . Could you please reassign me this.

Hi @ShwetKhatri2001 , If no one is working on this issue you can assign it to me

Closing this because it's a duplicate issue.


Callable secret to support Firebase that has multiple kid's

Firebase JWT tokens can have (currently) 3 kid's in their headers and to validate the token you have to use the correct key. This PR allows the secret to be a callable function so you can grab the kid from the token and return it. For example:
$authenticationOptions = [
    'secret'    => function ($token) {
        try {
            $jwt = (new Parser())->parse($token);
        } catch (\Exception $ex) {
            return null;
        }

        if (!$jwt->hasHeader('kid')) {
            return null;
        }

        $keyId = $jwt->getHeader('kid');

        return self::$keyStore->get($keyId);
    },
    'algorithm' => ['RS256'],
];
$app->add(new JwtAuthentication($authenticationOptions));

More info at https://firebase.google.com/docs/auth/admin/verify-id-tokens

Thanks for the PR! However this feature was recently done in bit different way by using the multiple key support firebase/php-jwt library provides.  If an array of secret keys is given, middleware will choose the key based on kid claim in the token header.
$middleware = new JwtAuthentication([
    "secret" => [
        "acme" =>"supersecretkeyyoushouldnotcommittogithub",
        "beta" =>"anothersecretkeyfornevertocommittogithub"
    ]
]);

But thanks again!


Remove torch.nn.module... from api doc

I thought that would be easy to fix but it is not...

Do you know (or speculate) why this does not work?

Any changes I made in class_template.rst seem to only affect the overview of the class but not the listed members. Need to better understand how this recursive autosummary approach of sphinx works.
So I can go from

to get rid of everything in the overview on the right but still present in the list below:

Doing something like
   .. autosummary::
   {% for item in methods %}
   {% if not item == 'add_module' %}
      ~{{ name }}.{{ item }}
   {%- endif %}
   {%- endfor %}
   {% endif %}
   {% endblock %}

in class_template.rst removes add_module from the list but this seems a very tedious solution.

We could also jsut remove the autosummary.
The are listed below by autodoc anyways (which can be controlled by the change in this PR)
We might want to keep autosummary for the attributes only (then we only have to remove 2-3 pytorch attributes), or add attributes also to the autodoc output.
Either way, I would prefer the attributes to be listed in a table.
So this is a larger thing to clean up our doc template...

But this PR still lgtm to partially address the issue


Rename ISA Qubit class to not clash with existing class name.

I don't think this is going to  / should happen. Just something to be aware of


Move SkoptSampler

Motivation
Progress https://github.com/optuna/optuna/issues/4484
Description of the changes
No tests have transferred since SkopSampler is highly unrecommended and not tested in optuna/optuna

I think these comments have not been resolved.

perhaps, scikit-optimize needs to be added to pyproject.toml (cf. here),
because this PR does not include any tests, could you provide minimal code like the one below to verify the SkoptSampler works as intended for reviewers?

I've made another PR (https://github.com/optuna/optuna-integration/pull/78) as a follow-up task.
Note that our CI cannot detect dependency errors because no tests are prepared for SkoptSampler.


Add support for UI customisation

Open for https://github.com/apache/cloudstack-primate/issues/359

[x] Add support on branding the UI: logos, and theme
[x] Add user documentation on branding

@utchoang just a note - when you test please do a npm run build and copy/run the dist files either under nginx/docker or within a CloudStack management server. The idea is end-user would install rpm/deb/docker container etc and should be able to make changes to the theme.json (or similar) config file.

@utchoang this is a important thing. Cool! @rhtyd you mean they will fetched in the build process or later?

@svenvogel @utchoang  the expectation as a user would be that after one installs Primate (say using the deb/rpm/archive or even docker image) then one should be able to edit the config.json to customise the theme/colours. Therefore in order to test, we need to build it (npm run build) and from the dist test by either copying to a mgmt server env or use docker/nginx reverse proxy (see README on how to setup nginx reverse proxy with the build Primate dist), and then change colours in theme.json (or any other config file/location) and refresh UI to see theme colours changed.
It may be necessary to load less.css etc to make it work @utchoang - I've not explore that myself, but as @svenvogel mentions it would be really cool feature to have!

@rhtyd I have researched and found out that I have understood how it works and how to do it. I will finish it as soon as possible. Thanks.

Fantastic @utchoang - no problem, no one's in a hurry, we're just excited about this feature.

@rhtyd cc @svenvogel I tried to customize the theme by apply https://www.npmjs.com/package/antd-theme-webpack-plugin. I was able to change the text color, button color, etc. But for other properties such as font size, it only applies after rebuilding again.
Can you have any solution for this?

No, I think wr don't need to configure fonts, sizes etc. The feature of providing some way to customise the theme to the end user by means of some config file is enough.
@utchoang so does it work in the built dist and changing just the config.json?

@rhtyd Yes. Just change the information in the config.json file. Then refresh the page and it will be applied.

Fantastic, well done @utchoang - is it ready for review now, or you still doing changes?

@rhtyd I need to edit a few more points. Also, do I need to write user documentation?

A short markdown documentation in docs/ would be great @utchoang thanks

@utchoang yes a doc would be good

@utchoang we need to change the logo in the config.json?

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-1989)

@svenvogel Yes. I and Rohit have exchanged about this on https://github.com/apache/cloudstack-primate/issues/359#issuecomment-638573176

No, I think wr don't need to configure fonts, sizes etc. The feature of providing some way to customise the theme to the end user by means of some config file is enough.
@utchoang so does it work in the built dist and changing just the config.json?

@rhtyd we need to change the size of the logo too. We need to find a good way to use this with config file? I would prefer to add something or how we could change this by an reproducable way? cc @utchoang

@svenvogel which logo - the login logo, or the left-top side logo that shows after we login? Or any other? I think instead of config file, we can have a folder to put logos (svg/png, preferably svgs) and customisation can be done by replacing the logo file than change in config.json file, what do you think?

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

@utchoang can you move the following keys to the config.json from the src/config/settings.js; which would allow the admin configure the API request path, the doc base URL path and the app/tab title prefix:
  apiBase: '/client/api',
  docBase: 'http://docs.cloudstack.apache.org/en/latest',
  appTitle: 'CloudStack',

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2005)

@rhtyd cc @svenvogel
About changing the logo size. I think the @Seven ideas would be good because the end-user only needs to change the logo size in the config file instead of using the third software to adjust it. I will try to find a way to interfere with the Ant Design style and I hope it works.

@utchoang do you know which logo is @svenvogel talking about the logo in favicon, or login screen, or post-login (on left-top side) or anything else?

@rhtyd I think all logo (login screen, left-top side,...)

@rhtyd He means when we wanted to change another logo, maybe its size would not be right, so just adjust it using the config file instead of the third software.

@utchoang okay, I guess first thing then - move all the banner and logo svgs to public/assets (I think you've moved logo, maybe even the error/403/404/500 pngs). I think the size is bound by the navigation bar width - that would be a limitation. Generally, like legacy UI, all images have a fixed sized - otherwise it will affect how the UI looks (it will cause other components/parts to spill out).

Note for myself - we'll need to check and get some of the config from legacy UI such as keyboard options: https://github.com/apache/cloudstack/pull/3258/files

@rhtyd @utchoang yes maybe the layout will give us only a fit size of the icon/logs and i agree with a copy and paste of the logo in a folder and overwrite them into. the cool thing from our templater was in the old UI there was a possibility to overwrite things with a "config" file if anyone want change different things in the UI before we build them. we dont need to hack in the files directly e.g. he want to change the size from logo (i know this will maybe no fit into the layout/design) or change other things.

@utchoang let me know when you're done with any other changes, I'll help review and merge this

@rhtyd I will notify you when it is completed with the new user document.

@utchoang please resolve conflict and ping me if/when ready for review; thanks.

@rhtyd It ready for review. Thanks.

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2049)

@utchoang can you check the build - http://primate-qa.cloudstack.cloud:8080/client/pr/372/#/dashboard

The default logo (after login, on left-top side) is missing, and the login banner
There's a fetching configuration message which is under loading (something went wrong?)
Maybe the issue is assuming the path/url of the config.json (could we try the local path like ./ instead of /)

Thanks for the effort, looks great so far

@rhtyd I think to turn to . /config.json did not solve the problem. Because the URL for the fetch configuration file is wrong. Instead, I think using process.env.BASE_URL to fetch the config.json file is better.
What do you think about this?

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2062)

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2064)

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2068)

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2069)

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2071)

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2079)

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/372 (JID-2082)


Source hIghlight in javascript is broken while parsing regex with double quotes

VSCode Version: 1.42.1
OS Version: Mac OS 10.15.3

Steps to Reproduce:

Load appium-adb npm module into vscode from https://github.com/appium/appium-adb
Open the file https://github.com/appium/appium-adb/blob/master/lib/tools/adb-commands.js in the edtor
Scroll to the line https://github.com/appium/appium-adb/blob/68a62e860990b1cae7a768be415378de115f6841/lib/tools/adb-commands.js#L1901
:

  if (!/\bresult=-1\b/.test(output) || !/\bdata="{/.test(output)) {
    log.debug(output);
    throw new Error('Cannot retrieve SMS list from the device. ' +
      'Check the server log for more details');
  }

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

The problem actually starts before the double quotes. The first regex in the if statement is scoped incorrectly too. It's the !/ that's causing problems.

Looks like you're not the only one to find this @mykola-mokhnach. Duplicate of https://github.com/microsoft/TypeScript-TmLanguage/issues/806


Nested decoupled service: how to?

I'm trying to follow the documentation and after reading #139 and #1254 I'm more confused than ever.
I have some tables on my DB, let's say User, Customer and UserCustomer (which implements an n:n relation between User and Customer).
I have set up endpoints in my server at /user/[id], /customer/[id] and /user/[iduser]/customer/[idcustomer]
I can CRUD on User and Customer tables using the Restangular.service syntax:
angular.module('...')
  .factory('User', function (Restangular) {
    return Restangular.service('user');
  })
  .factory('Customer', function (Restangular) {
    return Restangular.service('customer');
  })

In my User factory I would like to define a getCustomer method which populates an user instance with a customers variable, pointing to a collection of Customer.
Seems I can do something like:
angular.module('...')
  .factory('User', function (Restangular) {
    Restangular.extendModel('user', function(model) {
      if (model.customers) {
        Restangular.restangularizeCollection(null, model.customers, 'customer');
      }
      return model;
    });
    return Restangular.service('user');
  });

but can't figure out how to use it in a controller!
I'd like to do something like:
angular.module('...')
  .controller('...', function ($scope, User) {
    User.getList().then(function (users) {
      $scope.users = users;
      angular.forEach(users, function (user) {
        user.customers.getList();
      });
    });
    $scope.addUserCustomerAssociation = function (user, customer) {
       user.customers.post(customer.id);
    };
   $scope.removeUserCustomerAssociation = function (user, customer) {
       user.customers.remove(customer.id);
    };
  });

You should be able to do that in a controller. What isn't working?

I am also trying to figure this out.  How to build Nested decoupled services?

That should be working, the only thing to note is that because you are passing 'null' in a the first parameter to restangularizeCollection, it won't build a nested url for you e.g. '/users/1/customers'.


Disable non-native custom hovers

I hate the vs code custom hovers.
In previous versions, I could disable them with "workbench.experimental.useCustomHover". As a matter of fact, the only thing that makes vs code tolerable is that It has always taken extreme pains to try to provide a native experience where possible.
The custom hovers are just stupid, they are limited to the viscose window, and they just work weird.
I'm just extremely frustrated by the new hovers and found out I had to downgrade vs code so that I would not be forced to use it.

We're adopting the custom hovers in places where they add additional functionality (links, fast display, status bar actions, markdown), so we can't just switch them off. You could try tweak the style of them to your liking but I don't think they're going anywhere.
  "workbench.colorCustomizations": {
    "editorHoverWidget.background": "#ff0000",
    "editorHoverWidget.statusBarBackground": "#0000ff",
    "editorHoverWidget.border": "#00ff00",
    "editorHoverWidget.foreground": "#ffffff",
  }

@Tyriar

We're adopting the custom hovers in places where they add additional functionality (links, fast display, status bar actions, markdown)

That is a plain and simple lie.
Not all status bar actions need additional functionality.

 That was perfectly fine as a native hover/tooltip.
 I want to leverage all the space in my screen to see information.
I also hate the speed with which some of these tooltips show up, and the position.
And I also really hate that all this crap is different and weird, and each one has it's own kinks.

 Might as well remove the native title bar then.