Android build error Wrong Constant

🐛 Bug Report

Android gradle build error with message -
 C:\flutter\.pub-cache\hosted\pub.dartlang.org\geolocator_android-4.1.4\android\src\main\java\com\baseflow\geolocator\GeolocatorLocationService.java:159: Error: Must be one of: Service.STOP_FOREGROUND_LEGACY, Service.STOP_FOREGROUND_REMOVE, Service.STOP_FOREGROUND_DETACH [WrongConstant]
          stopForeground(ONGOING_NOTIFICATION_ID);

 Explanation for issues of type "WrongConstant":
     Ensures that when parameter in a method only allows a specific set of
     constants, calls obey those rules.

Expected behavior
Should be able to build in android
Reproduction steps
cd to android
run .\gradlew build
Configuration
Version: 9.0.2
Platform:

[ ] :iphone: iOS
[X] :robot: Android

i did it but still got this error

Hi @amrud,
Thank you for bringing this issue to our attention. I have released a new version of the geolocator_android package. If you depend on the geolocator package simply run flutter pub upgrade to automatically update to the latest version.

Alright. Thank you 👍🏻


Performance difference between customSelect and select queries

I was converting my data classes to use freezed classes (mainly so I didn't need to convert between similar classes with slight differences) and because drift queries don't currently allow user defined classes, I had to rewrite them to dart queries.
After making the change I started noticing that the screen was freezing when loading the data when it wasn't before. I reverted to using the generated drift data classes and problem persisted.
Finally I copied the generated query over from database.g.dart but instead used the freezed classes and the problem disappeared. So there is some performance difference between .drift files and dart select. This is loading ~2100 rows with lots of extra data.
Previous (fine)
.drift file query:
https://user-images.githubusercontent.com/1031451/209562050-9905a72e-7f91-414f-8f59-961a37bb086f.mp4
.drift file
listCards($where = TRUE, :mwlCode AS TEXT OR NULL) AS CardResult:
SELECT
  card.**,
  pack.**,
  cycle.**,
  faction.**,
  side.**,
  type.**,
  subtype.**
FROM card

INNER JOIN pack
  ON pack.code = card.pack_code

INNER JOIN cycle
  ON cycle.code = pack.cycle_code

INNER JOIN faction
  ON faction.code = card.faction_code

INNER JOIN side
  ON side.code = faction.side_code

INNER JOIN type
  ON type.code = card.type_code

LEFT JOIN type as subtype
  ON subtype.is_subtype
  AND (
    subtype.name = card.keywords
    OR card.keywords LIKE (subtype.name || ' - %')
  )

LEFT JOIN mwl_card
  ON mwl_card.mwl_code = :mwlCode
  AND mwl_card.card_title = card.title

WHERE $where;

generated query
  Selectable<CardResult> listCards({String? mwlCode, ListCards$where? where}) {
    var $arrayStartIndex = 2;
    final generatedwhere = $write(
        where?.call(this.card, this.pack, this.cycle, this.faction, this.side,
                this.type, alias(this.type, 'subtype'), this.mwlCard) ??
            const CustomExpression('(TRUE)'),
        hasMultipleTables: true,
        startIndex: $arrayStartIndex);
    $arrayStartIndex += generatedwhere.amountOfVariables;
    return customSelect(
        'SELECT"card"."code" AS "nested_0.code", "card"."pack_code" AS "nested_0.pack_code", "card"."faction_code" AS "nested_0.faction_code", "card"."type_code" AS "nested_0.type_code", "card"."position" AS "nested_0.position", "card"."title" AS "nested_0.title", "card"."body" AS "nested_0.body", "card"."keywords" AS "nested_0.keywords", "card"."quantity" AS "nested_0.quantity", "card"."cost" AS "nested_0.cost", "card"."deck_limit" AS "nested_0.deck_limit", "card"."faction_cost" AS "nested_0.faction_cost", "card"."uniqueness" AS "nested_0.uniqueness", "card"."strength" AS "nested_0.strength", "card"."agenda_points" AS "nested_0.agenda_points", "card"."memory_cost" AS "nested_0.memory_cost", "card"."advancement_cost" AS "nested_0.advancement_cost", "card"."trash_cost" AS "nested_0.trash_cost", "card"."base_link" AS "nested_0.base_link", "card"."influence_limit" AS "nested_0.influence_limit", "card"."minimum_deck_size" AS "nested_0.minimum_deck_size", "card"."flavor" AS "nested_0.flavor", "card"."illustrator" AS "nested_0.illustrator", "card"."image_url" AS "nested_0.image_url","pack"."code" AS "nested_1.code", "pack"."cycle_code" AS "nested_1.cycle_code", "pack"."position" AS "nested_1.position", "pack"."name" AS "nested_1.name", "pack"."date_release" AS "nested_1.date_release", "pack"."size" AS "nested_1.size","cycle"."code" AS "nested_2.code", "cycle"."position" AS "nested_2.position", "cycle"."name" AS "nested_2.name", "cycle"."size" AS "nested_2.size", "cycle"."rotated" AS "nested_2.rotated","faction"."code" AS "nested_3.code", "faction"."side_code" AS "nested_3.side_code", "faction"."name" AS "nested_3.name", "faction"."color" AS "nested_3.color", "faction"."is_mini" AS "nested_3.is_mini","side"."code" AS "nested_4.code", "side"."name" AS "nested_4.name","type"."code" AS "nested_5.code", "type"."side_code" AS "nested_5.side_code", "type"."position" AS "nested_5.position", "type"."name" AS "nested_5.name", "type"."is_subtype" AS "nested_5.is_subtype","subtype"."code" AS "nested_6.code", "subtype"."side_code" AS "nested_6.side_code", "subtype"."position" AS "nested_6.position", "subtype"."name" AS "nested_6.name", "subtype"."is_subtype" AS "nested_6.is_subtype" FROM card INNER JOIN pack ON pack.code = card.pack_code INNER JOIN cycle ON cycle.code = pack.cycle_code INNER JOIN faction ON faction.code = card.faction_code INNER JOIN side ON side.code = faction.side_code INNER JOIN type ON type.code = card.type_code LEFT JOIN type AS subtype ON subtype.is_subtype AND(subtype.name = card.keywords OR card.keywords LIKE(subtype.name || \' - %\'))LEFT JOIN mwl_card ON mwl_card.mwl_code = ?1 AND mwl_card.card_title = card.title WHERE ${generatedwhere.sql}',
        variables: [
          Variable<String>(mwlCode),
          ...generatedwhere.introducedVariables
        ],
        readsFrom: {
          card,
          pack,
          cycle,
          faction,
          side,
          type,
          mwlCard,
          ...generatedwhere.watchedTables,
        }).asyncMap((QueryRow row) async {
      return CardResult(
        card: await card.mapFromRow(row, tablePrefix: 'nested_0'),
        pack: await pack.mapFromRow(row, tablePrefix: 'nested_1'),
        cycle: await cycle.mapFromRow(row, tablePrefix: 'nested_2'),
        faction: await faction.mapFromRow(row, tablePrefix: 'nested_3'),
        side: await side.mapFromRow(row, tablePrefix: 'nested_4'),
        type: await type.mapFromRow(row, tablePrefix: 'nested_5'),
        subtype: await type.mapFromRowOrNull(row, tablePrefix: 'nested_6'),
      );
    });
  }

New (freezing)
select query:
https://user-images.githubusercontent.com/1031451/209562093-090f305c-a7c9-4ffe-8d59-209ddef3f13e.mp4
Selectable<CardResult> listCards({ListCardsOld$where? where, String? mwlCode}) {
    final subtype = type.createAlias('subtype');
    final query = select(card).join([
      innerJoin(pack, pack.code.equalsExp(card.packCode)),
      innerJoin(cycle, cycle.code.equalsExp(pack.cycleCode)),
      innerJoin(faction, faction.code.equalsExp(card.factionCode)),
      innerJoin(side, side.code.equalsExp(faction.sideCode)),
      innerJoin(type, type.code.equalsExp(card.typeCode)),
      leftOuterJoin(
        subtype,
        subtype.isSubtype &
            (subtype.name.equalsExp(card.keywords) | card.keywords.likeExp(subtype.name + const Constant(' - %'))),
      ),
      leftOuterJoin(
        mwlCard,
        mwlCard.mwlCode.equalsExp(Variable(mwlCode)) & mwlCard.cardTitle.equalsExp(card.title),
      ),
    ])
      ..where(where?.call(
            card,
            pack,
            cycle,
            faction,
            side,
            type,
            subtype,
            mwlCard,
          ) ??
          const Constant(true));
    return query.asyncMap((result) async => CardResult(
          card: await card.mapFromRow(result.rawData, tablePrefix: card.aliasedName),
          pack: await pack.mapFromRow(result.rawData, tablePrefix: pack.aliasedName),
          cycle: await cycle.mapFromRow(result.rawData, tablePrefix: cycle.aliasedName),
          faction: await faction.mapFromRow(result.rawData, tablePrefix: faction.aliasedName),
          side: await side.mapFromRow(result.rawData, tablePrefix: side.aliasedName),
          type: await type.mapFromRow(result.rawData, tablePrefix: type.aliasedName),
          subtype: await type.mapFromRowOrNull(result.rawData, tablePrefix: subtype.aliasedName),
        ));
  }

I also tried
query.map((result) => CardResult(
  card: result.readTable(result),
  ...
);

and the result was the same as query.asyncMap.

i've been able to narrow it down to this:
https://github.com/simolus3/drift/blob/develop/drift/lib/src/runtime/query_builder/statements/select/select_with_join.dart#L252
If I remove this line, the problem goes away. I'm wondering if we can make this and the above done on demand (and cached) rather than for every result.

Could this be related to #2205?

Thanks for this very (!) helpful report! I can see how reading all the columns back can cause a slowdown, especially since every column in every table is added there by default. I agree that doing this lazily and cached is a better approach here, I changed the implementation in c289e447c65ca7dabdab6c65df2429ae2dc1448a. Could you take a look if that improves the situation?

Works perfectly! Thanks for the quick response!


Memory Leak

In other entirely NOT shocking news, the code I wrote 15 years ago when I was first learning java seems to have a memory leak...
 51 (A3) 	Move:A3
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000000079b500000, 572522496, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 572522496 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/gus/leelaz/leela-zero/hs_err_pid89296.log

It's worth noting that this was found after running for several days straight. The ever scrolling move list in the UI is of course a leak of sorts. I'm not sure this is worth the time to track it down and fix it. This can be reopened if such things become more common. Even starting with -Xmx10mb is running fine for several games now. It's also possible that the move to stateless rule implementations has helped.


Total visitor count on website and form enhancement

i will add total visitor count on the website for better user engagement and enhance intrection

and this all the form the input section is very close to each other which create bad user experience
this issue is in all the form of website
i can improve the design for all the form present in the website

we really dont need this , i plan to remove it from the html site soon as well


compose: Add support for full-screen compose box

Fixes #17660

[x] Adds a default max-height which will facilitate scrolling.
[x] Add a expansion/collapsing button for toggling full-screen view.
[x] Make the CSS needed for making textarea occupy full height.
[x] Find a way to handle auto-resize properly.
[x] Test properly for different use cases.
[x] On the close of the compose box, it should be restored to its original width.
[x] Add tests once we are ready that the intended behaviour is correct. (Also make the CI tests pass)

Testing plan:
Tested manually:
Open the compose box, toggle the height using the toggler button added just below the compose area.
To check autosize doesnot interfare is that when the compose height state is true, it is destroyed as this is the way to stop all the listeners added by it (check on docs of autosize) and particularly checked for changing messages and drafts while having full size compose box.
The save and copy also doesn't not have any problems as the autosize has been destroyed.
For node tests, I think for the compose_height file some basic tests needs to be defined.
GIFs or screenshots:
The design of full height text-area currently.

@timabbott made the buttons with different IDs and commented above. Also rebased this, ready for another review now.

This looks pretty promising @Signior-X!  I think we should be about ready to merge this, or at least test-deploy on chat.zulip.org once the above comments are resolved.

@timabbott squashed the commits and commented above for the queries.

@timabbott updated the PR accordingly, made changes accordingly. The conversations that still unresolved are above, need feedback/review on them.

@timabbott rebased this and now this is ready for review.

OK, I've merged this with the above changes.  I think while we're thinking about this, the compose_top_right region should get its tooltips migrated from title to tippyjs.


feat(hybrid) use timer to send changes to dp nodes instead of on every change

Summary
Tools like decK etc. can make a lot of changes to CP. At the moment the CP notifies the workers that have connected to it on each change. This may cause huge amounts of changes on a cluster:

There is 1 CP
decK makes 10 changes to database  (in 200 ms)
There are 20 DPs connected to that CP
The config is sent 200 times

This commit changes it so that the changes are sent every x seconds, controlable with
db_update_frequency.

There is 1 CP
decK makes 10 changes to database (in 200 ms)
There are 20 DPs connected to that CP
The config is sent 20 times

This of course adds latency for changes to appear in DP nodes.

This is the most simple way I could think of to implement patching of CP -> DP messages.
This reuses the KONG_DB_UPDATE_FREQUENCY but we can invent another parameter, e.g.
KONG_DP_UPDATE_FREQUENCY ;-), if we want that.
There are other more fancy ways to do this, for example:

Push changes only when there are no changes made within x seconds?

But I just went the dead simple route. Any feedback welcomed.

@cwurm Ping :) Your feedback is especially appreciated on this!

