Remove JWT generation in JWT authentication

Backport of https://github.com/apereo/cas/pull/4768

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


Make #data-select just a text rather than a select box and move example dataset to be a tab in the pop-up

Make #data-select just a div rather than <select> and move example dataset list to be a tab in the pop-up.

The last piece of this is a final PR for the button in the sidebar

The last piece of this is in PR at vega/voyager#212: I am closing this issue


Making transformer plan log more obvious

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Making the transformer plan log more obvious. Plan for sql
select count(*) from my_char where name = 'Nemon'

Now is
CHNativeColumnarToRow
+- *(2) HashAggregateTransformer(keys=[], functions=[count(1)], output=[count(1)#7])
   +- ShuffleQueryStage 0
      +- ColumnarExchangeAdaptor SinglePartition, ENSURE_REQUIREMENTS, false, [plan_id=49], [id=#49], [OUTPUT] List(count:LongType), [OUTPUT] List(count:LongType)
         +- *(1) HashAggregateTransformer(keys=[], functions=[partial_count(1)], output=[count#10L])
            +- *(1) ProjectExecTransformer
               +- *(1) FilterExecTransformer (isnotnull(name#2) AND (name#2 = Nemon))
                  +- FileScan orc tpcds_parquet.my_char[name#2] Batched: true, DataFilters: [isnotnull(name#2), (name#2 = Nemon)], Format: ORC, ...

A more obvious one will look like this
CHNativeColumnarToRow
+- ^(2) HashAggregateTransformer(keys=[], functions=[count(1)], output=[count(1)#7])
   +- ShuffleQueryStage 0
      +- ColumnarExchangeAdaptor SinglePartition, ENSURE_REQUIREMENTS, false, [plan_id=49], [id=#49], [OUTPUT] List(count:LongType), [OUTPUT] List(count:LongType)
         +- ^(1) HashAggregateTransformer(keys=[], functions=[partial_count(1)], output=[count#10L])
            +- ^(1) ProjectExecTransformer
               +- ^(1) FilterExecTransformer (isnotnull(name#2) AND (name#2 = Nemon))
                  +- NativeFileScan orc tpcds_parquet.my_char[name#2] Batched: true, DataFilters: [isnotnull(name#2), (name#2 = Nemon)],...

Are your proposing to use ·NativeFileScan· to name the plan node to distinguish with Spark's? It can be achieved by overriding nodeName method. Looks reasonable. I am not quite sure why ^ is replacing * in your proposal. Any reasons?

Using ^ , so we can distinguish plan between whole stage codegen and whole stage transformer.
In spark plan , * usually means the plan node is codegened, same ID means they are in the same whole stage codegen.
We can keep the ID part, but use a ^ or other symbols instead.


AmqpProtocol did not close connection properly

reproduce: (just copied from examples/send.py)
env:

rabbitmq 3.9.4
trio 0.19
python 3.9.6
async_amqp 0.5.0

import anyio
import async_amqp

async def send():
    async with async_amqp.connect_amqp() as protocol:
        channel = await protocol.channel()

        await channel.queue_declare(queue_name="hello")

        await channel.basic_publish(
            payload=b"Hello World!", exchange_name="", routing_key="hello"
        )

        print(" [x] Sent 'Hello World!'")

# anyio.run(send)
# i do run this script on trio
trio.run(send)

logs at the rabbitmq side:
rabbitmq    | 2021-08-24 08:23:09.194281+00:00 [info] <0.2972.0> accepting AMQP connection <0.2972.0> (<IP_ADDRESS>:45794 -> <IP_ADDRESS>:5672)
rabbitmq    | 2021-08-24 08:23:09.196500+00:00 [info] <0.2972.0> connection <0.2972.0> (<IP_ADDRESS>:45794 -> <IP_ADDRESS>:5672): user 'guest' authenticated and granted access to vhost '/'
rabbitmq    | 2021-08-24 08:23:09.199222+00:00 [warn] <0.2972.0> closing AMQP connection <0.2972.0> (<IP_ADDRESS>:45794 -> <IP_ADDRESS>:5672, vhost: '/', user: 'guest'):
rabbitmq    | 2021-08-24 08:23:09.199222+00:00 [warn] <0.2972.0> client unexpectedly closed TCP connection

rabbitmq complains client unexpectedly closed TCP connection.
as comparison, i tried pika, and here is rabbitmq's logs
rabbitmq    | 2021-08-24 08:50:27.299260+00:00 [info] <0.3927.0> accepting AMQP connection <0.3927.0> (<IP_ADDRESS>:45828 -> <IP_ADDRESS>:5672)
rabbitmq    | 2021-08-24 08:50:27.302410+00:00 [info] <0.3927.0> connection <0.3927.0> (<IP_ADDRESS>:45828 -> <IP_ADDRESS>:5672): user 'guest' authenticated and granted access to vhost '/'
rabbitmq    | 2021-08-24 08:50:27.310122+00:00 [info] <0.3927.0> closing AMQP connection <0.3927.0> (<IP_ADDRESS>:45828 -> <IP_ADDRESS>:5672, vhost: '/', user: 'guest')

A client connection can be closed cleanly or abnormally. In the former case the client closes AMQP 0-9-1 (or 1.0, or STOMP, or MQTT) connection gracefully using a dedicated library function (method). In the latter case the client closes TCP connection or TCP connection fails. RabbitMQ will log both cases.

according to the docs of rabbitmq, it seems AmqpProtocol just simply close the underlying socket connection, without sending a proper close signal(?) to rabbitmq first.

Abruptly closed connections can be harmless.

althrough, i think implemeting the "normal close" is still good to have.

I agree and it should close cleanly (when not crashing). I'll look into it.

according to the amqp 0-9-1 reference, there is a connection.close() command which corresponding to pamqp.commands.Connection.Close().
after dived into the code, and i think it could be caused by the following code:
Protocol.close():

    # see: https://github.com/python-trio/trio-amqp/blob/dd805fc93e668b4ae094609d4afefa4561e64ae4/async_amqp/protocol.py#L228
    await self.connection_closed.set()

    if not got_close:
        # ...

        # see: https://github.com/python-trio/trio-amqp/blob/dd805fc93e668b4ae094609d4afefa4561e64ae4/async_amqp/protocol.py#L248
        await self.wait_closed()
        # which simply call `self.connection_closed.wait()`

since connection_closed is always set before waiting, the later wait() does not work as expected.

I agree and it should close cleanly (when not crashing). I'll look into it (though it'll be a couple weeks before I can get to it). Pull requests welcome. ;-)

Was this fixed? Or can I work on it?


Explicit constructor from Box<dyn Error + Send + Sync>

Hello
I've noticed there's a (closed) issue about having a From<Box<dyn Error + Send + Sync>> impl, that refers to wanting that from std (#66)
But would it make sense to have an explicit constructor in the meantime? Eg. Error::from_box_error(..)? That way one would have to write some kind of map_error(Error::from_box_error)? instead of just ?, but that's probably better than nothing.

anyhow! handles the conversion.
use anyhow::anyhow;

fn main() {
    let e: Box<dyn std::error::Error + Send + Sync> = unimplemented!();
    let e = anyhow!(e);
}

Reading the docs, doesn't this stringify the error? Won't it lose all the source chain, type information and such?
I'd hope it could somehow convert the existing dyn Error from 2-words trait object to the internal 1-word trait object. Or is it not possible?

Oh, I'm reading through the source code and it seems to be preserving it somehow. Would you mind if I send a PR making such usage clearer in the docs? Also, link from the Error type to the macro would make it little bit easier to find.

Perhaps I'm missing something but anyhow! isn't very easy to use with ?.
fn main() -> anyhow::Result<()>{
   something_returning_boxed_error()?;
}

is a bit awkward - I mean:
fn main() -> anyhow::Result<()>{
  match something_returning_boxed_error(){
     Ok(v) => Ok(v),
     Err(e) => anyhow!(e)
  }?
}

It could be shorter with map_err instead of explicit match, eg something like:
something_returning_boxed_error().map_err(|e| anyhow!(e))?

This would be even slightly more ergonomic if it existed as a function/constructor/method, eg:
something_returning_boxed_error().map_err(Anyhow::from_boxed)

But as long as Rust doesn't allow implementing impl From<Box<std::error::Error + Send + Sync>> for Anyhow, this is probably the best that can be done :-(.

Looks like SNAFU crate handles this issue
https://stackoverflow.com/questions/65151237/why-doesnt-boxdyn-error-implement-error


Working with Distributed messaging service like NSQ in Go

@souvikhaldar do you have a use case in mind for this?

Yes. Let's say I have a service for clustering of locations, so instead of server doing that I'll let server just intake the location request, send command to the clustering service to process the location input, in the meanwhile the server will respond with an OK status.

Thanks @souvikhaldar !


[Generics Manifesto] Existential subtyping as generic constraint

Updated 'Generalized supertype constraints' section of GenericsManifest based on https://forums.swift.org/t/existential-subtyping-as-generic-constraint/31584.
I think this addresses an important pain point when using protocols and generics together. Maybe this even should be separated from 'Generalized supertype constraints' and placed in 'Removing unnecessary restrictions' section, rather than 'Minor extensions' section.
Note: This is a copy from https://github.com/apple/swift/pull/28741, because GitHub does not allow to edit source branch of the pull-request.

I’m still confused about what this clarification is trying to accomplish. It seems like you want the ability for certain protocols to conform to themselves. Otherwise you don’t need a new kind of constraint here. Seeing G<T: any P>, my immediate thought is “T is an opaque type sealed behind an interface with requirements at least P”. We already have syntax for that, it’s some P. Perhaps I’m missing something here, but this section is about the ability to express bounds that depend on the substitutions made in a given protocol conformance - the ability to seal an interface’s requirements behind another requirement’s interface.

Please update the base branch to main by Oct 5th otherwise the pull request will be closed automatically.

How to change the base branch: (Link)
More detail about the branch update: (Link)


How to interact with System (Permission) Dialogs?

I have an app that requests permission to access the Camera and Microphone. This causes a system dialog to be presented. How can I have the driver interact with that dialog?
I have tried clicking on an arbitrary point on the screen using /click and passing in {x: number, y: number} but that end up clicking in an incorrect spot followed by crashing the runner.
I have also tried spinning up the driver passing in the UserNotificationCenter bundleId (as that is the system service that presents the notification) but the driver is unable to even start when doing that (possibly due to access).
Is there some sort of mode or feature that would allow this?

I assume it is an XCTest limitation. I would try to workaround it using AppleScript

This can work, but only in certain circumstances. From past experience working with any type of permission prompt is a pain.


Update index.html.md.erb

Updated documents from BWCE 2.4.4 perspective.

Created pull request under master repo by mistake. Closing it.
Sorry for inconvenience.


Figure out how to upgrade django-postgres-copy and psycopg2

The latest version of psycopg2 (2.8) was giving us some problems when deployed to lambda (seemingly because lambda lacks some external dependencies). So we locked into the most recent previous release that seemed to be working (2.7.7).
Then django-postgres-copy recently shipped a new version, which required 2.8.1.
The temporary solution was to also lock into the most recent previous release of django-postgres-copy (less than 2.4).
Long-term fix would be figuring out how to upgrade both of these packages. This might involve figuring out how to use a pre-compiled lambda package with psycopg2 and the needed dependencies.

This one might now be a little more pressing...
As a result of the work for #82, we made a slight change to django-postgres-copy (see california-civic-data-coalition/django-postgres-copy#105), which requires psycopg2>=2.8.1.

I tried setting upgrading to the latest version of psycopg2 and setting "use_precompiled_packages": false, in zappa_settings.json. This did not work.

You can get around the dependency resolution failure by skipping pipenv's lock mechanism:
pipenv install --dev --skip-lock

I then updated the deployment, and the site seems to be working. Looks like zappa used psycopg2==2.7.7 in this case.

Bottom line (insofar as I understand it): AWS Lambda needs psycopg2 to either be pre-2.8 or to use the new alternate psycopg2-binary. This need conflicts with reqs declared in the setup.py file of django-postgres-copy.
Maybe we'll see about dropping that requirement in django-postgres-copy...


64 apply new styling concept

closes #64
Changes
The Styling of the website was inconsistent and without a corporate design. This issue implemented a new corporate design and applied the new styling concept. Although some minor changes to the frontend design were made this issue does not included a structured redesign of the website.
Screenshots
Before:

After:

Checklist before merge
Developer's responsibilities

[ ] Assign one or two developers
[ ] Change code if reviewer(s) has/have requested it
[ ] Pull request build has passed
[ ] tested locally (in at least chrome & firefox if frontend)
[ ] updated the documentation
[ ] added tests where necessary

Since you are using croco the parser test is not running through anymore. Please fix that and I will look at the code.

Since you are using croco the parser test is not running through anymore. Please fix that and I will look at the code.
EDIT: The Testing error was on the dev branch as well, I have fixed it for my branch. Please have a look at how I did it (just some import/export stuff) and check, if that's the only cause for your tests to fail too. I will look at the rest f the code soon

regarding that, we should really think about a github workflow for tests. We should not have to run tests of the PR on our machines

Since you are using croco the parser test is not running through anymore. Please fix that and I will look at the code.
EDIT: The Testing error was on the dev branch as well, I have fixed it for my branch. Please have a look at how I did it (just some import/export stuff) and check, if that's the only cause for your tests to fail too. I will look at the rest f the code soon

regarding that, we should really think about a github workflow for tests. We should not have to run tests of the PR on our machines

Das hat der neue PO schon auf der Liste stehen ^^

Since you are using croco the parser test is not running through anymore. Please fix that and I will look at the code.
EDIT: The Testing error was on the dev branch as well, I have fixed it for my branch. Please have a look at how I did it (just some import/export stuff) and check, if that's the only cause for your tests to fail too. I will look at the rest f the code soon

I will try to fix it. To which branch are you referring to with "my branch"?

Since you are using croco the parser test is not running through anymore. Please fix that and I will look at the code.
EDIT: The Testing error was on the dev branch as well, I have fixed it for my branch. Please have a look at how I did it (just some import/export stuff) and check, if that's the only cause for your tests to fail too. I will look at the rest f the code soon

I will try to fix it. To which branch are you referring to with "my branch"?

I think I was referencing the 87_backend... branch


WIP

🤔 해결하려는 문제가 무엇인가요?
🎉 변경 사항
🙏 여기는 꼭 봐주세요!
사용 방법
🌄 스크린샷
📚 참고

Codecov Report
Patch and project coverage have no change.

Comparison is base (ab0dc3c) 95.00% compared to head (95d80c5) 95.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   95.00%   95.00%
=======================================
  Files           7        7
  Lines          40       40
  Branches        4        4
=======================================
  Hits           38       38
  Misses          2        2

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


write_dataset(table, format='orc'): segfault

I'm on CPython 3.10.8 on Linux on x86_64.
$ python
Python 3.10.8 (main, Nov 15 2022, 15:04:54) [GCC 12.2.1 20220819 (Red Hat 12.2.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyarrow
>>> pyarrow.__version__
'10.0.1'
>>> import pyarrow.dataset
>>> t = pyarrow.table({"a": range(10)})
>>> pyarrow.dataset.write_dataset(t, format='orc', base_dir='/tmp')
Segmentation fault (core dumped)

If what I try to do shouldn't even work (e.g., if write_dataset() isn't supposed to be able to write ORC) then we probably want a nicer error message.
I tried searching existing GitHub issues for that, but didn't find anything applicable. Sorry if that's already tracked elsewhere.
Component(s)
Python

Thanks for the report. It seems this is crashing when trying to create the file write options. For example in Python the following also segfaults:
import pyarrow.dataset
orc_format = pyarrow.dataset.OrcFileFormat()
orc_format.make_write_options()

Want to try to debug and fix this crash?

Want to try to debug and fix this crash?

Yes, I'd love to give this a shot!

Understood the problem :).
Manual bisection has shown that this line is where things crash:
https://github.com/apache/arrow/blob/41b57d683ea73329af083540e6f67007bdd1d0c4/python/pyarrow/_dataset.pyx#L778
sp.get() above returns whatever self.format.DefaultWriteOptions() here returns.
And in case of the ORC file format that's
std::shared_ptr<FileWriteOptions> OrcFileFormat::DefaultWriteOptions() {
  // TODO (https://issues.apache.org/jira/browse/ARROW-13796)
  return nullptr;
}

as defined in cpp/src/arrow/dataset/file_orc.cc.
Trying to invoke type_name() of nullptr explains the segfault.
Quote from JIRA ticket:

https://github.com/apache/arrow/pull/10991 added basic support for ORC file format in the Datasets API, but didn't yet add support to write datasets to the ORC format.

https://arrow.apache.org/docs/python/dataset.html#dataset currently says:

Currently, only Parquet, ORC, Feather / Arrow IPC, and CSV files are supported.

That kind of suggests that ORC support is complete.
However, the write_dataset() docs are explicit in the sense that ORC is not documented as being supported:

Currently supported: “parquet”, “ipc”/”arrow”/”feather”, and “csv”.

As a quick improvement: should we maybe raise a NotImplementedError or generally use some method to generate a user-friendly error message for the while being?

As a quick improvement: should we maybe raise a NotImplementedError or generally use some method to generate a user-friendly error message for the time being?

Yes please.  Perhaps we can test if DefaultWriteOptions returns nullptr to decide if a format supports writing (and document this in the DefaultWriteOptions comment docs).


Contains & FreeText throws InvalidOperationException for dynamic columns

I have following query that works perfectly:
DbContext.Foods.Where(m => EF.Functions.Contains(m.DisplayName, "apple&raw")).ToList();

In my scenario, however, I have only IQueryable<T> where I don't know what column is going to be used for searching. Using string as a reference causes InvalidOperationException to be thrown. I've been trying something in the sense of:
DbContext.Foods.Where(m => EF.Functions.Contains("DisplayName", "apple&raw")).ToList();
DbContext.Foods.Where(m => EF.Functions.Contains(m.GetType().GetProperty("DisplayName").Name, "apple&raw")).ToList();
DbContext.Foods.Where(m => EF.Functions.Contains(new Food().DisplayName, "apple&raw")).ToList();

But all of them fail. Is there a way of running the queries above successfully?
Error generated for warning 'Microsoft.EntityFrameworkCore.Query.QueryClientEvaluationWarning: The LINQ expression 'where __Functions_0.Contains([m].GetType().GetProperty("DisplayName").Name, "apple&raw")' could not be translated and will be evaluated locally.'. This exception can be suppressed or logged by passing event ID 'RelationalEventId.QueryClientEvaluationWarning' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'.

Steps to reproduce
Create full text search index on any column & try to use FreeText or Contains with property reference as string.
Further technical details
EF Core version: 3.0.0-preview6.19304.10
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system:
IDE: Visual Studio 2019 16.1.2

`DbContext.Foods.Where(m => EF.Functions.Contains(EF.Property(m, "DisplayName"), "apple&raw")).ToList();

Works great! Thank you :-)


Error: 'utf-8' codec can't decode byte 0x9d in position 681: invalid start byte

Starting restler with cmd:
restler test --grammar_file Compile/grammar.py --dictionary_file Compile/dict.json --token_refresh_interval 3500 --token_refresh_command "python3.8 /opt/api/some-service/token-some-service.py" --no_ssl
Some minutes later:
ERROR: Restler engine failed. See logs in /opt/api/admin-service/Test directory for more information.
But EngineStdErr is empty. The information in EngineStdOut:
Initializing: Garbage collection every 30 seconds.
 Waiting for max 300 seconds.
'utf-8' codec can't decode byte 0x9d in position 681: invalid start byte
The information from main.txt:
Rendering request 14 from scratch
2021-03-18 11:09:59.824: Final Swagger spec coverage: 4 / 25
2021-03-18 11:09:59.824: Rendered requests: 0 / 25
2021-03-18 11:09:59.824: Rendered requests with "valid" status codes: 4 / 0
2021-03-18 11:09:59.824: Num fully valid requests (no resource creation failures): 4
2021-03-18 11:09:59.824: Num requests not rendered due to invalid sequence re-renders: 0
2021-03-18 11:09:59.824: Num invalid requests caused by failed resource creations: 0
2021-03-18 11:09:59.824: Total Creations of Dyn Objects: 0
2021-03-18 11:09:59.824: Total Requests Sent: {'gc': 0, 'main_driver': 71}
2021-03-18 11:09:59.824: Bug Buckets: {'main_driver_504': 1}

Hello @InLineR495,
Thanks for reporting this.  Would you be able to post a sample response from your logs?  It is probably the last "Received" in the network.testing file before RESTler exited.
Thanks,
Marina

Hello @InLineR495,
Thanks for reporting this. Would you be able to post a sample response from your logs? It is probably the last "Received" in the network.testing file before RESTler exited.
Thanks,
Marina

Here it is:
Generation-1: Rendering Sequence-1
Request: 1 (Remaining candidate combinations: 1)
Request hash: 9b9dc8102bb0870e8fbc21d55535317e80801868

	- restler_static_string: 'GET '
	- restler_static_string: '/'
	- restler_static_string: 'votings'
	- restler_static_string: '/'
	- restler_static_string: 'result'
	- restler_static_string: ' HTTP/1.1\r\n'
	- restler_static_string: 'Accept: application/json\r\n'
	- restler_static_string: 'Host: example.com\r\n'
	+ restler_refreshable_authentication_token: ['token_refresh_cmd', 'token_refresh_interval']
	- restler_static_string: '\r\n'

2021-03-18 11:09:59.309: Sending: 'GET /votings/result HTTP/1.1\r\nAccept: application/json\r\nHost: example.com\r\n_OMITTED_AUTH_TOKEN_\r\nContent-Length: 0\r\nUser-Agent: restler/7.2.0\r\n\r\n'

@InLineR495
I added some logging in order to better understand where issue is happening:
https://github.com/microsoft/restler-fuzzer/pull/173
The code is located in this branch:
https://github.com/microsoft/restler-fuzzer/tree/stas/164
If you could run your test with my changes, and share the logs.

@InLineR495
I added some logging in order to better understand where issue is happening:
#173
The code is located in this branch:
https://github.com/microsoft/restler-fuzzer/tree/stas/164
If you could run your test with my changes, and share the logs.

Here from network.testing (ommiting sensitive data):
2021-04-02 09:35:08.961: Failed to decode header data due to 'utf-8' codec can't decode byte 0xd0 in position 1493: invalid continuation byte when decoding b'HTTP/1.1 200 \r\nServer: nginx/X.XX\r\nDate: Fri, 02 Apr 2021 09:35:08 GMT\r\nContent-Type: application/json;charset=UTF-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nvary: Origin\r\nvary: Access-Control-Request-Method\r\nvary: Access-Control-Request-Headers\r\nset-cookie: abf3ed9a58c43deadc2a1b4aca570fda=c4685aad5e98f9969fd39702c736043d; path=/; HttpOnly\r\ncache-control: private\r\n\r\n451\r\n{"data":[{"id":"9c0cf2c3-d53d-4dc9-93b8-1a84807af922","vId":"26d50624-ce16-47d3-8ac1-5736dy895246","eId":"21231100000000","vName":"\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92","name":"\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92 111","lang":0,"mMar":1,"mType":"ON","q":[{"id":"4207a31a-0a61-43c1-9594-2cfb5ee4a39c","num":1,"eId":"21231100000000","sText":"\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98r\n'

@InLineR495
I cannot seem to be able to repro the issue with data you shared

s =  b'HTTP/1.1 200 \r\nServer: nginx/X.XX\r\nDate: Fri, 02 Apr 2021 09:35:08 GMT\r\nContent-Type: application/json;charset=UTF-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nvary: Origin\r\nvary: Access-Control-Request-Method\r\nvary: Access-Control-Request-Headers\r\nset-cookie: abf3ed9a58c43deadc2a1b4aca570fda=c4685aad5e98f9969fd39702c736043d; path=/; HttpOnly\r\ncache-control: private\r\n\r\n451\r\n{"data":[{"id":"9c0cf2c3-d53d-4dc9-93b8-1a84807af922","vId":"26d50624-ce16-47d3-8ac1-5736dy895246","eId":"21231100000000","vName":"\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92","name":"\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92 111","lang":0,"mMar":1,"mType":"ON","q":[{"id":"4207a31a-0a61-43c1-9594-2cfb5ee4a39c","num":1,"eId":"21231100000000","sText":"\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98r\n'

s.decode('utf-8')
'HTTP/1.1 200 \r\nServer: nginx/X.XX\r\nDate: Fri, 02 Apr 2021 09:35:08 GMT\r\nContent-Type: application/json;charset=UTF-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nvary: Origin\r\nvary: Access-Control-Request-Method\r\nvary: Access-Control-Request-Headers\r\nset-cookie: abf3ed9a58c43deadc2a1b4aca570fda=c4685aad5e98f9969fd39702c736043d; path=/; HttpOnly\r\ncache-control: private\r\n\r\n451\r\n{"data":[{"id":"9c0cf2c3-d53d-4dc9-93b8-1a84807af922","vId":"26d50624-ce16-47d3-8ac1-5736dy895246","eId":"21231100000000","vName":"ВВВВВВ","name":"ВВВВВВ 111","lang":0,"mMar":1,"mType":"ON","q":[{"id":"4207a31a-0a61-43c1-9594-2cfb5ee4a39c","num":1,"eId":"21231100000000","sText":"ИИИИИИИИИИИИИИr\n'

@InLineR495
I cannot seem to be able to repro the issue with data you shared

s =  b'HTTP/1.1 200 \r\nServer: nginx/X.XX\r\nDate: Fri, 02 Apr 2021 09:35:08 GMT\r\nContent-Type: application/json;charset=UTF-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nvary: Origin\r\nvary: Access-Control-Request-Method\r\nvary: Access-Control-Request-Headers\r\nset-cookie: abf3ed9a58c43deadc2a1b4aca570fda=c4685aad5e98f9969fd39702c736043d; path=/; HttpOnly\r\ncache-control: private\r\n\r\n451\r\n{"data":[{"id":"9c0cf2c3-d53d-4dc9-93b8-1a84807af922","vId":"26d50624-ce16-47d3-8ac1-5736dy895246","eId":"21231100000000","vName":"\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92","name":"\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92\xd0\x92 111","lang":0,"mMar":1,"mType":"ON","q":[{"id":"4207a31a-0a61-43c1-9594-2cfb5ee4a39c","num":1,"eId":"21231100000000","sText":"\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98\xd0\x98r\n'

s.decode('utf-8')
'HTTP/1.1 200 \r\nServer: nginx/X.XX\r\nDate: Fri, 02 Apr 2021 09:35:08 GMT\r\nContent-Type: application/json;charset=UTF-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nvary: Origin\r\nvary: Access-Control-Request-Method\r\nvary: Access-Control-Request-Headers\r\nset-cookie: abf3ed9a58c43deadc2a1b4aca570fda=c4685aad5e98f9969fd39702c736043d; path=/; HttpOnly\r\ncache-control: private\r\n\r\n451\r\n{"data":[{"id":"9c0cf2c3-d53d-4dc9-93b8-1a84807af922","vId":"26d50624-ce16-47d3-8ac1-5736dy895246","eId":"21231100000000","vName":"ВВВВВВ","name":"ВВВВВВ 111","lang":0,"mMar":1,"mType":"ON","q":[{"id":"4207a31a-0a61-43c1-9594-2cfb5ee4a39c","num":1,"eId":"21231100000000","sText":"ИИИИИИИИИИИИИИr\n'

According to Python documentation (https://docs.python.org/3/howto/unicode.html#the-unicode-type), we can attempt to ignore bad character, and proceed with receiving data. Or replace a character that causes a failure.
Also see:
https://wiki.python.org/moin/UnicodeDecodeError

It would be great to handle these types of exceptions and continue running
Also i had this today:
Initializing: Garbage collection every 30 seconds.
No checkpoints used at this phase
2021-04-02 19:01:36.390: Generation: 1
Terminating garbage collection. Waiting for max 300 seconds.
Traceback (most recent call last):
File "/opt/restler_bin/engine/engine/core/fuzzer.py", line 42, in run
self._num_total_sequences = driver.generate_sequences(
File "/opt/restler_bin/engine/engine/core/driver.py", line 652, in generate_sequences
seq_collection = render(seq_collection, fuzzing_pool, checkers, generation, global_lock)
File "/opt/restler_bin/engine/engine/core/driver.py", line 266, in render_sequential
valid_renderings = render_one(seq_collection, ith, checkers, generation, global_lock)
File "/opt/restler_bin/engine/engine/core/driver.py", line 198, in render_one
renderings = current_seq.render(candidate_values_pool, global_lock)
File "/opt/restler_bin/engine/engine/core/sequences.py", line 402, in render
response = request_utilities.send_request_data(rendered_data)
File "/opt/restler_bin/engine/engine/core/request_utilities.py", line 218, in send_request_data
success, response = sock.sendRecv(rendered_data,
File "/opt/restler_bin/engine/engine/transport_layer/messaging.py", line 86, in sendRecv
response = HttpResponse(self._recvResponse(req_timeout_sec))
File "/opt/restler_bin/engine/engine/transport_layer/messaging.py", line 229, in _recvResponse
data += buf.decode(UTF8)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 315: invalid continuation byte

@InLineR495  - I added "ignore" parameter when decoding fails. Can you give that change a try ?
https://github.com/microsoft/restler-fuzzer/pull/173/files

@InLineR495 - I added "ignore" parameter when decoding fails. Can you give that change a try ?
https://github.com/microsoft/restler-fuzzer/pull/173/files

Now, it's working!
Can you merge it into main?

@InLineR495  We will get this merged next week, Stas is currently on vacation.
We're going to put it under an option for now, in case this parsing issue could indicate a bug in some cases.


Days Remaining to LDD - Not Displaying in Left Hand Nav for IAO Users

Describe the bug in current situation
While testing features, I was observing that IAO users can no longer see days remaining to the LDD on the left hand nav panel
UPDATE : Confirm this has been fixed with #946 , @arielleandrews
Link bug to the User Story
#354
Impact of this bug
IAO Users Can not See days remaining at a glance anymore when viewing a request
Chance of Occurring (high/medium/low/very low)
High
Pre Conditions: which Env, any pre-requesites or assumptions to execute steps?
Appears any request in the open state, when viewed by an IAO user role, can not see days remaining. Issue can not be replicated with a Ministry user.
Steps to Reproduce
Steps to reproduce the behavior:

Go to any request in the open state or later as an IAO user (Flex, Intake, Processing)
Look at Left hand Nav panel
Days remaining will not be visible

Actual/ observed behaviour/ results
Expected behaviour

GIVEN ... I am on the queue screen and have clicked on any request with  and Status: Open or later
https://jacklyn808742.invisionapp.com/console/share/3W2O64AP5C/657932451
WHEN ... I am taken to the review request information screen for open or later request
THEN ... left side bar will say "xx days remaining" at the bottom
https://jacklyn808742.invisionapp.com/console/share/3W2O64AP5C/657932505

Screenshots/ Visual Reference/ Source

Can we confirm this is only once there is an extension?

@arielleandrews, as discussed please check  if this is still an issue after #946 is in TEST.

As per @jadmsaadaot  - this is ready for test with #946

Ready for QA

This bug is fixed and is working as expected again, tested with ticket #946


JavaScript exception: ReferenceError: Can't find variable: XMLHttpRequest

Hi,
I updated to 2.7.3 and I still have this issue:
Video ids:
eP0nRMlG960
kR1lDumQ9q8
ssdaFZYZ9dU
Related:
https://github.com/0xced/XCDYouTubeKit/issues/420
https://github.com/0xced/XCDYouTubeKit/issues/418

Same


updated to ghc8107 and fixed deprecation warnings

some minor updates

I've just tried the project but (as a Nix newbie) had no idea why it was failing, but this PR fixes everything. Can it be merged @emattiza :pray:

I've just tried the project but (as a Nix newbie) had no idea why it was failing, but this PR fixes everything. Can it be merged @emattiza :pray:

Then you know as much as i did when i picked up this repo! Happy to merge.


Add create methods to Parameter

I was working on providing an example of passing  parameters to the MeasureEvaluator class for the IHE devs. We currently have the ParameterHelper class that can generate a parameter map of type Map<String, Object> to pass along to the engine during measure evaluation. There are two ways to  create the map:

https://github.com/Alvearie/quality-measure-and-cohort-service/blob/0501fa4e2adec384f9f82c1333ed6c786e39c470/cohort-cli/src/main/java/com/ibm/cohort/cli/ParameterHelper.java#L33
https://github.com/Alvearie/quality-measure-and-cohort-service/blob/0501fa4e2adec384f9f82c1333ed6c786e39c470/cohort-cli/src/main/java/com/ibm/cohort/cli/ParameterHelper.java#L73

Both options  are somewhat difficult to work with currently:

The string option uses a made up  format of name:type:value (where value can be further subdivided to subtype,start,end for  intervals).
The Parameter class does not have a straightforward way to currently create the POJO except  for using an ObjectMapper  to read a JSON string.

This PR adds some factory methods to the Parameter class to make them easier to create (which should make using the ParameterHelper class easier). If folks have different suggestions for making the ParameterHelper  class easier to interact with, I'd be open to those too. This was just something quick I wanted to get in front of people.

Going to close this for now. I got the sort of feedback I was looking for and am going to have users attempt to use the code as is before introducing changes.


pyscroll: init at 2.19.2

Motivation for this change
Add the pyscroll library
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Notify maintainers
cc @

I would focus on just unit tests, if they make the distinction.

I have opened an issue regarding the failing tests in the upstream repository https://github.com/bitcraft/pyscroll/issues/34

Seems like the upstream has put work into the tests. Can you give it another try @geistesk?


[AIStudio][Cherry pick] Fix retrieval truncation

change token count api to naive version

remove unused api

Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (5c274f7) 61.21% compared to head (db9b4a0) 61.19%.

Files
Patch %
Lines

...ot_agent/agents/functional_agent_with_retrieval.py
0.00%
1 Missing :warning:

Additional details and impacted files
@@             Coverage Diff              @@
##           aistudio     #217      +/-   ##
============================================
- Coverage     61.21%   61.19%   -0.02%
============================================
  Files            56       56
  Lines          2787     2786       -1
============================================
- Hits           1706     1705       -1
  Misses         1081     1081

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


storeconfig doesn't create all keys from configuration file

What version of Traefik are you using (traefik version)?
1.2.0-rc2
What is your environment & configuration (arguments, toml...)?
k8s + consul kv
What did you do?
Created traefik.toml ConfigMap, and run storeconfig as a k8s job.
What did you expect to see?
All keys specified in traefik.toml created in kv store. toml file used:
    # traefik.toml
    logLevel = "INFO"
    defaultEntryPoints = ["http","https"]
    [entryPoints]
      [entryPoints.http]
      address = ":80"
      [entryPoints.http.redirect]
      entryPoint = "https"
      [entryPoints.https]
      address = ":443"
        [entryPoints.https.tls]
    [kubernetes]
    [web]
    address = ":8080"
    [acme]
    acmeLogging = true
    dnsProvider = "route53"
    email = "<redacted>"
    storage = "traefik/acme/account"
    entryPoint = "https"
    onDemand = true
    OnHostRule = true
    [[acme.domains]]
    main = "<redacted>"
    [consul]
    endpoint = "consul-0.consul:8500"
    watch = true
    prefix = "traefik"

What did you see instead?
Most of the keys were created, but some were not. Specifically traefik/acme/acmelogging and traefik/acme/dnsprovider were not created.

Closed by #2598.


Collect search behaviours data on /works and WL.org

Who it's for
Experience team
Why
To help us make better product decisions based on user data on WC.org and WL.org.
To investigate on both /Works and WL.org

number of search per session (avg. or histogram)
Return users: how often do they return?
Device breakdown
What features are currently being used in Works page?
Advanced search usage

Related to #3030

I think Return users and Device breakdown is the only thing we can get from GA. @hthair Can we get this info and then close this issue?
The rest of it will be done as part of #4149 @jamesgorrie

@hthair @Heesoomoon Is this still to be done?

@jennpb heesoo's got print outs of it all, just checking how we can capture it elsewhere.


Fix out of order packets

This forces ticks to be synchronized which means if a particular packet takes too long to compress and encrypt it will still be sent before the next packet.
Closes https://github.com/GeyserMC/Geyser/pull/714

Fixed in 9c8632e60f166b2e48c8534f4f0208f881a07494


Bot Framework-Emulator

Hi Team
Am getting this message "Taking longer than usual to connect" when i try to open the bot.
I have tried both URL
http://localhost:3978/api/messages
http://<IP_ADDRESS>:3978/api/messages
Please help

Hi @SenthilPrasad1704 ,
Does your bot code use Microsoft App Credentials (a Microsoft App ID & Microsoft App Password)? If so, make sure you are entering those credentials into the correct input fields when opening a bot via the Emulator.
Also make sure your bot is running on the correct port before trying to connect to it.

Hi Tony
Am not using the Microsoft App Credentials.
How to check that my bot is running on the correct port?
Thanks
Senthil Prasad

Am using the correct port number ,
FYI
server.listen(process.env.port || process.env.PORT || 3978, () => {
console.log(\n${ server.name } listening to ${ server.url });
console.log(\nGet Bot Framework Emulator: https://aka.ms/botframework-emulator);
console.log(\nTo talk to your bot, open the emulator select "Open Bot");
});

@SenthilPrasad1704 - How are you running your bot? Are you using Visual Studio Code? Are you running it in debug mode?

I am seeing the same issue today with local bots. I am running the bots in IIS Express via Visual Studio. The bot is definitely running as it accepts posts from Postman, but the emulator seemingly never even posts anything to the messages endpoint.

@SenthilPrasad1704
@garypretty
What version of Emulator are you using?

4.5.2-76208

All right, I can reproduce this in the latest version. Looks like this is a genuine bug. I recommend downgrading in the meantime.
@tonyanziano - Is 4.5.2 working for you?

@v-kydela I have been building from source (latest) & using the nightly and I haven't had any issue connecting to local bots.
It's worth noting that I'm only using NodeJS bots, so launching the bots using terminal or VS Code. So maybe it's an issue with the Emulator interfacing with IIS Express?

@tonyanziano - I have just verified that my Node bot works fine. Try switching to .NET and Visual Studio.

@tonyanziano
I have just realized that the problem was caused by a breakpoint in my code. I didn't realize that I had hit a breakpoint, and now that I've removed it 4.5.2 is working fine. Could that be the problem with all three of us?
@garypretty
@SenthilPrasad1704
Do you have the problem when you try other bots, perhaps with a different SDK?

@v-kydela I've tried launching the dotnet-core echobot sample locally and am able to communicate with it using the Emulator.

 I remember we had a similar issue not too long ago that was caused by the user being behind a proxy.

@tonyanziano @v-kydela Apologies for the delayed response - in the UK - I am not behind a corporate proxy and I have now tested this using metered / un-metered  and private / public networks.  Same results.
I am going to check another machine at my office today to see if this is a local issue to my machine at home - which I am assuming it probably is.
What I cannot get my hear around is the fact that the emulator just never seems to hit the bot at all - I have added a breakpoint to the controller.  But if I send a post directly to the endpoint using postman it hits it fine. It feels like there is something blocking the emulator from the bot, I just don't know what it is.

Ok, here is my update of a few scenarios I have tried.  This is looking like some sort of issues with the emulator being able to communicate with localhost bots - which could easily be some form of local networking issue, but I am not sure where it is to be honest.

If I point the emulator to http://localhost:3978/api/messages it doesn't connect.  I just get the 'taking longer to connect' message and nothing ever happens and seemingly nothing hits the bots endpoint.  This is the same regardless of if I have ngrok bypassed for local addresses or not.

However, if I spin up my own ngrok endpoint, point to 3978 and then update the target endpoint in the emulator to use the new ngrok endpoint I spun up myself, the emulator connects successfully and I can debug normally.

So - this seems to rule out the bot being the issue.
Any ideas?  Ngrok problem? Again that seems unlikely due to the fact I can spin up my own endpoint and everything works fine.
I won't have this machine with me today now, until tomorrow, and at least I have a workaround - so if you do have any ideas let me know and I can test them then.
Thanks for your help on this one. It's stumped me!

@garypretty - Are you saying the Emulator works correctly when you downgrade to 4.4.2?

@garypretty Your second scenario leads me to agree with you that there might be something wrong with how the Emulator is resolving localhost addresses on your machine. Or like you said, it could possibly be some networking configuration problem, however, the fact that it works for you on previous versions makes me doubt that.
Assuming you're on Windows, have you checked your hosts file (C:\Windows\System32\drivers\etc\hosts) for an entry that might be preventing localhost from resolving correctly?
Also, the flash of "Unable to connect" is normal.

@tonyanziano sorry if I wasn't clear. The older version of the emulator wasn't working either. Which makes me think I have some sort of config issue locally.
Apologies for not coming back sooner. Not been able to look further into this for a couple of days. I am planning to try and repro with a vanilla sample later today and will let you know what happens.

@tonyanziano @v-kydela FYI. This looks to be a (very odd) local issue to me.  I still haven't tracked down the issue, but I have successfully managed to get things working on another machine.  I'll let you know if I find the problem but I will close this for now. Thanks for your help so far!

Hi @garypretty, do you have any updates? Since you have a working solution, maybe we can close this issue?

@garypretty any updates?

Sadly the only solution I found  was to blow away my machine and rebuild. This did solve it though so I'm assuming it was a local environment issue.

@garypretty thanks for the update, even if inconclusive. I'd like to close this for now, but please re-open if someone comes in with a reproduction steps that we can use to find a RCA.


WIP: Support new install_addon arguments

This PR supports the changes made in #28, which is pending to be merged.
The update currently made Install_addon to expect the following arguments:
parameters=None
use_api_defaults=True
wait=True
wait_timeout=TIMEOUT_30MIN

/verified


This doesn't work great on release branches

The release file doesn't contain any dev/test gems that are needed
The git-based gems don't get updated

Backported to morphy in commit 30ec715e082e54df203740563d7a2ac0d587d5c4.
commit 30ec715e082e54df203740563d7a2ac0d587d5c4
Author: Jason Frey<EMAIL_ADDRESS>Date:   Tue Sep 14 09:10:03 2021 -0400

    Merge pull request #21428 from bdunne/partial_revert_21404

    This doesn't work great on release branches

    (cherry picked from commit 7bafe0d1fa519daa706bf8013a6f9891ac990edf)


Dev throttle

Coverage increased (+1.9%) to 65.704% when pulling 15dccd93e52f0117da53430d4ea28f4c7350e484 on dev-throttle into 22ba5c452afc905865da3bd404be6d1af0919637 on master.


Ignore incorrect color formats.

I think that when the color format is wrong, give a warning instead of throwing an exception directly, which will make the entire SVG parsing fail.
SVG: https://openseauserdata.com/files/863685b93036afafb014b12754a43b3e.svg
This SVG contains some percentage values, how to determine the width and height of the SVG for calculation?

See also https://github.com/zathras/jovial_svg/issues/35 and https://github.com/zathras/jovial_svg/issues/36


[19.09] piper version incompatible with libratbag

Describe the bug
Supported devices do not show up in piper's GUI.
To Reproduce
Steps to reproduce the behavior:

Enable ratbagd service - services.ratbagd.enable = true;
Connect a supported device
Run piper

Expected behavior
The device shows up in piper GUI.
Screenshots
N/A
Additional context
Running compatible version of piper fixes the issue:
$ nix-shell -p "piper.overrideAttrs(_: { src = fetchTarball "https://github.com/libratbag/piper/archive/0.2.904.tar.gz"; })" --run piper

19.09 currently ships with piper 0.2.903.
Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.6, NixOS, 19.09.1690.0d9055a2ac2 (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3`
 - channels(root): `"nixos-19.09.1690.0d9055a2ac2"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: piper
# a list of nixos modules affected by the problem
module: services.ratbagd

#77551 is merged


added waitlist-page

Description 📜
Added a communist waitlist page where you can join the newsletter of the company.
Fixes #1702

Type of change 📝

[x] Add a new project

Domain of Contribution 📊

[x] Project using only HTML & CSS

Checklist ✅

[x] I have performed a self-review of my own code or work.
[x] My changes generate no new warnings.
[x] I'm GSSoC'22 contributor

Screenshots / Gif (Recommended) 📸

Not accepting new PR, check imp-announcement of discord channel


Random promise_already_satisfied exception and data race

Hello, we've been using this library as this is a very nice way to write cleaner asynchronous code.
Unfortunately, it looks like there is an issue when using .then() where an internal promise gets set twice.
This simple piece of code can help reproducing it very reliably:
#include <string>
#include "cf/cfuture.h"

int main(int argc, char* argv[])
{
    for (int i = 0; i < 2000; i++)
    {
        auto future = cf::async([] { return 1; })
        .then([](cf::future<int>)  { return 2; });
    }

    return 0;
}

This throws an exception (compiled with clang) :
libc++abi.dylib: terminating with uncaught exception of type cf::future_error: promise_already_satisfied
Running clang's ThreadSanitizer shows a data race with the .then() callback that seems related:
Write of size 8 at 0x7d4000017998 by main thread (mutexes: write M753):
template<typename F>
void set_callback(F&& f) {
    std::unique_lock<std::mutex> lock(mutex_);
    cb_ = std::forward<F>(f);    <<<<<<<<<<<<<<<   Write callback
    lock.unlock();
    if (satisfied_)
      cb_();
  }

Previous read of size 8 at 0x7d4000017998 by thread T9:
void set_ready(std::unique_lock<std::mutex>& lock) {
    satisfied_ = true;
    cond_.notify_all();
    lock.unlock();
    cb_();    <<<<<<<<<<<<<<<  Access callback with mutex unlocked
}

It doesn't look like an easy fix as any change with the mutexes has lots of implications

Here are Thread Sanitizer logs
sanitizer.txt

Thank you for the feedback. Fixed, relevant UT added.

Thank you for the quick fix, looks like the issue is solved


fix:PluginLifeCycleHook postInit() before at addHook() and reduce loop

Description
https://github.com/stateIs0/exp/blob/7cdba8341afd106a5068c5e54043b76dbc2819c0/open-exp-code/open-exp-core-impl/src/main/java/cn/think/in/java/open/exp/core/impl/ExpAppContextImpl.java#L49-L51
https://github.com/stateIs0/exp/blob/7cdba8341afd106a5068c5e54043b76dbc2819c0/spring-adapter/open-exp-adapter-springboot-common-starter/src/main/java/open/exp/adapter/springboot/common/starter/ObjectStoreSpringboot.java#L65
as the above code, the postInit(pluginId, classes)  is ahead of PluginLifeCycleHookManager.addHook(pluginId) , which
result in when invoke postInit, the PluginLifeCycleHook is not ready,  so we should fix it.
I use a simple way to fix it, which maybe not the elegant style, If have more elegant style, we should use it
also add some use sample with UserPluginLifeCycleHook
Checklist

[x] I have explained the need for this PR and the problem it solves
[x] I have explained the changes or the new features added to this PR
[ ] I have added tests corresponding to this change
[ ] I have updated the documentation to reflect this change
[ ] I have verified that this change is backward compatible

I test the code I submitted in my own env, but its failed in this pr, I checked the progress, the mvn procedure all success, so please determine if it could merge, thanks

@jujiale PluginLifeCycleHook 在最初的设计里， 是用于拦截“之后安装“的其他插件的，通常是个比较底层的插件，例如拦截之后的所有的 bean 的类上的某个注解 ，可以类比为 spring 容器的钩子；
总而言之，PluginLifeCycleHook 不是用于拦截自己的，如果要拦截自己，可以使用 @PostConstruct 注解。

@stateIs0 OK, I  see，as you said, when plugin will be loaded in later time, the PluginLifeCycleHook has been ready. so this pr should be closed, thanks a lot.


help-support > UI

Description of the change:
Reason for the change:
Link to original source:

Closes #

Hello @justinwhall,Thanks again for the PR! We appreciate your contribution and look forward to                                              continued collaboration. Thanks!                                             Team SendGrid DX


fix(registry): use rpassword when taking registry password from stdin

cc @michelleN

Am I right in thinking this is addressing the problem identified in #1191?


Upgrade v0.10.2 (k8s 1.9.10) --> v0.11.0(k8s 1.10.5)

I'm in the process of trying to upgrade a k8s cluster provisioned with kube-aws 0.10.2 to k8s 1.10.5 using kube-aws 0.11.0.
I have tried a couple things. In each case, the new etcd servers are unable to connect to the existing etcd servers.
Running kube-aws apply using new kube-aws results in:
Error: failed to initialize cluster driver: failed to initizlie network stack: failed to read/create encrypted assets: error reading credential file credentials/kube-controller-manager.pem: credentials/kube-controller-manager.pem must exist. Please confirm that you have not deleted the file manually.
However, running:
kube-aws render credentials --ca-cert-path=./credentials/ca.pem --ca-key-path=./credentials/ca-key.pem
kube-aws render stack
kube-aws apply
I also tried backing up the existing certs and then using them along with the newly generated certs with the same outcome. The new etcd servers cannot connect to the old ones. I was unable to netcat to the old etcd from the new etcd results in a timeout.
Is what I am trying possible or do I need to rebuild the cluster.
cluster.yaml
clusterName: ckube-a-common
s3URI: <redacted>
disableContainerLinuxAutomaticUpdates: true
apiEndpoints:
- name: default
  dnsName: <redacted>
  loadBalancer:
    private: true
    hostedZone:
      id: Z2ONWAFV9V0IHD
keyName: <redacted>
region: us-east-1
kmsKeyArn: "<redacted>"
controller:
  securityGroupIds:
    - sg-61ed811e
  autoScalingGroup:
    minSize: 1
    maxSize: 3
    rollingUpdateMinInstancesInService: 1
  iam:
    role:
      managedPolicies:
      - arn: arn:aws:iam::aws:policy/AmazonSSMFullAccess
  subnets:
    - name: PrivateSubnet1
  nodeLabels:
    kube-aws.coreos.com/role: controller
    central1.cluster/name: ckube-a-common
  customFiles:
    - path: "/etc/systemd/system/docker.service.d/10-custom.conf"
      permissions: 0644
      content: |
        [Service]
        Environment="DOCKER_OPTS=--log-opt max-size=50m --log-opt max-file=3 --bip=<IP_ADDRESS>/16 --no-new-privileges"
worker:
  nodePools:
    - name: nodepool1
      subnets:
      - name: PrivateSubnet1
      securityGroupIds:
        - sg-61ed811e
      iam:
        role:
          managedPolicies:
          - arn: "arn:aws:iam::aws:policy/AmazonSSMFullAccess"
      instanceType: m5.4xlarge
      autoScalingGroup:
        minSize: 1
        maxSize: 2
        rollingUpdateMinInstancesInService: 1
      autoscaling:
        clusterAutoscaler:
          enabled: true
      clusterAutoscalerSupport:
        enabled: true
      nodeLabels:
        kube-aws.coreos.com/role: worker
        central1.cluster/name: ckube-a-common
      customFiles:
        - path: "/etc/systemd/system/docker.service.d/99-bip.conf"
          permissions: 0644
          content: |
            [Service]
            Environment="DOCKER_OPTS=--log-opt max-size=50m --log-opt max-file=3 --bip=<IP_ADDRESS>/16  --no-new-privileges"
workerInstanceType: m5.4xlarge
etcd:
  count: 3
  subnets:
    - name: PrivateSubnet1
  iam:
    role:
      managedPolicies:
      - arn: "arn:aws:iam::aws:policy/AmazonSSMFullAccess"
  snapshot:
    automated: true
  memberIdentityProvider: emo
vpc:
  id: vpc-2d3b694b
vpcCIDR: "<IP_ADDRESS>/16"
subnets:
   - name: PrivateSubnet1
     private: true
     availabilityZone: us-east-1a
     id: "subnet-f1360cdc"
     routeTable:
       id: "rtb-d9dbbba0"
tlsCADurationDays: 3650
tlsCertDurationDays: 365
kubernetesVersion: v1.10.5
kubernetes:
  encryptionAtRest:
    enabled: false
  networking:
    selfHosting:
      enabled: true    # false will fall back to legacy coreos flannel/etcd2 installation
      type: canal      # either "canal" or "flannel"
      typha: false     # enable for type 'canal' for 50+ node clusters
containerRuntime: docker
manageCertificates: true
kubeResourcesAutosave:
  enabled: true
kubeSystemNamespaceLabels:
  name: kube-system
kubernetesDashboard:
  adminPrivileges: true
  insecureLogin: false
  enabled: true
cloudWatchLogging:
  enabled: true
  retentionInDays: 7
  localStreaming:
    enabled: true
amazonSsmAgent:
  enabled: true
  downloadUrl: https://github.com/DailyHotel/amazon-ssm-agent/releases/download/v2.2.546.0/ssm.linux-amd64.tar.gz
  sha1sum: cfe36dab08b55df61bc10e501615d7c11da46288
kubeDns:

  provider: kube-dns
  autoscaler:
    coresPerReplica: 256
    nodesPerReplica: 16
    min: 2
kubeProxy:
  ipvsMode:
    enabled: false
    scheduler: rr
    syncPeriod: 300s
    minSyncPeriod: 60s
addons:
  clusterAutoscaler:
    enabled: true
  rescheduler:
    enabled: false
  metricsServer:
    enabled: true
  prometheus:
    securityGroupsEnabled: false
experimental:
  admission:
    podSecurityPolicy:
      enabled: false
    alwaysPullImages:
      enabled: false
    denyEscalatingExec:
      enabled: true
    initializers:
      enabled: false
    priority:
      enabled: false
    mutatingAdmissionWebhook:
      enabled: false
    validatingAdmissionWebhook:
      enabled: false
    OwnerReferencesPermissionEnforcement:
      enabled: false
    persistentVolumeClaimResize:
      enabled: false
  awsEnvironment:
    enabled: false
    environment:
      CFNSTACK: '{ "Ref" : "AWS::StackId" }'
  auditLog:
    enabled: true
    logPath: /dev/stdout
  authentication:
    webhook:
      enabled: false
      cacheTTL: 1m0s
      configBase64: base64-encoded-webhook-yaml
  awsNodeLabels:
    enabled: false
  clusterAutoscalerSupport:
    enabled: true
  tlsBootstrap:
    enabled: true
  nodeAuthorizer:
    enabled: false
  ephemeralImageStorage:
    enabled: false
  kiamSupport:
    enabled: true
    image:
      repo: quay.io/uswitch/kiam
      tag: v2.7
      rktPullDocker: false
    sessionDuration: 15m
    serverAddresses:
      serverAddress: localhost:443
      agentAddress: kiam-server:443
  kube2IamSupport:
    enabled: false
  nodeDrainer:
    enabled: false
    drainTimeout: 5
    iamRole:
      arn: ""
  oidc:
    enabled: true
    issuerUrl: "_OATH_ISSUER_"
    clientId: "example-app"
    usernameClaim: "email"
    groupsClaim: "groups"
  disableSecurityGroupIngress: false
kubelet:
  RotateCerts:
    enabled: true
stackTags:
  Name: "Cluster ckube-a-common"
  c1:env: "common-services"
  c1:cluster: "ckube-a-common"
  c1:cluster-type: "kubernetes"
  c1:owner: "Jen Kins"
hostOS:

@wolstena Hey! Thanks for the report.
Would adding only kube-scheduler and kube-controller-manager keys and certs work for you?
That is, run:
kube-aws render credentials --ca-cert-path=./credentials/ca.pem --ca-key-path=./credentials/ca-key.pem

and then revert everything other than kube-controller-manager-key.pem, kube-controller-manager-cert.pem, kube-scheduler-key.pem, and kube-scheduler-cert.pem.

@mumoshu your suggestions did the trick along with enabling selfHosting before the upgrade. I thought I had but I was mistaken.
For anyone else:
cp -p credentials/* backup/
kube-aws render credentials --ca-cert-path=./credentials/ca.pem --ca-key-path=./credentials/ca-key.pem
cp -p backup/* credentials
kube-aws render stack
kube-aws validate
kube-aws apply
The next issue I have come across is the new controller is not launching. It is looping on the cni setup:
Sep 28 01:13:59 ip-10-143-13-122.aue1.central1.cc retry[2476]: Sleeping 3 seconds. Sep 28 01:14:01 ip-10-143-13-122.aue1.central1.cc kubelet-wrapper[1302]: W0928 01:14:01.873042    1302 cni.go:171] Unable to update cni config: No networks found in /etc/kubernetes/cni/net.d Sep 28 01:14:01 ip-10-143-13-122.aue1.central1.cc kubelet-wrapper[1302]: E0928 01:14:01.873699    1302 kubelet.go:2130] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
I suspect it is related to our selfHosting setup:
  networking:     selfHosting:       enabled: true    # false will fall back to legacy coreos flannel/etcd2 installation       type: canal      # either "canal" or "flannel"       typha: false     # enable for type 'canal' for 50+ node clusters
Do we need to specify any additional configuration.

I'm now seeing the same error on my test cluster.
Could you take logs from your, probably failing, controller-manager container?
$ docker ps -a
CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS                        PORTS               NAMES
39ea0592eb11        k8s.gcr.io/hyperkube-amd64:v1.10.5   "/hyperkube kubectl …"   1 second ago        Created                                           wizardly_lalande
9ed124410c57        k8s.gcr.io/hyperkube-amd64:v1.10.5   "/hyperkube kubectl …"   1 second ago        Created                                           vigilant_ardinghelli
2bd5b00172c3        6006241c0593                         "/hyperkube controll…"   32 seconds ago      Exited (255) 12 seconds ago                       k8s_kube-controller-manager_kube-controller-manager-ip-10-0-0-233.ap-northeast-1.compute.internal_kube-system_85e935e01177a915de2e10d3a365860b_7
aa1f7da3b6f8        6006241c0593                         "/hyperkube schedule…"   13 minutes ago      Up 13 minutes                                     k8s_kube-scheduler_kube-scheduler-ip-10-0-0-233.ap-northeast-1.compute.internal_kube-system_352b06fd450c7b49063bb0c98c7ab717_0
3d0736d76f48        6006241c0593                         "/hyperkube apiserve…"   13 minutes ago      Up 13 minutes                                     k8s_kube-apiserver_kube-apiserver-ip-10-0-0-233.ap-northeast-1.compute.internal_kube-system_3facf922dd4ff0b2fb1d3470d000b9a6_0
8de2ef303c7d        k8s.gcr.io/pause-amd64:3.1           "/pause"                 13 minutes ago      Up 13 minutes                                     k8s_POD_kube-scheduler-ip-10-0-0-233.ap-northeast-1.compute.internal_kube-system_352b06fd450c7b49063bb0c98c7ab717_0
b50330f7a0e8        k8s.gcr.io/pause-amd64:3.1           "/pause"                 13 minutes ago      Up 13 minutes                                     k8s_POD_kube-controller-manager-ip-10-0-0-233.ap-northeast-1.compute.internal_kube-system_85e935e01177a915de2e10d3a365860b_0
47337f7c9c9e        k8s.gcr.io/pause-amd64:3.1           "/pause"                 13 minutes ago      Up 13 minutes                                     k8s_POD_kube-apiserver-ip-10-0-0-233.ap-northeast-1.compute.internal_kube-system_3facf922dd4ff0b2fb1d3470d000b9a6_0

$ docker logs 2bd5b00172c3
I0928 07:07:12.649622       1 controllermanager.go:116] Version: v1.10.5
W0928 07:07:12.650377       1 authentication.go:55] Authentication is disabled
I0928 07:07:12.650408       1 insecure_serving.go:44] Serving insecurely on [::]:10252
I0928 07:07:12.650560       1 leaderelection.go:175] attempting to acquire leader lease  kube-system/kube-controller-manager...
I0928 07:07:30.219250       1 leaderelection.go:184] successfully acquired lease kube-system/kube-controller-manager
I0928 07:07:30.239637       1 event.go:218] Event(v1.ObjectReference{Kind:"Endpoints", Namespace:"kube-system", Name:"kube-controller-manager", UID:"e03f8584-c098-11e8-b67b-0677f1f56d78", APIVersion:"v1", ResourceVersion:"344451", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' ip-10-0-0-233.ap-northeast-1.compute.internal_1f82d3a2-c2ed-11e8-b939-0695f6f4e4bc became leader
I0928 07:07:30.261533       1 aws.go:1026] Building AWS cloudprovider
I0928 07:07:30.261572       1 aws.go:988] Zone not specified in configuration file; querying AWS metadata service
I0928 07:07:30.939882       1 tags.go:76] AWS cloud filtering on ClusterID: kubeaws1
I0928 07:07:30.942578       1 controller_utils.go:1019] Waiting for caches to sync for tokens controller
E0928 07:07:30.947285       1 reflector.go:205] k8s.io/kubernetes/vendor/k8s.io/client-go/informers/factory.go:87: Failed to list *v1.Secret: illegal base64 data at input byte 3
F0928 07:07:30.948067       1 client_builder.go:273] unable to get token for service account: illegal base64 data at input byte 3

The last error seems problematic, but not sure what's causing this yet.

Oops, so mine was due to that I've enabled kubernetes.encryptionAtRest and then disabled, which resulted in k8s controller-manager came up after disabling it resulted in unable to fetch encrypted secrets.
Maybe you cluster has its own reasons not coming up.
Firstly, could you try running docker ps -a to see if there is any container failing? Typically you could run docker logs against the failing container to see what's the cause.

Hi, I would check the contents of /etc/kubernetes/ssl/service-account-key.pem to check whether you have a valid service account signing key in there.  Also, are you seeing any errors on the apiserver logs?

The output from the controller logs indicates it is key related.  There may be a issue with the way I store and retrieve our certs in the upgrade process.
docker logs 7b3ce72f242c (controller)
E0928 17:50:19.537010       1 leaderelection.go:224] error retrieving resource lock kube-system/kube-controller-manager: Get https://<IP_ADDRESS>/api/v1/namespaces/kube-system/endpoints/kube-controller-manager: x509: certificate is valid for <IP_ADDRESS>, not <IP_ADDRESS>

When we originally generated our certs (~1.9.3) the apiserver.pem. These certs did not include <IP_ADDRESS> in the SAN list.  If you regenerated the certs they do.
As part of a cluster upgrade, is it possible to regenerated all certs excluding etcd. Something along the lines of:
# backup existing credentials
cp -p credentials/* backup/
# generate new credentials
kube-aws render credentials --ca-cert-path=./credentials/ca.pem --ca-key-path=./credentials/ca-key.pem
# copy original etcd certs
cp -p backup/etcd* /credentials
kube-aws render stack
kube-aws apply

@wolstena Oh, good catch!
If you would be regenerating certs, you'd somehow figure out doing it with tools like openssl so that you can reuse the private keys to regenerate only certs, or enhance kube-aws to do it, which sounds like a hassle.
An alternative way would be to just rewrite cloud-config-controller so that controller-manager accesses the api via <IP_ADDRESS>, not <IP_ADDRESS>.
More concretely, could you change <IP_ADDRESS> to <IP_ADDRESS> in your cloud-config-controller?
  - path: /etc/kubernetes/kubeconfig/kube-controller-manager.yaml
    content: |
        apiVersion: v1
        kind: Config
        clusters:
        - name: local
          cluster:
            certificate-authority: /etc/kubernetes/ssl/ca.pem
            server: https://<IP_ADDRESS>

  - path: /etc/kubernetes/kubeconfig/kube-scheduler.yaml
    content: |
        apiVersion: v1
        kind: Config
        clusters:
        - name: local
          cluster:
            certificate-authority: /etc/kubernetes/ssl/ca.pem
            server: https://<IP_ADDRESS>

If that works, we could update kube-aws to expose a new template function named like KubernetesServiceIPAddr that looks like:
_, serviceNet, err := net.ParseCIDR(c.ServiceCIDR)
if err != nil {
	return nil, fmt.Errorf("invalid serviceCIDR: %v", err)
}
return netutil.IncrementIP(serviceNet.IP)

so that you can use it in cloud-config-controller:
  - path: /etc/kubernetes/kubeconfig/kube-scheduler.yaml
    content: |
        apiVersion: v1
        kind: Config
        clusters:
        - name: local
          cluster:
            certificate-authority: /etc/kubernetes/ssl/ca.pem
            server: https://{{ .KubernetesServiceIPAddr}}

docker logs 7b3ce72f242c (controller)
E0928 17:50:19.537010 1 leaderelection.go:224] error retrieving resource lock kube-system/kube-controller-manager: Get https://<IP_ADDRESS>/api/v1/namespaces/kube-system/endpoints/kube-controller-manager: x509: certificate is valid for <IP_ADDRESS>, not <IP_ADDRESS>

This could be a hang-over from back when the kube-controller-manager would connect to the apiservers via the insecure localhost port <IP_ADDRESS>:8080.  Seen as it is now connecting to the apiserver  via https I don't see any harm in connecting with the nodeip or consider connecting via the apiserver ELB which would uncouple it from the local apiserver (giving more resilience but costing the network round-trip between ELB and apiserver instance)?

@mumoshu updated cloud-config-controller the server IPs to <IP_ADDRESS>. The controller is returning:
E1002 01:45:58.095817       1 leaderelection.go:224] error retrieving resource lock kube-system/kube-controller-manager: Get https://<IP_ADDRESS>/api/v1/namespaces/kube-system/endpoints/kube-controller-manager: dial tcp <IP_ADDRESS>:443: i/o timeout

@wolstena We are also running into this issue. I was wondering, how did you go about updating your apiserver.pem Subject Alternative? We've been struggling to nail the steps down.


Properly parse distributionUrl for Gradle snapshot distributions

This plugin currently fails on URLs such as https://services.gradle.org/distributions-snapshots/gradle-7.6-20221024231219+0000-bin.zip. This means that, when running on a project that uses a Gradle snapshot distribution, the plugin will not successfully execute. This PR aims to fix that by detecting the -snapshots portion of the URL in the parsing regular expression.

LGTM. Can you please also make it work for RCs and milestones. See here for the format: https://services.gradle.org/distributions/

I verified that RCs and milestones work both with this changeset and on previous version (v0.10.2, v0.11). The urls for RCs and milestones use /distributions, so were not subject to this issue.

LGTM. Can you please also make it work for RCs and milestones. See here for the format: https://services.gradle.org/distributions/

I verified that RCs and milestones work both with this changeset and on previous version (v0.10.2, v0.11). The urls for RCs and milestones use /distributions, so were not subject to this issue.

Got it. Thanks for the clarification. Let's merge it.


[WIP] Removing serde from deserialization

What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.

Codecov Report
Attention: Patch coverage is 62.50000% with 60 lines in your changes missing coverage. Please review.

Project coverage is 70.58%. Comparing base (d351d66) to head (c51c967).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #537      +/-   ##
==========================================
- Coverage   70.58%   70.58%   -0.01%
==========================================
  Files         206      207       +1
  Lines       28129    28270     +141
==========================================
+ Hits        19856    19954      +98
- Misses       8273     8316      +43

Components
Coverage Δ

crashtracker
16.52% <ø> (ø)

datadog-alloc
98.73% <ø> (ø)

data-pipeline
50.00% <ø> (ø)

data-pipeline-ffi
0.00% <ø> (ø)

ddcommon
86.43% <ø> (ø)

ddcommon-ffi
75.29% <ø> (ø)

ddtelemetry
58.95% <ø> (ø)

ipc
84.13% <ø> (ø)

profiling
78.78% <ø> (ø)

profiling-ffi
58.64% <ø> (ø)

serverless
0.00% <ø> (ø)

sidecar
35.42% <ø> (ø)

sidecar-ffi
0.00% <ø> (ø)

spawn-worker
54.98% <ø> (ø)

trace-mini-agent
71.14% <ø> (ø)

trace-normalization
98.24% <ø> (ø)

trace-obfuscation
95.73% <ø> (ø)

trace-protobuf
77.16% <ø> (ø)

trace-utils
89.93% <62.50%> (-1.10%)
:arrow_down:


RobustHarvest data fields now static and not public.

About the PR

Changed the data fields in RobustHarvest.cs to be static and not public.
Why / Balance

RobustHarvest is a specific chemical with specific limits that should not be modifiable in play.
Media

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

It is no longer possible to set a custom PotencyLimit, PotencyIncrease, or PotencySeedlessThreshold for robust harvest outside of the class itself. If your game uses custom values for robust harvest, make sure they are changed in the RobustHarvest class in RobustHarvest.cs.

Should this really be the case?
Seems to me like taking something that allowed some potential custom content and making it hardcoded instead.

Should this really be the case? Seems to me like taking something that allowed some potential custom content and making it hardcoded instead.

yes.


Remove PAT_TOKEN and PAT_USERNAME from CircleCI

Summary
This is a cleanup change needed after the CircleCI security incident.
We should be using the Authorization: Bearer header to trigger rn-diff-purge instead of using username & password authentication.
Source: https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event
Changelog
[INTERNAL] - Remove PAT_TOKEN and PAT_USERNAME from CircleCI
Test Plan
I've tested this locally with:
curl -X POST https://api.github.com/repos/react-native-community/rn-diff-purge/dispatches \
                    -H "Accept: application/vnd.github.v3+json" \
                    -H "Authorization: Bearer [...]" \
                    -d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"test.test.test\" }}"

and the run was succesfully fired by @react-native-bot:
https://github.com/react-native-community/rn-diff-purge/actions/runs/3894079133

Making the world a better place for the poor out there all over the world

Yes I did
On Wed, Jan 11, 2023 at 8:02 PM Facebook Community Bot <
@.***> wrote:

@cortinico https://github.com/cortinico merged this pull request in
573734f
https://github.com/facebook/react-native/commit/573734f4e6f4338874797ce2b1f24c94930d8515
.
—
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/pull/35808#issuecomment-1379351252,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A44YFRFDWLLDRZZD2KXVD2LWR37VZANCNFSM6AAAAAATYFAAHM
.
You are receiving this because you commented.Message ID:
@.***>


merge

🤔 This is a ...

[ ] New feature
[ ] Bug fix
[ ] Site / document update
[ ] Component style update
[ ] TypeScript definition update
[ ] Refactoring
[ ] Code style optimization
[ ] Test Case
[x] Branch merge
[ ] Other (about what?)

👻 What's the background?

💡 Solution

📝 Changelog

Language
Changelog

🇺🇸 English

🇨🇳 Chinese

☑ Self Check before Merge

[ ] Doc is updated/provided or not needed
[ ] Demo is updated/provided or not needed
[ ] TypeScript definition is updated/provided or not needed
[ ] Changelog is provided or not needed

merge


Question: Rewrite complex path

Title: Rewrite complex path
Description:
In my case, one regex_rewrite cannot meet my needs since the rewriting part will require some, is it possible to chain multiple rewrites or use a 3rd party system to decide about the new path?

/cc @zhxie

I think it is difficult to complete with existing extensions. Maybe Lua or WASM helps.

Hi @zhxie what do you mean by "difficult to complete with existing extensions"? I have been looking at how to rewrite paths using Lua, but it's not clear to me from the docs even if it is possible.
Here is an example:
Original Path: https://myservice.org/application/p1-p2-....pN
I would like to rewrite to something like: https://myservice.org/application/p1/p2/....pN
Since the number of pX in the last part of the path is not fixed it's hard to rewrite using a single regex_rewrite, maybe I could do it if I could chain multiple regex_rewrite.
But I also might have cases where the rewrite is not even possible to do with a regex eg:
https://myservice.org/application/{some random hash} -> https://myservice.org/application/{some other random hash}
In this scenario, I have do a db lookup and calculate the new hash for the path

Yes. I meant we could not chain regex_rewrite exactly.
BTW, if you want to replace some patterns with other strings like in your example, - to /, it is easy to achieve by regex_rewrite. regex_rewrite can replace all matched strings to substitutions at once. But if you want replace some random hash to another random hash, I do not think it can be done with regex_rewrite currently.

About replacing a path with something random can it be done with external processing filters?

I am not sure if it could be done with other filters. From the doc, I think it can be done with external processing.

Thanks I will give it a shot and report back


CI: Use Python 3.9 for PyLint presubmit action

A few small maintenance updates to the PyLint presubmit action.

Use Python 3.9 instead of Python 3.8.
Update the setup-python action to v2, which is actively maintained.
Parse the Python version as a string ("3.9" instead of 3.9), since otherwise Python 3.10 will be rounded and processed as Python 3.1 in the future.

/cc @angerson

Thanks for this!


org.jboss.jandex.UnsupportedVersion: Version: 11

I did clean up all my build.gradle files and manage to eliminate the previous java.lang.ClassCastException... many thanks for the great support I received, but it took me a while to wrap my mind around it properly.
Now, I am getting
                    Caused by:
                    org.jboss.jandex.UnsupportedVersion: Version: 11
                        at app//org.jboss.jandex.IndexReader.initReader(IndexReader.java:87)
                        at app//org.jboss.jandex.IndexReader.readVersion(IndexReader.java:137)
                        at app//org.jboss.jandex.IndexReader.read(IndexReader.java:73)
                        at app//io.helidon.microprofile.openapi.OpenApiCdiExtension.existingIndexFileReader(OpenApiCdiExtension.java:166)
                        ... 86 more

tests.txt
I am a total Jandex newbie, just a guy trying to clean up our monorepo (aka Big Ball Of Mud) of Gradle projects by upgrading from Java 8 to Java 11.
Is this exception referring to Java Version 11, or something else that is Version 11?

From Jandex's relevant javadocs:

Throws: UnsupportedVersion - if the index data is tagged with a version not known to this reader

So you wrote an index with, probably, given your other support question in this project's bug system and your project's issues with versioning, Jandex 3.x, and then tried to read it with Jandex 2.x.
(This is not an issue with Jandex so probably you want to move your support questions to a better venue such as StackOverflow or something similar.)

Version: 11 is indeed a version of the Jandex index. Specifically, 11 means the index was produced by Jandex 3. Considering your other issue, you probably used the Jandex Gradle plugin version 1.x to create a Jandex index of your application -- you should move back to the Jandex Gradle plugin 0.x, which is based on Jandex 2.x (note that Jandex 2.4 produces newer index version than Jandex 2.3, so you may have to configure a specific Jandex version so that the produced index is compatible with the Jandex version enforced by the platform you use).


Running from anywhere

When you create an alias is required in the application directory to load the library.
This is awkward. You can fix this?

And the interesting idea is to import scripts. Say what?

I'm not sure I understand the first point about aliases. Can you please explain more?
As for importing, that is planned, but may not be happening that soon. I'd like to get the core language features implemented first.

@tdenniston
For example, I compiled Bish in the folder "A/B/C". Call it from the folder "A" can not, as Bish ask upload script library.
$:~/tmp/A > ./apps/bish-app/bish scripts/test.bish
Failed to open file at src/StdLib.bish

Here you need to specify the full path to the folder where you installed Bish.
const std::string STDLIB_PATH = "src/StdLib.bish";

Ah, got it. Good point. I'll fix that.

Forgot to mention it in the commit message, but bdddf7e should fix this.
Now you can do this (following your example):
BISH_ROOT=/A/B/C apps/bish-app/bish scripts/test.bish
Can you let me know if the issue is resolved?

@tdenniston Does not compile.
g++ -g -O0 -c src/CallGraph.cpp -o obj/CallGraph.o -MMD -MF obj/CallGraph.d -MT obj/CallGraph.o
g++ -g -O0 -c src/IR.cpp -o obj/IR.o -MMD -MF obj/IR.d -MT obj/IR.o
g++ -g -O0 -c src/IRVisitor.cpp -o obj/IRVisitor.o -MMD -MF obj/IRVisitor.d -MT obj/IRVisitor.o
g++ -g -O0 -c src/IRAncestorsPass.cpp -o obj/IRAncestorsPass.o -MMD -MF obj/IRAncestorsPass.d -MT obj/IRAncestorsPass.o
g++ -g -O0 -c src/CodeGen_Bash.cpp -o obj/CodeGen_Bash.o -MMD -MF obj/CodeGen_Bash.d -MT obj/CodeGen_Bash.o
g++ -g -O0 -c src/Parser.cpp -o obj/Parser.o -MMD -MF obj/Parser.d -MT obj/Parser.o
g++ -g -O0 -c src/SymbolTable.cpp -o obj/SymbolTable.o -MMD -MF obj/SymbolTable.d -MT obj/SymbolTable.o
g++ -g -O0 -c src/TypeChecker.cpp -o obj/TypeChecker.o -MMD -MF obj/TypeChecker.d -MT obj/TypeChecker.o
g++ -g -O0 -o bish src/bish.cpp obj/CallGraph.o obj/IR.o obj/IRVisitor.o obj/IRAncestorsPass.o obj/CodeGen_Bash.o obj/Parser.o obj/SymbolTable.o obj/TypeChecker.o
src/bish.cpp: In function ‘std::string get_stdlib_path()’:
src/bish.cpp:44:18: error: ‘PATH_MAX’ was not declared in this scope
     char abspath[PATH_MAX];
                  ^
src/bish.cpp:48:31: error: ‘abspath’ was not declared in this scope
         root = realpath(root, abspath);
                               ^
src/bish.cpp:52:35: error: ‘abspath’ was not declared in this scope
         stdlib = realpath(stdlib, abspath);
                                   ^
make: *** [bish] Error 1

Perhaps you misunderstood me. I mean that the variable STDLIB_PATH must point to the folder where the library is located. Without global explanatory variables. Some version of getCurrentDir();

It seems the only way to accomplish that is to hard code the path when bish.cpp is compiled. This can be done, but then if one moves the bish binary, the hard coded path will no longer be correct. The issue with using a get current directory approach is that the current directory reflects the current working directory, which changes as the user moves around the filesystem.
If you have an idea on how to work around these issues, could you submit a PR with the changes?
For the compile error, can you tell me if adding #include <limits.h> fixes the issue?

@tdenniston The problem is that I do not know how to program in C ++.
And that if you add a "make install"?

@tdenniston Adding "#include <limits.h>" helped.

That's just my opinion, did not help.
egor@book:~ > ./tmp/BISH/bish/bish -r ./tmp/BISH/scripts/examples/print.bish
Failed to open file at src/StdLib.bish

You must set the BISH_ROOT environment variable in this situation. Try the following:
BISH_ROOT=tmp/BISH/bish ./tmp/BISH/bish/bish -r ./tmp/BISH/scripts/examples/print.bish

@tdenniston I tried it. Add them to the ".bashrc", but it did not help. If the program does not see them.

@tdenniston Can not be made so that instead of std :: getenv (" BISH_STDLIB "); used STDLIB_PATH?

Ok, the path to StdLib.bish is now hardcoded as an absolute path at compile time. This is done in the Makefile. The BISH_STDLIB environment variable remains as a backup. Please retry your issue and let me know if it is fixed.

@tdenniston Now everything is in order. You can call from anywhere.
Thanks!


(cmake) Fix AU version detection

Description

The cmake download page was changed to have both old prerelease versions still available for download after the stable minor version is released. This causes the AU script to error, as the streams variable already has the key, so the stable version is not added. This adds a check to fix that.
Motivation and Context
Fixes #2394
As the .install and .portable packages reference this AU script, this change fixes both of them as well.
How Has this Been Tested?
AU script ran on Windows 10. Package tested in Chocolatey test environment.
Screenshot (if appropriate, usually isn't needed):
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Migrated package (a package has been migrated from another repository)

Checklist:

[x] My code follows the code style of this repository.
[ ] My change requires a change to documentation (this usually means the notes in the description of a package).
[ ] I have updated the documentation accordingly (this usually means the notes in the description of a package).
[ ] I have updated the package description and it is less than 4000 characters.
[x] All files are up to date with the latest Contributing Guidelines
[x] The added/modified package passed install/uninstall in the chocolatey test environment.
[x] The changes only affect a single package (not including meta package).

:white_check_mark: Package verification completed without issues. PR is now pending human review

:white_check_mark: Package verification completed without issues. PR is now pending human review


Bad data in analysis-request JSON

I tried Sabre with open source contract
https://github.com/cryptocopycats/awesome-cryptokitties/blob/master/contracts/ERC721.sol
which failed like:
sabre contracts/ERC721.sol
Bad data in analysis-request JSON:
In contract ERC721:
* field "bytecode" is not allowed to be empty
* field "bytecode" with value "" fails to match the required pattern: /^(0x)?([0-9a-fA-F]{2})+$/
* field "deployedBytecode" is not allowed to be empty
* field "deployedBytecode" with value "" fails to match the required pattern: /^(0x)?([0-9a-fA-F]{2})+$/
* field "sourceMap" is not allowed to be empty
* field "deployedSourceMap" is not allowed to be empty

@sjukeshov -- I just tried to debug the issue. I'm able to see abi and ast for this contract but somehow the evm is kind of empty, hence the error is thrown while trying to generate report. Any idea why this would happen?
 evm:
            { assembly: '',
              bytecode:
               { linkReferences: {}, object: '', opcodes: '', sourceMap: '' },
              deployedBytecode:
               { linkReferences: {}, object: '', opcodes: '', sourceMap: '' },
              gasEstimates: null,
              legacyAssembly: null,
              methodIdentifiers:
               { 'approve(address,uint256)': '095ea7b3',
                 'balanceOf(address)': '70a08231',
                 'ownerOf(uint256)': '6352211e',
                 'supportsInterface(bytes4)': '01ffc9a7',
                 'totalSupply()': '18160ddd',
                 'transfer(address,uint256)': 'a9059cbb',
                 'transferFrom(address,address,uint256)': '23b872dd' } },

I have no idea to be honest. Just found out this project and that was first contract I tried

@sjukeshov -- Yeah, that's really weird. I'll see what could be the issue. But please feel free to try sabre with other contracts and let us know in case you find any issues. It's helpful to know the failing cases to debug and improve the tool :)

It's because the contract is only an interface.

@b-mueller -- So what should be the expected behaviour in such scenarios?

I'd say display an error message like "Compiling the Solidity code did not return any bytecode. Note that abstract contracts cannot be analyzed.".


refactor: implement value_shcema_v0

What problem does this PR solve?
implement value_schema_v0, which represents data version 0.
Checklist
Tests

Unit test

If your intention of this PR is to add new value schema more conveniently, I can give a simple solution:
struct value_schema_v2
{
    static constexpr size_t version_field_offset = 0;
    typedef version_type = uint8_t;

    static constexpr size_t expire_ts_field_offset = 1;
    typedef expire_ts_type = uint32_t;

    static constexpr size_t timetag_field_offset = 5;
    typedef timetag_type = uint64_t;

    value_schema_v2() {
      _write_buf.resize(sizeof(uint8_t) + sizeof(uint32_t) + sizeof(uint64_t));
      _write_slices.resize(2);
    }

    rocksdb::SliceParts generate_value(uint8_t version, uint32_t expire_ts, uint64_t timetag, dsn::string_view user_data) {
      data_output out(_write_buf);
      out.write<uint8_t>(version);
      out.write<uint32_t>(expire_ts);
      out.write<uint64_t>(user_data);

      _write_buf[0] = rocksdb::Slice(_write_buf.data, )
      return {&_write_slices[0], static_cast<int>(_write_slices.size())};
    }

    static uint8_t extract_version(string_view val);
    static uint32_t extract_expire_ts(string_view val);
    static uint64_t extract_timetag(string_view val);
    static blob:: extract_user_data(std::string&& val);

private:
    std::string _write_buf;
    std::vector<rocksdb::Slice> _write_slices;
};

void extract_expire_ts_from_value(int version, string_view user_data);
void extract_timetag_from_value(int version, string_view user_data);
void extract_version_from_value(int version, string_view user_data);

As you can see, this code is very similar to our thrift-generated code. It can be generated with a very simple template language, for example, yaml.
0:
  - expire_ts :
      type: uint32_t
      size: 4

1:
  - expire_ts :
      type: uint32_t
      size: 4
  - timetag :
      type: uint64_t
      size: 8

2:
  - version :
      type: uint8_t
      size: 1
  - expire_ts :
      type: uint32_t
      size: 4
  - timetag :
      type: uint64_t
      size: 8

I would suggest implementing a tool that can generate the above code according to the template, instead of using class inheritance.
The value encoding/decoding is extremely critical and requires efficiency. I think we should avoid runtime type deduction as much as we can, for example:
void extract_expire_ts_from_value(value_schema *schema, string_view user_data) {
    auto field = schema->extract_field(raw_value, pegasus::value_field_type::EXPIRE_TIMESTAMP); // type deduction #1
    auto expire_ts_field = static_cast<expire_timestamp_field *>(segment.get()); // type deduction #2
    return expire_ts_field->expire_ts;

There're 2 deductions here. I'm not indicating that this code will definitely perform poorly. But technically, I would prefer to write code without potential slow points.
Using a code generator can also avoid bugs so long as the tool itself is stable. So when we add another field in the future, we only need to modify the template file, rather than introduce more code.

uint64_t

I don't think it's a good idea. Since we should add a different interface for each filed, for example: extract_version_from_value. This means you should add a interface if you add a filed. And In this interface, you should deal with all of these version even if this version does't support it.

If your intention of this PR is to add new value schema more conveniently, I can give a simple solution:
struct value_schema_v2
{
    static constexpr size_t version_field_offset = 0;
    typedef version_type = uint8_t;

    static constexpr size_t expire_ts_field_offset = 1;
    typedef expire_ts_type = uint32_t;

    static constexpr size_t timetag_field_offset = 5;
    typedef timetag_type = uint64_t;

    value_schema_v2() {
      _write_buf.resize(sizeof(uint8_t) + sizeof(uint32_t) + sizeof(uint64_t));
      _write_slices.resize(2);
    }

    rocksdb::SliceParts generate_value(uint8_t version, uint32_t expire_ts, uint64_t timetag, dsn::string_view user_data) {
      data_output out(_write_buf);
      out.write<uint8_t>(version);
      out.write<uint32_t>(expire_ts);
      out.write<uint64_t>(user_data);

      _write_buf[0] = rocksdb::Slice(_write_buf.data, )
      return {&_write_slices[0], static_cast<int>(_write_slices.size())};
    }

    static uint8_t extract_version(string_view val);
    static uint32_t extract_expire_ts(string_view val);
    static uint64_t extract_timetag(string_view val);
    static blob:: extract_user_data(std::string&& val);

private:
    std::string _write_buf;
    std::vector<rocksdb::Slice> _write_slices;
};

void extract_expire_ts_from_value(int version, string_view user_data);
void extract_timetag_from_value(int version, string_view user_data);
void extract_version_from_value(int version, string_view user_data);

As you can see, this code is very similar to our thrift-generated code. It can be generated with a very simple template language, for example, yaml.
0:
  - expire_ts :
      type: uint32_t
      size: 4

1:
  - expire_ts :
      type: uint32_t
      size: 4
  - timetag :
      type: uint64_t
      size: 8

2:
  - version :
      type: uint8_t
      size: 1
  - expire_ts :
      type: uint32_t
      size: 4
  - timetag :
      type: uint64_t
      size: 8

I would suggest implementing a tool that can generate the above code according to the template, instead of using class inheritance.
The value encoding/decoding is extremely critical and requires efficiency. I think we should avoid runtime type deduction as much as we can, for example:
void extract_expire_ts_from_value(value_schema *schema, string_view user_data) {
    auto field = schema->extract_field(raw_value, pegasus::value_field_type::EXPIRE_TIMESTAMP); // type deduction #1
    auto expire_ts_field = static_cast<expire_timestamp_field *>(segment.get()); // type deduction #2
    return expire_ts_field->expire_ts;

There're 2 deductions here. I'm not indicating that this code will definitely perform poorly. But technically, I would prefer to write code without potential slow points.
Using a code generator can also avoid bugs so long as the tool itself is stable. So when we add another field in the future, we only need to modify the template file, rather than introduce more code.

I don't think it's a good idea

we should add a different interface for each filed, for example: extract_version_from_value. This means you should add a interface if you add a filed. And In this interface, you should deal with all of these version even if this version does't support it. The code is not elegant enough if we implement it like this.
static_cast doesn't cost too much time. And these is only one type deduction, not two.
It's too complex to implement a tool to generate these code.


feat: Checkout buy endpoint support for wait fulfillment transactions options

Summary
Checkout buy endpoint currently waits for transactions to be fulfilled, adding an override to the buy function adds support to return the transactions without waiting for the transaction settlement.
Customer Impact
The Checkout SDK buy endpoint includes a new overrides parameter waitFulfillmentSettlements that returns the transactions without waiting for confirmation.

We will need to expose the overrides on the BuyParams type for the buy endpoint that is on the top level part of the checkout sdk
Type is in buy.ts in types folder
export interface BuyParams {
  provider: Web3Provider;
  orders: Array<BuyOrder>;
  overrides: ... // need a type for the overrides
}


the phone number is empty

I have the next issue, the phone number throw this:
TM.ERROR
have you any idea?

Some solution?

you got any solution ?


Fixes

#138
Missed some stuff when making UserLoginAuto which is based on Library's UserLoginManual.
Also fixed some checks since pResponse.success is a string for some reason.

if you're in the mood,
https://github.com/TurboWarp/extensions/blob/e39f44e430067082037a63be6e7f7497fd558880/extensions/itchio.js#L4-L7
I don't imagine "Softed by softed" is what it's supposed to say there?

if you're in the mood,
https://github.com/TurboWarp/extensions/blob/e39f44e430067082037a63be6e7f7497fd558880/extensions/itchio.js#L4-L7
Is "Softed by softed" what it's supposed to say there?

It just means modified


Include language resources in the app package

This change will allow users to change the language even if the user did not install the region from the Windows settings app.

@duke7553 I updated the description.


Fix name shortening

This PR has code extracted from table config PR related to name shortening
Fix JumpAction name

what is expected in spec file? I thought for large name a short name will be used

thats extactly happening.
without this pr:
jmpa LABEL_SWITCH vxlan_encap_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk
after this pr
jmpa LABEL_SWITCH vxlan_encap_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dpdk_dp5


Black screen part.

Guys, I want your help. I am using ViewPager in Xamarin.Android and I facing black screen part, when I change fragment from MapsUI. It is look like this https://t.me/JosephStalinCommunity/717. And I don't know what I should to do, for fix it. I used Google Maps fragment before mapsui and didn't facing something like black screen. I tried to fix it whole week, but I didn't. Google does not give me something good for that.

You are going to need to give some more information, could you upload a reproduction zip/repo?

What do you mean? Code? How much code do you want to see?) If all code will be good, such it located here: https://gitlab.com/iamnotstalinlab/josephstalinapp.
Problem code was located in this module https://gitlab.com/iamnotstalinlab/josephstalinapp/-/blob/cb095c669b380f8398a54a10b42acd05cad0c02b/JosephStalinForTheProletarians/MainFragments/mapsFragment.cs#L159 on this line.
I used ViewPager for showing fragments. One fragment gets black screen, after I swithed from MapsFragment (with MapsUI). If it will be good, I will be little happy)


ClusterLoader - Load test

Adding 3-node load test.
New measurement WaitForRunningRCs added.

/hold
Waiting for #206 .

/hold cancel
All required changes are done.
@shyamjvs PTAL

I've reimplemented the wait_for_rc_pods.go. Currently it is called wait_for_controlled_pods.go and has support for ReplicationController, ReplicaSet, Deployment, DaemonSet and Job.
@shyamjvs PTAL

@wojtek-t @shyamjvs PTAL

All requested changes are done.
@shyamjvs @wojtek-t PTAL

/lgtm
Thanks!


fix(dis7): merge DIS7.xml and DIS2012.xml into DIS7.xml

merged the easy parts from the DIS2012.xml into DIS7.xml.
there were some sections I wasn't sure about and left alone for now.

Thank-you @kurtsansom !
Related to https://github.com/open-dis/xmlpg/issues/21

Thank-you @kurtsansom !
Related to https://github.com/open-dis/xmlpg/issues/21


Portfolio: setup and mobile first - First Milestone

Request for code review: Portfolio: setup and mobile first
First Milestone

Toolbar & Headline sections.
Layout created with Flexbox.
Button interactions.
Using template 3 from the provided Figma designs.

👤 Author
@marcoshdezcam
🔴 Preview
Live version
🔧 Built With

HTML
CSS
Flexbox
Bootstrap

Thank you for taking the time to review our code! 💐

Hi @marcoshdezcam ,
While you made a great effort in this project, unfortunately, I cannot proceed to review your code.
Invalid Code Review Request
You have submitted a project, that does not passes all linters check please fix the below issue and resubmit
style.css
 22:16  ✖  Unexpected unit   length-zero-no-unit
 22:20  ✖  Unexpected unit   length-zero-no-unit

Your Code Review Request will be marked as invalid in your Dashboard, so please submit a new one once you are ready 🙏
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

Invalid Code Review Request does not count into the code reviews limit.

I've submitted a fix. All checks have passed now.

Project approved!