thunar: improvements

Add the possibility to specify plugin set to
be used as overridable thunar derivation argument.
New nixos config attribute:
services.xserver.desktopManager.xfce.thunarPlugins
that allows user to specify plugins in the context
of nixos.
Tests:

With and without plugins.
Using the nixos attributes.

Could be improve with #10308.

@edolstra You're the listed thunar maintainer. Any input on this?

I believe the thunarx-2-dev split is counter-productive.

@vcunat: A split seems necessary to be whether it be named thunar-build or thunarx-2-dev cause
otherwise, we get circular dependencies in the form:
thunar -> myPlugin
myPlugin -> thunar

which is broken using:
thunar -> myPlugin
thunar -> thunar-build
myPlugin -> thunar-build

Maybe other approaches exist. Any idea?

Surely thunar doesn't depend on its plugins. There should be a wrapper (separately built) that takes thunar and a list of plugins.

Alternatively thunar can get renamed thunarWithPlugins whilst thunar-build to thunar. In
the end, tit has the same form.

@vcunat: What I meant is the wrapper you're talking about is actually named thunar and the
actual thunar package (wrapped) is named thunar-build and aliased thunarx-2-dev.
As I really do not care about whether it should be the wrapper that gets the name of the
package or the wrapped, what is your actual suggestion? I took inspiration from
the clementine package where the wrapper got the clementine name and the
wrapped got a clementine-free name.

I had the feeling that the wrapper will get used more often so it seem to make sense that it gets the
official plugin name unless there are indication not to.

Oh, I was probably confused by the way github shows the rename.

The new expression is slightly messy, but it seems to work well. I'm sorry for the delays.

:beers:

Hi! It turns out that this change breaks my own config-level hack where I replaced uca.xml.in with a patched version of this file. The patched version contained customised menu entries for various file types.
  nixpkgs.config = {
    packageOverrides = pkgs : {

      xfce = pkgs.xfce // {

        thunar = pkgs.lib.overrideDerivation pkgs.xfce.thunar (a:{
          name = a.name + "-patched";
          prePatch = ''
            cp -pv ${./my-own-uca.xml.in} plugins/thunar-uca/uca.xml.in
          '';
        });
      };
    };
  };

Now Nix doesn't accept this snippet with an error saying error: attribute ‘override’ missing, at /home/grwlf/proj/nixcfg/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix:60:9
Could you please advice me on how to adapt this hack to xfce.thunarPlugins settings? Basically, I'd like to apply my hack thunar-uca plugin instead of writing my own brand new plugin, but how should I do it now?

Hmm, that sounds it could be a bug in .overrideDerivation or maybe .override. I also don't really know what's the difference between fooPackage.overrideDerivation and lib.overrideDerivation fooPackage. These things are relatively complex implementation-wise.

fooPackage.overrideDerivation is .override-able, lib.overrideDerivation is not. See https://github.com/NixOS/nixpkgs/issues/4017 and 492dd14e78aebea0722dcb6becb2d6601ad51dc8.

Hmm, so my conclusion is that we should document that lib.overrideDerivation is better not used and suggest the other one instead? Or maybe even remove/hide the first one?

Hi @grwlf,
what about doing:
  nixpkgs.config = {
    packageOverrides = pkgs : {

      xfce = pkgs.xfce // {

        thunar-build = pkgs.lib.overrideDerivation pkgs.xfce.thunar-build (a:{
          name = a.name + "-patched";
          prePatch = ''
            cp -pv ${./my-own-uca.xml.in} plugins/thunar-uca/uca.xml.in
          '';
        });
      };
    };
  };

the thunar package is no longer a built from source package but rather a combination of
thunar-build (which is the original built from sources package) and whatever plugins are
passed as thunarPlugins argument.
So the lib.overrideDerivation should work fine with thunar-build even though not the
recommended way to go.
As the thunar package is now a mere wrapper, doing thunar.overrideDerivation will
not work as your hack seem to require source code alterations.

OK, Thanks, @jraygauthier ! Pathcing thunar-build works as before. So it was question of names after all.


fix: fix the bug of missing ops and edge cases for if block

Signed-off-by: Bo Wang<EMAIL_ADDRESS>Description
In partitioning, some OPs might be missing because these OPs are left in segmentation vectors. Fixed it.
For If block, there are some edge cases like
   = prim::If(%8)
    block0():
      %11 : Tensor[] = aten::append(%mod_list.2, %y.2) # modifying_op_error.py:13:12
      -> ()
    block1():
      -> ()

There was segmentation faults because Torch-TensorRT always thought the blocks in If node was not empty.
Type of change

Bug fix (non-breaking change which fixes an issue)

Checklist:

[x] My code follows the style guidelines of this project (You can use the linters)
[ ] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas and hacks
[ ] I have made corresponding changes to the documentation
[ ] I have added tests to verify my fix or my feature
[ ] New and existing unit tests pass locally with my changes

looks like this has been merged together with #1140

Can this be closed then?


build: update go directive in go.mod to 1.17

This PR updates  the go directive in go.mod file by running go mod tidy -go=1.17 to enable module graph pruning and lazy module loading.
Note 1: This does not prevent users with earlier Go versions from successfully building packages from this module.
Note 2: The additional require directive is used to record indirect dependencies for Go 1.17 or higher, see https://go.dev/ref/mod#go-mod-file-go.

@Juneezee - thanks for the PR - however we are not planning to change this right now.


go get doesn t seem to work

gomatcha.io is down therefore the go get doesn t work.
go get gomatcha.io/matcha/...
package gomatcha.io/matcha/...: unrecognized import path "gomatcha.io/matcha/..."

Yes, doesn't work.

Also website https://gomatcha.io/ doesn't work, I thought it was a DNS problem, but the domain name has an IP related with it <IP_ADDRESS> ( nslookup gomatcha.io )
Looks like this project is not maintained :disappointed:


--success last not working

Using the following command:
concurrently --success last "npm run server" "npm run test"