Does it only reuse the setting, or will it reuse the timer?
If the CP's are a cluster then both delays kick in, checking the DB for changes, and sending to DP. So the maximum delay after which the cluster is in-sync again is 2x the setting.
When reusing the timer, sequentially pushing the changes after polling the database, the maximum delay will be 1x the setting.

The configuration is sent 200 times by websocket. communication cost and data size can be ignored. The point to the problem is that when the message reaches the data plane node, the impact  is not reduced on the worker process. For example, the route reconstruction is still 200 times.right?

The configuration is sent 200 times by websocket. communication cost and data size can be ignored. The point to the problem is that when the message spread to data plane node, the impact is not reduced on the worker process. For example, the route reconstruction is still 200 times.right?

No. It is 1.

Does it only reuse the setting, or will it reuse the timer?
If the CP's are a cluster then both delays kick in, checking the DB for changes, and sending to DP. So the maximum delay after which the cluster is in-sync again is 2x the setting.
When reusing the timer, sequentially pushing the changes after polling the database, the maximum delay will be 1x the setting.

There is cp cluster delay, worker event delay x 2 and then delay that this timer might add.

Nothing elsi is changed delay wise except the added delay of timer that can be anything between 0 and the db_update_frequency.

another question (might need some input from @hbagdi ); don't we run the risk of sending incomplete configurations?
Essentially we will always have that risk, but when syncing with decK, the inconsistencies will be very short-lived. Now if we, mid a decK sync hit the timer, we send the config, and then only 5 seconds (default setting) later we'll send the rest. Isn't that risky?
As an alternative we could set it up to push the config only after we haven't received any new updates for x seconds, with a timeout of y after which we always send the update.
But not sure whether this is a problem we have or not?

another question (might need some input from @hbagdi ); don't we run the risk of sending incomplete configurations?
Essentially we will always have that risk, but when syncing with decK, the inconsistencies will be very short-lived. Now if we, mid a decK sync hit the timer, we send the config, and then only 5 seconds (default setting) later we'll send the rest. Isn't that risky?
As an alternative we could set it up to push the config only after we haven't received any new updates for x seconds, with a timeout of y after which we always send the update.
But not sure whether this is a problem we have or not?

That's what I said there:
https://github.com/Kong/kong/pull/6280#issuecomment-682578762
The question is whether we want to fancy or non fancy.  The possible diffs and incremental updates and dp related pushes only plays into this too.

Now if we, mid a decK sync hit the timer, we send the config,
and then only 5 seconds (default setting) later we'll send the rest

And it could still be incomplete. The deck sync will stop anywhere between 0-db_update_frequecy secs of delay. We can set another parameter too, e.g. dp_state_update_frequency or dp_update_frequency ;-). Users who are concerned about the delays should set db_update_frequency(if running cluster) and dp_update_frequency to small number.
Fancier would be allow batching of admin ap calls, but that is a lot harder. We could perhaps also allow :8001/config with db mode?

@bungle The behavior in this PR makes sense to me. However, I felt that it may be necessary to make this delayed sync behavior opt in. There are cases when user wants to have minimum sync delay between API calls and DP reloads (in fact we advertise it as a feature for Hybrid mode).
Since decK sync does not happen all the time, after the initial sync is over then further updates are less and should be pushed to the DP ASAP. It seems that we should maybe let decK hint that "there might be more updates coming" when making the API call and only enable the delay for these calls (in fact the delay can even come from decK itself). That way we can have good performance versus good latency, which I consider both to be equally important.

I'm happy to see the discussion going on here.

don't we run the risk of sending incomplete configurations?

No. Kong's Admin API is RESTful, meaning at any point of time, the configuration in DB is complete in some sense. Now, I do understand that there is an "incompleteness" with respect to the configuration decK would like to have all Kong nodes to have. Unfortunately, there is no way out of it. The incompleteness is present even in the regular DB-backed mode. Since this is not specific to the hybrid mode, we shouldn't be worried about it at all. Kong's compatibility promise states that the nodes converge over time a.k.a. eventual consistency.

It seems that we should maybe let decK hint that "there might be more updates coming" when making the API call and only enable the delay for these calls (in fact the delay can even come from decK itself).

I would advise against it. We need to hide Kong's complexity below it's API. decK is not special and simply follows the contract laid out by Kong's Admin API. The same problem also exists with Terraform provider for Kong, which again only follows the contract laid out by Kong's Admin API.
I'll also recommend that we should NOT have any configuration property for this change for two reasons:

Every additional configuration option is an added overhead for users and maintainers alike
Tunable behaviors at this level should only be introduced when the shape of performance is very well understood and we are certain that a knob will make significant difference.

The motivation of the PR is correct but the implementation is not.
The implementation is resorting to using a cron-like solution where, configuration changes are sent based on a timer. While this simple solution does solve the problem, I think we can do better without a lot of effort.
As I understand, the problem we are trying to solve here is to "rate-limit" the number of configuration updates that can be sent out to proxy nodes. If so, the control plane node should send out a configuration update as soon as it sees an event and then wait for an interval before sending out another one (and in future (out of scope for this PR) add in exponential backoff with a low ceiling). This seemingly small change has considerable impact:

Brings down p90/p99 latency of our configuration change significantly and also solves Datong's concern (which I agree with) around impact on latency
decK is written to minimize the number of Admin API calls required to sync the configuration. In case of a minor update, some configurations might have a single Admin API call (very common with CI/CD and git based systems). In such cases, having a fire and wait mechanism is better than a timer.

Thanks for the ping @hishamhm. Thanks for putting this together @bungle.
I've tested the patch and was able to load over 100K entities into a Kong CP/DP in hybrid mode. As before, I used a modified version of decK to send a generated config of 10K services and associated routes, plugins, consumers, and credentials. Execution times varied between 16 and 18 minutes (for comparison, in my testing it took just short of 13 minutes in non-hybrid mode so this is pretty good).
A few notes:

I had to go into the code and increase MAX_PAYLOAD here to 8MB (from 4MB) after running into payload too big errors. We might consider making this a configuration option since it effectively sets an arbitrary hard limit on the size of the Kong configuration in hybrid mode (non-hybrid mode has no such limit from what I can see).
I had to set KONG_MEM_CACHE_SIZE to 512m after running into no memory errors. This was expected.
I played around with settings for KONG_DB_UPDATE_FREQUENCY and eventually found 60 (seconds) to be the lowest to work well in this case. What seems to happen is that as the configuration gets progressively larger the time to apply it on the DP gets longer and longer. I have log statements measuring time spent at the beginning and end of the update_config method (here) and while at the beginning of the decK run (when the effective Kong configuration is small) the method would execute in just under 3 seconds towards the end it takes even 77 seconds (that's the last config update on the DP with the full config). If this was a real deployment I would probably set KONG_DB_UPDATE_FREQUENCY to higher than 77 seconds to avoid the DP ever applying successive configuration updates back-to-back. In an earlier iteration, I had set KONG_DB_UPDATE_FREQUENCY to 30 seconds which led to the DP no longer being able to catch up with the rate at which the CP was sending new configs and so it was pegged at 100% CPU for the remainder of the decK run and long after (config updates will queue and be processed sequentially - which is the entire problem this PR is aiming to solve).

I'll also recommend that we should NOT have any configuration property for this change for two reasons:

Every additional configuration option is an added overhead for users and maintainers alike
Tunable behaviors at this level should only be introduced when the shape of performance is very well understood and we are certain that a knob will make significant difference.

I think we might have to make it configurable. I tried different values and it makes a huge difference to performance (how long the DPs are processing configuration) and consistency (how long it takes for configuration to be applied to all DPs).
From my testing, KONG_DB_UPDATE_FREQUENCY should be at least as high as the time it takes for a DP to apply the full configuration. So the value depends on the overall size of the configuration which is unknowable by us. Users can make similar testing and adjust - similar to how they can use configuration options like worker_consistency and worker_state_update_frequency in non-hybrid mode today.

@bungle The behavior in this PR makes sense to me. However, I felt that it may be necessary to make this delayed sync behavior opt in. There are cases when user wants to have minimum sync delay between API calls and DP reloads (in fact we advertise it as a feature for Hybrid mode).

I think a delay should be the default. In my testing, the current behaviour will cause the DPs to thrash with just 150 entities - which I would consider a small configuration. Each entity is an Admin API call that causes a complete config rebuild on each DP. Since each rebuild typically takes at least a few seconds (but much longer with a larger configuration, see above) the config changes are queued and all DPs can spend a very long time at 100% CPU re-applying their entire configuration (with just one change each time) over and over again. I have seen even 150 entities take almost 10 minutes to apply to all DPs. Larger configurations are impossible and will leave all DPs of a Kong cluster at 100% CPU forever - only a complete restart of all DPs seems to be able to stop them from continuing to apply all queued configurations one-by-one.

As I understand, the problem we are trying to solve here is to "rate-limit" the number of configuration updates that can be sent out to proxy nodes. If so, the control plane node should send out a configuration update as soon as it sees an event and then wait for an interval before sending out another one (and in future (out of scope for this PR) add in exponential backoff with a low ceiling). This seemingly small change has considerable impact:

If I understand correctly, the behaviour would be:

When a CP sends a config to its DPs, it starts a timer/countdown.
If it receives further Admin API calls while the timer is running down, it does not send them to DPs, but makes a note to send the then-current config when the timer expires.

So the difference to this PR would be that the timer is not running continuously - but only starts when a config update is made. That makes sense to me and I like the idea of an intelligent backoff. In the meantime, I guess the timer would have to be configurable (similar to this PR) - otherwise, the value could be too low for a large configuration and cause thrashing again.

Having continuously running timer with ngx.timer.every in my opinion feels more robust.

We can also make timer to run every second, and then instead of making boolean check we compare times.

I kept the timer, but made small adjustments in this commit:
https://github.com/Kong/kong/pull/6280/commits/e23445e91bbfeaf25646592ea2f76dae143f6313

the config changes are queued and all DPs can spend a very long time at 100% CPU re-applying their entire configuration (with just one change each time) over and over again

I think the DPs should also have ways, similar to :8001/config to tell that they are busy processing the previous change, and return right away, and let dp know that they didn't apply the config, and that cp has to retry.

@bungle No, that approach seems incorrect, letting CP retry intentionally is a bad idea, because it artificially introduces more traffic and load onto the CP.
Instead, if DP is busy applying another config, it should instead queue the new config and keep only the latest config and always apply that once it has a chance. We should not require CPs to do more work than it already is because that makes the system less stable.
Couple other things I have in mind:
ngx.timer.every is ill-suited for this kind of use case, making the delay milliseconds isn't going to work either because we risk saturating the timer queue if config updates are slow to export, which causes timers to be randomly dropped.
Instead, we should start a timer thread once at init_worker phase, and use ngx.semaphore to sync between worker events and the timer thread. That way the overhead is much lower, the push delay is essentially eliminated, and we will not run into timer saturation ever.


Ensure compatibility with BIDS derivatives standard

BIDS derivatives https://bids-specification.readthedocs.io/en/derivatives/05-derivatives/01-introduction.html allow for handling of preprocessed data - but they follow a slightly different folder structure (problem: they miss the func folder). Adapting run.py so that it checks if a func folder exists and if not does not use it for globbing bold and metadata would be a great addition.

This should now work.


[BUG] Wrong instance passed in the inputs argument of .format_output()

Describe the bug
The first instance in the batch is always passed to inputs argument of the .format_output() method of the Task class. This can create input - output mismatches e.g the data in inputs is used for creating metadata for the generated output.
Note the right instance is for formatting the input and generating the output.
To work around this, I had to set input_batch_size=1.
To Reproduce
I've created a simplified version of my code to reproduce the bug.
Code to reproduce
from distilabel.steps.tasks import Task
from distilabel.steps.tasks.typing import ChatType
from distilabel.llms import OpenAILLM
from distilabel.pipeline import Pipeline
from distilabel.steps import LoadDataFromDicts, KeepColumns

from typing import List, Dict, Any

class MyCustomTask(Task):
    @property
    def inputs(self) -> List[str]:
        return ["input", "metadata"]

    @property
    def outputs(self) -> List[str]:
        return ["output", "metadata"]

    def format_input(self, input: Dict[str, Any]) -> ChatType:
        return [
            {
                "role": "system",
                "content": "You are a helpful assistant."
            },
            {
                "role": "user",
                "content": input["input"],
            },
        ]

    def format_output(self, output: str, inputs: Dict[str, Any]) -> Dict[str, Any]:
        # ! inputs always store the first instance in the batch
        # ! If inputs is used for creating metadata or similar
        # ! it creates an input - output mismatch
        metadata = {
            "parent_record_id": inputs["metadata"]["record_id"],
            "parent_record_type": inputs["metadata"]["record_type"],
        }

        return {"output": output, "metadata": metadata}

llm = OpenAILLM(model="gpt-4o")

# some dummy data
data = [
    {"input": "Hello, how are you?", "metadata": {"record_id": 1, "record_type": "user"}},
    {"input": "I'm doing well, thanks!", "metadata": {"record_id": 2, "record_type": "assistant"}},
    {"input": "How can I help you today?", "metadata": {"record_id": 3, "record_type": "user"}},
    {"input": "I'd like to book a flight.", "metadata": {"record_id": 4, "record_type": "assistant"}},
    {"input": "Can you please provide me with the flight details?", "metadata": {"record_id": 5, "record_type": "user"}},
    {"input": "Sure, I'll book the flight for you.", "metadata": {"record_id": 6, "record_type": "assistant"}},
    {"input": "Thank you for your booking!", "metadata": {"record_id": 7, "record_type": "user"}},
]

with Pipeline("my_pipeline") as pipeline:
    load_dataset = LoadDataFromDicts(
        name="load_dataset",
        data=data,
    )

    task = MyCustomTask(
        name="run_my_custom_task",
        llm=llm,
        input_batch_size=2,
    )

    output_cols = KeepColumns(
        name="output_cols",
        columns=["output", "metadata"],
    )

    load_dataset >> task >> output_cols

distiset = pipeline.run(
    parameters={
        task.name: {
            "llm": {"generation_kwargs": {"max_new_tokens": 10}}
            }
        },
        use_cache=False,
)

Expected behaviour
inputs contains the instance used for generating the output, instead of the first instance in the batch always.
Desktop (please complete the following information):

Package version: 1.2.1
Python version: 3.10.13

Hi @bergr7, thanks for reporting! I'll work on fixing this

Hi @bergr7, thanks for reporting! I'll work on fixing this

Many thanks @gabrielmbmb !! :)

Hi again @bergr7! We just released a new version 1.2.2 with the bug fixed. Thanks again for reporting!

Lightning fast! Thanks. I can confirm it's fixed and I've benefited from the fix already!!


Miranda Sanova (G1)

text: A minion with negative intercept amount cant block an action with zero stealth
link: https://groups.google.com/g/rec.games.trading-cards.jyhad/c/ze7FHSIdaA4/m/5l5rSNheHfsJ

See https://github.com/lionel-panhaleux/krcg/issues/628


Capabilities for PhantomJs and upgrade to Selenium 2.46.0

Add phantomjs capabilities and upgrade Selenium version to 2.46.0.

Hi @jlamaille . Is there any way you can split off the PRs from PhantomJS and selenium 2.46.0 ? I think it would be easier to review and merge in. If not, no worries.

Is the phantomjsdriver in this PR a forked copy of detro's version? I wasn't sure if https://github.com/detro/ghostdriver was still an active project. Also, is the version from codeborne on github somewhere?

Yes, you are right, I took this version of phantomjs for another project, I will back to the correct groupId.
Also, I will do two pull requests. One for upgrading to 2.46 and the other for integrating phantomjs.
However, the second depend on the first.

Ok, I was planning on merging in the first one (upgrade to 2.46.0) anyway, as its a lot easier. I saw you also included a dependency for Opera. Was that intentional?

Yes, the dependency for opera was intentional.

Hi, i have dependencies problems to add phantomJs capabilities :