npm run server starts the application server.
npm run test runs tests against the application.
Expectation
When the tests pass in npm run test, I expect the --success flag to treat the overall concurrently command as a success, and to exit the server.
Observed behaviour
The test process exits with a 0 code - but the overall concurrently command continues to hang (it doesn't kill the server).
NB: I've tried various ways of re-writing the flag (e.g. --success="last", success "last" etc), as well as moving the flag to the end of the command. For what it's worth, I've also tried re-ordering the command and passing --success first instead, but this also fails to exit the server.
Is this down to me misunderstanding what --success does, or not implementing --success properly in the command, or is this a bug with the --success flag?

--success last is just telling that the last process to exit will determine if concurrently itself will exit with code 0 or not.
It doesn't stop any running processes.
What you probably want to do is to pass the flag --kill-others --success first, so the test exits first (killing the server process) and its exit code is concurrently's.

Thanks - that's what I wanted.

@gustavohenke Thank you, this is what I was looking for <3


Dependency check tool doesn't handle v2 modules

https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1629059&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=bdeefc16-b669-5ebd-ad94-a2c19ade53b0
github.com/Azure/azure-sdk-for-go/sdk/depcheck imports 	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/communication/armcommunication/v2: module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/communication/armcommunication@latest found (v1.0.0), but does not contain package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/communication/armcommunication/v2

I reran the pipeline and came with a sucess. It is a little tricky here. After we merge the v2 release code into main, we need wait for the release ci and approve for release, and then we can have tag and package can be indexed by pkg.go.dev. During the time before tag finished, there will be no v2 package can be get, so other ci which include this v2 source code will fail then. We will make this gap time as short as possible, but it seems some ci broken are unavoidable.

I changed the script to use tag to verify the version and fall back to use replace if race.


Switch the name attribute for events to "event_name".

"name" is a reserved word in Craft. So on Craft's side, the attribute is "event_name".

https://github.com/downtowngr/mantle/pull/7


[Bug] NullPointerException with -credential option

API-Mgr. CLI version
1.2.1
API-Manager and Service-Pack Version
7.6.2 SP4
Expected behavior
Actual behavior
If I run the following command, a NullPointerException happens.
apim app get -s <myStage> -credential <myCredential>
Log-Output in Debug
----------------------------------------------------------------------------------------
API-Manager CLI: 1.2.1

To report issues or get help, please visit:
https://github.com/Axway-API-Management-Plus/apim-cli
----------------------------------------------------------------------------------------
Module: Application - E X P O R T / U T I L S (1.2.1)
----------------------------------------------------------------------------------------
4659   INFO     APIManagerAdapter| Successfully connected to API-Manager (7.6.2 SP4) on: https://...:8075
30036  ERROR ApplicationExportApp| Can't initialize API-Manager API-Representation.
com.axway.apim.lib.errorHandling.AppException: Can't initialize API-Manager API-Representation.
        at com.axway.apim.adapter.clientApps.APIMgrAppsAdapter.getApplications(APIMgrAppsAdapter.java:146)
        at com.axway.apim.appexport.ApplicationExportApp.runExport(ApplicationExportApp.java:87)
        at com.axway.apim.appexport.ApplicationExportApp.export(ApplicationExportApp.java:56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.axway.apim.cli.APIManagerCLI.run(APIManagerCLI.java:142)
        at com.axway.apim.cli.APIManagerCLI.main(APIManagerCLI.java:78)
Caused by: java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
        at java.util.regex.Matcher.reset(Matcher.java:309)
        at java.util.regex.Matcher.<init>(Matcher.java:229)
        at java.util.regex.Pattern.matcher(Pattern.java:1093)
        at com.axway.apim.adapter.clientApps.ClientAppFilter.filterCredential(ClientAppFilter.java:221)
        at com.axway.apim.adapter.clientApps.ClientAppFilter.filter(ClientAppFilter.java:207)
        at com.axway.apim.adapter.clientApps.APIMgrAppsAdapter.getApplications(APIMgrAppsAdapter.java:140)
        ... 8 more

Test case sample

Please describe the steps you have done to replicate the issue

@jschaefer77, The NPE should normally not happen, as this means, an application has a Credential, such as API-Key, OAuth, OAuth (Ext) configured, but this Credential doesn't have an API-Key or Client-ID (means null).
More detailed: The code causing the NPE is looping over all configured Credentials for an application and checks, if the searched API-Key/Client-ID matches to the application credential. The code assumes, if a credential for an application is given, it must either contain an API-Key or Client-ID. But in your case it is NULL.
Anyway, I'm handling this situation now to avoid the error. Additionally the code is printing the following warning message:
Inconsistent application: 'Application ABC' found. API-Key/Client-ID is NULL for credential.
Perhaps a good idea to investigate then if such an application is somehow inconsistent.


[move-prover][paper] Final version.

See also https://arxiv.org/abs/2110.08362. You can contact me to obtain the paper password.
Motivation
Finalize paper.
Have you read the Contributing Guidelines on pull requests?
Yes

/land


Added default permission to context command builders

This PR adds the missing default permission option to the Context Command builders

Please pull and fix related changes to ratelimits for this PR

Please pull and fix related changes to ratelimits for this PR

This PR is ahead of release/3.x,  feature/internal-ratelimiting and feature/ratelimit-callbacks. There is nothing to pull. Are you referring to feature/cache-providers.

Please pull and fix related changes to ratelimits for this PR

Didn't you merge the feature/internal-ratelimiting to the release branch 3 days ago? This was based on that. Nvm, there are too many conflicting commits, i will just create a brand new PR.

The new ratelimit stuff was shot to wack and broke alot of things


docs(readme): getSession

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


OCaml: Several improvements

added some missing keywords
added highlighting for modules, labels and constructors
split polymorphic variant types and type variables

Thank you for the quick feedback.

Thank you for contributing!


Fixes no_std by removing accidental dependence on std

The current code accidentally imports std::cell::Ref, which causes the code to fail to compile when the std feature is deactivated. I replaced this import with an import of core::cell::Ref, which accomplishes the same purpose while remaining compatible with no_std.

Nice catch. Lots of conflicts though.

I just checked, the current version works fine on no_std.

How did you test whether the current version works with no_std? Doing so is a bit subtle. It is not sufficient to simply attempt to import the crate into a file marked no_std. The crate needs to have no dependence, either explicitly or implicitly, on the std crate. For example, a crate with the lib file marked no_std could explicitly import std, or it could import a dependency which itself depends on std; in that case, the crate would not be no_std suitable. The best way I found to check this is cargo no-std-check. The command you would use to check your file is cargo +nighty no-std-check --no-default-features.
When you attempt to compile the current version without using the std feature, the compilation fails. For instance, the output of cargo check --no-default-features is
error[E0433]: failed to resolve: maybe a missing crate `std`?
  --> src/lib.rs:75:5
   |
75 | use std::cell::Ref;
   |     ^^^ maybe a missing crate `std`?
   |
   = help: consider adding `extern crate std` to use the `std` crate

If you leave the default std feature activated, then lib.rs is never marked no_std, so the crate certainly is not no_std in that case.
By contrast, in my pull request, the crate compiles when the std feature is disabled and passes no-std-check in that case.

This crate has no dependencies, so cargo check --no-default-features is sufficient, and passes for me. Are you sure you're using the right crate? Here's line 75 on the master branch: https://github.com/thomcc/rust-typed-arena/blob/master/src/lib.rs#L75

Sorry for wasting your time. I appear to have somehow made a pull request to the wrong library. I was trying to help fix another crate which is a fork of typed-arena but somehow managed to end up here instead.


Fix application start up

The project may pass the CI step, but fails to easily build based on the documented readme steps.

:tada: This issue has been resolved in version 0.35.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Migration fixes

This fixes the issues I ran into when upgrading from version 1 to version 2.

I thought that brackets in Plug mapping didn't have influence. I was wrong ... Thanks again !


Interval literal creation is inconsistent

Type of issue: bug report |  documentation
Impact:  Possible API modification
Other information
Not the discrepancy with the following Interval literals. Decimal values are encode using the .I arguments
while BigInt and Int values are interpreted according to the .I arguments. I think this is likely to create confusion
though the cat may already be out of the bag on this one.
import chisel3._

Statement
Value

val b = BigInt(-2)
b: scala.math.BigInt = -2

val e = BigDecimal(-2.0)
e: scala.math.BigDecimal = -2.0

val d = -2.0
d: Double = -2.0

val l = -2
l: Int = -2

val ib = b.I(2.BP)
ib: chisel3.experimental.Interval = Interval<2>(-2)

val ie = e.I(2.BP)
ie: chisel3.experimental.Interval = Interval<4>(-8)

val id = d.I(2.BP)
id: chisel3.experimental.Interval = Interval<4>(-8)

val il = l.I(2.BP)
il: chisel3.experimental.Interval = Interval<2>(-2)

ib.litToDouble
res0: Double = -0.5

ie.litToDouble
res1: Double = -2.0

id.litToDouble
res2: Double = -2.0

il.litToDouble
res3: Double = -0.5

ib.litValue()
res4: BigInt = -2

ie.litValue()
res5: BigInt = -8

id.litValue()
res6: BigInt = -8

il.litValue()
res7: BigInt = -2

What is the current behavior?
When creating Interval literals the behavior is different for BigInts, Longs, and Ints, than it is for Double and BigDecimal.
In the former case the bits of the number are interpreted according to the paramters of the cap-I conversion while the latter the number is the supplied
What is the expected behavior?
Seems to me that the behavior should be the same as Double and BigDecimal
Please tell us about your environment:
Chisel3 3.3

Check behavior of FixedPoint with respect to above.

Consider looking at scalafix to provide way conversion of existing code

Addressed by PR #1509


Enhancement: adding IPv6 support to Remote Addr Predicate gh-165

CIDRUtils from Edin Dazdarevic seems to work great with both IPv4 and IPv6. I have limited knowledge about network addressing like IPv6, maybe someone with more experience can check if it is a solid solution for supporting IPv4 and IPv6 at the same time in RemoteAddrRoutePredicateFactory.
fixes gh-165

@jphilippeplante Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@jphilippeplante Thank you for signing the Contributor License Agreement!

Thanks, I'll need to check on licensing.

Codecov Report

Merging #183 into master will increase coverage by 2.56%.
The diff coverage is 78.46%.

@@            Coverage Diff             @@
##           master     #183      +/-   ##
==========================================
+ Coverage   69.57%   72.13%   +2.56%
==========================================
  Files          87       87
  Lines        1923     1870      -53
  Branches      136      123      -13
==========================================
+ Hits         1338     1349      +11
+ Misses        510      456      -54
+ Partials       75       65      -10

Impacted Files
Coverage Δ

...ler/predicate/RemoteAddrRoutePredicateFactory.java
65% <56.25%> (+10.71%)
:arrow_up:

...ringframework/cloud/gateway/support/CIDRUtils.java
85.71% <85.71%> (ø)

...framework/cloud/gateway/support/ArgumentHints.java
50% <0%> (-16.67%)
:arrow_down:

...oud/gateway/route/RouteDefinitionRouteLocator.java
81.9% <0%> (+0.95%)
:arrow_up:

.../gateway/handler/RoutePredicateHandlerMapping.java
90.32% <0%> (+6.45%)
:arrow_up:

Continue to review full report at Codecov.

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

Maybe it might be better to use a library published to maven central like:
https://github.com/TheTechWarriors/cidr-utils (apache 2 licensed) or https://github.com/veqryn/cidr-ip-trie (MPL).
I'll wait and hear back.

Or even netty, which is already a dependency http://netty.io/3.5/api/org/jboss/netty/handler/ipfilter/CIDR.html


SSL verification is Failed - [BRIEF DESCRIPTION]

App Id: duv1ycno7qpfe
Region: us-east-1
Step: SSL verification
Status: Failed

Note: Do not include information that is sensitive in nature such as your domain name, company etc.

Issue/question
A clear and concise description of what the issue/question is.
Error message
If there is an error message, please include it here.
Note: Be sure to check the message for sensitive information.
Additional information
Please add any other relevant information. Please feel free to include screenshots.

@matiasmagni : According to our records, it looks like your domain is now resolving. Please let us know if you continue to face any issues.


Segment status is not stored, undefined when fetching segments by Id

Version where bug was found:
5.1
Describe the bug
Found by @zackcl as an observation in #1252 while QA'ing, when refreshing on a segment details page, the "status" is always showing as Unused, even when it is used.
I believe this is because on the view-segment-details page, we call the endpoint that uses getSegmentById, whereas on the root view, we call getAllSegmentsWithStatus, where there is a sub-function that attaches a status property.
However, I don't want to put a band-aid on band-aid, the Segment model doesn't actually include a status property, it looks like this was applied as an afterthought and it's a little funky because we're not storing it, it looks like we reapply the status every time we fetch segments by requerying some other tables, instead of updating the status in the db when an experiment is updated to include the segment. Can someone more familiar with this code take a look, this seems less than ideal, but I'm not 100% I'm stating it accurately.
To Reproduce
Steps to reproduce the behavior:

Go to a segment details page for a segment that is attached to an experiment, so "status" will be "used"
Hit refresh
It will say status not used.

Qa: passed


add create route to restful routes.

change return string for each route.
add create route to fulfill all restful routes.

Method
Route
Action

GET
/photos/
index

GET
/photos/create
create

POST
/photos
store

GET
/photos/:id
show

GET
/photos/:id/edit
edit

PUT/PATCH
/photos/:id
update

DELETE
/photos/:id
destroy

🙏 Sorry I thought I already merged this a week ago 🤦♂

🙏 Sorry I thought I already merged this a week ago 🤦♂


ChatPDF can create some exam questions based on the document, but pdfGPT failed

For example, I upload a file in ChatPDF and ask it to create some exam questions based on the document

but pdfGPT failed

i also need pdfGPT for extracting question, answers and explanations. Did you later get a solution to this?

ok. I will develop this feature and push it live very soon.


Questions: Steps to implement isomorphic rendering

Questions: Steps to implement isomorphic rendering
I see there is a comment in server/main.js to remove a few lines for isomorphic, but there would need to be some additional steps to populate initial state, and html markup.  Are you able to provide those steps.

Sorry, no, and apologies if the comment in the server implied otherwise. This has been brought up numerous times and it's not something I'm willing to tackle in this project due to the amount of additional boilerplate/maintenance/etc. that would be required.

https://github.com/davezuko/react-redux-starter-kit/issues/775
https://github.com/davezuko/react-redux-starter-kit/pull/281
https://github.com/davezuko/react-redux-starter-kit/issues/643
https://github.com/davezuko/react-redux-starter-kit/issues/212#issuecomment-161355951

If you follow the docs for React/Redux/React-Router you can totally implement it yourself, the only thing you'll really have to deal with is whether or not to pre-process your server code with webpack (such as w/ its isomorphic tools) and then the consequences of that decision. Since this starter kit does not concern itself in any way with universal rendering, you may find more of your questions answered by checking out https://github.com/erikras/react-redux-universal-hot-example.
Good luck.

@davezuko - thanks for the response and for the links.  But it seems from the other links, a lot of people seem to be requesting the feature of isomorphic.  It does appear to be a legit request (from my perspective).  Just curious, is your starter kit only concerned with everything else except universal rendering / isomorphic ?

It is a legitimate request, you're absolutely right, but those links are also just a small subset of many issues, opinions, and discussions that have accrued over the lifetime of this project, so they are not necessarily representative of the majority opinion. SPA's have for a long time worked perfectly without universal rendering, and though it is a great feature (i.e. for SEO) it's not a necessary part of "getting started" with React, Redux, et al. If you look at the number of issues (and types of issues) in the universal boilerplate, it's absolutely staggering, and I don't want the same to happen to this project.
The overarching theme for this project is that people should be easily able to take it and do whatever they want with it without having to completely rip it apart. Basic universal rendering isn't super complex, but it becomes a slippery slope when you consider all of the other things that go along with it (how do I make API requests? Deploy the server? Handle images? Inject styles? Set page titles?). At that point, the decisions become incredibly personal and team- or needs-based, so drawing a line at an arbitrary set of a "supported" server features becomes difficult; as a result I took a step back and drew it simply at universal rendering.
Furthermore, universal rendering is something that I think you should only be doing when you really understand the foundation on which you're building, and that is in opposition to our goal, which is to give people who don't necessarily fully understand Webpack and this entire ecosystem an easy starting-off point that points them in the right direction where they hopefully won't shoot themselves in the foot. It's hard enough for me to keep up with issues as they stand now, with a lot of people treating this project as StackOverflow, so I really don't want to go down the road of adding even more code that will raise questions.
So, ultimately, the rationale is multifaceted and has been thought about deeply over this project's lifetime, and it's not a decision made lightly. Hopefully that clears my position slightly.

@davezuko - I mean I get it.  It is definitely a tough and slippery slope for these requests.  Thanks for your time and response.

If interested, check out this


Crash on pywinauto.findwindows.find_window while waiting for the window start

I have a crash in find_window:
Unexpected error: <class 'TypeError'>
Traceback (most recent call last):
  File "find_fx.py", line 23, in <module>
    w = find_fx()
  File "find_fx.py", line 12, in find_fx
    title_re=".*Mozilla Firefox.*"
  File "...\Docs\dev\pywinauto\pywinauto\findwindows.py", line 59, in fin
d_window
    windows = find_windows(**kwargs)
  File "...\Docs\dev\pywinauto\pywinauto\findwindows.py", line 189, in fi
nd_windows
    windows = [win for win in windows
  File "...\Docs\dev\pywinauto\pywinauto\findwindows.py", line 190, in <l
istcomp>
    if handleprops.text(win) is not None and title_regex.match(handleprops.text(
win))]
TypeError: expected string or buffer

To reproduce, run the script below and try to launch Firefox browser several times. On my machine it crashes on first or second attempt to launch the browser.  I got the crash on Python 3.4 x64 and x86
# -*- coding: utf-8 -*-

import sys, time
import pywinauto

app = pywinauto.application.Application()

def find_fx():
    while True:
        try:
            h = pywinauto.findwindows.find_window(
                    title_re=".*Mozilla Firefox.*"
                    )
            return app.Window_(handle=h)
        except(pywinauto.findwindows.WindowNotFoundError):
            # if the sleep is open the problem still happens but less frequently
            #time.sleep(0.2)
            pass
        except:
            print("Unexpected error:", sys.exc_info()[0])
            raise

count = 0
while True:
    w = find_fx()
    w.Wait("ready")
    w.Close()
    count = count + 1
    if count > 30:
        break

It looks like handleprops.text(win) returns some string first time and None second time for the same handle. To avoid the second call I can suggest the following fix in find_windows:
        windows_and_texts = [(win, handleprops.text(win)) for win in windows]
        windows = [win for win, text in windows_and_texts
            if text is not None and title_regex.match(text)]

I just went on with this:
        def _title_match(w):
            t = handleprops.text(w)
            if t is not None:
                return title_regex.match(t)
            return False
        windows = [win for win in windows if _title_match(win)]

Looks as working for me. I was just about checking it in...

OK, it looks great too. Go ahead please. I'm still working on SendKeys tests...


[chore] speed up tests

The tests have stopped hanging for me since https://github.com/sveltejs/kit/pull/5482. There is still flakiness. I'd like to debug that, but running the tests takes too long right now, so I'm hoping to re-parallelize them. Has https://github.com/sveltejs/kit/pull/5482 fixed the increased flakiness with parallelization that others were seeing? If not, perhaps we could find a compromise option like parallelize unless on the CI?

let's give it a whirl


Rework the configuration infrastructure

This PR reworks the configuration infrastructure inside of trunk.
The main topics are:

Split up stored configuration model (toml) and CLI model (clap)
Have the CLI override part of the configuration model
Allow re-using clap's env feature instead of envy, as the env-var overrides aligns more with CLI arguments rather then with the stored configuration
Prepare for alternate configuration formats
Warn about future deprecation in the configuration: there are a few cases where either the configuration outgrew itself, or there had been inconsistencies because of the unified model for config-file/cli-args. Trunk warns about that and suggests migrations.

What's missing:

[x] loading from Cargo.toml: that is prepared, but not implemented yet
[x] have all tests work: most of them work, some of them don't compile yet
[ ] Ensure that all example configurations still work
[ ] find a better way to internally migrate deprecated fields: right now that happens inside each sub-command, I think that's the wrong place.

State: It's a draft. Most of the tests work locally. Some don't compile yet. It needs more work, but I think most of the work is done.

Ping me when it's in a test-able state and I'd love to give this a try!

@simbleau I guess not there's something for you to take a look at :) … Loading from Cargo.toml is implemented. There are no additional features yet (like profiles and stuff). But, it's a start. I also added an example cargo-manifest to show how it works.


feat(en): Implement gossip fetcher

What ❔
...i.e., a fetcher component that would use gossip network instead of JSON-RPC API.
Fixes BFT-326 and BFT-368.
Why ❔
This can be used by external nodes to sync with the main node.
Checklist

[x] PR title corresponds to the body of PR (we generate changelog entries from PRs).
[x] Tests for the changes have been added / updated.
[ ] Documentation comments have been added / updated.
[x] Code has been formatted via zk fmt and zk lint.

I'd prefer to implement and test syncing from a non-genesis miniblock in a follow-up PR. AFAICT at this point, this would comprise the following items:

Load the first block with consensus fields from Postgres when a node starts and comparing it against the reference block. If there are no blocks with consensus fields, the node will persist it from the reference.
Use this first block in BlockStore::first_block() rather than block 0.

Most of PR should be dedicated to testing this functionality.


Manage state of chain with StateManager interface

Faaschain is stateless in nature. Currently the only state in chain is executionposition and requestId. For partial request the state value are forwarded as a data.
Although It might be a use-case when user need more data to be stored in the state. To achieve that we can provide user an interface StateManager  as:
type StateManager interface {
         Set(key string, value interface{}) error
         Get(key string) (interface{}, error)
         Del(key string) error
}

User should be able to request the global state manager from request context as
      context := faaschain.GetContext()
      context.Get(key)
      context.Set(key)

By Default the StateManager will be set to RequestEmbedStateManager which is provided by the faaschain. It will forward the state as a data to the next call with json to encode.
User can implement and set the state manager as SetStateManager()
An example of setting state and handling may look like
         chain.SetStateManager(monio_state_manager)
         chain.ApplyAsync("function").ApplyModifier(func ([]byte { faaschain.GetContext.Set("some", "data") }).
                    chain.ApplyAsync("function"). ApplyModifier(func ([]byte { data := faaschain.GetContext.Get("some") })

GetPhaseInput() should also be deprecated. It can be done as:
       chain.ApplyModifier(func (data []byte){
                        // save data
                        fchain.GetContext.Set("beforecheck", data)
                        return data
                      }).Apply("func").ApplyModifier(func (data []byte){
                       // do some checking
                       // replay saved data
                       return fchain.GetContext.Get("beforecheck")
                      })


Add more fonts

We would like to have as many font options as possible in the app. But we don't have the time to keep adding fonts to the css file that contains them all. We welcome any contributions of font imports from any font provider like google fonts.
if you would like to add a font to the css file just add it to this file and make a pull request. In your pull request make sure to specify the name of the font you are adding so we can add to the database as an option.

Hi, are you looking for "soft" fonts (example: https://medium.muz.li/top-5-ui-fonts-for-website-mobile-apps-d78829e58f7e), or more "crazy" fonts?

@AlexARNcode pretty much anything, within reason. The "soft" fonts are preferred but since the user can select whatever they want to use a lot of "crazy" fonts fine, just not too crazy like wing-dings and stuff like that. A safe bet would be to contribute a font from google fonts. Using google fonts gives you about a 90% chance of the font being. We are going to try to accept as many fonts as possible but if they are too crazy we'll have to deny them.

@AlexARNcode did that help?

I've just added some font I like to use in #50 . I also saw that you import some font multiple times (like Noto Sans JP,  Poppins, Source Sans Pro)

thanks for pointing that out. Feel free to make another pr removing the duplicate imports, if not I will do later

I'll do that.


Names of imagery not always visible

URL
https://www.openstreetmap.org/edit?way=39987535#map=20/41.37384/-8.41364
How to reproduce the issue?
Hi,
in some countries, we have special imageries with somtimes an (english) name quite long. Same things when we translate some names.
On a "normal" screen of a laptop (15''), these names are cut with '...' at the end (see screenshot). If we use the mouse on it, we can see an explanation of the map : impossible to see the full name.
I will suggest to put names on 2 lines if needed (or to have the full name added at the description under the mouse like a title).
Best regards
Screenshot(s) or anything else?

Which iD Editor versions do you see the issue on?
Released version at openstreetmap.org/edit
Which browsers are you seeing this problem on?
Chrome

Hi, I will be working on fixing this issue. I will remove '...' and make text visible for the user.


Add merge date in comment

Follows #3152.

This is why I prefer an estimated date there and not ??? so we don't forget to update it.


Replace path_manager channels with mutex

From what I can tell the path_manager is only used to store data.
Have considered replacing the internal loop with a mutex? This would simplify the code and cut the number of lines in half.
There may be some performance considerations though.

@aler9 Just trying to help. If you don't want contributors say that in the readme. Then you wont need to close/lock threads before giving people a chance to have a discussion.


chore: add cyberdevv

Check List (Check all the applicable boxes)

[X] My code follows the code style of this project.
[ ] My change requires changes to the documentation.
[ ] I have updated the documentation accordingly.
[X] All new and existing tests passed.
[X] This PR does not contain plagiarized content.
[X] The title of my pull request is a short description of the requested changes.

Screenshots

Thanks for your contribution!


etcd 3.1.4 fails to start in the amplifier stack

Something changed in etcd between 3.1.0 and 3.1.4 (still in 3.1.5):
etcdmain: --initial-cluster must include default=http://<IP_ADDRESS>:2380 given --initial-advertise-peer-urls=http://<IP_ADDRESS>:2380
knowing that initial advertise peer url is set by default by etcd with a discovered IP, but not initial cluster.


Social Media button is not working

No description provided.

Which Social Media Button is not working, kindly elaborate your issue, share screenshots if needed.

Discord and Instagram button is not working

can i solve this


Added an option to use absolute position for tooltips

@francoisl @mollfpr
Tagging you since you are familiar with the tooltip and the addresed behaviour in this PR
Details
I have added an option so we can render tooltips as they are without being ported to the <body> (using <Portal /> or ReactDOM.createPortal)
With the current code the tooltips are positioned using a fixed position on the viewport and this may create problems especially on scroll.
With this PR we have the option to use absolute positioning where the tooltips gets attached to their corresponding elements instead of the document body.
Fixed Issues
No issue is opened yet as far as I know, but we have this reported on slack: https://expensify.slack.com/archives/C049HHMV9SM/p1673105955055379
This PR does not fix the issue but makes it less annoying.
Before
https://user-images.githubusercontent.com/16493223/211208102-bc23cb56-b1c7-4be5-90f9-dc4d93545f19.mp4
After
https://user-images.githubusercontent.com/16493223/211208110-b52a2ba0-b04b-40dc-aaa0-285fc6069026.mp4
Tests

Go to any report
Click on the copy to clipboard
Scroll to the top
Verify that the tooltip remains attached to the "copy to clipboard" button and not stuck in the screen

[ ] Verify that no errors appear in the JS console

Offline tests
n/a
QA Steps

Go to any report
Click on the copy to clipboard
Scroll to the top
Verify that the tooltip remains attached to the "copy to clipboard" button and not stuck in the screen

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[X] I linked the correct issue in the ### Fixed Issues section above
[X] I wrote clear testing steps that cover the changes made in this PR

[X] I added steps for local testing in the Tests section
[X] I added steps for the expected offline behavior in the Offline steps section
[X] I added steps for Staging and/or Production testing in the QA steps section
[X] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[X] I included screenshots or videos for tests on all platforms
[X] I ran the tests on all platforms & verified they passed on:

[X] Android / native
[X] Android / Chrome
[X] iOS / native
[X] iOS / Safari
[X] MacOS / Chrome / Safari
[X] MacOS / Desktop

[X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[X] I followed proper code patterns (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I followed the guidelines as stated in the Review Guidelines
[X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] I verified that if a function's arguments changed that all usages have also been updated correctly
[X] If a new component is created I verified that:

[X] A similar component doesn't exist in the codebase
[X] All props are defined accurately and each prop has a /** comment above it */
[X] The file is named correctly
[X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[X] The only data being stored in the state is data necessary for rendering and nothing else
[X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[X] All JSX used for rendering exists in the render method
[X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

This PR also seems to unintentionally fix another issue. Check the "copy to clipboard" tooltip width on the first video (on staging too) it's not getting updated... While on the second video seems fine

The linked issue has not been properly triaged yet, or opened to accepting proposals. We can reopen this PR in the future if we get to that stage and the proposal is accepted.


QRScanner - After scan router navigate dosen't work

Hi, I've got problem with cordova-plugin-qrscanner in Angular project. In my component I scan QR code and if scan is completed I want navigate to another component. Unfortunately its dosen't work correct. This is part of my code
scan() {

     // QRScanner.prepare();
     const that = this;

      QRScanner.show();
     window.document.querySelector('body').classList.remove('transparentBody');
      QRScanner.scan(displayContents);

     function displayContents(err, text) {
      if(err){
        console.log('error', err);
        // an error occurred, or the scan was canceled (error code `6`)
      } else {
        // The scan completed, display the contents of the QR code:
         alert(text);
that._router.navigate(['/main/depositor']);  // here dosen't work
        if (text) {`enter code here`
          QRScanner.destroy((status) => {
            console.log('destroy scanner', status);
         window.document.querySelector('body').classList.add('transparentBody');
that._router.navigate(['/main/depositor']);  // here too dosen't work
          });
        }
      }
    }
  }

Path is correct. I don't know why it's dosen't work. My Angular version is 7.0.6 and cordova 8.1.2.
Router change url but view not renderer

this._ngZone.run(() => this._router.navigate([''/main/depositor']));

thank you, is worked


Release 1.2.1

@loicmathieu is it related to the failure in the platform or not? Just want to know if I need to wait for that one too. Thanks.

Not sure but I plan to release a new version, I wanted to release it for Quarkus 2.12 but are a little late.
I'll then try to understand what's going on with the test that fail in the platform.


Update contributors list 38

Hi @cmaumet
This PR is up to be reviewed.
except resolving merging conflict, the only change should be on the README

For the contributors, everything seems good to me ! For the choice of icons for each contributor, I let @cmaumet answer.
Furthermore, it seems that there are other changes other than for the README. I don't know if it affects the generated jsonld. Maybe it deserves a comment.

For the contributors, everything seems good to me ! For the choice of icons for each contributor, I let @cmaumet answer.
Furthermore, it seems that there are other changes other than for the README. I don't know if it affects the generated jsonld. Maybe it deserves a comment.

So it's good for me !

Discussed on March 30th -- Camille to update with contributor roles

@cmaumet : you should have to add the missing contributions with respect to the following legend : https://allcontributors.org/docs/en/emoji-key


Recursive iput question

I'm not sure if something like this is implemented within GoRODS, or if it's intended that users write the path-walking and such directly. Thanks in advance!

Hi Ian,
Thanks for the question, this is something I'll look into. I'll get back to
you in the next few weeks. I don't see reference to a recursive flag in the
GoRODS source code or documentation at the moment.

John

On Fri, Oct 26, 2018 at 4:33 PM Ian McEwen<EMAIL_ADDRESS>wrote:

I'm not sure if this is implemented within GoRODS, or if it's intended
that users write the path-walking and such directly. Thanks in advance!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jjacquay712/GoRODS/issues/28, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOHVTXObdxROYIZxCmTTc8Oj-BMsajbks5uo3GsgaJpZM4X87fl
.

Apologies for the late reply. Recursive iput functionality isn't currently supported by GoRODS. I will add this to the feature request queue.
Regards,
John


Trouble generating occupancy grid

Hi!  The program gets stuck on the "Computing 3D occupancy grid. This will take some time..." info prompt for about an hour. After which it tells me that the that the process has died. I generate the map.ot with the help of octomap_server and LeGO-LOAM. Does anyone have any advice on what I could do?

Hi @arjvn. Could you provide us the *.ot file that you're using to generate the occupancy grid?

Hi, thanks for responding. I've tried these two .ot files
here is a link: https://drive.google.com/file/d/1FhtKBZ3N0eaPpuvn0h4UYyQajrZNefXl/view?usp=sharing

Hi @arvjn, we've been checking the problem with your .ot files.
The problem is due to the size of your octomap. When the occupancy grid is generated, it creates a Grid3dCell vector called "grid" where the size of each element is 8 bytes. This vector's size depends on the map's size and the octomap's resolution (ComputeGrid method in PointCloudTools.cpp). If the map is too large, the size of the grid also becomes too large, causing the program to crash.
The memory needed to create the grid is calculated by:
mem = (map_size_z / octomap_resolution) * (map_size_y / octomap_resolution) * (map_size_z / octomap_resolution ) * 8 bytes
In one of your octomaps, this value is approximately 60Gb. To workaround the issue you could reduce the size of your .ot files or change the octomap resolution to reduce the size of the grid.

Alright thanks, I will try this out. Would you know/ have a recommendation of how big of a map I can generate without the program crashing?

Hi @arjvn,
It depends on the computational capacity of your computer, you can use the previous formula as a guideline to check whether the map's size is valid or not.


Slash Commands

Is there a way to alter the code to use slash commands instead of dollar signs? Slash commands give the roller a +10% wish spawn rate and +5% kakera value on reacts and claims. I think it would be a beneficial option.

just change the channel prefix in the channeldata /.txt file to /

Thank you!! :)


Always patch MutatingWebHook

Added patching MutatingWebHook even in case of error during install/update istio
Related issues:
#967

/retest

/test pre-main-ory-reconciler-eval-integration

/test pre-main-reconciler-protecode-guard


A problem occurred evaluating project ':CordovaLib'

Hi,
I'm getting the following issue from an Ember project. I have tried several emulator options too.
Any ideas on how to resolve this error please?
Many thanks
D:\dev\corber-test (master)λ corber start
Corber Starting
? Select a device/emulator android emulator - Pixel_2_API_27

WARNING: corber
Your corber/cordova/config.xml file has set the following flag:
        <allow-navigation href="http://<IP_ADDRESS>:4200" />
This is necessary for device live-reload to work, but is unsafe and should not be used in production.
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\dev\corber-test\corber\cordova\platforms\android\CordovaLib\build.gradle' line: 40
* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
>
com/google/gson/JsonParseException

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

No apk found
No apk found

D:\dev\corber-test (master)
λ

Here are lines 33 thru 42 of the build.gradle file
33     dependencies {
34         classpath 'com.android.tools.build:gradle:3.0.1'
35         classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
36         classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
37     }
38 }
39
40 apply plugin: 'com.android.library'
41 apply plugin: 'com.github.dcendents.android-maven'
42 apply plugin: 'com.jfrog.bintray'

My environment:
λ cordova -v
9.0.0<EMAIL_ADDRESS>

D:\dev\corber-test (master)
λ corber -v
corber (global): 1.3.11
corber (package.json): ^1.3.11
corber (node_modules): 1.3.11
node: 10.15.0

D:\dev\corber-test (master)
λ ember -v
ember-cli: 3.10.1
node: 10.15.0
os: win32 x64

λ gradle -v

------------------------------------------------------------
Gradle 5.5.1
------------------------------------------------------------

Build time:   2019-07-10 20:38:12 UTC
Revision:     3245f748c7061472da4dc184991919810f7935a5

Kotlin:       1.3.31
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM:          1.8.0_212 (Oracle Corporation 25.212-b10)
OS:           Windows 10 10.0 amd64

D:\dev\corber-test (master)
λ java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

The latest Android Studio update has resolved this issue. Many thanks for this great project.
Android Studio 3.5
Build #AI-191.8<IP_ADDRESS>91312, built on August 9, 2019
JRE: 1.8.0_202-release-1483-b03 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0


How to force a rerender of useVirtualizer?

Describe the bug
I need to change the height of a list item when the user clicks on it.
It needs to be an InfiniteScroll with dynamic height.
I was able to update the height of the element clicked but the other ones (after them) are not re-rendered, causing them to stack.
I created a sandbox with the reproduceable bug, you only need to click in any of the items to see it.
https://codesandbox.io/p/sandbox/optimistic-edison-jebzqk?file=%2Fsrc%2Fmain.tsx&selection=[{"endColumn"%3A40%2C"endLineNumber"%3A72%2C"startColumn"%3A40%2C"startLineNumber"%3A72}]

Your minimal, reproducible example
https://codesandbox.io/p/sandbox/optimistic-edison-jebzqk?selection=[{"endColumn"%3A1%2C"endLineNumber"%3A109%2C"startColumn"%3A1%2C"startLineNumber"%3A109}]&file=%2Fsrc%2Fmain.tsx
Steps to reproduce

Click on any row of the list

Expected behavior

Expand the height of the clicked row
Adjust the rows below it to prevent stacking

How often does this bug happen?
Every time
Screenshots or Videos

Platform

Browser

tanstack-virtual version
3.0.0-beta.48
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Hi @ocodista to read height out of box using the resize observer please attach additional props on item, like
key={virtualRow.key}
data-index={virtualRow.index}
ref={rowVirtualizer.measureElement}

https://codesandbox.io/p/sandbox/dynamic-height-change-height-on-click-forked-gq33ld

Jesus, this is great, thank you!!!

Hi @ocodista to read height out of box using the resize observer please attach additional props on item, like
key={virtualRow.key}
data-index={virtualRow.index}
ref={rowVirtualizer.measureElement}

https://codesandbox.io/p/sandbox/dynamic-height-change-height-on-click-forked-gq33ld
Jesus, it's working! nice mate, you are the true hero!

I'm having a similar issue, and in my case setting key={virtualRow.key} (rather than key={myRow.id}) fixes the occasional missed render, but breaks my animations on insert/remove rows.
I understand why, as changing the key prop on a React node essentially removes and re-adds it to the DOM.
However, for insert/remove animations to work, each row's key must be tied to a unique identifier in the underlying data, right? This is the only way for React to track that row N is now at, say,  N+10 after adding 10 rows above it, so row N remains in the DOM and smoothly animates to a new position.  I hope that makes sense.
Is there a way to trigger re-render that doesn't involve resetting keys?

I found a relatively straightforward fix to my above comment -- calling `measureElement

I found a relatively straightforward solution to my above comment shortly after posting it -- listening to virtualItem.start and calling measureElement within my row component as so:
useEffect(() => {
  virtualizer.measureElement(ref.current);
}, [virtualItem.start, virtualizer]);

I can't notice or detect any degradation in performance, but who knows. As far as I can tell, this makes measureElement fire less often than if it were in the ref callback, and only causes re-renders that are likely necessary when virtualItem.start changes anyway.

hmm if you don't use arrow it on ref, just pass measureElement then it should fire only once, https://react.dev/reference/react-dom/components/common#ref-callback

React will also call your ref callback whenever you pass a different ref callback. In the above example, (node) => { ... } is a different function on every render. When your component re-renders, the previous function will be called with null as the argument, and the next function will be called with the DOM node.


Bump RabbitMQ mixin version

This fixes https://github.com/logstash-plugins/logstash-output-rabbitmq/issues/30#issuecomment-163673382

LGTM


[staging-24.05] curl: fix CVE-2024-6197

https://curl.se/docs/CVE-2024-6197.html
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Built curl.tests.withCheck on macos 12 x86_64 successfully.


PowerShell commands for encrypting existing VM fail with the -VolumeType param

I followed the prerequisites and command on this page to enable encryption and each time the command:
Set-AzVMDiskEncryptionExtension -ResourceGroupName JeremyTest -VMName TestVM -DiskEncryptionKeyVaultUrl $URI -DiskEncryptionKeyVaultId $RID
Failed with the following error:
ErrorMessage: VM has reported a failure when processing extension 'AzureDiskEncryption'. Error message: "".
After googleing I found this thread:
https://github.com/Azure/azure-linux-extensions/issues/663
And added -VolumeType All to the command and it was accepted and encryption was applied

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

ID: d7c63605-95f5-0953-3cf6-1e9c50532c1d
Version Independent ID: 8731daa8-2c15-78f7-adac-151401c13b6c
Content: Enable Azure Disk Encryption for Windows IaaS VMs
Content Source: articles/security/azure-security-disk-encryption-windows.md
Service: security
GitHub Login: @mestew
Microsoft Alias: mstewart

Title of the issue should read "without the -VolumeType param"

@jeremyhagan Thanks for your question. We are checking on this and will respond to you soon.

@jeremyhagan Appreciate your patience!  Just to clarify have you declared the variable $RID
Just highlighting: Can you try the suggestion mentioned below and check
This is the script which I used:
`Login-AzAccount
Select-AzSubscription -Subscription "***************e"
$rgName = ""
$location = "East US"
Register-AzResourceProvider -ProviderNamespace "Microsoft.KeyVault"
Get-AzResourceGroup -Location $location -Name $rgName
$keyVaultName = "githubissue"
New-AzKeyVault -Location $location     -ResourceGroupName $rgName
-VaultName $keyVaultName `
-EnabledForDiskEncryption
#Install-Module -Name Az.KeyVault
#Import-module -Name Az.KeyVault -RequiredVersion 1.0.1
#Install-Module -Name Az.KeyVault -RequiredVersion 1.0.1
#Install-Module -Name Az.KeyVault -RequiredVersion 0.7.0
Add-AzKeyVaultKey -VaultName '' -Name '*****' -Destination 'Software'
$keyVault = Get-AzKeyVault -VaultName $keyVaultName -ResourceGroupName $rgName;
$diskEncryptionKeyVaultUrl = $keyVault.VaultUri;
$keyVaultResourceId = $keyVault.ResourceId;
$keyEncryptionKeyUrl = (Get-AZKeyVaultKey -VaultName $keyVaultName -Name *****).Key.kid;
Set-AzVMDiskEncryptionExtension -ResourceGroupName $rgName     -VMName "<VM Name>"
-DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl     -DiskEncryptionKeyVaultId $keyVaultResourceId
-KeyEncryptionKeyUrl $keyEncryptionKeyUrl `
-KeyEncryptionKeyVaultId $keyVaultResourceId
Get-AzVmDiskEncryptionStatus  -ResourceGroupName $rgName -VMName ""  # For status
`

Hi,
The command you have listed is not the same as the command on the Microsoft Docs page I was referencing. I didn't use the two -KeyEncryption param (perhaps because I am not using KEK). The $RID and $URI params I referenced were populated using the same powershell commands as you used.

@jeremyhagan Can re-try Disk Encryption process and let me know the status, we are able to encrypt as mentioned in the Document

@jeremyhagan Were you able to encrypt using the information now in the article?

I was already able to do it with the syntax I provided in the OP and didn't have more time to spend on it.

Hi, @jeremyhagan. This article has been replaced with a new quickstart: Quickstart: Create and encrypt a Windows virtual machine in Azure with PowerShell. We have also updated the VolumeType" parameter description on the Set-AzVMDiskEncryptionExtension powershell reference page. Thank you for your feedback!

#please-close


llvm: Fix compiler-rt missing sanitizers when using useLLVM

Attempts to address https://github.com/NixOS/nixpkgs/issues/97688 by refactoring the llvm/16 toolchain build to make more sense.
The build order is now:
{compiler-rt-no-libc}
{compiler-rt-no-libc, libc}
{compiler-rt-no-libc, libc, libc++}
{compiler-rt-no-libc, libc, libc++, compiler-rt-libc}
The names of the stages have been updated to reflect this.
 Apologies!

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

I like the fix and general approach. I note that nixpkgs LLVM has changed a fair amount, so this will need reimplementing. Thankfully, you should only need to implement it once for all LLVM versions, since they were made to share 'common' nixpkgs sources.

I plan on re-implementing this now.

Thanks @Ericson2314 I didn't have time to refactor it.

llvmPackages_12.clangWithLibcAndBasicRtAndLibcxx fails to compile due to compiler-rt:
compiler-rt>     clang-12: warning: argument unused during compilation: '-nostartfiles' [-Wunused-command-line-argument]
compiler-rt>     Linking C executable cmTC_b0eb1
compiler-rt>     /nix/store/hyr25rm1gxiz04bbdvdk7a6291anq685-cmake-3.29.6/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b0eb1.dir/link.txt --verbose=1
compiler-rt>     /nix/store/278ccfykw0mg3a4rbsql4s4jxwyjzcd8-clang-wrapper-12.0.1/bin/clang --target=aarch64-unknown-linux-gnu CMakeFiles/cmTC_b0eb1.dir/testCCompiler.c.o -o cmTC_b0eb1
compiler-rt>     /nix/store/1jbqn7z7rh2q23nda4r66hr601z0w753-binutils-2.42/bin/ld: cannot find -lc: No such file or directory
compiler-rt>     clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
compiler-rt>     make[1]: *** [CMakeFiles/cmTC_b0eb1.dir/build.make:100: cmTC_b0eb1] Error 1
compiler-rt>     make[1]: Leaving directory '/build/compiler-rt-12.0.1.src/build/CMakeFiles/CMakeScratch/TryCompile-agZWJE'
compiler-rt>     make: *** [Makefile:127: cmTC_b0eb1/fast] Error 2

Thanks @RossComputerGuy. That made me look harder at the compiler-rt file again, and I found some things to fix. Looking forward to mass rebuild cleanups sometime later! :)

Looking forward to mass rebuild cleanups sometime later! :)

Sweet, that's working great so far. 13 building, 33 built, 69 to go.

@RossComputerGuy The remaining changes are due to libcxx on Linux changing in an intentional way, and I tried some things and they still built fine. (Last push is just a rename to make something clearer, no hashes should be changed.)
If you want to run another nixpkgs-review, I think this is ready!

If you want to run another nixpkgs-review, I think this is ready!

Can't now but will do after work.

(After https://github.com/NixOS/nixpkgs/pull/329706, this should be an easy backport, and I believe it is safe too --- worse that happens is you get a more featureful compiler-rt than before, yay.)

20 packages marked as broken and skipped:
bintoolsDualAs darwin.autoSignDarwinBinariesHook darwin.binutils darwin.binutils-unwrapped darwin.binutils-unwrapped.man darwin.binutils.man darwin.binutilsDualAs darwin.binutilsDualAs-unwrapped darwin.binutilsNoLibc darwin.binutilsNoLibc.man darwin.cctools darwin.cctools-llvm darwin.cctools-llvm.dev darwin.cctools-llvm.man darwin.cctools.dev darwin.cctools.gas darwin.cctools.man darwin.postLinkSignHook darwin.signingUtils macdylibbundler

8 packages failed to build:
citrix_workspace citrix_workspace_23_09_0 citrix_workspace_23_11_0 citrix_workspace_24_02_0 irods irods-icommands snapdragon-profiler upwork

44 packages built:
aapt apktool blackmagic-desktop-video diffoscope diffoscope.dist diffoscope.man discord discord-canary discord-development discord-ptb edgetpu-compiler feishu gnss-sdr gnuradio gnuradioPackages.osmosdr gnuradioPackages.osmosdr.dev gyroflow libcxx libcxx.dev libcxxStdenv llvmPackages_12.clangNoLibc llvmPackages_12.clangNoLibcxx llvmPackages_12.clangUseLLVM llvmPackages_12.clangWithLibcAndBasicRtAndLibcxx llvmPackages_12.compiler-rt-no-libc llvmPackages_12.compiler-rt-no-libc.dev llvmPackages_12.libcxx llvmPackages_12.libcxx.dev llvmPackages_12.libcxxClang llvmPackages_12.libcxxStdenv llvmPackages_12.libunwind llvmPackages_12.libunwind.dev maloader mdk-sdk ns-3 pocl premid python311Packages.pygccxml python311Packages.pygccxml.dist python312Packages.pygccxml python312Packages.pygccxml.dist sbt-with-scala-native teamspeak_client wrangler

I am not sure I did nixpkgs-review right, but this was my result. I think ti's a good result --- the things that did not build are unfree things with source code one needs to dowload manually. I think (once ofborg completes again) this is ready to be merged!

This partially broke the PR #329995 since valgrind does a static binary and sanitizers rely on getauxval which isn't in libc_nonshared.a.


NimBLE Server - NIMBLE_PROPERTY::READ leads to crash

HI @h2zero I know you are busy with fixing the Client stuff, but something on the Server side broke along the way.
Simple custom characteristic creation using NIMBLE_PROPERTY::READ makes the app crash on pService->start().
Example code:
// Includes for BLE Arduino-NimBLE
#include <NimBLEUtils.h>
#include <NimBLEServer.h>
#include <NimBLEDevice.h>
#include <NimBLEAdvertising.h>

/** Unique device name */
char apName[] = "ESP32-xxxxxxxxxxxx";

// List of Service and Characteristic UUIDs
#define SERVICE_UUID "0000AAAA-EAD2-11E7-80C1-9A214CF093AE"
#define WIFI_UUID "00005555-EAD2-11E7-80C1-9A214CF093AE"

... // skipping the callbacks
/**
 * initBLE
 * Initialize BLE service and characteristic
 * Start BLE server and service advertising
 */
void initBLE()
{
	// Initialize BLE and set output power
	BLEDevice::init(apName);
	BLEDevice::setPower(ESP_PWR_LVL_P7);
	BLEDevice::setMTU(256);

	Serial.printf("BLE advertising using %s\n", apName);

	// Create BLE Server
	pServer = BLEDevice::createServer();

	// Set server callbacks
	pServer->setCallbacks(new MyServerCallbacks());

	// Create BLE Service
	pService = pServer->createService(SERVICE_UUID);

	// Create BLE Characteristic for WiFi settings
	pCharacteristicWiFi = pService->createCharacteristic(
		// BLEUUID(WIFI_UUID),
		WIFI_UUID,
		NIMBLE_PROPERTY::READ |
			NIMBLE_PROPERTY::WRITE);

	/** Add properties the same way as characteristics now **/
	pCharacteristicWiFi->createDescriptor("2902");

	pCharacteristicWiFi->setCallbacks(new MyCallbackHandler());

	// Start the service
	pService->start();

	// Start advertising
	pAdvertising = pServer->getAdvertising();
	pAdvertising->addServiceUUID(WIFI_UUID);
	pAdvertising->start();
}

Serial debug output:
Build: Apr  5 2020 10:15:02
Read from preferences:
primary SSID: XYZ2 password: secret
secondary SSID: XYZ3 password: secret
I NimBLEDevice: "BLE Host Task Started"
I NimBLEDevice: "NimBle host synced."
D NimBLEDevice: ">> setPower: 7"
D NimBLEDevice: "<< setPower"
BLE advertising using ESP32-3C71BF6CE284
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400e43e3  PS      : 0x00060530  A0      : 0x800d65d8  A1      : 0x3ffcb5c0
A2      : 0x00000004  A3      : 0x3ffcb600  A4      : 0x3ffc3600  A5      : 0x00000002
A6      : 0x3ffcb610  A7      : 0x3ffce201  A8      : 0x00002902  A9      : 0x00000000
A10     : 0x00000000  A11     : 0x40085110  A12     : 0x3ffce444  A13     : 0x3ffcb538
A14     : 0x3ffcb5a0  A15     : 0xfefefe01  SAR     : 0x00000018  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000004  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000

Backtrace: 0x400e43e3:0x3ffcb5c0 0x400d65d5:0x3ffcb5e0 0x400d5f2d:0x3ffcb600 0x400d1de1:0x3ffcb690 0x400d233f:0x3ffcb6d0 0x400eb93f:0x3ffcb790 0x4008dadd:0x3ffcb7b0

Decoded backtrace:
PC: 0x400e43e3: ble_uuid_cmp at .pio\libdeps\esp32devmaxapp\NimBLE-Arduino\src\nimble\host\src\ble_uuid.c line 71
EXCVADDR: 0x00000004

Decoding stack results
0x400e43e3: ble_uuid_cmp at .pio\libdeps\esp32devmaxapp\NimBLE-Arduino\src\nimble\host\src\ble_uuid.c line 71
0x400d65d5: NimBLEUUID::equals(NimBLEUUID) at .pio\libdeps\esp32devmaxapp\NimBLE-Arduino\src\NimBLEUUID.cpp line 181
0x400d5f2d: NimBLEService::start() at .pio\libdeps\esp32devmaxapp\NimBLE-Arduino\src\NimBLEService.cpp line 129
0x400d1de1: initBLE() at src\main.cpp line 355
0x400d233f: setup() at src\main.cpp line 531
0x400eb93f: loopTask(void*) at C:\users\beegee\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp line 14
0x4008dadd: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143

I tried as well with the BLE Uart example and it crashes at the same place. Btw. there is an error in the BLE Uart example.
	// Create a BLE Characteristic
	pTxCharacteristic = pService->createCharacteristic(
		CHARACTERISTIC_UUID_TX,
		/******* Enum Type NIMBLE_PROPERTY now *******
                                        BLECharacteristic::PROPERTY_WRITE
                                        );
                                    **********************************************/
		NIMBLE_PROPERTY::WRITE);

should be
	// Create a BLE Characteristic
	pTxCharacteristic = pService->createCharacteristic(
		CHARACTERISTIC_UUID_TX,
		/******* Enum Type NIMBLE_PROPERTY now *******
                                        BLECharacteristic::PROPERTY_WRITE
                                        );
                                    **********************************************/
		NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY);

Thanks for reporting, strange behavior indeed. I'll look into this tomorrow.

I think I found it, at least how to avoid the crash.
Removing pCharacteristicWiFi->createDescriptor("2902") fixes the crash.
	// Create BLE Characteristic for WiFi settings
	pCharacteristicWiFi = pService->createCharacteristic(
		BLEUUID(WIFI_UUID),
		// WIFI_UUID,
		NIMBLE_PROPERTY::READ | // NIMBLE_PROPERTY::READNOTIFY |
			NIMBLE_PROPERTY::WRITE);  // | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);

	/** Add properties the same way as characteristics now **/
	// pCharacteristicWiFi->createDescriptor("2902" /** , NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE **/);

But now I got a different problem.
In BLECharacteristicCallbacks in void onWrite(BLECharacteristic *pCharacteristic) I always get only 18 bytes, while the connected client sends something between 70 and 80 bytes.
The buffer content of 18 bytes is the first 18 bytes of the data sent from the Android app.
This application was working with the server_dev branch before. I just retried yesterday with the final library for confirmation.

I have located the source of the error and it's actually in the application code. If you create a 2902 descriptor without NIMBLE_PROPERTY::NOTIFY or NIMBLE_PROPERTY::INDICATE properties it causes this error.
As for the fix, I would suggest adding one of those properties to the characteristic you are creating the descriptor with as without those set it probably won't function the way you expect.
I'm considering adding those properties automatically if a 2902 is created without them but that would be encouraging bad practice. The other option is to ignore it completely but then there would be complaints that it's not working lol. The final option is to allow it to be created anyway but I'm unsure if notifications would even be sent, which may be even more confusing.
As for the number of bytes you're receiving I am unsure why that would be other than perhaps your android app has not exchanged MTU info with the esp32. Nothing in that code has changed since merging the ServerDev branch. I'll see what I can find.

I'm considering adding those properties automatically if a 2902 is created without them but that would be encouraging bad practice.

Maybe just add assert, which will crash or at least display error/warning about missing property, because with descriptor you can have either notification or indication.

I always get only 18 bytes, while the connected client sends something between 70 and 80 bytes.

Indeed it looks like MTU = 23.

I understand the problem with the 2902 descriptor and will adjust the code.
For the 18 bytes, when I compile the same code with the ESP32-Arduino BLE library it works without problems. It happens only with NimBLE. On Android side I use the same app in both cases.
I tried to set MTU on ESP32 side to 256 (see above code example) but that doesn't change anything.
When using ESP32-Arduino BLE I do not set any MTU size and it works. What is the default MTU size in the original BLE library.?
I will check in the Android app how I can request a larger MTU.
@chegewara, just a comment, 18+3 would indicate a MTU of 21, not 25.

Just tested it and if a 2902 is created without the properties set on the characteristic for notfiy or indicate the client app will not provide a means to subscribe.
@chegewara I agree an assert/message is probably best.

Just thinking....
If I don't use Notify or Indicate, I don't need the 2902 descriptor.
Will test tomorrow together with the MTU problem.

That's correct, if you aren't using notification/indication there is no need for a 2902.
If you set log level to debug you will see if/when the MTU is exchanged and what the value is.
With my phone I get this:
D NimBLEServer: ">> handleGapEvent: BLE_GAP_EVENT_MTU"
I NimBLEServer: "mtu update event; conn_handle=0 mtu=185"

just a comment, 18+3 would indicate a MTU of 21, not 25.

You are correct, write request OP code takes 3 bytes, so it should be 20 bytes of data.

@h2zero    side problem
I have a problem with the debug output in PlatformIO.
If I include the library with lib_deps it doesn't recognize the CORE_LEVEL_DEBUG (or ARDUHAL_DEBUG_LEVEL) setting in platformio.ini. Only if I copy the library into the lib folder of the ithe project I get some debug output, but only until the BLE server started, then all debug output stops. I have to manipulate NimBLE_Log.h to enable debug output. I didn't try on ArduinoIDE, because that's not my preferred IDE.
Temporary problem, not sure why that happens.

Interesting finding on the MTU, seems NimBLE uses 5 bytes and not 3 for the operation command header.

Well, forget the problem for now, it might be related to the Android BLE library I use.
I made another test with a customers Android app, which uses nRF52 BLE library and it works just fine there. It uses the same custom characteristic with both READ and WRITE.
I will have to dig into the Android BLE library I use for the app causing the problem.

Look for an api call to begin MTU exchange in your library and call it after the connection opens. Also I'd like to say thanks for this issue as I now know I need to implement long reads and writes. I already started on the code for that and will push a new branch up shortly with some of that and the latest bugfixes.

gatt.requestMtu(256);  in the Android app solved the problem with the cut off data.
Still wondering why I didn't need it in the ESP32-Arduino BLE library.
But I am good now. Thanks for the support!

Also I'd like to say thanks for this issue as I now know I need to implement long reads and writes.

@beegee-tokyo Because this is not implemented yet and its working in old library


Add support for SSM Parameter deletion

Added support to delete and SSM parameter.

@brikis98 I added support to delete a SSM parameter. Can you please review?

@yorinasub17 Can this be merged?

The implementation looks good to me, but we need to make a case on whether we should include this or not... With that said, there is an argument to be made about "completeness" as you would typically want to temporarily be setting and destroying SSM parameters for the test, so I think we are ok to merge this in.
That’s exactly out use case. We have modules that require SSM to be present. We use this library to setup those parameters and feel that we’d prefer to use the same library to also tear down those same parameters.

As a side note that typically, we recommend doing this kind of dependency injection using Terraform.
Which kind of DI are you referring to? Can you please elaborate or point me in the right direction?

Thanks,

Which kind of DI are you referring to? Can you please elaborate or point me in the right direction?

The idea is to create wrapper modules that call the modules you are testing, and then use terraform to setup the dependencies of the underlying module. Then, you use terratest against the wrapper modules, which implicitly test the underlying modules.
This way, you can use terraform to setup all the resource dependencies that you need, giving you a much more robust testing platform.
An alternative approach that we also sometimes take is to create a separate module that sets up the dependencies, and use terratest to call them in sequence, relying on terraform.Output to pass through the data. This lets you more directly test the target module when the input variables are complex and hard to duplicate in a wrapper.

@yorinasub17 when you say wrapper module, I think you follow a similar pattern with your examples and modules in that your examples spin up an implementation of the module and your infrastructure test then actually init and apply the example (wrapper module) instead of the module itself, correct? Is that what you're referring to?

Nevertheless. Is this PR something you think that will be merged, or should I change the approach on my tests? (I prefer referencing terratest directly and not a forked version of it)

when you say wrapper module, I think you follow a similar pattern with your examples and modules in that your examples spin up an implementation of the module and your infrastructure test then actually init and apply the example (wrapper module) instead of the module itself, correct? Is that what you're referring to?

Yup that is correct.

Is this PR something you think that will be merged, or should I change the approach on my tests?

I think we can merge this in, based on the completeness litmus test. I just reviewed the test failure and it is a known issue unrelated to this change so will be merging and releasing shortly.


MacOS Catalina: Does not work

It does not work with the following message:
$ watcher
2019/10/24 21:02:15 build started
Building ....
2019/10/24 21:02:17 build completed
Running ...
2019/10/24 21:02:17 process interrupted: signal: killed

Other people from my team who upgraded to Catalina report the same
$ go version
go version go1.12.9 darwin/amd64

Guys getting the same error on macOS Catalina.
@vonhraban Were you able to solve the issue?

yup same here, i will see if i get some time this evening to find out what's causing this and make a pull request.

ok i've found the issue and got a fix for it. it's not done yet but the problem is the change to zsh from bash on MacOS Catalina. I will try to get it done tomorrow after work.
If you're on Catalina and just want to get it working, change runCommand() in common.go:
func runCommand(name string, args ...string) (*exec.Cmd, error) {
	var cmd *exec.Cmd

	if len(args) == 0 {
		cmd = exec.CommandContext(context.Background(), "/bin/zsh", "-c", name)
	} else {
		cmd = exec.Command(name, args...)
	}

	stderr, err := cmd.StderrPipe()
	if err != nil {
		return cmd, err
	}

	stdout, err := cmd.StdoutPipe()
	if err != nil {
		return cmd, err
	}

	if err := cmd.Start(); err != nil {
		return cmd, err
	}

	go io.Copy(os.Stdout, stdout)
	go io.Copy(os.Stderr, stderr)

	return cmd, nil
}

and then change Run() in run.go:
func (r *Runner) Run(p *Params) {
	for fileName := range r.start {

		color.Green("Running %s...\n", p.Get("run"))

		cmd, err := runCommand(fileName, p.Package...)
		if err != nil {
			log.Printf("Could not run the go binary: %s \n", err)
			r.kill(cmd)

			continue
		}

		r.cmd = cmd

		go func(cmd *exec.Cmd, fileName string) {
			if err := cmd.Wait(); err != nil {
				log.Printf("process interrupted: %s \n", err)
				r.kill(cmd)
			}

			removeFile(fileName)
		}(r.cmd, fileName)
	}
}

Uhm... seems to be even simpler. You only need to make the change to Run() (i.e. moving removeFile()).

I had to add this line before runCommand in Run func:
fileName = "./" + fileName
It was trying to search for fileName in PATH.. maybe I'm missing something.
I've also added removeFile to the err handler of runCommand, right before continue. To don't leave any invalid executable around...

Hello,
after cloning and installin golang watcher, try to type watcher on my terminal, on cd /path/to/myapp directory following error returns:
zsh: command not found: watcher
Could you please advice what is wrong?
Btw, I am using MacOS Catalina
Thanks for your support

@zzeynal Not sure why you added your question to this issue, but here's your problem:  Just because you are in the folder, it doesn't mean that folder is in your $PATH.  You can do one of two things: add that folder to your $PATH environment variable, or just run ./watcher.  You may need to chmod +x ./watcher first if it's not already executable.

@zzeynal Not sure why you added your question to this issue, but here's your problem: Just because you are in the folder, it doesn't mean that folder is in your $PATH. You can do one of two things: add that folder to your $PATH environment variable, or just run ./watcher. You may need to chmod +x ./watcher first if it's not already executable.

# @tzusman Thanks for your reply.
Somehow I have fixed and watcher command already works. But now I have same issue with building and running the myapp.
Building ....
2020/06/12 19:28:11 build completed
Running ...
2020/06/12 19:28:11 process interrupted: signal: killed
It does not build any executable file nor runs any, as there does not appear any exeucatble file.
While nomral outcome instead of above outcome, should look like as the below:
Building ....
2020/06/12 19:28:11 build completed
Running ...
2020/06/12 19:28:11 process interrupted: signal: killed
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

using env:	export GIN_MODE=release
using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /posts                    --> main.Posts (3 handlers)
[GIN-debug] GET    /posts/:id                --> main.Show (3 handlers)
[GIN-debug] POST   /posts                    --> main.Store (3 handlers)
[GIN-debug] PATCH  /posts/:id                --> main.Update (3 handlers)
[GIN-debug] DELETE /posts/:id                --> main.Delete (3 handlers)
[GIN-debug] Listening and serving HTTP on :9090
it should build and then run that build executable, but unfortunately it does not happen.
I have make all mentioned changes to Run() funtion and all other stuff, but still the same outcome.
Please help!
Thanks in advance!

@zzeynal Your question isn't watcher related, so I would post this question in a more appropriate place.  I would however ensure that go build and go run works for your app, otherwise watcher won't be able to run it either.  good luck

@zzeynal Your question isn't watcher related, so I would post this question in a more appropriate place. I would however ensure that go build and go run works for your app, otherwise watcher won't be able to run it either. good luck

@tzusman yes, sure while running go build and go run commands my app works.
Much appreciate your support.

ok i've found the issue and got a fix for it. it's not done yet but the problem is the change to zsh from bash on MacOS Catalina. I will try to get it done tomorrow after work.
If you're on Catalina and just want to get it working, change runCommand() in common.go:
func runCommand(name string, args ...string) (*exec.Cmd, error) {
	var cmd *exec.Cmd

	if len(args) == 0 {
		cmd = exec.CommandContext(context.Background(), "/bin/zsh", "-c", name)
	} else {
		cmd = exec.Command(name, args...)
	}

	stderr, err := cmd.StderrPipe()
	if err != nil {
		return cmd, err
	}

	stdout, err := cmd.StdoutPipe()
	if err != nil {
		return cmd, err
	}

	if err := cmd.Start(); err != nil {
		return cmd, err
	}

	go io.Copy(os.Stdout, stdout)
	go io.Copy(os.Stderr, stderr)

	return cmd, nil
}

and then change Run() in run.go:
func (r *Runner) Run(p *Params) {
	for fileName := range r.start {

		color.Green("Running %s...\n", p.Get("run"))

		cmd, err := runCommand(fileName, p.Package...)
		if err != nil {
			log.Printf("Could not run the go binary: %s \n", err)
			r.kill(cmd)

			continue
		}

		r.cmd = cmd

		go func(cmd *exec.Cmd, fileName string) {
			if err := cmd.Wait(); err != nil {
				log.Printf("process interrupted: %s \n", err)
				r.kill(cmd)
			}

			removeFile(fileName)
		}(r.cmd, fileName)
	}
}

after changing Run() func in run.go file I got such a problem:
exported method Runner.Run should have comment or be unexported go-lint
Please advice.

Guys solved my issue!
Everything is done great, based upon your advice.
Thanks!

I have the same issue with Mac OS Catalina. How do I build the watcher after I change the code?
❯ watcher -c config.dev.yaml
2020/10/16 10:35:48 build started
Building ....
2020/10/16 10:35:55 build completed
Running ...
2020/10/16 10:35:55 process interrupted: signal: killed

any progress on this issue?


Self parse user data

This PR adds the ability to parse variables referenced in a userdata file.
UserData.yaml
#!/bin/sh
echo Hey, {{name}}

stack.yaml
- name: stack
   variables:
     name: tom
     UserData: ${file plain:file:/path/to/file}

stack.py - somewhere where userdata needs to be passed in
...
UserData = self.parse_user_data( variables['Userdata'] )
...

this will convert all variables enclosed in {{ ... }} to their respective values and base64 encode the entire string.

The way userdata templating works is fixed, it uses the default string template provided by python. The main problem with my previous attempt was the way I was passing in the userdata was as a plain string using the file lookup handler which was passing its output to the default output handler and causing all sorts of problems. Now, the function only requires the path and it reads the file itself.
Example config file: test.yaml
...
UserDataPath: file://tmp.txt
#file:// is required for it to work
...

Example template file: test.py
...
variables = self.get_variables()
...
userdata=self.read_user_data(variables['UserDataPath'])
...

I can move this to stacker_blueprints, I think it may be a better fit.


ticdc: Support Vector data type | tidb=master pd=master tikv=master

What problem does this PR solve?

Issue Number: ref #11530
What is changed and how it works?
Detect TypeTiDBVectorFloat32, and convert vector to string in DML sink.
CREATE table test.simple(id int primary key, data VECTOR(5));
INSERT INTO test.simple(id, data) VALUES (1, '[1,2,3,4,5]');

Some changes like converting VECTOR to LONGTEXT on an unsupported downstream, supporting multiple output protocols may be temporary. Converting VECTOR to LONGTEXT is automatical when downstream is not TiDB or TiDB version less than 8.3.0.
CREATE table test.simple(id int primary key, data LONGTEXT);
INSERT INTO test.simple(id, data) VALUES (1, '[1,2,3,4,5]');

Check List
Tests

Unit test
Integration test

Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
support vector data type

/ok-to-test

/retest

/test engine-integration-test

/test engine-integration-test

/retest

/area ticdc

why this is merged to pingcap:feature/vector-data-type

why this is merged to pingcap:feature/vector-data-type, instead of the master branch ?

To keep the code tidy. Vector index support will also be provided in the future.

/retest

/retest


website getting started intructions: 'npm run compile' package.json rule is missing

Hi react-server team,
You might want to edit the website 'getting started' script to remove the 'npm run compile' line, because this rule doesn't exists inside the package.json
Thanks and have a nice day,
Alex

Resolved in https://github.com/redfin/react-server/pull/538


New release

there have been 140 commits since the last release so a new release would be nice if possible.

Early August 😏


add docker scripts, fix flask version issue

Updated some of the scripting:

Added opener as dev dep to be cross-platform: https://www.npmjs.com/package/opener
Changed clean-container script to remove only images and containers using the specified image name, also prunes dangling images
docker:run script will now remove the container after it exits.

Removed the docker:stop script because of this


setupaccount task fails if password contains a bracket "("

Requirements: Have a user account set up where the user's password contains a bracket (aka parenthesis).
STR:

Run suitecloud setupaccount
When prompted with Do you want to issue or save a TBA token?, select Issue a token.

Expected result: the wizard continues normally
Actual result: an error is returned: /bin/sh: -c: line 0: syntax error near unexpected token '('
Full log:
MacBook-Pro:MyFirstCommerceExtension sgoldberg-oracle$ suitecloud setupaccount
? Enter your email<EMAIL_ADDRESS>? Enter your password: [hidden]
? Select the account ID: SuiteCommerce - [Administrator]
? Do you want to issue or save a TBA token?
    If your role requires 2FA, you must save a TBA token issued in NetSuite. To learn how to issue a toke
n in NetSuite, see https://system.netsuite.com/app/help/helpcenter.nl?fid=bridgehead_4254083671.html. Iss
ue a TBA token.
ERROR: SDK exited with code 2
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `java -jar  -DintegrationMode  -DclientPlatformVersion=10.16.3 "/Users/sgoldberg 1/netsuite-suitecloud-node-cli/bin/cli-2019.2.1.jar" issuetoken -password mypasswordhasabracketinit( -account TSTDRV1234567893 -role 3 -email<EMAIL_ADDRESS>-url tstdrv123456789.restlets.api.netsuite.com '

(Some details have been obscured. Note that it dumps your password in your terminal window.)

Thanks for reporting this, Steve!
We are implementing a new authentication flow for the next major release that will not require users to input the password in the CLI. Instead, the user will setup the account using browser-based authentication (oAuth). The dev branch has the new implementation already.
Then, this problem should be resolved for the Node.js CLI in the next major release, planned for February/March 2020.
Since this bug is at the SDK level (Java Jar), we should still fix it for other commands that require password in the Java-based CLI (for instance, issuetoken).

Hello Steve @stevegoldberg,
Thank you for your feedback!
I understand you are using the code from master branch that has code for 19.2 version which was not officially released, this code is outdated, all active development happens in /dev branch.
We will officially release 20.1 version of suitecloud-cli in npmjs.com in the following weeks, the latest code will be merged into master then.
If you would like to use suitecloud-cli already I would recommend installing from /dev branch.
Closing this issue as outdated.