Detro release (http://mvnrepository.com/artifact/com.github.detro.ghostdriver/phantomjsdriver/1.1.0) use version 2.39.0 for selenium-remote-driver
Codeborne Realease (http://mvnrepository.com/artifact/com.codeborne/phantomjsdriver/1.2.1) use version 2.44.0 for selenium-remote-driver

Currently, Selenium-Grid-Extras use version 2.42.0 for selenium-remote-driver. What is your preference ?


Cleared field bugfix of #1211

Description

UTY-2382
Check cleared field count as well when applying update to diff
Fixes bug introduced in #1211

Tests

removed 1 map element every second on server, received updated on client
logged map count on server/client
observed client never made it to 0 before bugfix
correct behaviour observed after bugfix

Documentation

[x] changelog

Primary reviewers
If your change will take a long time to review, you can name at most two primary reviewers who are ultimately responsible for reviewing this request. @ mention them.

For future reference - we could use the JSON representation of schema to test that we are serializing data correctly:

Serialize data/update into Schema_*
Convert into JSON
Validate the JSON against the expected structure


Add Hypersomnia entry

Hypersomnia is an adrenaline-packed shooter that brings competitive gaming to the open-source community. It's completely free without any hidden payments. As a testament to its quality, Assassin's Creed and Skydio have used a part of its source code.

Thanks for the addition and sorry for the delay.


Kotlin stackdriver debugger support

fixes #2253
Supports Kotlin file types as breakpoint sources.

Kotlin and Java language specific logic lives in optionally included plugin.xml's: stackdriver-debugger-java.xml and stackdriver-debugger-kotlin.xml

Currently all that is needed is a simple language-specific implementation of the platform JavaDebugAware extension point which probably would have been better named as JvmDebugAware

Since the language specific code was so minimal I decided not to create new kotlin and java modules under stackdriver and instead keep all the source in the stackdriver module. However, the kotlin plugin is still optionally included in the google-cloud-tools-plugin module's plugin.xml - which means things will still work for Java if the user doesn't have the Kotlin plugin installed. Of course this now has the downside that the build time classpath doesn't match the runtime completely, but I think its OK given the extent of the language specific support.

updated based on comments so far

@ivanporty I fixed your comment about stackdriver being available for other IDEs (like PyCharm). See me last commit: I moved the stackdriver plugin xml to live under google-cloud-java.xml
Now, debugger is only available when the Java module is available (IDEA). Kotlin debugging still works.


Apply the method to window explicitly

To include respond.js using webpack, it is required to have the scope specified explicitly to window (instead of this), since it is enclosed in an import function where this is not window.

@bbeirnaert You can also use imports-loader :
const respondjs = require('imports-loader?this=>window!Respond.js/dest/respond.min');


Refactor to zustand for timed text track language choices

Purpose
Part of our ongoing refactor away from redux & sagas and towards more lightweight and flexible solutions.
This PR refactors  and uses it to show how we can use zustand to build a lightweight, specialized store.
Proposal

[x] Refactor  per #374, + make it a function component
[x] Add zustand and use it to get timed text track language choices for

@lunika @sampaccoud you can check commit 4 for a quick look at this way to manage state


mac-42 is dead.

Type of Request
bug
Infrastructure Environment
LUCI, Github, Cocoon scheduler, Autosubmit, etc...
What is happening?
mac-46 is dead.

Steps to reproduce
Step 1:
Step 2:
..
Step n:
Expected results
I expect to see X when Y is finished.

mac-46 is up and running, I can login remotely from my desk . Will take a look more details.

mac-46 is up and running.


Likely bug in Theano breaks Keras

It seems like there was a bug recently introduced in Theano that breaks parts of Keras in subtle ways, i.e. things run but don't work very well. The last good commit was:
https://github.com/Theano/Theano/commit/2595fea0688a6e08db00c9d0a349b51d820f9ab1
The code below works if you pull from this commit, but loss doesn't really decrease with bleeding edge Theano. If someone can confirm I'll report it to the Theano devs. I've only tried on GPU, so it may only apply there
from __future__ import print_function
import numpy as np
np.random.seed(1337)

from keras.utils.test_utils import get_test_data
from keras.models import Sequential
from keras.layers.core import TimeDistributedDense
import unittest

(X_train, y_train), (X_test, y_test) = get_test_data(nb_train=1000, nb_test=200, input_shape=(5, 10), output_shape=(5, 10),
                                                 classification=False)

model = Sequential()
model.add(TimeDistributedDense(X_train.shape[-1], y_train.shape[-1]))
model.compile(loss='hinge', optimizer='rmsprop')
history = model.fit(X_train, y_train, nb_epoch=12, batch_size=16, validation_data=(X_test, y_test), verbose=2)

Haven't checked it out, but the linked commit seems to only modify tests ?

Yup, the issue starts with the next commit: https://github.com/Theano/Theano/commit/41a8e89b63f5b4d4f9a0b942554ed5483e1ceab5

I can confirm this. I was getting NaN all over the place with LSTMs. I rolled back theano to 2595fea, and everything works as expected.

Thanks for notifying us! We should definitely bring this up with the Theano dev. Keras is not doing anything particularly fancy with Theano, so if Keras is broken I assume a lot of other Theano-code must be broken as well.

Theano devs say it's now fixed, I'll test and update.

Looks like that did the trick. I would advise everyone to update to the newest Theano!

Awesome, thanks!


#782 Meme generator using React.js

Description
This is a meme generator project using React. The popular images are fetched from imgflip API. Users can add text on the top and bottom of the image and set the font size and position using sliders.
Fixes #782
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] Documentation Update

Checklist:

[x] My code follows the style guidelines(Clean Code) of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have created a helpful and easy to understand README.md
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests/screenshots(if any) that prove my fix is effective or that my feature works

Remove package-lock.json file
Done ✅

Remove package-lock.json file

Done ✅


Select multiple routers at once

From UI feedback session of 6 April 2017 (jgor):
It'd be nice to select multiple routers at once to go into the scratchpad for a new reservation.

closing this issue; refers to previous frontend & new UI is reasonably practical in that axis


Incompatible storage_options handling between dd.read_csv and dd.read_parquet

Hey there,
I've been dealing with a puzzling issue while trying to remotely read either csv or parquet files from a MinIO bucket.
This works:
boto_storage_options = {
    'aws_access_key_id'=<key>
    'aws_secret_access_key'=<secret>
    'endpoint_url'=<endpoint>,
}

df = dd.read_csv(<url>, storage_options={"client_kwargs": boto_storage_options})

However, using the same storage_options format to read parquet files from the same bucket fails:
df = dd.read_parquet(<url>, storage_options={"client_kwargs": boto_storage_options})

Here is the full error:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/tmp/ipykernel_29622/1722391778.py in <module>
----> 1 df = dd.read_parquet(path_parquet, storage_options={"client_kwargs": boto_storage_options})

~/PycharmProjects/wiremind/venv/lib/python3.8/site-packages/dask/dataframe/io/parquet/core.py in read_parquet(path, columns, filters, categories, index, storage_options, engine, gather_statistics, ignore_metadata_file, split_row_groups, read_from_paths, chunksize, aggregate_files, **kwargs)
    296     if hasattr(path, "name"):
    297         path = stringify_path(path)
--> 298     fs, _, paths = get_fs_token_paths(path, mode="rb", storage_options=storage_options)
    299
    300     paths = sorted(paths, key=natural_sort_key)  # numeric rather than glob ordering

~/PycharmProjects/wiremind/venv/lib/python3.8/site-packages/fsspec/core.py in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand)
    615             paths = cls._strip_protocol(urlpath)
    616             update_storage_options(options, storage_options)
--> 617             fs = cls(**options)
    618
    619     if isinstance(paths, (list, tuple, set)):

~/PycharmProjects/wiremind/venv/lib/python3.8/site-packages/fsspec/spec.py in __call__(cls, *args, **kwargs)
     73             return cls._cache[token]
     74         else:
---> 75             obj = super().__call__(*args, **kwargs)
     76             # Setting _fs_token here causes some static linters to complain.
     77             obj._fs_token_ = token

~/PycharmProjects/wiremind/venv/lib/python3.8/site-packages/fsspec/implementations/http.py in __init__(self, simple_links, block_size, same_scheme, size_policy, cache_type, cache_options, asynchronous, loop, client_kwargs, get_client, **storage_options)
    113
    114         if not asynchronous:
--> 115             sync(self.loop, self.set_session)
    116
    117     @staticmethod

~/PycharmProjects/wiremind/venv/lib/python3.8/site-packages/fsspec/asyn.py in sync(loop, func, timeout, *args, **kwargs)
     67         raise FSTimeoutError
     68     if isinstance(result[0], BaseException):
---> 69         raise result[0]
     70     return result[0]
     71

~/PycharmProjects/wiremind/venv/lib/python3.8/site-packages/fsspec/asyn.py in _runner(event, coro, result, timeout)
     23         coro = asyncio.wait_for(coro, timeout=timeout)
     24     try:
---> 25         result[0] = await coro
     26     except Exception as ex:
     27         result[0] = ex

~/PycharmProjects/wiremind/venv/lib/python3.8/site-packages/fsspec/implementations/http.py in set_session(self)
    129     async def set_session(self):
    130         if self._session is None:
--> 131             self._session = await self.get_client(loop=self.loop, **self.client_kwargs)
    132             if not self.asynchronous:
    133                 weakref.finalize(self, self.close_session, self.loop, self._session)

~/PycharmProjects/wiremind/venv/lib/python3.8/site-packages/fsspec/implementations/http.py in get_client(**kwargs)
     26
     27 async def get_client(**kwargs):
---> 28     return aiohttp.ClientSession(**kwargs)
     29
     30

TypeError: __init__() got an unexpected keyword argument 'aws_access_key_id'

I've noticed reading through the source code that dd.read_parquet and dd.read_csv handle storage_options very differently, as dd.read_csv basically reuses Pandas code, while dd.read_parquet looks like an extensive rewrite.  Hence my suspicion that there might be a discrepancy somewhere in the way some arguments are handled and should be formatted. Any idea whether this has anything to do with my issue?
My environment/version details are:

Dask version: 2021.9.0
Python version: Python 3.8.10
Operating System: Ubuntu 20.04.3 LTS
Install method (conda, pip, source): pip

@martindurant maybe you can comment on the differences between storage_options in these two readers? I would expect that if you are using fsspec, the storage_options should be the same in both cases. Based on the pandas docs, it looks like you use fsspec if the path starts with s3 and not if it starts with http

Pandas docs
@PCanavelli can you confirm that you are using fsspec in the read_csv case?

Hi @jsignell, and thanks for answering so rapidly.
Yes, I confirm that both urls follow the same s3://<...> format, and should then be forwarded to fsspec.

Yes, the options are the same when passed to fsspec. However, pandas already had http support before relying on fsspec, so that one specific protocol is handled separately - I believe this is still the case.
Whether using parquet or csv, dask handles creating the fsspec instance explicitly, and it's open files that get passed to pandas or passing path + filesystem instance to the parquet backends.
I am confused by the traceback, which says that the backend chosen is http (not S3).

You can make your own easily enough
def set_indx_to_now(df):
    df.index = [datetime.datetime.now()]
    return df

sdf2 = sdf.map_partitions(set_indx_to_now, sdf) # note passin sdf - this is more like a func than a method
sdf2.window(value="2s").full().stream.sink(print)
inp.emit(pd.DataFrame({"value": [True], "obj_id": [2]})) # pandas requires lists without an index

I don't believe there's any further action needed from us here, closing. Feel free to reopen if the issue persists.


fonts with plus sign in their names won't render.

VSCode Version: 1.13.1
OS Version: macos 10.12.5

Steps to Reproduce:

Install this patched font from here https://github.com/gabrielelana/awesome-terminal-fonts/blob/patching-strategy/patched/SourceCodePro%2BPowerline%2BAwesome%2BRegular.ttf
this font's name is SourceCodePro+Powerline+AwesomeRegular go to your settings.json and try to activate this font by setting the editor.fontFamily: "SourceCodePro+Powerline+AwesomeRegular"
You'll see that step 2 will not work.
now try setting the font like this

"editor.fontFamily": "\"SourceCodePro+Powerline+AwesomeRegular\"",

What's happening is that VSCODE won't put quotation marks around font name if there are no spaces in it. but this font name has plus signs in the name, chromium accepts that as space and won't render the font.

Reproduces without extensions: Yes

@serkanyersen I believe this has been fixed in the meantime with one of our Electron updates. i.e. I cannot reproduce anymore on the Insiders Build (https://code.visualstudio.com/insiders/):

I can reproduce after reloading the window


objc-tests: InteropTestsRemoteWithCronet test4MBResponsesAreAccepted failure

https://grpc-testing.appspot.com/job/gRPC_pull_requests_macos/3190/consoleText
/jenkins/workspace/gRPC_pull_requests_macos/workspace_objc_macos_dbg_native/src/objective-c/tests/InteropTests.m:164: error: -[InteropTestsRemoteWithCronet test4MBResponsesAreAccepted] : ((error) == nil) failed: "Error Domain=io.grpc Code=3 "Received message larger than max (4194316 vs. 4194304)" UserInfo={io.grpc.TrailersKey={
}}" - Finished with unexpected error: Error Domain=io.grpc Code=3 "Received message larger than max (4194316 vs. 4194304)" UserInfo={io.grpc.TrailersKey={
Test Case '-[InteropTestsRemoteWithCronet test4MBResponsesAreAccepted]' failed (2.314 seconds).

This is keeping the macos master build red. Is the fix complex?

seen again in https://grpc-testing.appspot.com/job/gRPC_pull_requests_macos/3314/testReport/junit/(root)/objc_macos_opt_native/objc_tests/
pr: https://github.com/grpc/grpc/pull/10076 against v1.2.x

seen again in https://grpc-testing.appspot.com/job/gRPC_pull_requests_macos/3333/testReport/junit/(root)/objc_macos_dbg_native/objc_tests/
pr https://github.com/grpc/grpc/pull/9986 against v1.2.x

Seen again in https://grpc-testing.appspot.com/job/gRPC_pull_requests_macos/3346/testReport/junit/(root)/objc_macos_dbg_native/objc_tests/
pr #10087 against v1.2.x


fix Chia-Network/chia-blockchain-gui#184

Fixes the bug where the open devtools menu will error on open because mainWindow is not in scope.

thanks :)


Transaction fails as duplicated transaction from pigeon module

What is happening?
https://etherscan.io/tx/0x3a92b3c6df3422a076eb8532dada514bf6b14bb0d7273de30feee6d2e86b3029
https://etherscan.io/tx/0x3d4a36eeb35b104c3bc934412380ca46054e177ee6f59caf51af16a1f51d7f40
These transactions are what work the same TWAP swapping. But two validators sent the transaction for the same message and that's why the following one failed as "wrong count" error.
There can be 2 cases

Some validator tried to send the same message even though the message from the other validator was pending.
During sending a transaction to EVM chain, backend script and CW sent the same message(spamming).
Honestly, I am not sure which one is a real reason of this issue. But either of them is making the issue.

Solutions

pigeon module should wait for the previous transaction (maybe >=15 seconds).
We can set some delay parameter in CW so that we can prevent spaming same message.

I'm pretty sure this is because of message spamming and should be handled on teh CW or script level. Just for one TWAP today, we at times had 10 or 11 messages in the queue. There was supposed to be 1 logic call every 5 minutes, so no reason for so many concurrent messages with the same payload

5 minutes? Can we send a transaction on EVM chain every 5 minutes only?

from @webelf101 Understood. However, the script keeps sending a message until the TWAP succeeds.I think we need to update CW to prevent spamming. Good to close this buyg ticket and add new feature ticket.


Enerwave (Wenzhou MTLC Electric Appliances) ZWN-RSM1-PLUS incorrectly detected as ZWN-RSM1 / ZWN-RSM2

Checklist:

[x] My problem is not within Home Assistant or the ZWave JS integration. Or: a Home Assistant developer has told me to come here.
[x] My problem is not within ZWaveJS2MQTT. Or: a ZWaveJS2MQTT developer has told me to come here.
[x] I have checked the troubleshooting section and my problem is not described there.
[x] I have read the changelog and my problem was not mentioned there.

Describe the bug
Recently migrated from Vera Edge to this library for use with Home Assistant with ZooZ S2 Stick 700 Series .  When moving several (qty 3) ZWN-RSM1-Plus devices, observed that these were incorrectly identified as older generation ZWN-RSM1 / ZWN-RSM2 type.  Tracked this to the productType / productID combination in the config file definitions.
Device information
Which device(s) is/are affected (manufacturer/model)?
ZWN-RSM1-PLUS
Wenzhou MTLC Electric Appliances Co., Ltd. / Smart Relay Switch Module
What is/are the node IDs?
282-1541-273 (0x011a-0x0111-0x0605)
Did you change anything?

[x] Yes: (please describe)
To fix, migrate the combination of
{
"productType": "0x0111",
"productId": "0x0605"
}
from
/config/config/devices/0x011a/zwn-rsm2.json
https://devices.zwave-js.io/?jumpTo=0x011a:0x0101:0x5606:0.0
to
/config/config/devices/0x011a/zwn-rsm1-plus.json.
https://devices.zwave-js.io/?jumpTo=0x011a:0x0101:0x5605:0.0
The Z-wave alliance reference in that device entry also appears to be only relevant to the older ZWN-RSM1 / ZWN-RSM2.
[ ] No

Did this use to work before?

[x] Don't know, this is a new device
[ ] No, it never worked anywhere
[ ] Yes, in: (specify application with versions)

How are you using node-zwave-js

[ ] zwavejs2mqtt (latest) docker image
[ ] zwavejs2mqtt (dev) docker image
[ ] zwavejs2mqtt Manual Docker build

node-zwave-js branch:
zwavejs2mqtt branch:

[ ] ioBroker.zwave2 adapter
[ ] HomeAssistant version XYZ
[ ] Pkg
[ ] Manual Docker build

node-zwave-js branch:
zwavejs2mqtt branch:

[ ] node-red-contrib-zwave-js

Module version (double click node):

[ ] Manually built (as described in the docs)
[x] Other:
Using yarn version of zwavejs2mqtt master branch from github.

To Reproduce
Steps to reproduce the behavior:

Perform inclusion with ZWN-RSM1-Plus device and observe that the product type and ID are incorrect in the zwavejs2mqtt dashboard.

Additional context

Logfile:
Let me know if this really needed for this issue and I'll provide.

Do you have time to provide a PR for this?


"Configurations VirtualMachineInstance definition with guestAgent should have attached an guest agent channel by default" is N/A

/kind bug
What happened:
Tets is skipped?
What you expected to happen:
Test is not skipped.
How to reproduce it (as minimally and precisely as possible):
Expand the table here https://jenkins.ovirt.org/job/kubevirt_kubevirt_standard-check-pr/test_results_analyzer/
and look for the testcase.
Anything else we need to know?:
Not sure if it's a bug that there is N/A. Is it?

I went through the logs, so I will summarize my findings.

Skipped guest agent test is not bug. The skipped tests are for windows, which is fine, since currently there is no way of testing the guest agent on windows.
The N/A is indeed a bug, but not in the testing code. The N/A test an old version I had in development phase, it never made to the master.

Started investigation about the 2).

The automation which identified this bug does ignore skipped tests.
However, it does not differentiate between merged and unmerged PRs.
Instead it looks for the most often appearing failing cases.
WRT 2 - It can well be that the bug in the development code lead to the
many falures.
I'd recommend to look at the most recently merged PR to see if the bug
still exists.

There is no bug in the development code. It was just change in the label of the test. What I believe is happening, is that tests try to run nonexistent test and thus result in N/A.
From the code perspective, the failing test is not present.

True! The test case is not there anymore.
And the jobs I checked there the new attached a guest was not failing.
Closing this one.
Thanks for checking.


Convert URI parser to C++

There are some small, notable changes in the way URIs are parsed:

Repeated query parameters are not supported.
All "bare" query parameters such as ?a and ?a=&b are stored as
query keys a and b with empty-string values.

This change is

I encountered an edge-case behavior in the previous implementation that I'm going to suggest we break. I think it's intentional since there's a test for this behavior explicitly. URIs are permissively %-decoded unless the %[nn] triplet is at the end of the URI string. This includes reporting errors where the end of string is % or %n. I'd like to remove the end-of-string exception, and permissively %-decode the string everywhere.
To illustrate: https://goo.gl/?x%zzy is decoded and passed through as https://goo.gl/?x%zzy, since %zz is not a valid percent encoding. However, https://goo.gl/?x%zz is considered an invalid URI since %zz is at the end of the string.
I found various takes on relaxed/permissive URI parsing, I'm not sure there's a right answer here, but I'm all ears if there is one. For reference, Chrome permissively decodes at the end of the string as well.
> midstr_url = new URL('h://g/?x%zz=y')
URL {origin: "null", protocol: "h:", username: "", password: "", host: "", …}

> for ([k,v] of midstr_url.searchParams)
>     console.log(k,v)
 x%zz y

> eos_url = new URL('h://g/?x%zz')
URL {origin: "null", protocol: "h:", username: "", password: "", host: "", …}
> for ([k,v] of eos_url.searchParams)
>     console.log(k,v)
 x%zz

> eos_url2 = new URL('h://g/?x%z')
URL {origin: "null", protocol: "h:", username: "", password: "", host: "", …}
> for ([k,v] of eos_url2.searchParams)
>     console.log(k,v)
x%z


update manual install instructions

I've gone through the manual installation instructions and documented the known issues to make it clear where future developers should not deviate from the guide.
There is also an issue with compiling on a system that has 1GB of RAM (or less), which I worked around in the guide by adding swap space.
Having this guide be clear will prevent new developers from getting discouraged by having things not work when they're just trying to get started.
Closes #432

ACK. I would like to do a full manual build following these changes before merging. Appreciate the PR.

Tested without issue.
This PR updates the recommended Debian 10 version to use (from the 2021-05-28 version to 2023-05-03 version). I've confirmed the manual build steps to create a Raspberry PI OS based image for development works as expected.


Conda-Store open database connections

Conda-Store seems to open too many database connections. Need to figure out how to control this with sqlalchemy.

Did some testing via org mode and found on postgreslql with the current settings roughly 40 open connections. I have a 8 cpu/16 thread machine. When I limited the concurrency of celery it reduced the number of connections to ~15.
For each new environment that I add I see 1/2 connections created.

Did testing on mysql as well via
select id,
       user,
       host,
       db,
       command,
       time,
       state,
       info
from information_schema.processlist;

I was able to reproduce the issue with the number of connections increasing with large celery concurrency. By limiting the concurrency I don't see this issue. For instance with 4 concurrency I'm only seeing at max 15-17 connections.
I get this doesn't totally fix the issue but does look like it solves the issue with too many open database connections. If I want to truely limit the number of connections I will need to do work to explicitely close the connection after each task completed I belive. Since each thread in celery will have at least on connection.


Refactor TaskCommentsView/Presenter for unit testability & add unit tests

Hello. This is my personal proof of concept in greater mission of migrating some QE's slow and hard-to-maintain selenium tests to faster and possibly more reliable Mockito based unit tests in community, performed at the level of UI controller. I also did some refactorings to remove some duplication and make the code a bit more readable (see comments inline). I tested the changes thoroughly. Please check it and provide some feedback.
PS.: Sorry for changing the formatting, I'll try to avoid that in future commits.

Hi @jhrcek
this is great work. We should definitely do what you did here in all the screens :)
I will merge the changes shortly.
One question that I have for you is about the test coverage, and if the test really helps. Looking at the test proposed in this commit I would like to understand your vision about which kind of issues we are going to detect early because of these tests. In the test that you provided we are only testing the Presenter which contains the logic as you mention and we are also mocking the backend service, so the only scope of the test is the presenter logic, am I right? If so, I think that it is valuable but we need to in some way make sure that the backend service calls that we are doing also has tests, so everytime that we create a presenter test using mockito we can go to jBPM Services and also add a test to the services that are being invoked from all our presenters. Does it make sense? Cheers

@Salaoby you're right, this test intentionaly only focuses on presenter logic.
QE's recent goal has been to replace part of our selenium tests with more lightweight tests in community.
In particular we're trying to get rid of UI tests for which selenium testing is not the most suitable approach. Using TaskComments screen as an example: using selenium to verify that comment input field is cleared after user clicks "Add comment" button is clearly an overkill and should be tested at lower level if possible.
The migration of tests to lower level has turned out not as easy as we initially thought. For example some of us didn't really understand gwt enough to be able to write unit tests / refactor gwt code, and the code itself was not written with testability in mind in the first place. We'll strive to improve test coverage in the community in the future, but most of us are still learning what's the best way to do it.
However we're still keeping the kind of complex higher level tests, so the existing (selenium) coverage is not going away.
Of course ideally some backend services tests should be created as well to increase test coverage in community. If you could point me to some examples I might be able to give a hand with that.

@jhrcek that will be awesome.. I will send you the links offline.. or please contact me in the IRC later today or when you have time. Regards

@yurloc Don't ask me, I just extracted existing implementation into static inner class :) What do you think @Salaboy ?

merged in master

@jhrcek do you think that we can do this for the task details and task context tabs as well?

@Salaboy I think It might be possible in the future, but currently we're rather busy with planing and test development for the upcoming features. I'll take a look at it when I have a bit more time.

@jhrcek I do believe that before planning for new features we should try to cover the existing features. Can you please contact me to my personal email so we can discuss about that? I would like to understand the planning a little bit better


support laravel 8

Hello, thank you for your patience, this is now done! Check latest release!!
This package now supports Laravel v8, PHP v8, Composer v2, enjoy 🥳


add algolia search support?

Reference: http://stonebythesea.org/posts/blog-migration/

Has any plan of this?


Question list main

@apriljgranzow please review
I finished on the main question list component other than adding answer form and adding question form (which are separate features).

 Renders Answers List

 1.3.4 More Answered Questions

For question list:
![Screenshot from 2021-11-03 22-37-35](https://user-images.githubusercontent.com/82062938/140266329-dd6aba4a-01ab-467d-8f71-930b2d42a828.png

For answer list:

)


How to get distance between two geoms before collision for collision avoidance

Hi,
I'm a student and I'm trying to use MuJoCo for collision prevention/avoidance.
What I need accordingly, is the shortest distance at any given time between geom1 and geom2. This info would then be used to tell the system to stop the movement before actual contact happens.
I originally thought I could get the relevant data from d->contact[].dist but as far as I understand mjContact only stores data when a collision already happens, meaning only negative values get saved in d->contact[].dist due to penetration. Is this correct?
A workaround that comes to mind would be using sensordata by attaching sites to the relevant geoms. This workaround however wouldn't have the precision I'm looking for.
Any help is appreciated!

Out of curiosity, why does the distance between two geom sites not have the precision you need? What do you mean by precision in this case?

@st168992 it sounds like all you really need is for inactive contacts to be detected within a certain distance of actual contacts, rather than being able to query closest distance between arbitrary geoms.
The gap and margin attributes of the <geom> element (see here) is exactly what you want for this.

Out of curiosity, why does the distance between two geom sites not have the precision you need? What do you mean by precision in this case?

What I mean by precision is that I'd have a hard time recreating the meshes from my build with the available geom-types for sites. The consequence would be a lack of precision in collision-detection when compared to the real system (which obviously isn't approximated by sites). I know it's a bit nitpicky though lol.

@saran-t & @yuvaltassa Thanks, that looks promising!
I will test it in the coming week and get back at you.

@saran-t @yuvaltassa so I just tried it and... it works! Thanks.
One additional question though:
I am printing ncon additionally which is described as number of detected contacts.
Is it correct that detected contacts means active as well as inactive contacts?
Consequentially, if I set a value as margin, ncon will be 1 as soon as I'm within the margin, correct?

Yes.

Positive margin M means "inflate the geom by M". If you only have margin then contacts will be detected and force will be created to resolve the collision.
Positive gap G means "start computing forces only after the penetration is larger than G".
So if you want contacts to be detected, but forces not created, you need both margin and gap.

I recommend making a simple pedagogical model to play with these values and understand them.
If you make something nice, we can include it in the documentation 🙂

Almost. The gap should be on the outside, taking away from the margin. If I have a geom with margin 1.5 and gap 0.5, contacts will be detected at distance 1.5, but contact forces will be generated at distance 1.0
Makes sense?

From the documentation, it seems that the gap-paremeters is measured from the outside, hence it should be the orange-region in the above drawing.
Or am I missing something?


[Feature Request]: Implementation of Longest path in DAG under Dynamic Programming

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
Description
Given a weighted directed acyclic graph (DAG) and a source vertex, find the cost of the longest path from the source vertex to all other vertices present in the graph. If the vertex can’t be reached from the given source vertex, print its distance as infinity.
Input:
Source vertex and the cost matrix or the dajacency list as per your wish.
Output:
Longest path from source vertex to all other vertices.
Record

[x] I agree to follow this project's Code of Conduct
[X] I want to work on this issue
[X] I'm willing to provide further clarification or assistance if needed.

Full Name
Shuvojit Samanta
Participant Role
GSSOC

@UTSAVS26 please assign the issue.

@UTSAVS26 please assign the issue.

You can raise a PR of this issue i will assign you that alongwith labels.


Help for configuration of sending traces

Help for configuration of sending two traces
Please help me find the variable documentation to configure or send the trace?

I used the opentelemetry doc as a reference, but it doesn't work
https://opentelemetry.io/docs/languages/java/configuration/

It's not clear what you are trying to do, you can find the docs here: https://micrometer.io/


[backport] Fix device property default name

Backport of #4594

[automatic post] Jenkins, test this please.

Jenkins CI test (for commit 0f408b63caf2f6c33e142ca4b2416a374124d91e, target branch v8) failed with status FAILURE.

pfnCI, test this please.

Jenkins CI test (for commit 0f408b63caf2f6c33e142ca4b2416a374124d91e, target branch v8) failed with status FAILURE.


How to install in linux

I am using steam and proton. How and where should I install you application ?? Can you give a detailed guide for Linux steam users ?

Hi,
you can use this script under Linux:
https://github.com/FakeMichau/fgmod
this script is already published on Nexus too:
https://www.nexusmods.com/site/mods/927

It has older version. He can't update due to innoextractor incompability https://github.com/FakeMichau/fgmod/issues/1

Hi,
From what I know FakeMichau successfully tested some newer extractor of InnoSetup files, but regardless, you can do one trick for now:

launch the setup app using Wine and use it as an unpacker (install the mod into an empty directory)
copy the files from that directory into the one with game executable
if you own a non-NVIDIA GPU, you need to perform one extra operation: if the game uses DLSS 3.5 or older - import the registry key that disables NVIDIA signature checks by using proton tricks, if the game requires DLSS 3.7 or later - find a "nvngx_dlss.dll" file in one of the game (sub)directories, and copy it next to the game executable under a name of "nvngx.dll" (therefore replacing a smaller file already provided with my mod).

Game should work from now on with FG available.
(All of the steps above are usually automated with InnoSetup or FakeMichau's scripts)

the fgmod-installer had some unintended file-deletions here (after removal from some games), leading to game redownloads (steam),so i tried to gather everything i know currently here:
https://github.com/slynobody/dlss-enabler-mod-for-linux
this would be the right procedure? if someone knows a good method how to automatically put the registry-key inside the files of a wine prefix (without using regedit, f.e. through winetricks) please enlighten me.
btw: the latest beta does not work with 'no mans sky' on linux / vulkan (polaris as well as rdna2, vulkan set to true), maybe you need nvidia currently (in general not the greatest joy on linux), dxgi should not be needed?

steam deck  ,  Black Myth-Wukong ,No bug were found during testing, DLSS frame generation is available

the fgmod-installer had some unintended file-deletions here (after removal from some games), leading to game redownloads (steam),so i tried to gather everything i know currently here: https://github.com/slynobody/dlss-enabler-mod-for-linux
this would be the right procedure? if someone knows a good method how to automatically put the registry-key inside the files of a wine prefix (without using regedit, f.e. through winetricks) please enlighten me.
btw: the latest beta does not work with 'no mans sky' on linux / vulkan (polaris as well as rdna2, vulkan set to true), maybe you need nvidia currently (in general not the greatest joy on linux), dxgi should not be needed?

Could you elaborate which files were deleted but shouldn't? I take care to restore anything that potentially might've been in the game folder previously

I think it does not remove, but rather change the dll which lead to denuvo thinking that there is a hardware change and whitelist your account for 24hours. As for steam redownloading files it maybe to due to the change in hashes of dll files


Back button handler

Hi NoriginMedia,
me and my team are using your library in our react TV app and we made a small improvement in order to handle the back button.
The Back event could be handled defining the new onBackPress callback in the useFocusable configuration: this callback could be used in both component and Focusable Context.
As README.md explains, that callback is called when the component is focused and Back key is pressed. If no callback was provided to the focused component, the event will go up through the Focusable Tree as long as one defined callback was found or the top was reached up.
The back key is set to 27, like the ESC key; of course it could be set with setKeyMap method.
A small example of the behaviour was provided on App.tsx demo page: when the back event was fired while the focus is on a Content, the focus jumps to the side menu; if the back event was fired while the focus is on the "Asset 3" element, an alert will show up.
I hope it could be usefull.
--Luca

I also need this feature )

@lcaprini @emilehay can we extend this logic to handle any button handlers? For example play pause etc.

@lcaprini @emilehay can we extend this logic to handle any button handlers? For example play pause etc.

Of course is possible, but in my opinion the play, pause and other remote buttons aren't directly related to the navigation. I do it in a different library/package.

@lcaprini but before handling key events we should check that the needed element has focus and etc..
Could you please share package?

but before handling key events we should check that the needed element has focus and etc..

My package listens the keydown event without consider the focused element, because the playback remote buttons are used across the whole app.
My package is currently on a private repo; I'll publish also in github asap.

@lcaprini can you share your package please?

@lcaprini can you share your package please?

The first draft version is online on npm as react-remote-controller. There is no doc on it actually, but you could install with npm i react-remote-controller and see the example in src/example/App.tsx. I write the README.md when I have time.

@lcaprini thank you so much. I'll investigate your package.

We are also gratefully using your library & eagerly awaiting this feature. Can you foresee when this change will be integrated?

Hi,
I have been thinking about this feature, and honestly, I don't see any good reason to add this inside Norigin-Spatial-Navigation. Since the goal of this library is to handle spatial navigation (directional navigation).
And I think @siarheipashkevich had a good point, if we add back logic, why not other keys as well?
Then in my personal opinion separating the code into two parts will be the best:
  const { ref, focused } = useFocusable();
  const {backHandler} = useBack(); // or useKeyListener

Thus the app developer will implement its own useBack on the app code.

Hi @guillecc, thank you for your reply. Your considerations about the back buttons could be correct, but them could be also applyed to the enter button as well.
Also the enter button is not strictly connected to the navigation, but to the action related to the focused element. In the same way, the back button action is related to a focusable item or context.

Hi,
as I needed more keys to work in the context of the focus tree I made a more broader approach, introducing a onKeyPress handler, which could also take care of back. I needed this for example to be able to handle color keys in different parts of our app too. Also needed to be able to use arrow keys for some functionality when there is nothing to navigate to like closing a modal.
Would love to hear you feedback on it, https://github.com/drudolf/Norigin-Spatial-Navigation/tree/feature/key-press.
Thanks.

Based on having onEnterKey, onBackKey imo is a natural extension.
I think adding other keys is not in the spirit of this library - it is a navigation tool, and a classic property of navigational tools is to go back.

Hello.
We had a lot of internal discussions on this and the consensus was that we are not really keen on adding Back handler to this library.
More explanations here: https://github.com/NoriginMedia/Norigin-Spatial-Navigation/issues/57
TLDR; onEnterPress is mostly used to listen to the currently focused element being pressed, while onBackPress is mostly used to navigate to the previous page, so it's not usually linked to the currently focused element. Of course there are exceptions, like "if player controls are open and Back is pressed, close the controls", but this is easily achievable with a simple callback on Back button key press where you check whether "player controls are open" or similar.
We are not sure that we should go with the rule "since we have X button, let's add another A, B, C key listeners to the library". It will bloat the library with the logic that is not directly related to the spatial (directional) navigation, and all the extra buttons listeners can be added in a custom way in the project. Same goes with the gamepads support and/or other devices with different key codes. We'd like to keep this library device-agnostic. We might even remove the default key listener since now it assumes the default browser key codes, so we might make it pluggable and provide an exportable default implementation.


CD: Shops

Country and area :                 CD admin7_Gombe
Category :                          shop=computer|mobile_phone|clothes
Legal opening rule :                legally closed
Time period :                       06.04.2020 - 10.05.2020
Source :                            https://information.tv5monde.com/afrique/virus-en-rdc-kinshasa-la-gombe-isoleee-les-vendeurs-de-rue-desoles-357416

Integrated, thanks :+1:


Don't instrument Hazelcast Executors

Context: https://discuss.elastic.co/t/cant-run-apm-java-agent-in-alfresco-cluster-environment/172962

Codecov Report

Merging #536 into master will increase coverage by 0.56%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master    #536      +/-   ##
===========================================
+ Coverage     63.64%   64.2%   +0.56%
  Complexity       68      68
===========================================
  Files           175     173       -2
  Lines          6554    6467      -87
  Branches        754     746       -8
===========================================
- Hits           4171    4152      -19
+ Misses         2131    2063      -68
  Partials        252     252

Impacted Files
Coverage Δ
Complexity Δ

.../apm/agent/concurrent/ExecutorInstrumentation.java
45.45% <100%> (+1.7%)
0 <0> (ø)
:arrow_down:

...gent/okhttp/OkHttp3ClientAsyncInstrumentation.java

...agent/okhttp/OkHttpClientAsyncInstrumentation.java

Continue to review full report at Codecov.

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

But that would prevent context propagation if the Runnable implements Serializable and submitting that to a conventional Executor.

If someone bothered to mark Runnables as Serializable, we probably shouldn't wrap them...

But it doesn't depend on the Runnable but rather on the Executor if it can deal with those. If we exclude Serializable Runnables, I'm sure we'll sooner or later get an issue like Context propagation does sometimes not work. Debugging that won't be easy.


refactor: remove runner attribute from create_jvm_test_suite

In create_jvm_test_suite.bzl, the runner attribute is not utilised within the define_test function. By the time we reach the create_jvm_test_suite macro, this attribute is redundant because the specific test runner can be directly specified within the define_test function provided by the user. So, this PR removes references to the runner from the macro.

A consequence of this changes is that for existing users, the runner attribute is now going to be passed to the define_test function (via kwargs). Just checking that this change is intended and that it's acceptable in terms of backward incompatibility.

That’s fine. This macro is seldom used, as it’s a building block for the
higher level suite macros.

@shs96c would you be able to trigger the pipeline again please?


SIGABRT CRASH on HeartbeatTimer: malloc: Heap corruption detected, free list is damaged

Bug report
Describe the bug
While leaving my app open on a screen that has a channel subscription, after around 20 minutes without touching the app it crashed, saying "malloc: Heap corruption detected, free list is damaged". This has happened several times, on different devices.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

Make a channel subscription:

let client = self.supabaseClient.realtime
client.connect()

let allChanges = client.channel(.column("id", value: id, table: "table-name", schema: "schema-name"))

client.onOpen { [weak self] in
   print("Realtime client opened")
}

allChanges.on(.update) { [weak self] _ in
    print("Realtime update")
}

allChanges.subscribe()

self.realtimeChannel = allChanges

Wait with the app open for a while, while triggering lots of updates to the database on another device/directly to the db
At a seemingly random time, the app will crash with a signal SIGABRT.

Expected behavior
The client should be able to stay open indefinitely with no crashes.
Screenshots
Image of where the crash occurred in the library
Image of the thread stack trace
System information

OS: [iOS 16.4.1]
Version of supabase-realtime: [0.0.2]
Version of supabase-swift: [0.2.1]

Additional context
This is happening quite consistently, please advise how to fix the crash if it's a usage issue!

@grsouza hey just tagging you cause I've seen you active in the community! This is a pretty gnarly issue for my app which I'm hoping to push to production very soon, do you have any idea of how much time you and others in the community have to spend on this? Happy to help however I can.

My hunch is it's to do with the HeartbeatTimer having its own dispatch queue for the timer but then also all the Realtime being executed in the delegate methods of URLSession, which could be a variety of different background threads


Allow to select SPICE version

[x] Allow to select SPICE version
[x] Update docs

@stefdoerr could you review?


This verion of exiftool is not compatible

This version of C:\Python3\QualityScaler\Assets\exiftool.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
I'm running Windows 10
Is this needed for anything major?

Hi my friend,
Exiftool is used only for copy details of the original file to upscaled file (for example colore profile)
In any case, that is a strange error, are you running a old version of Windows 10?

I got the same error and am running Windows 11 Pro

I am too,win10 22H2

@Maverynthia @gjnave @pinea00
Hi

download  Windows executable exiftool.exe from here (https://exiftool.org/)
place exiftool.exe in Assets directory

@Maverynthia @gjnave @pinea00
Hi

download  Windows executable exiftool.exe from here (https://exiftool.org/)
place exiftool.exe in Assets directory

Thanks,error message was gone.

Thanks, it seems the exiftool included was for an old windows. Needed to be updated from the website you listed.


Update unixStartScript.txt

Switched master out for HEAD which references the default branch to support https://github.com/github/renaming in future

Context

Within the software development there is an effort to be more inclusive with the language used within our code bases.  This minor change will reference the default branch used by the project, which will help if you chose to rename the master branch.
In addition it means when people make use of gradle within the numerous companies which are looking to use more inclusive language that it reflected there.
Contributor Checklist

[ ] Review Contribution Guidelines
[ ] Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
[x] Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
[x] Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
[ ] Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective
[ ] Provide unit tests (under <subproject>/src/test) to verify logic
[ ] Update User Guide, DSL Reference, and Javadoc for public-facing changes
[ ] Ensure that tests pass sanity check: ./gradlew sanityCheck
[ ] Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest

Gradle Core Team Checklist

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation
[ ] Recognize contributor in release notes

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

OK, I've already triggered a build for you.


Fails to compile on FreeBSD

What steps will reproduce the problem?
1. gmake

What is the expected output? What do you see instead?
Expect working bins and tests.  Build fails because build_detect_platform
doesn't recognize FreeBSD.

What version of the product are you using? On what operating system?
rev 39, FreeBSD 9.0-CURRENT

The attached patch fixes the build.

Original issue reported on code.google.com by dforsythe on 23 Jul 2011 at 8:14
Attachments:

freebsd.diff

Thanks dforsythe! I'll be working on patching in your changes.

Before I can patch them in, however, can you please fill out this online
contributor agreement?
http://code.google.com/legal/individual-cla-v1.0.html
This will let us add your patch to the LevelDB codebase.
Let me know when you have done so.

Thanks again for your patch - looking forward to having LevelDB compiling on
FreeBSD.

Gabor Cselle
Product Manager, Google

Original comment by<EMAIL_ADDRESS>on 25 Jul 2011 at 8:15

Changed state: Accepted

I've completed the agreement.  Thanks!

Original comment by dforsythe on 25 Jul 2011 at 8:35

This is now fixed in Revision 40. Can you verify.

Original comment by<EMAIL_ADDRESS>on 27 Jul 2011 at 4:50

Changed state: Fixed


SSSD config file moved, programs rely on its exact location

Describe the bug
The SSSD config file location was changed as a result of 87942da08e3221f32c7a43a17b165fabfdb04082, but sudo (and possibly other programs, but none I'm aware of) relies on its exact location when the system is configured to get sudo rules from FreeIPA. This happens with nixos 22.11 or newer.
Steps To Reproduce
Steps to reproduce the behavior:

Build sudo with withSssd set to true
Add the following to /etc/sudo.conf

Debug sudo /var/log/sudo_debug.log all@debug
Debug sudoers.so /var/log/sudo_debug.log all@debug

Try to authenticate with sssd over sudo (this might only work if a rule is supplied to sudo via SSSD that contains a netgroup)
The logs will contain a line that matches netgroup [^ ] matches but the short hostname will be in the first field in the parenthesis instead of the full hostname

Expected behavior
sudo should be able to find the ipa_hostname via the SSSD config
Additional context
This is probably best resolved by symlinking /etc/sssd/sssd.conf to /var/lib/sssd/sssd.conf in case there are other programs that rely on reading the sssd config.
Also I noticed in the code that there's still a stray config.environment.etc."sssd/sssd.conf".source in the systemd.services.sssd-kcm configuration in nixos/modules/services/misc/sssd.nix that should probably be settingsFileUnsubstituted
Notify maintainers
@yayayayaka
@bbigras
@Ma27
Metadata
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.82, NixOS, 22.11 (Raccoon), 22.11.20221213.265caf3`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

https://github.com/NixOS/nixpkgs/pull/206273 partially addresses the issue mentioned here.

Related: https://github.com/NixOS/nixpkgs/pull/220379


Remove txt file option and pass in OPENSEARCH_INITIAL_ADMIN_PASSWORD env variable

Description
Recent changes in security backend disallows passing in the initial admin password via a txt file since it is insecure. This removes that step and sets the environment variable to successfully spin up the cluster.
Category
[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]
Why these changes are required?
What is the old behavior before changes and new behavior after changes?
Issues Resolved
[List any issues this PR will resolve (Is this a backport? If so, please add backport PR # and/or commits #)]
Testing
[Please provide details of testing done: unit testing, integration testing and manual testing]
Check List

[ ] New functionality includes testing
[ ] New functionality has been documented
[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Inspired by #1706


[API Gateway V1] Deployment does not depend on API resources

Have noticed that when a ApigatewayV1Args.transforms.deployment.triggers  are set when sst.deploy() is called the API is seemingly deployed in advance of method creation - producing the following exception

BadRequestException: The REST API doesn't contain any methods...

Haven't encountered any other instances where this behavior is observed. To replicate - the stage being deployed to must be new - ie no API Gateway and corresponding methods should exist.
Proposed fix in #1253

Hi @fwang, cross posting here:
thanks for looking into this and closing. Was the root cause addressed in another change? Can you link any artifacts here for reference? Thank you!


Change Request: 4 eye principle on segments

Segments impacts the way the features work as well as their values. It would be great to have 4 eye principle on any segment operation (addition, deletion or update)

Dupe of 1204


Issue with Yarn Workspace Monorepo: Query engine binary for current platform could not be found.

Hi all —
I have a monorepo set up with a few services, namely an "api" service, which contains all of the Prisma stuff, and an "app" service, which is a Next.js app that also needs minimal access the Prisma client (via a next-auth adapter).
The file structure looks like this:
project/
  ├─ package.json
  ├─ node_modules/
  |
  └─ services/
      ├─ app/                             <-- main app
      |   ├─ node_modules/
      |   └─ pages/api/[next-auth].ts     <-- next-auth api function
      |
      └─ api/                             <-- database & api
          ├─ node_modules/
          |   ├─ .prisma/client           <-- generated client
          |   └─ @prisma/client           <-- installed by yarn
          └─ prisma/
              └─ schema.prisma

The package.json in the root of the project has nohoist, to stop the prisma client from getting hoisted to the root node_modules.
When next-auth attempts to do its thing, Prisma throws errors that it has an Invalid prisma.session.findUnique() invocation, and that the Query engine binary for current platform "darwin" could not be found. Following its instructions to add "darwin" to the binaryTargets field in the generator block yields the same results, albeit with a notification that it can tell I added the target, but something still went wrong and that I create an issue here.
It also says that the client looked in these locations:
(Prisma Client looked in "/path/to/project/services/app/.next/server/pages/api/auth/query-engine-darwin")

Searched Locations:

  /path/to/project/services/app/.next/server/.prisma/client
  /path/to/project/services/api/node_modules/@prisma/client
  /path/to/project/services/app/.next/server/pages/api
  /path/to/project/services/app/.next/server/pages/api/auth
  /path/to/project/services/app/.next/server/pages/api/auth
  /path/to/project/services/app/.next/server/pages/api/auth

@j0hnm4r5 👋
Do you have a repo where I could test this? In a normal mono-repo it does find the client.

@ryands17 here's a reproduction repo that clearly shows what's going on (with instructions): https://github.com/j0hnm4r5/example-prisma-next-auth-monorepo
@millsp is also talking a look at #6899.

@j0hnm4r5 have you tried with the latest version?

@millsp I just tried it again with<EMAIL_ADDRESS>(and<EMAIL_ADDRESS>to no avail. It's still the same error.
You already added the platforms "native", "darwin" to the "generator" block
in the "schema.prisma" file as described in https://pris.ly/d/client-generator,
but something went wrong. That's suboptimal.

Is there anything else I should try?

@j0hnm4r5 Don't know if it helps but I had to setup a monorepo that isolate a prisma package and here's what I found till now...

The nohoist road was a dead end with prisma... and anyway removed in yarn 3.0.0.
Setting the binaryTarget is not helpful in this case, the engine is well there but not where the prisma client expects it, the engine is actually needed in the root node_modules folder
So I created a postinstall script that generates the client in the consuming app (https://github.com/belgattitude/nextjs-monorepo-example/blob/ed1fc6b8f294195884a0dc8d3d75d29c916902a8/apps/web-app/package.json#L47)

Somehow it ended up working (local, ci, vercel, docker)... it was based on an older prisma version I'll see if I can get rid off those hacks. But doing so I also have the limitation of having only one prisma schema for the monorepo (which is okay for now).
Link there: https://github.com/belgattitude/nextjs-monorepo-example

@j0hnm4r5 I was able to get it to work, I think, by updating to the latest Prisma + Next.js https://github.com/millsp/example-prisma-next-auth-monorepo. The repro is kinda hard to set up, I'd appreciate if you can give me a simpler one.

Hey @belgattitude could you please provide us with steps to reproduce this in your current repo?

I took the time to take @j0hnm4r5 reproduction and reproduced it. With the latest version of @prisma/client, you will get an error letting you know that the schema was not found.
The error that is reported in the repro is the engine not being found, not the schema. This shows that our findSync logic was indeed finding a schema, but not the one of the generated client, hence the engine could not be found. Both of these have been recently improved, and you will get better error messages. To fix this, you will need to use @prisma/nextjs-monorepo-workaround-plugin.


Python tests are not run on all versions py27, py36, py37

It seems that our python tests are not running using all tox virtualenvs for py27, py36 and py37.
I think somehow the $TRAVIS_PYTHON_VERSION is unset, so we end up creating .tox/py. It's unclear to me which python version we are running tests with.
This is taken from  the output of a master  branch build (https://travis-ci.org/combust/mleap/builds/643702883):
$ tox -c python/tox.ini -e $(echo py$TRAVIS_PYTHON_VERSION | tr -d .) -v
using tox.ini: /home/travis/build/combust/[secure]/python/tox.ini (pid 20189)
using tox-3.14.3 from /home/travis/.local/lib/python2.7/site-packages/tox/__init__.pyc (pid 20189)
GLOB sdist-make: /home/travis/build/combust/[secure]/python/setup.py
[20199] /home/travis/build/combust/[secure]/python$ /usr/bin/python setup.py sdist --formats=zip --dist-dir /home/travis/build/combust/[secure]/python/.tox/dist >.tox/log/GLOB-0.log
package .tmp/package/1/[secure]-0.16.0-SNAPSHOT.zip links to dist/[secure]-0.16.0-SNAPSHOT.zip (/home/travis/build/combust/[secure]/python/.tox)
py cannot reuse: no previous config /home/travis/build/combust/[secure]/python/.tox/py/.tox-config1
py create: /home/travis/build/combust/[secure]/python/.tox/py

It seems that python tests are not being run on 3.7 because they would incur in this error on Travis:
https://travis-ci.community/t/unable-to-download-python-3-7-archive-on-travis-ci/639/2

Closing this as the PR has been merged, please let me know if that's not right.


AOT compilation - Parsing pipes with a non-string argument fails

Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.
@angular/cli: 1.0.1
node: 7.7.4
os: linux x64
@angular/animations: 4.1.0
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/material: 2.0.0-beta.3
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0
Debian GNU/Linux 8.7 (jessie)
Repro steps.

I'm using the latest version (3.1.0) of an Angular library used for translating messages, dates and currency amounts.
This library also implement a pipe that you can use to translate text inside HTML templates like this:
<span>{{ "errors.password.minlength" | translate:lang:{ minlength: 5 } }}</span>

This pipe has a legit syntax and it works as expected out of the AOT mode.
It used to work until recently and it would correctly compile in AOT mode too.
AOT compilation doesn't work anymore with the above-given set of dependencies, and I don't know which is the exact dependency (or sub-dependency) that cannot handle this kind of pipes anymore and is causing the error.
I have made a test, wrapping the argument lang into double quotes - e.g. "lang" instead of lang - so that the first argument passed to the translate pipe would be a string. Indeed, the error in the AOT compilation disappeared (even though I had a nonfunctioning translation pipe at that point for obvious reasons).
So it's evident that something can't digest pipes with non-string arguments in the AOT compilation.
The log given by the failure.
ERROR in ng:///home/gsoverini/github/angular-test-cli/src/app/+users/settings/password.component.html (7,5): Property 'lang' does not exist on type 'PasswordComponent'.

Desired functionality.

I would expect this kind of pipes to be correctly parsed by the AOT compiler.

This does not appear to be a CLI issue and also appears to be a legitimate error.  Is there a "lang" property/variable on PasswordComponent?  The pipe usage shown won't work otherwise.

Sorry, no it doesn't have a lang property, its parent component does have it though, and apparently it's enough for making it work on JIT compilation.
I understand that's the mistake I made. I was misled by the fact that this app was not throwing errors during development, but only during AOT compilation.
Thank you for your attention.


Upgrade dependencies

Upgrades the Google Analytics tag, and also normalize.css, to their latest versions.

Didn't realize this was included in https://github.com/pages-themes/cayman/pull/43. @sjparkinson if you could still please answer the question above, I just want to ensure the change remains backwards compatible.

Of course.

Does this require the user to create a google tag manager tag, e.g., if they were using the previous version, do they need to make any changes or take any action?

According to the migration documentation, theres no specific mention of having to do anything but replace the snippet.
I have made this change at https://uncomplicated.systems, but I haven't setup anything in Google Tag Manager, only a typical property in Google Analytics.
I also checked an old property I have that's still using analytics.js and it's listing this new snippet in the settings. So nope, I don't think users have any action to take with this change.


How to use GPU?

I have read that it's possible to use GPU also. How do I do that on Linux & which file needs to be edited?

For Linux:
Just open the fastsdcpu folder in your terminal & run: export DEVICE=GPU