Time of Use Solar -> Grid (over production) and From Grid (consumption) Metrics

First a complement. I found this project recently and was impressed with how easy it was to get running and how feature filled it is. Well done!

Problem
We have Solar and a single Powerwall. My electrical service provider supports time of use. Sadly, they do not carry over credits between months. Also, they do not credit 1-1 more like 1/2 off-peak and 1/4 of on-peak Kwh charges. Due to our Powerwall we very rarely use on-peak grid sourced power.
My problem is we mostly (5 days of 7) only get credit for on-peak solar production. But we classically charge our EV off-peak overnight (EV charging is our biggest energy usage). This means we are not balancing our credits with our consumption. We end up getting charged for a lot of off-peak usage and credited little for on-peak over production.
The goal: move charging of our EV to on-peak, but do not exceed our solar over production for the month when we do this to avoid the very expensive on-peak energy cost.  This would save us approximately 5 cents a Kwh for all of the energy we use to charge our EV.
Enhancement
I would like to create metrics to help monitor the 4 different "buckets" of our energy consumption and production:

Monthly On-Peak Solar Over Production
Monthly On-Peak Home Usage
Monthly Off-Peak Solar Over Production
Monthly Off-Peak Home Usage

These could be daily with a monthly rollup as well.
Visualization
I would like to create panels to show the difference between solar over-production and grid consumption for the current month. It "would be nice" to have a comparison with the previous year's month.
Time of Use Schedule
Making this general use would be the hardest part. My use case is simple in that on-peak is Monday-Friday 8am-8pm all year round. For general use this might be tricky as looking at the Tesla app time of use scheduling UI it can get pretty complicated.
How?
Maybe a telegraf transform work against the Powerwall site meter API to populate a daily metric that references the time of use schedule to measure how much production and consumption are in each "bucket". Maybe daily another transform could roll it up to a monthly metric.
Additional context
I am a software developer but have limited experience with Grafana and very little experience with influxdb and telegraf. I'd be happy to play around working on this idea. But would likely need some hand holding along the way.

I didn't know about pwdusage. So I will look into that for now. 👯

If that doesn't work for you, I think you can get everything you need using the approach I took for time of use calculations.
TLDR: Copy some data from InfluxDB into MySQL and then you will have no problem writing queries to pull the usage/production for just the days and times you want. The data can easily be visualized in Grafana.
As described in https://github.com/jasonacox/Powerwall-Dashboard/discussions/82, I set up a separate MySQL/MariaDB container and copy data from InfluxDB to that database since MySQL offers greater ability (or really any ability when compared to InfluxDB 1.x) to work with dates and times.
To very briefly summarize what's in the linked discussion:

I set up a MariaDB docker container
I have a python script that copies data from InfluxDB to MariaDB, using a cron job to run the python script every few minutes
In the MariaDB database I have a TOU table that has different costs/credits that can be configured for specific days of the week and times of the day.
As the data are added to MySQL, the costs/credits are calculated and stored in the table columns so they don't have to be calculated every time they are queried.
I use stored procedures that go back and update the data since I only know my monthly rate at the end of the month when I get my bill and see what I was charged. After I update my TOU table, I run the stored procedures to refresh the cost calculations.
In Grafana I use the MariaDB data for anything relating to cost.

I extended my setup beyond what's in the linked post because I added a second solar array that I own in addition to my original array which is on a PPA (power purchase agreement). Since the powerwall 'solar' metric includes production from both systems, I have a separate table in MariaDB where I track only the production from the PPA and its costs and use that for my solar cost.
I think you're more interested in the kwh total at different times rather than the dollar cost, correct? If so, simply getting the data into MySQL should be enough without worrying about the TOU cost calculations. Once you have the InfluxDB kwh data in MySQL, you can easily write queries that use the date and time functions in MySQL to get the information you need (https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html).
For example, in MySQL you could get the sum of usage "where week(datetime) <=12 and hour(datetime) >=4 and hour(datetime) <11 and dayofweek(datetime) = 2" which would give you only usage for Mondays from 04:00:00 to 10:59:59 for the first 12 weeks of the year.
Since I think you only want solar over-production, the to_grid value should be what you're looking for. For the examples below, I'm going to assume peak is Monday through Friday from noon to 8 PM, because that is my utility's peak period. You could easily extend these queries to cover multiple peak period per day or different start/end times on different days:

Monthly On-Peak Solar Over Production

(using my data for  this year so far)
select month(datetime), sum(to_grid)
from kwh
where
dayofweek(datetime) >= 2  and dayofweek(datetime) <= 6
and
( hour(datetime) >= 12 or hour(datetime) < 20 )
and
datetime >= '2024-01-01'
group by month(datetime)

Monthly On-Peak Home Usage

Same, changing to sum of "home". I included home and to_pw to capture all power going to the house or to charge the powerwalls.
select month(datetime), sum(home) + sum(to_pw)
from kwh
where
dayofweek(datetime) >= 2  and dayofweek(datetime) <= 6
and
( hour(datetime) >= 12 or hour(datetime) < 20 )
and
datetime >= '2024-01-01'
group by month(datetime)

Monthly Off-Peak Solar Over Production

(I'd need to double-check some of my parenthesis here, but I think this is right)
select month(datetime), sum(to_grid)
from kwh
where
(
dayofweek(datetime) in ('1','7')
or
(
dayofweek(datetime) >= 2  and dayofweek(datetime) <= 6
and
( hour(datetime) < 12 or hour(datetime) >= 20 )
)
)
and
datetime >= '2024-01-01'
group by month(datetime)

Monthly Off-Peak Home Usage

select month(datetime), sum(home) + sum(to_pw)
from kwh
where
(
dayofweek(datetime) in ('1','7')
or
(
dayofweek(datetime) >= 2  and dayofweek(datetime) <= 6
and
( hour(datetime) < 12 or hour(datetime) >= 20 )
)
)
and
datetime >= '2024-01-01'
group by month(datetime)

You mentioned a daily summary... easy enough:
Solar peak-only over-production by day (February only)
select month(datetime), day(datetime), sum(to_grid)
from kwh
where
dayofweek(datetime) >= 2  and dayofweek(datetime) <= 6
and
( hour(datetime) >= 12 or hour(datetime) < 20 )
and
datetime >= '2024-02-01' and datetime < '2024-03-01'
group by month(datetime), day(datetime)

This is immensely helpful thank you.

Looking a bit more closely, I think pwdusage should do a lot of this out of the box.

Problem We have Solar and a single Powerwall. My electrical service provider supports time of use.

Can I check that your plan is more or less this:

Peak times: 8am to 8pm Mon-Fri.

Power bought from the utility at say 50c per kWh.
Power sent to the utility from solar credited at 12.5c per kWh, or do you just get credited 0.25kWh per kWh of solar export? (the two are equivalent).
Credit for peak solar is only applied against peak usage?

Off peak is everything else.

Power bought from the utility at say 35c/kWh.
Power sent to the utility credited at 17.5c/kWh or 0.5 kWh/kWh.
Credit for off peak is only applied against off peak usage?

If so, pwdusage can generate the raw bucket data for the import and export in these periods, and you can get running credit/debit values with a couple of grafana transforms.

Enhancement I would like to create metrics to help monitor the 4 different "buckets" of our energy consumption and production:

This should be straighforward. We do a rolling monthly panel that tracks:

value of solar export.
value of solar power used directly.
value of solar power used indirectly via the powerwall.

You could do metrics of either kWh or cost on:

Imports from utility on peak/off peak.
Exports to utility on peak/off peak with or without credit factor applied.
Net credits/costs.

These could be daily with a monthly rollup as well.

Probably workable. pwdusage is not efficient because it doesn't store query results (deliberate decision - I'm looking to minimise impact on the dashboard stack). You could modify pwdusage to write queries back to influxdb or a database of your choice.

Visualization
I would like to create panels to show the difference between solar over-production and grid consumption for the current month. It "would be nice" to have a comparison with the previous year's month.

For this to work acceptably fast, you'd need to write query results back to a database. We find a simple monthly panel gives us everything we need.

My utilty plan details:

Peak is 8am-8pm Weekdays (M-F) Grid energy cost is $0.205/Kwh, Solar sell credit is $0.59
Off-Peak is 8pm-8am weekdays and all weekend. Grid energy cost is $0.105/Kwh Solar sell credit is $0.49

Our net metering is reconciled at the month end subtracting consumption - over production for each period.
Example: I consume 200 peak Kwh and over produce 190Kwh. I owe (200-190) * $0.205.
pwdusage
I'm working through the readme now and working to get it started up for my testing.
Alternatives
I do not understand well enough how the pipeline of telemetry goes between pyPowerwall to influxdb to grafana. I was hoping I could maybe write a go telemetry aggregator to capture a metric accumulating the difference between the site.energy_imported and site.energy_exported scoped to the off-peak and on-peak periods. Or I could be completely wrong.

@KevM - I took a look at the impressive work @BuongiornoTexas has done on the pwdusage tool, although quite a bit of it went over my head as I'm crap with Python and JSON. So to me that looks like a black box with a rather intimidating setup process, whereas I write SQL queries in my sleep so using MySQL seems much easier to me. YMMV depending on your experience with SQL.
After reading the pwdusage page, I think I see a couple of other distinctions between the two approaches. Adding on MySQL or MariaDB, a cron job to refresh data, and writing queries may be the 'clunkier' of the two approaches with more moving parts. However once the kwh data is in MySQL, the queries against it are very fast. I run a separate dashboard where I only have historical data and generally look at periods from 90 days to one year at a time, and when I look at a year's data, most of the panels are done loading in 1 second (running Grafana 10.x on a Raspberry Pi 4B with a bunch of other services running).
If you go with the MySQL approach, I would create views on the database for each of the query types to make using them in Grafana easier: e.g. I would save the first query from above as "view_peak_to_grid" and the next one as "view_peak_use", etc. so you can write simple Grafana queries like "select sum(to_grid) from view_peak_to_grid where  $__timeFilter(datetime_local)".
Just for fun (I really need some new hobbies 😄 ) I ran a combined peak overage/peak use query for 2023:

The fine print there says it took .061 seconds.
So I ran the daily one (for peak only)...

Then I ran the off-peak for 2023 (combined to_grid and (home + to_pw):

Ok, so still needing a new hobby, I wrote the one query to rule them all. This one returns peak and off-peak values for every day in 2023:

The query
```
select t1.datestamp, t1.month, t1.day, t1.to_grid_off_peak, t1.usage_off_peak,
t2.to_grid_peak, t2.usage_peak
from
( select date(datetime_local) as datestamp, month(datetime_local) as month,
day(datetime_local) as day, sum(to_grid) as to_grid_off_peak,
sum(home) + sum(to_pw) as usage_off_peak
from kwh
where
dayofweek(datetime_local) in ('1','7')
or
(
dayofweek(datetime_local) >= 2 and dayofweek(datetime_local) <= 6
and
( hour(datetime_local) < 12 or hour(datetime_local) >= 20 )
)
group by date(datetime_local)
) t1
left join (select date(datetime_local) as datestamp,
month(datetime_local) as month, day(datetime_local) as day, sum(to_grid)
as to_grid_peak, sum(home) + sum(to_pw) as usage_peak
from
kwh
where
dayofweek(datetime_local) >= 2 and dayofweek(datetime_local) <= 6
and
( hour(datetime_local) >= 12 or hour(datetime_local) < 20 )
group by month(datetime_local), day(datetime_local) ) t2
on t1.datestamp = t2.datestamp
where t1.datestamp >= '2023-01-01' and t1.datestamp < '2024-01-01'
order by t1.datestamp
</details>
Revising what I said above, this one query could be saved to MySQL as a view with the final "where" statement removed (where I limited it to 2023) and then all the Grafana queries could be run against this one view. If it were named, for example, 'view_tou_usage', the panel source would look like "select to_grid_peak from view_tou_usage where $__timeFilter"

A few rows of the mega-query look like:

![image](https://github.com/jasonacox/Powerwall-Dashboard/assets/57046429/d69c30d8-14fa-462a-aa41-ebec836a715b)

That query took:

![image](https://github.com/jasonacox/Powerwall-Dashboard/assets/57046429/3a76a5bf-08c6-4c8b-b1e2-7e40bfa3ad17)

to pull one year's data from MySQL

Example: I consume 200 peak Kwh and over produce 190Kwh. I owe (200-190) * $0.205.

At first glance (clarifying questions below), I don't think the cost/credit data from the simple agent will work for your case.
However, you can definitely get monthly consumption and over production kWh values from pwdusage, and you can calculate your net credits/costs via grafana transforms - but this will typically only work for one tariff at a time (history probably won't work).
It should be possible to create a modified agent that does a net consumption calculation using a repeating monthly schedule, but this may be overkill for your use case - and may not be worth the implementation effort - depends how frequently your tarriffs change and how much you value your historical data for this stuff. (We've found we mainly use the monthly report, and then drop summary results into a manual tracking spreadsheet for summary history and economic analysis).
Can I check that your $0.59/$0.49 solar credit values are correct? Not $0.059 /$$0.049?
Also, can I check how net overproduction works: e.g. If I consume 220 peak and over produce 250, do I get a payment of (250-220) * $0.59?

I do not understand well enough how the pipeline of telemetry goes between pyPowerwall ...

pypowerwall provides a set of rest apis for powerwall data with some processing along the way - it sounds like your aggregator would do similar things. Telegraf grabs the data (with optional filtering) and writes to influxdb. Grafana is visualisation, but you can do some basic transforms along the way.

If I knew more people were using it, I'd spend a bit of time profiling and improving efficiency (pretty sure I know where the problems are), but with crickets for feedback, there's not a lot of incentive ...

I tried to get this going a while ago, but couldn't.  It's that long ago that I don't recall where I failed.  I should try again (but then again, I've got MySQL working well, so there wasn't the incentive to get it going).
However, I've got a stepped rate FIT (first 10kWh at a higher rate than the residual) so your approach seemed worth trying.

No one likes JSON. I'm regretting running with it, and may convert to TOML at some point.

Everyone likes Jason! Oh... not @jasonacox... JSON  😄

a rather intimidating setup process,

That's a bit harsh - the basic setup is pretty straightforward now that Jason is hosting the docker image. Update the yml file, open the firewall port and configure your setup and usage plan in json (yeah, that part does suck!).

I should have said "intimidating to me"...
Are you familiar with Paul Hibbert who does home automation videos on YouTube? Because I can't help hearing everything starting at "update the yml" in his Home Assistant boffin voice. If you don't know his channel, trust me, that's a hilarious reference. 🥲

If I knew more people were using it, I'd spend a bit of time profiling and improving efficiency (pretty sure I know where the problems are), but with crickets for feedback, there's not a lot of incentive ...

I tried to get this going a while ago, but couldn't. It's that long ago that I don't recall where I failed. I should try again (but then again, I've got MySQL working well, so there wasn't the incentive to get it going).
However, I've got a stepped rate FIT (first 10kWh at a higher rate than the residual) so your approach seemed worth trying.
I should try again, when I get a round TUIT.

Here you go:

Did you get the first 10 kWh thing working in SQL, because it seems like it should be solvable in a query

I should try again, when I get a round TUIT.
MySQL working well,

A working solution is worth a lot more than the time spent getting pwdusage up and running.

However, I've got a stepped rate FIT (first 10kWh at a higher rate than the residual)

I assume this the first 10kWh of the day?
This won't work out of the box for pwdusage - at the very least requires a tweaked usage agent, and raises issues about reporting part days - e.g. how to handle a view starting from say 11:00am after part of the generation for a day has happened.
But as it seems to be a common aspect of Australian plans, I'll have a think about it! I can already see a path to incorporating it, but generalising the combo of ToU and tiered tarriffs may make the JSON explode - which we'd all rather avoid.

Are you familiar with Paul Hibbert

Not seen/heard this!

Did you get the first 10 kWh thing working in SQL? Because it seems like it should be solvable in a query

Agreed.
I can't even remember (and I'm a bit under the weather at the moment) - well enough to accept your TUIT and reply here, but not well enough to fire up the tools and look)

Are you familiar with Paul Hibbert

Not seen/heard this!

This isn't the exact scene I was looking for, but this is the general idea:
https://youtu.be/glqS5kEiJoQ?si=4zbM9TmIz5OpkVTs&t=751
or this:
https://youtu.be/LI3lhgOiZ-8?si=08REST2KRhVp-i0b&t=796

This isn't the exact scene I was looking for, but this is the general idea:

Nice!
Also, @youzer-name, I'm going to kind of hate both you and @BJReplay a little bit for the rest of today. I can now see a way to do combined tiered and ToU plans, but it'll probably involve a rewrite of the core pwdusage engine (especially since it will need to capture non-ToU tiers and even worse, tiers that cross ToU boundaries). Back to the python mines at some point then.

Please don't do it for me (I'm blissfully ignorant at this point in time as to what I did when I got my tiered FIT, other than I remember doing something); that said, solving a challenge is sometimes an itch you have to scratch.

solving a challenge is sometimes an itch you have to scratch.

And that's the problem - I'm mostly hating myself! That said, I've just started playing Elden Ring, and the way I'm having my backside handed to me, python coding will probably seem like a welcome and trivial thing when I get back to it.

Hmm I'm trying to understand the data flow of pypowerwall http to influxdb. I'm querying the influxdb timeseries and only see http and weather measurements. Isn't there more details being displayed on the dashboards?
Here is the gist of my http measurement:
Query:
select home, from_grid, to_grid, to_pw, from_pw, solar, percentage from http WHERE time >= now() - 1h ORDER By time DESC

On the dashboard I see detailed information about battery reserve settings. etc.
Looking at the telegraf.conf it seems like a lot more data should be in the influx fields but I don't see where the json fields I am seeing in influxdb are getting selected out of the json.

Hmm I'm trying to understand the data flow of pypowerwall http to influxdb. I'm querying the influxdb timeseries and only see http and weather measurements. Isn't there more details being displayed on the dashboards?

You have to query against the specific retention policy. If none is specified, it uses the default, which is autogen.
So your query is identical to:
select home, from_grid, to_grid, to_pw, from_pw, solar, percentage from autogen.http WHERE time >= now() - 1h ORDER By time DESC

you can use "show retention policies" to see the other ones.
> show retention policies
name    duration shardGroupDuration replicaN default
----    -------- ------------------ -------- -------
autogen 0s       168h0m0s           1        true
raw     72h0m0s  24h0m0s            1        false
kwh     0s       168h0m0s           1        false
daily   0s       168h0m0s           1        false
monthly 0s       168h0m0s           1        false
pwtemps 0s       168h0m0s           1        false
vitals  0s       168h0m0s           1        false
grid    0s       168h0m0s           1        false
pod     0s       168h0m0s           1        false
alerts  0s       168h0m0s           1        false
strings 0s       168h0m0s           1        false

> select * from pod.http order by time desc  limit 1
name: http
time                 PW1_POD_nom_energy_remaining PW1_POD_nom_full_pack_energy PW2_POD_nom_energy_remaining PW2_POD_nom_full_pack_energy PW3_POD_nom_energy_remaining PW3_POD_nom_full_pack_energy backup_reserve_percent host month nominal_energy_remaining nominal_full_pack_energy source url year
----                 ---------------------------- ---------------------------- ---------------------------- ---------------------------- ---------------------------- ---------------------------- ---------------------- ---- ----- ------------------------ ------------------------ ------ --- ----
2024-03-05T15:57:00Z 13580                        14768                        13442                        14593                        13342                        14484                        90                          Mar   40364                    43845                               2024

> select * from vitals.http order by time desc limit 1
name: http
time                 ISLAND_FreqL1_Load ISLAND_FreqL1_Main ISLAND_FreqL2_Load ISLAND_FreqL2_Main ISLAND_FreqL3_Load ISLAND_FreqL3_Main ISLAND_VL1N_Load ISLAND_VL1N_Main ISLAND_VL2N_Load ISLAND_VL2N_Main ISLAND_VL3N_Load ISLAND_VL3N_Main METER_X_VL1N METER_X_VL2N METER_X_VL3N PW1_PINV_Fout      PW1_PINV_VSplit1 PW1_PINV_VSplit2 PW1_f_out         PW1_i_out          PW1_p_out           PW1_q_out PW1_v_out         PW2_PINV_Fout     PW2_PINV_VSplit1 PW2_PINV_VSplit2 PW2_f_out          PW2_i_out          PW2_p_out           PW2_q_out           PW2_v_out         PW3_PINV_Fout     PW3_PINV_VSplit1 PW3_PINV_VSplit2 PW3_f_out         PW3_i_out          PW3_p_out          PW3_q_out          PW3_v_out          host month source url year
----                 ------------------ ------------------ ------------------ ------------------ ------------------ ------------------ ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ------------ ------------ ------------ -------------      ---------------- ---------------- ---------         ---------          ---------           --------- ---------         -------------     ---------------- ---------------- ---------          ---------          ---------           ---------           ---------         -------------     ---------------- ---------------- ---------         ---------          ---------          ---------          ---------          ---- ----- ------ --- ----
2024-03-05T15:58:00Z                                                                                60.010727272727266                                   60.01077272727273 2.6863636363636365 -145.45454545454547 -10<PHONE_NUMBER>545455 60.01118181818181                                   60.011181818181825 2.5272727272727273 -135.45454545454547 -14.545454545454545<PHONE_NUMBER>181818 60.01018181818181                                   60.01022727272729 2.5954545454545457 -129.0909090909091 13.181818181818182<PHONE_NUMBER>0909092      Mar              2024

Looking at the telegraf.conf it seems like a lot more data should be in the influx fields but I don't see where the json fields I am seeing in influxdb are getting selected out of the json.

Supporting the response from @youzer-name  - grab chrongraf as well - you can use it a interactive browser and query builder for influx. It will list the RPs, data buckets and variables available from influxdb. I used it to get a handle on both InfluxQL and Flux (Flux is a) horrible and b) deprecated - not worth chasing).

This is as close as I can get with the simple pwdusage agent:

Unfortunately, I can't see a way to apply costs to the kWh net usage/overproduction values due to a combination of limitations between the json import plugin and grafanas relatively inflexible transforms (very hard to do an if statement!). With a better choice of data api for the usage data, I suspect this could be easily fixed - paying the price for my laziness here!

I'm currently diving into learning how telegraf slurps pypowerwall data into influxdb and seeing if that's a good place for an aggregator. It seems like your projects could benefit from that as well. My goal is to collect two measurements aggregations of consumption (grid to home) and over production (solar to grid) over time. Then maybe figure out how rollups work (daily, weekly, monthly, etc.).
I'm really not looking for costs. I am more looking for usage in Kwh for on peak and off peak. The cost calculation is more of a would be nice. That said I think costs could be derived from the measurements I'm looking to collect and may obviate the need for a side database. The cost calculator could be a telegraf processor which emits a new measurement?
I'd love someone to chime in with how the rollups work. I am mostly ignorant of what exactly powerwall dashboard is doing behind the scenes.
There looks to be some drama regarding the usage of with influxdb version 1.8 when the world seems to be moving towards v3 at the moment but again I'm ignorant of that too.

I'm going to plug my method again.
The fundamental problem with InfluxDB 1.x is the lack of date/time manipulation functions. You'll need to anticipate every query you would ever want to use and tag the data when storing it. If you want to query by the day of the week, you'd have to tag each entry with a DOW value separate from the datetime. Do you want to find everything on weekdays between certain hours? You'll have to tag each value when it is stored to indicate which time window it is in. You could probably tag each row with a simple 'peak' or 'off peak' tag, but you'll want to get it right the first time. Going back to change the tags, while possible, is a PITA.
You also have to deal with the fact that a tag is not the same as a field, and that adding tags with many discrete values will bloat the memory utilization of the database. If you want to be able to query "where X = Y", X must be a tag, not a field. If there are many different values for Y, memory utilization will skyrocket.
Once you have a MySQL instance up and running, you have complete flexibility to manipulate the data. I was able, in a few minutes, to write queries that got the results you need from SQL even though I didn't create the database with those specific parameters in mind. SQL is simply a superior query language for extracting the information you need from the data.
InfluxDB with complex date/time queries is very much a square peg/round hole situation. You might be able to make it fit, but it's going to take a lot of forcing.

@youzer-name is spot on with his comments about issues with influxDB. It's not great to work with if you want to get clever about time series manipulation.

I'm really not looking for costs. I am more looking for usage in Kwh for on peak and off peak

Um. This was the data I provided in my example plot. Usage is Import (from grid), and Over production is Export (to grid). The net values are the differences between usage and over production.

You can do more granular output if you want. E.g. our last 7 days of usage and over production by day (please excuse the American style month/day notation - I almost never use this, so haven't localised it to sensible day/month).

I'm currently diving into [learning how telegraf ... It seems like your projects could benefit from that as well

That'll be a big Australian "Yeah, nah!" from me on that. It may be possible to do simple ToU cases with telegraf, but from my understanding, it'll be hard to manage complex cases in a general way (I'll be very happy to be proved wrong though!). Giving some idea of the things that a usage plan might need to do, here are just some of the issues in the Australian market:

Handle multiple ToU time bands: e.g. peak, off-peak, super off peak, overnight and off peak,. Some of these bands may appear multiple times a day and these bands shift twice a year with daylight saving. Separate bands may apply to solar export.
Usage and export tiers - e.g. BJReplay is on a scheme that pays a higher rate for the first 10kWh of the day, and another plan I've seen has tiered usage based on yearly consumption.
The plan costs change once per year, on a different date to the time band changes.

I'll be ecstatic if you can find a path that makes these things easy for general usage. But I won't be surprised if you end up like @youzer-name and I - concluding there are things that the InfluxData stack does well, but it's a bloody blackberry thicket if you want to do anything outside that narrow path.


Update tsconfig.json to emit jest/browser com...

...patible output.
Resolves #6

Please merge this PR, I just tried it and working fine. Thanks @kgdiem
Issue was such a pain tried all possible solution like ignoring transformIgnorePatterns both in global and lib jest config but didn't work..


Line chart different background colors

Hello,
I am looking for a way to achieve this using Chart.js :

My concern is having 2 different background color. I don't know how to do this.
I managed to do everything else by creating new Scales (x is a TimeScale, y is a LinearScale).
Here is what I got today :

As you can see, the only difference is having a background, and line color dynamic depends on the value in dataset.
Do you have any advice to do this ?
btw, I'm using angular-chart.js currently in alpha with chart.js on beta-2. plan to migrate to last release soon when angular-chart will be stable.
Thanks

I don't think is currently possible. It would require an updated Chart.element.Line.prototype.draw method that drew different backgrounds

You could use 2 different datasets. One that contains data for red background and the other for blue background.

Hello,
Thanks for the tips,
I ended up using, indeed, 2 different datasets.
Only problem was: What to put on the second dataset when there is data on the first one ?
Best is to put "null".
Also, on transition point, data must be on both datasets or there will be a break in the graph

Working solution:

Closing since I don't think we're going to change the drawing methods to support this since it hasn't been heavily requested and there are good work arounds
Options are

use two datasets
set the fill as a CanvasGradient object
change Chart.elements.Line.prototype.draw to include this

what if we want to achieve different colors for positive and negative values? we can only override the draw?

Do you have a jsfiddle/codepen link to the working solution?

1+

+1, any tips for doing this ?

https://github.com/chartjs/Chart.js/issues/4895
there is an example
https://jsfiddle.net/egamegadrive16/zjdwr4fh/

#4895
there is an example
https://jsfiddle.net/egamegadrive16/zjdwr4fh/

Anyway this works with the fill color?
I got different dashed lines working, but not the fill sadly
https://jsfiddle.net/haeydc7m/2/

Latest versions of ChartJS allow you to customize line segments individually, which can be used to change the color and also the style (dashed etc) of a specific segment.
const config = {
  type: 'line',
  data: {
    labels: Utils.months({count: 7}),
    datasets: [{
      label: 'My First Dataset',
      data: [65, 59, NaN, 48, 56, 57, 40],
      borderColor: 'rgb(75, 192, 192)',
      segment: {
        borderColor: ctx => skipped(ctx, 'rgb(0,0,0,0.2)') || down(ctx, 'rgb(192,75,75)'),
        borderDash: ctx => skipped(ctx, [6, 6]),
      }
    }]
  },
  options: genericOptions
};

see segments for more info

No need for a workaround.
@Hedva I'm sure you won't need it anymore, but your example would then look like
https://jsfiddle.net/dsmcx94y/


Improve RBAC UI to Attach Policy to a Group

When you try to attach a policy to a group in the RBAC UI then few issues:

It shows only 5 policies.
There is no scroll bar or next page.
Filtering is also very limited. Filter looks for "starts with" instead of substring and it is case sensitive.

Related: #7168.


TerraformTaskV1 : Unable to set backendServiceArm with a variable coming from variable group or template import

All variables are working in the task below except backendServiceArm :
- task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV1@0
    displayName: 'Terraform : Init $(Environment)'
    inputs:
      workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform'
      backendServiceArm:  ${ServiceConnectionNameTerraform}   # NOT WORKING
      backendAzureRmResourceGroupName: '$(BackendStorageResourceGroupName)'
      backendAzureRmStorageAccountName: '$(BackendStorageAccountName)'
      backendAzureRmContainerName: '$(BackendStorageContainerName)'
      backendAzureRmKey: '$(Environment).terraform.tfstate'

Syntaxe try:

${ServiceConnectionNameTerraform}    Not Working

${{variables.ServiceConnectionNameTerraform}}    Not Working

$[variables.ServiceConnectionNameTerraform]    Not Working

link
I'm using the same variable group import for WebApp deployement and the Service connection ${ServiceConnectionName} is working perfectly. But not with TerraformTaskV1  :-(
I have also try to create an external Yaml variable file like this :
File : MyProject.Development.yaml
Content
variables:
   - name: ServiceConnectionNameTerraform
     value: 'My Service Connection Name in Devops'
     readonly: true

   - name: BackendStorageAccountName
     value: 'myaccountname'
     readonly: true

   - name: BackendStorageContainerName
     value: 'mycontainername'
     readonly: true

   - name: BackendStorageResourceGroupName
     value: 'myrg'
     readonly: true

   - name: Environment
     value: 'DEV'
     readonly: true

In my Release pipeline
 - stage: deploy_stage_DEV
    displayName: "Deployment"
    dependsOn: build_stage
    condition: succeeded()
    variables:
      - group: MyProject.Development
      - group: MyProject.DevelopmentKV
      - template: ../variables/MyProject.Development.yaml
    jobs:
      - template: deployment-template.yml

I have the same issue with variable group & Template import.
Thank you in advance,

It's working if it's in the root level of de pipeline.
It's NOT working when it's a variable group or template import at stage level (DEV for example)
trigger:
  branches:
    include:
    - master
    - release/*
  paths:
    include:
    - deployment/pipelines/*
    - Terraform/*

pool:
  vmImage: "windows-latest"

variables:
  - group: MyProject.General
  - template: ../variables/MyProject.General.yaml  ## WORK here

stages:
  ###################################################
  # Build
  ###################################################
  - stage: build_stage
    displayName: "Build"
    jobs:
      - template: build-template.yml

  ###################################################
  # Release
  ###################################################
  # DEV
  - stage: deploy_Stage_Playground
    displayName: "Deployment of APIM Configuration"
    dependsOn: build_stage
    condition: succeeded()
    variables:
      - group: MyProject.DevelopmentKV
      - template: ../variables/MyProject.DEV.yaml  ## NOT WORK here
    jobs:
      - deployment: deploy_Job_Playground
        displayName: "Deploy MyProject DEV"
        environment: "DEV"
        strategy:
            runOnce:
                deploy:
                    steps:
                       - template: deployment-template.yml
                         parameters:
                            ServiceConnectionName: $(ServiceConnectionNameTerraformDEV)

In my project this works fine if you use a different variable syntax and change the input value to '${{ variables.ServiceConnectionNameTerraformDEV }}'

At the end it's not a bug it's a feature from Azure Devops : Azure Devops need to check all permissions at the beginning of the run of the pipeline.
see related issue : https://github.com/microsoft/azure-pipelines-agent/issues/1307#issuecomment-690584752
So we need to get the service name from root variable file. it's impossible to get the service name from environment variable file :(

After spending around a day in trying to inject this variable coming from Azure KeyVault into Terraform Init task, I was thinking it was not being bound in the Pipeline because of "all variables from KeyVault are marked secret", but I was incorrect based on what has been described by @didaskein
There is a workaround to this Design though.
You can have a parameter in your Template or the main pipeline named environmentSelection like so
parameters:
    - name: environmentSelection
      displayName: Azure Application Environment
      type: string
      default: nonprod
      values:
        - prod
        - nonprod

and then use the same in the Terraform Init Task.
- task: TerraformTaskV1@0
  displayName: "Main TF Init"
  inputs:
    provider: "azurerm"
    backendServiceArm: "MYConnection ${{parameters.environmentSelection}}"
    backendAzureRmResourceGroupName: $(TF_RESOURCE_GROUP)
    backendAzureRmStorageAccountName: $(TF_STORAGE_ACCOUNT)
    backendAzureRmContainerName: $(TF_CONTAINER_NAME)
    backendAzureRmKey: $(TF_STATE_KEY)
    command: "init"
    commandOptions: "-no-color -input=false -reconfigure"
    workingDirectory: $(System.DefaultWorkingDirectory)

May be this helps someone who hits the problem in future.

After spending around a day in trying to inject this variable coming from Azure KeyVault into Terraform Init task, I was thinking it was not being bound in the Pipeline because of "all variables from KeyVault are marked secret", but I was incorrect based on what has been described by @didaskein
There is a workaround to this Design though.
You can have a parameter in your Template or the main pipeline named environmentSelection like so
parameters:
    - name: environmentSelection
      displayName: Azure Application Environment
      type: string
      default: nonprod
      values:
        - prod
        - nonprod

and then use the same in the Terraform Init Task.
- task: TerraformTaskV1@0
  displayName: "Main TF Init"
  inputs:
    provider: "azurerm"
    backendServiceArm: "MYConnection ${{parameters.environmentSelection}}"
    backendAzureRmResourceGroupName: $(TF_RESOURCE_GROUP)
    backendAzureRmStorageAccountName: $(TF_STORAGE_ACCOUNT)
    backendAzureRmContainerName: $(TF_CONTAINER_NAME)
    backendAzureRmKey: $(TF_STATE_KEY)
    command: "init"
    commandOptions: "-no-color -input=false -reconfigure"
    workingDirectory: $(System.DefaultWorkingDirectory)

May be this helps someone who hits the problem in future.


[SPARK-46339][SS] Directory with batch number name should not be treated as metadata log

What changes were proposed in this pull request?

This patch updates the document of CheckpointFileManager.list method to reflect the fact it is used to return both files and directories to reduce confusion.
For the usage like HDFSMetadataLog where it assumes returned file status by list are all files, we add a filter there to avoid confusing error.
Why are the changes needed?

HDFSMetadataLog takes a metadata path as parameter. When it goes to retrieves all batches metadata, it calls CheckpointFileManager.list to get all files under the metadata path. However, currently all implementations of CheckpointFileManager.list returns all files/directories under the given path. So if there is a dictionary with name of batch number (a long value), the directory will be returned too and cause trouble when HDFSMetadataLog goes to read it.
Actually, CheckpointFileManager.list method clearly defines that it lists the "files" in a path. That's being said, current implementations don't follow the doc. We tried to make list method implementations only return files but some usage (state metadata) of list method already break the assumption and they use dictionaries returned by list method. So we simply update list method document to explicitly define it returns both files/dictionaries. We add a filter in HDFSMetadataLog on the file statuses returned by list method to avoid this issue.
Does this PR introduce any user-facing change?

No
How was this patch tested?

Added test
Was this patch authored or co-authored using generative AI tooling?

No

Thanks @dongjoon-hyun . Re-triggered on: https://github.com/viirya/spark-1/actions/runs/7153203366

All failed tests are passed now.

Thank you, @viirya .
Merged to master/3.5/3.4.

Thank you @dongjoon-hyun !


Handle cc & bcc fields if present

cc & bcc fields are currently ignored, I add the ability to add them if they're present.

thank you so much @skelz0r

released version 0.6.6 with this

:+1:


Broaden tests in ocr-numbers exercise.

That's a much more encompassing test suite now, but it seems that you're basically giving away the solution for the grid function with join_ocr in ocr_test.py.
I believe it would be better if the test cases would simply compare the output of the number and grid functions with literals or at least short expressions that are easy to grasp.

Fair point. I'll use the functions to create some literals to test again and then remove the functions.

Same tests, updated to use literals instead of functions.

Thanks! That's a great test suite and I'm willing to merge it.
However, there's another improvement possible, which would be to move the "number grids" directly into the respective test methods. That way everything I need to know about a test case is defined right inside the test case and I don't have to look up a constant defined elsewhere.
If you don't want to make that change for any reason, never mind, I'll merge your PR anyways. But I think that this test suite could be even better!

My only reservation with this is that most of the grids are used to test both numbers and grid, so it makes sense to define them once and then use in both.  I'll go make the change, however, if you still think they should belong in each test case.

My only reservation with this is that most of the grids are used to test both numbers and grid, so it makes sense to define them once and then use in both.

:blush: - I guess I actually overlooked that…
Ok, do as you please. There's a tradeoff of redundancy and locality/simplicity here and I don't see any clear guidelines on how to approach it.

I changed all of the literals to be in-line with the tests.  I think it is cleaner this way, but in several tests I defined an auixiliary variable digits solely to keep the same format among tests without exceeding 79 characters in a line.

:+1:


Bench fix 2

This PR adds missing rules to container version update script.
Also, updates the container version to 24.06

CI MESSAGE: [17044555]: BUILD STARTED

CI MESSAGE: [17044555]: BUILD FAILED

CI MESSAGE: [17044555]: BUILD PASSED


Bring ABC-size down to 18

This change brings Metrics/AbcSize from 19 to 18, mostly through extracting methods, and some use of the new node extensions.
Incidentally it also reduces offenses for Metrics/CyclomaticComplexity and Metrics/MethodLength slightly.
I took the freedom to inline disable Metrics/AbcSize on methods that saw no benefit, or got worse, from refactoring.

Before submitting the PR make sure the following are checked:

[X] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[X] Used the same coding conventions as the rest of the project.
[X] Feature branch is up-to-date with master (if not - rebase it).
[X] Squashed related commits together.
[ ] Added tests.
[ ] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[X] All tests are passing.
[X] The new code doesn't generate RuboCop offenses.
[X] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[X] Updated cop documentation with rake generate_cops_documentation (required only when you've added a new cop or changed the configuration/documentation of an existing cop).

Very nice :clap:

Nicely done indeed! :-)


[Bug] Order Suspension Reason is Blank

Describe the bug
The reason provided in the suspension log for order history is blank, both automated and user provided.
How to reproduce

Create a new order and set it to automatically expire
Let the order expire automatically or manually suspend it
Go to the order history
Observe the suspension log line item
The suspension reason is blank

Expected behavior
The log should explain the order expired or the reason provided by the user.
Screenshots
Red is automated suspension, blue is manual suspension.

FOSSBilling version
0.5.3
Module version
No response
Device
Desktop
Information

Asus Desktop
Windows 11 x64
Firefox 115.0.3 (64-bit)

Additional context
No response

I'm trying to replicate this issue, and from what I can see with 0.5.5, this issue doesn't exist.

Can you try to upgrade and see if it still persists?
Also: Did you configure the field "Auto Suspend Reason" in the Settings?

I'll have an order expire in 20 minutes, I can then tell you if i could replicate the automated part.

I'm sorry, I cant' replicate your issue. My system automatically suspended the order  (red) as well as manually (green) - both times it used the comment.

Please update to FOSSBilling Version 0.5.5 and verify your settings. If the issue persists, feel free to reach out again.

I'll update to 0.5.5 and see if the issue persists.

Not sure what exactly was causing it, but its working now after re-installing 0.5.3 (can't upgrade to 0.5.5 due to issues when installing)


fix: insert 'fake' station when no stations found and provide error message

fixes #119

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

Project coverage is 79.89%. Comparing base (847c0db) to head (6d8036e).

Files with missing lines
Patch %
Lines

custom_components/gasbuddy/config_flow.py
66.66%
2 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #120      +/-   ##
==========================================
- Coverage   80.10%   79.89%   -0.21%
==========================================
  Files           7        7
  Lines         387      393       +6
==========================================
+ Hits          310      314       +4
- Misses         77       79       +2

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


Turn off Logging

I am trying to turn off all the logging outside of errors but despite toggling the logging settings I am still seeing a bunch of INFO level lines in my log. Is there something else that needs to be done to turn off these log messages?
Running version: 5.4.0
Kotlin Version: 1.9.23
Log Messages
2024-05-22 15:40:26,675 INFO  [DefaultDispatcher-worker-3] e.vendeli.tgbot.utils.LogbackLogger (26): Handling update #122579515
2024-05-22 15:40:26,677 INFO  [DefaultDispatcher-worker-3] e.vendeli.tgbot.utils.LogbackLogger (26): Update #122579515 processed in functional mode with whenNotHandled action.
2024-05-22 15:40:26,677 INFO  [DefaultDispatcher-worker-3] e.vendeli.tgbot.utils.LogbackLogger (26): Number of affected functional actions - 1.

Bot Setup
    val tBot = TelegramBot(settings.telegramSettings.token){
        logging {
            botLogLevel = LogLvl.ERROR
            httpLogLevel = HttpLogLevel.NONE
        }
    }

Logging Dependencies
    // Logging //
    implementation("org.slf4j:slf4j-api:2.0.13")
    implementation("ch.qos.logback:logback-core:1.5.6")
    implementation("ch.qos.logback:logback-classic:1.5.6")

Thanks for any help you can offer.

Did you tried without declaring logging dependencies, library have logback as transitive dependency, I may be wrong but I've encountered something similar when I had them :/.
A bit later I'll look into it :)

I found why this problem occured, thank you for your report!
For now to change logging you can place logback.xml file in your resources folder with such content:
<configuration>
    <logger name="TgUpdateHandler" level="ERROR"/>
</configuration>

I will give that a try. Thank you for digging in.

should be fixed in 5.5.0


StartPower(Power1, Power2) command type

Hello,
The StartPower(Power1, Power2) function (Output Command 0x81 - Sub Command 0x02) is stated as using the "WriteDirectDataMode" (0x81, 0x51, mode undefined?).
I believe it is a error/typo since no mode is defined for the WriteDirectDataMode command and mode=0x02 is already used by PresetEncoder(Position).
It should most likely use the normal "Port Output Command" (0x81, 0x02).
Best Regards,
Laurent

I can confirm this. by treating the command not a WriteDirectDataMode but instead as a SubCommand 0x02 (and I guess therefore addressing the Hub and not the port), the method StartPower(power1, power2) start to work.


[FEA] look at ways to use replace_nans and replace_nulls from cudf

As a part of the discussion at https://github.com/NVIDIA/spark-rapids/issues/6164#issuecomment-1210095670 we saw that there is a replace_nans function in cudf, along with a replace_nulls one. It might be good for us to try and play around with using these for things like with the coalesce expression or pattern matching for if(isNull(a), b, a) or something similar.  I have not seen too many of these types of operations show up in any traces, but it would be an interesting first step to start to explore the framework to do other types of replacements in the future.

If we want to add JNIs for them, should we put them in cudf or spark-rapids-jni?

If we want to add JNIs for them, should we put them in cudf or spark-rapids-jni?
cudf. These are cudf APIs and we are not putting anything in that is super Spark specific.


Unable to ping private IP address of instance in a different subnet

Maybe I'm doing something wrong here, but I created two instances in different tenants.  One was assigned IP address <IP_ADDRESS> and  the other <IP_ADDRESS>.  I then logged into the machine with the IP address of  <IP_ADDRESS> and tried to ping  <IP_ADDRESS>.  The ping command hung.  I also tried pinging <IP_ADDRESS> from <IP_ADDRESS> and this also failed.  Needless to say both instances were part of the same tenant.  Is this expected?  If so, I think we've got a bit of a problem as users have no control over which subnets are used as a source of their instances' IP addresses.  How can the user be certain that two instances in the same tenant will be able to communicate.

@mcastelino , @kaccardi , should this work?  Am I doing something wrong?

Or is this something that will be addressed by #1608 ?

right - it wont work right now because currently while we do launch a cnci per subnet, the cnci's can't communicate. Once PR #1608 is complete, this should work.


STR 731: Functional test RPC Behaviour when EL is down

Description

Type of Change
Adds a functional test that checks the behavior of client RPC when reth is down and ability to continue when reth is up again

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
[ ] Refactor
[x] New or updated tests
[ ] Dependency Update

Notes to Reviewers

Checklist

[x] I have performed a self-review of my code.
[x] I have commented my code where necessary.
[x] I have updated the documentation if needed.
[x] My changes do not introduce new warnings.
[x] I have added tests that prove my changes are effective or that my feature works.
[x] New and existing tests pass with my changes.

Related Issues

STR-731

Any idea why these other functional tests are failing?

Any idea why these other functional tests are failing?

Flaky run. I've manually rerun and now passes.
I suspected a flaky run when I saw the error messages.


Cannot read property 'style' of undefined (NativeBase) react native

I have this problem, since I run "npm update" in my project.
"Can not read property 'style' of undefined"
"Module AppRegistry is not a registered callable module (calling runApplication)"
Apparently occurs because "_reactNative.ViewPropTypes.style" is coming undefined
This is my dependency on the package.json
"dependencies": {
"native-base": "^2.0.13",
"react": "15.4.2",
"react-native": "0.42.2",
"react-native-drawer": "^2.3.0",
"react-native-image-picker": "^0.26.3",
"react-native-maps": "^0.13.1",
"react-native-modalbox": "^1.3.9",
"react-native-onesignal": "^3.0.3",
"react-native-redux-router": "^1.0.7",
"react-native-swipeable": "^0.4.0",
"react-native-tab-navigator": "^0.3.3",
"react-native-vector-icons": "^4.0.0",
"react-redux": "^5.0.3",
"redux": "^3.6.0",
"redux-thunk": "^2.2.0"
}

Hello! Issues with third party libraries belong on those repositories. In this case it sounds like the issue was with "NativeBase" - please re-create the issue on that repository.


BUG: Mode changing button is bot working  ion signup and login page

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
The mode changing button is not working on login and signup page when i am changing the mode then the mode actually doesn't changing .
https://github.com/anuragverma108/SwapReads/assets/118350936/861fb28b-ffa5-43a4-9129-f79166f212ee
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Issue already exists ig #1085

This issue already exists. Please check the existing issues before raising a new one. Find another issue or feature to contribute to. Thank you!


Pods Ips diferent from PodCIDR

Hi, All
I followed the tutorial, with exception of the networking (kube-router) and TLS Bootstraping.
The bridge plugin seems not be setting up the bridge-interface's ip correctly. Any suggestions?

If I setup manually networking as I suppose it should be, then I receive an error from k8s

after removing the kube-bridge's ip address

I'm not in position to support different networking backends. I provide a reference path which should work, but it'll be up to you for any other backend.


rzup: add support for cross-device toolchain copying

this resolves the Invalid cross-device link (os error 18) issue when extracting and moving toolchains by adding support for cross-device copying (rather than move) in move_toolchain. See slack for more context.

It'd be better if this was an atomic operation. Can we not move the root directory across devices in a single operation?

It'd be better if this was an atomic operation. Can we not move the root directory across devices in a single operation?

From man 2 rename
       EXDEV  oldpath  and  newpath  are not on the same mounted filesystem.  (Linux permits a
              filesystem to be mounted at multiple points, but rename() does not  work  across
              different mount points, even if the same filesystem is mounted on both.)

So a good number of linux distro's have /tmp mounted tmpfs which means the rename's will fail and can't be reliably used.

When will this be pushed to production / an installable release? I just installed rzup; I get 0.2.2, and still seem to have this issue.


onStateChange function called when selecting an item (it's supposed to call just onChange)

downshift version: 1.14.0
node version: 6.9.4
npm (or yarn) version: 1.2.1

Relevant code or config
<ClienteAutocomplete
  items={this.state.liveresult}
  onChange={selectedItem => {
  selectedItem != null &&
    this.handleOnChange(selectedItem.cliid);
  }}
  // console.log(`onChange: ${selectedItem.cliid}`)}
  itemToString={this.itemToString}
  onStateChange={changes => {
    changes.hasOwnProperty("inputValue") &&
      this.getClienteLive(changes.inputValue);
  }}
/>

// ClienteAutocomplete component
import React, { Component } from "react";
// import PropTypes from "prop-types";
import Downshift from "downshift";

let ClienteAutocomplete = ({
  items,
  onChange,
  itemToString,
  onStateChange
}) => {
  return (
    <Downshift
      onChange={onChange}
      itemToString={itemToString}
      onStateChange={onStateChange}
    >
      {({
        getInputProps,
        getButtonProps,
        getItemProps,
        isOpen,
        clearSelection,
        inputValue,
        selectedItem,
        highlightedIndex
      }) => (

          <input
            {...getInputProps({
              placeholder: "Buscar cliente..."
            })}
          />
          {selectedItem ? (
            <button {...getButtonProps()} onClick={clearSelection}>
              Limpiar
            </button>
          ) : null}
          {isOpen ? (

              {items.map((item, index) => (

                  {itemToString(item)}

                // ))
              ))}

          ) : null}

      )}
    </Downshift>
  );
};

export default ClienteAutocomplete;

What you did:
What happened: When I select an item downshift component is calling onStateChange function when it's supposed to call just onChange

Reproduction repository:

Problem description:
Suggested solution:

Hi there. This is expected behavior (unless I'm misunderstanding something). See the docs about onStateChange (emphasis mine):

This function is called anytime the internal state changes. This can be useful if you're using downshift as a "controlled" component, where you manage some or all of the state (e.g. isOpen, selectedItem, highlightedIndex, etc) and then pass it as props, rather than letting downshift control all its state itself. The parameters both take the shape of internal state ({highlightedIndex: number, inputValue: string, isOpen: boolean, selectedItem: any}) but differ slightly.

It has to be called any time internal state changes, which includes when an item is selected.
In your case, you could probably keep track of the currently selected item. Then, in onStateChange, you can check if changes.selectedItem has changed or not.
Because this is expected behavior, I'm closing this issue.


Revert microxrce prepare for saluki and fmu5x

Don't build microdds_client yet, because it breaks the micrortps_client causing it to crash.

saluki-v1 reverted commit:
https://github.com/tiiuae/saluki-v1/compare/3bdb40727da79ed918510ea028824e381ac1f1a2...c8efcb9c7a5f76b7b163c78e552700f49d2e7c6d

Modified github action to push px4-firmware flasher container image into ghcr.io, to allow to test/verify PR content before merging to master

Now at least locally built image for Pixhawk5x works


Unable to plot with 3d

hi, I am unable to plot on both the scatter and 3d. Is there a specific format to the payload?
My payload now is simply: 1,2,3
An easy example will help a lot.

For me, it throws a lot of gl-fbo: Parameters are too large for FBO errors in the console. None of the numbers on the x, y, and z axis exceed 400 as a number ...


How to use WAIT task?

Contrib module provides SQS integration where an external system can place a message in a pre-configured queue that the server listens on. As the messages arrive, they are marked as COMPLETED or FAILED.

Where to set the pre-configured queue ?  I din't find it in the code or docs, can you help me? Thanks.

The pre-configured queues are set here - https://github.com/Netflix/conductor/blob/15106380ffe69383b67352c2a9b4f5f38ddf5e31/contribs/src/main/java/com/netflix/conductor/contribs/ContribsModule.java#L82.
By default, the sqs queues are configured to conductor_sqs_notify_COMPLETED and conductor_sqs_notify_FAILED


Fix 'CachedResponse has no len()' error

Closes #694.

I cba to test this (bc I'm away from home).
But the most major flaw that I found in this PR is that it doesn't deal with the issue at hand.
This error occurs because of the package we use to cache the requests we make, requests-cache.
That package has moved a class from one place to another.
So anime-dl fails to cache any request.
To fix this we can either force the use of an older version of requests-cache or to add a try except in order to keep compatibility with both the old and new versions of requests-cache.
So what you should be looking to fix is in session.py.
There is a small chance that I'm wrong about this, but installing an older version of that package fixes this error.


Request URL replaced

I'm making a call using retrofit 2.0 (works over okhttp) (using wi-fi). I'm using base url, in example, "http://someapi.com", using annotation @POST("/api/somemethod"), then call using "call.execute()". I've got a timeoutexception and it shows me "can't connect to http://someapi.com/[IPv6 address]" (in example http://someapi.com/2001:db8:1234:0000:0000:0000:0000:0000. why didn't it calls "http://someapi.com/api/somemethod"?
P.S. All works using 3G or LTE connection
P.S. Thread on retrofit-issues: https://github.com/square/retrofit/issues/1204

In your original report, you said can't connect to http://someapi.com/[IPv6 address]. My guess is that you mistyped the error, which probably said can't connect to someapi.com/[IPv6 address] without the http:// prefix. In this case its a simple issue of an unreachable host.


Integration does not compile when OptimizelySDKiOS is version 2.0

The compiler can't find the variable OptimizelyDidActivateExperimentNotification in SEGOptimizelyXIntegration.m when the OptimizelySDKiOS library is updated to version 2.0 (https://github.com/optimizely/objective-c-sdk/releases)

temporarily fixed by https://github.com/segment-integrations/analytics-ios-integration-optimizely-x/pull/11

Hi, is this something that will be addressed? We'd like to move to version 2 of Optimizely's library

Hey @kevmalek, I would recommend implementing Optimizely X in your app using Segment's cloud mode. For this, you would simply implement the Optimizely X SDK version of your choice and enable the "Optimizely X" component in your Segment dashboard to map Segment track events to Optimizely's track method. I'd recommend this approach in general - it's a light-weight and straightforward way to send A/B test metrics to Optimizely via Segment.


#1715: Remove unsupported configurations from documentation

Removes references to unsupported operating systems in the documentation.
No testing required.

i think this one might be a whackamole situation if any other distro refrences are found. lgtm though


Added logic to push resetIdentities event to all registered modules

Description

ResetIdentities Event is now passed to registered module.
LocationHint and state:store (edge module) need to be dropped along with the ECID (identity module)

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] I have signed the Adobe Open Source CLA.
[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Can you add an additional test case which

sets the location hint and state store
calls resetIdentities
sends a network request and verifies the request does not have the location hint and state store?

Your current test is good in that it verifies the delete function is called, but you should also verify the actual value is deleted.

I will add the case for the steps you mentioned. For verifying it actually deleted, I believe stateStore and locationHint unit tests would have covered that. And can be covered in Integration tests.

Can you add an additional test case which

sets the location hint and state store
calls resetIdentities
sends a network request and verifies the request does not have the location hint and state store?

Your current test is good in that it verifies the delete function is called, but you should also verify the actual value is deleted.

For verifying it actually deleted, I believe stateStore and locationHint unit tests would have covered that. And can be covered in Integration tests. Also the case you mentioned I will cover as a part of Integration tests.


BookType Enum-Question

First off thanks Mr. @RehanSaeed for creating this library!
I've got a question about this BookTypes.
We're using this library to create structured data and when I set the
BookFormat to BookFormatType.EBook,
When it gets returned it has the value of 1. I'm going to have to explain why EBook has the value of 1 and why that's ok. Is there any documenation that you can point me to that shows 1 is a value value for EBook?
[EnumMember(Value = "http://schema.org/EBook")] EBook
Thanks! --Steve

All documentation can be found on schema.org. In your case you want https://schema.org/BookFormatType
Feel free to reopen if you have more questions.

Thank you for pointing me to the documentation.
I'd spent quite a bit of time there, before reaching out so as not to waist your time, trying to see if I could figure out how you knew that
EBook gets a value of 1, but I don't see any sort of mapping.

Well it's an enum and enum's are just integers.


When this will be GA?

Can you please provide an estimated date when this will be GA?
[Enter feedback here]

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

ID: c3c187c0-27f1-11c9-41af-6c65ca36e77e
Version Independent ID: 249a570b-90ba-4a11-4467-320f0369ec25
Content: Use Azure Active Directory pod-managed identities in Azure Kubernetes Service (Preview) - Azure Kubernetes Service
Content Source: articles/aks/use-azure-ad-pod-identity.md
Service: container-service
GitHub Login: @mlearned
Microsoft Alias: mlearned

@nitinkhandelwal26 Thank you for sharing your query! We are currently investigating and will get back to you shortly on this.

@nitinkhandelwal26 Apologies for the delay in response and all the inconvenience caused because of the issue.
I has discussion internally which took some time and got to know that the work is still in progress to bring up this feature for GA release and currently we don't have any ETA as such when it will be GA but I will keep you posted on this thread once I have an update from internal team on this.
We will now close this issue since this is something the Product Group is working on and we don't have any definite ETA for now. If there are further questions regarding this, please tag me in a comment. I will reopen it and we will continue the discussion.


server settings: Add setting for MAILING_ADDRESS.

This fails tests, I think because of the second commit.
Otherwise looks reasonable.

oops, didn't realize you were on-line :). Fixed.

Let's rename the setting to have PHYSICAL in the name, to avoid confusion with all the other "mailing" addresses that are actually email.

Updated to PHYSICAL_ADDRESS.

Merged, thanks @rishig!


Good work.

:+1:

just for fun
alternative for 'Parse selector' in h()
var selector = "div#foo.bar.boo";  //test
var props = {};  //test

var re  = /[#\.]([^#\.]+)/g;

//para mostrar las ocurrencias que se encontrarán
var cls = '';
selector = selector.replace(re, function(ch, token) {
  ch = ch[0];
  if (ch === '#') {
    props.id = token;
  } else if (ch === '.') {
    cls ? (cls += ' ' + token) : (cls = token);
  }
  return '';
});
props.className = cls;

//test...
console.log(selector);
console.log(props.id);
console.log(props.className);
//output:
//div
//foo
//bar boo

Hello
Thanks a lot for your corrections :) Great catches!
I don't know how you found this library. But since you're here let me share my goals:
1/ Clean and simple virtual DOM implementation – mostly done.
2/ Performance – (I have implemented the vdom benchmark and it looks good).
3/ Advanced hooks for implementing components – not done.

Your selector parser is really clever! And it handles when the id is not first. Like div.some#id.class. But it's a bit longer.

thanks @paldepind
yeah, the selector parser is verbose and I don't test it, but I think is fast. Benchmark it, there is only one call to replace and only work if neccesary.
Good luck.


Datetimeinput and datetimepicker together

I try to make the following with datetimeinput and datetimepicker together :

User can modify the input date without the picker (if input focus then picker is closed)
User can select the date with the picker with the bootstrap calendar icon

You can see the result http://plnkr.co/edit/dqgmTHaJbT9lnEJDbPTW?p=preview
The icon doesn't respond… What is wrong ?

I didn't look in detail, but there is no ng-app and the html for the
dropdown i not correct (see bootstrap for how to write the dropdown)  You
have one dropdown working correctly, if you add the input directive to that
dropdown it works correctly.
On Thu, Jan 28, 2016 at 4:01 AM, Incognito-Nemo<EMAIL_ADDRESS>wrote:

I try to make the following with datetimeinput and datetimepicker together
:
1 User can modify the input date without the picker (if input focus then
picker is closed)
2 User can select the date with the picker with the bootstrap calendar icon
You can see the result http://plnkrco/edit/dqgmTHaJbT9lnEJDbPTW?p=preview
The icon doesn't respond… What is wrong ?
—
Reply to this email directly or view it on GitHub
https://github.com/dalelotts/angular-bootstrap-datetimepicker/issues/268
.

There is ng-app in my plunker.
The simple date input and the simple date picker works perfectly but not together.
When the user click on the input, he must can put numbers with the keyboard. And if he wants to use the picker, he must click on the icon.
Thanks another times for your work and your help for a french guy!

You just had a few bugs in your fiddle - I fixed them.
http://plnkr.co/edit/9qbN2ztdP0H29pj2tG7h?p=preview

Thanks another time for your answer but if I use your code, the piker open when the focus is put in the input. But I want the picker open only when the user click on the icon button… and the piker close when the input is in focus...

Not really an issue with this directive. You might want to look through the documentation on bootstrap or search stack overflow.
In short, move the input out of the a tag - only wrap it around the button.

Effectively it was not really an issue… you can see the result on http://plnkr.co/edit/6I0ieIyY8PhS5JEt2cew?p=preview
Thanks for your work !


Add GitHub Action support to trigger comment based actions.

Describe the solution you'd like
GitHub Actions that can trigger comment-based actions such as "/assign", "/unassign", and "/bug" by anyone and some additional feature such as "/triage-accepted", "/priority-description" and labels that can specify which area the problem is from in Armada for maintainers.
Describe alternatives you've considered
The prow was a good alternative but due to infra issues, it is being discarded for the time being.
Additional context
Some additional context regarding this issue can be found in issue #2379.
┆Issue is synchronized with this Jira Task by Unito

I would be working on the task if it's alright with everyone.

Hey @sbdtu5498.
Are you still working on this task?

@satyampsoni I am almost done with the stuff. Had been busy with other stuffs as well.

Cool! pls Let me know if you will have any problem working on it.

Any update on this folks?

It will take some time. I have been a bit busy with some other stuff and this issue is being faced by the majority of CNCF projects. So we at TAG Contributor Strategy have thought of solving these issues by creating common templates for them. Sorry for the delays. If there is any sort of urgency let me know, I will try to prioritize those actions and put them in place.

No problem - take your time :))

Closing due to inactivity, and current project/repo contribution rate may not warrant this at this time.  A related issue at https://github.com/armadaproject/armada/issues/2379 has already been closed.


fix: When current branch doesn't exist, don't blow up

Previously, when our locally cached branch doesn't exist, things kind of blow up in the CMS.

I added a minimal error screen, but more importantly, the toolbar stays accessible (so the user can change branches and resolve the issue).
closes ENG-802

Looks good! I just added a couple icons & replaced the button with the @tinacms/toolkit button component.


Improve options & add tests

Coverage decreased (-0.2%) to 82.258% when pulling 0eefd67848a7b239e1b9d612a511ea20d20f997f on options into 30efb77cde94304a5038d9f5c3457243256616e3 on master.


resamples audio to 16000 Hz in the inference step

some code improvements like unpacking the data sequence in the for loop for better readability.

Thanks, looks good.


probable error fix

This is typo & bug i suppose.

Thank you for your contribution! Before we accept it we need you to sign our contributor agreement[1]. Please send it to<EMAIL_ADDRESS>Apologies for the inconvenience, but unfortunately we cannot avoid it.
[1] http://bluejimp.com/bca.pdf

Is it ok?

Received, thanks! Just waiting for a confirmation.

@kamenik, sorry for the hassle but could you please scan this and resend it, as the photo has text which isn't readable?

Not sure what your CLA status is. In any case, we moved to an all-electronic process and everybody is/was required to re-sign there.

@bgrozev can you please check the CLA or fix these manually?


Add logo widget

@ajpmaclean : Please review

Just add the background colour, I've had a look at the coffee for the VTK class, it only uses three doubles not an array fit the colours.

I have added the background color as suggested. Please review .

Thanks


IC SD2 from MATLAB version

Working data, I've been seeing that the IC SD2 from the MATLAB version really helps to mark out those last few periods of artifacts.
We currently only do the one pass, but it does exist in the previous.
See here.

So just to clarify. In this case:
We would run the final ICA (in our case info max).
We run flag_epochs_ic_sd on the final ICA time series, where any flagged epochs are labeled ic_sd_2
This last assessment would not have any impact on the ICA topos obv because we aren't running another ICA afterwards.
The only impact of this assessment is to flag more epochs in the raw data, with bad_pylossless_ic_sd2
Is that right?

Yep, that's right.
It's just doing an additional flagging of bad time via exactly what you outlined

Okay cool, if you'd like this step and it was in the original pipeline Im +1 for adding this extra step.
@Andesha if you'd like this feature are you up for a PR? I won't have time to implement it myself in the near future.
I think we can just re-use the flag_epoch_ic_sd or whatever it's called and place it after the final ica. We can  create a parameter like flag_label with default ic_sd1 but for this new second call we can change it to something else. This flag_label parameter should get passed in to add_pylossless_annotation
I think there are a few nested funcs that will need this new flag_label kwarg but seems do able to me.

I'll give it a try at some point - could you create it as an issue and assign it to me?

I'll give it a try at some point - could you create it as an issue and assign it to me?

Done ;)

I may be wrong, but I think this issue and #111 are related.


Add CAN event

Description
Add CAN event
Motivation and Context

Added new category event for CAN

Types of changes

[ ] Improvement (non-breaking change that improves a feature, code or algorithm)
[ ] 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 change)

Checklist:

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Signed-off-by: sjmneves<EMAIL_ADDRESS>

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


Update onenote-quickstart.md

Added note about running the command prompt / terminal as administrator for developers who are hitting this (I made the same change in the Outlook docs)

Docs Build status updates of commit cd2e7e2:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/quickstarts/onenote-quickstart.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Restore: optional --touch-affected-refs to touch refs affected by a restore

Proposal how  #1471 could be addressed, to help incremental build tools like MsBuild to detect the need to rebuild selective projects.
I'm not convinced Project.save true is the right approach though, since it could also affect the content of the project file. Maybe we should specifically add a Project.touch instead which guarantees the project file content remains exactly the same?

Project.touch sound s like a good change


Fix missing exports condition

https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition

@rsdavis can you create a new release of this, too?

This would also close #4


docs: Update SECURITY.md

New SECURITY.md vulnerability "policy".
First report vulnerabilities via a GitHub security advisory and then to the Eclipse security dashboard.
This is agreed with the Eclipse security team.

Docs in https://github.com/eclipse-tractusx/eclipse-tractusx.github.io are already updated.


Support for custom evaluators

Support for custom evaluators

Move evaluation registration out of OliveEvaluator into its own class
Evaluators are registered using both the Framework and the class name
Add "type", "type_args", "user_script" and "script_dir" to OliveEvaluationConfig to support user specific custom implementation
Remove some dead code

Checklist before requesting a review

[ ] Add unit tests for this change.
[ ] Make sure all tests can pass.
[ ] Update documents if necessary.
[x] Lint and apply fixes to your code by running lintrunner -a
[ ] Is this a user-facing change? If yes, give a description of this change to be included in the release notes.
[ ] Is this PR including examples changes? If yes, please remember to update example documentation in a follow-up PR.

(Optional) Issue link

Overall this looks good to me. Can you please fix the tests and Github warnings? Can you also add a documentation about how to use custom evaluators for advanced users?


fix: roll back to use token for Coveo search

Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the maintainers.
What Type of PR is This?

[x] Issue
[ ] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

Issue(s)

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[x] Tested Locally
[ ] Optional Screen Shoot.

Preview environment: https://ci.pr.harness.io/pr-335


move sentinel creation to ansible-init.py and look for metadata

If a packer build is run starting from an image which includes ansible-init (e.g., an “extra” build using a fatimage), then ansible-init runs during the build. This is bad because:

In the general case it may be doing things which are not appropriate to be done during build
It writes the sentinel file into the resulting image, which means booting a cluster instance using the resulting image never runs ansible-init

The desired fix is to prevent ansible-init running during a build, but the safest way of achieving that (without depending on e.g. how early  a cloud-init bootcmd option runs) is to change ansible-init so that if it finds a metadata flag (e.g. ansible_init_disable=true) it:

It exits immediately without running local playbooks or remote collections
Doesn’t write the sentinel file

@mkjpryor @bertiethorpe tested this, and we saw the expected messages come up when disabling it via metadata. So I think it's good, but I'd like an opinion please.


Notifications ducks cleanup + tests

Summary of Changes
Code cleanup in ducks/notifications and added tests for actions, reducer, and saga logic.
Tests
Added tests for actions, reducer, and saga logic in ducks/notifications.
Documentation
N/A
CheckList
Make sure you have checked all steps below to ensure a timely review.

[x] PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"

In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

[x] PR includes a summary of changes, including screenshots of any UI changes.
[x] PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
[x] In case of new functionality, my PR adds documentation that describes how to use it.

All the public python functions and the classes in the PR contain docstrings that explain what it does

[x] PR passes all tests documented in the developer guide
[x] I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message"

Codecov Report

Merging #280 into amundsen-notifications will increase coverage by 5.62%.
The diff coverage is n/a.

@@                    Coverage Diff                     @@
##           amundsen-notifications     #280      +/-   ##
==========================================================
+ Coverage                   70.16%   75.79%   +5.62%
==========================================================
  Files                         139       26     -113
  Lines                        3506     1132    -2374
  Branches                      421       94     -327
==========================================================
- Hits                         2460      858    -1602
+ Misses                       1012      246     -766
+ Partials                       34       28       -6

Impacted Files
Coverage Δ

...ication/static/js/components/common/Tabs/index.tsx

...ndsen_application/static/js/ducks/search/api/v0.ts

...ion/static/js/components/PreferencesPage/index.tsx

...mponents/PreferencesPage/PreferenceGroup/index.tsx

...ication/static/js/components/common/Flag/index.tsx

...ts/common/ResourceListItem/TableListItem/index.tsx

...sen_application/static/js/ducks/allTags/reducer.ts

...tatic/js/components/common/ScrollTracker/index.tsx

...pplication/static/js/ducks/popularTables/api/v0.ts

...static/js/components/common/ResourceList/index.tsx

... and 101 more

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 1d2c0d0...56d9c0d. Read the comment docs.


CloudEvent with no datacontenttype parsed as JSON instead of plain text

Describe the Bug
Doing a demo based on this blog to consume S3 events from Kamelet
The nodejs SDK can't handle the HTTP POST request with cloud event
Using the following code https://github.com/knative/docs/blob/main/docs/serving/samples/cloudevents/cloudevents-nodejs/index.js
Steps to Reproduce

create nodejs service
create trigger to send cloudevent from broker to nodejs service

Expected Behavior
That the cloud event is properly handle.
The knative event-display using the goland cloudevent can handle plaintext in body and missing content-type in header.
https://github.com/knative/eventing/blob/main/cmd/event_display/main.go#L59
Additional context
Try both versions of the SDK 4.0.3 and 5.0.0 same error
The input event from Camel Kamelet S3 is the following
Debug Incoming Request: {
   "headers": {
     "host": "func1.default.svc.cluster.local",
     "user-agent": "Go-http-client/1.1",
     "content-length": "11",
     "accept-encoding": "gzip",
     "ce-id": "A8A6BD24B2AE5FF-0000000000000017",
     "ce-knativearrivaltime": "2021-11-17T22:48:50.315578709Z",
     "ce-source": "source",
     "ce-specversion": "1.0",
     "ce-time": "2021-11-17T22:48:50.306Z",
     "ce-type": "org.apache.camel.event",
     "forwarded": "for=<IP_ADDRESS>;proto=http",
     "k-proxy-request": "activator",
     "traceparent": "00-0f3421c775056be4f762f87b5cee145d-5f24409ef4edc327-00",
     "x-forwarded-for": "<IP_ADDRESS>, <IP_ADDRESS>",
     "x-forwarded-proto": "http",
     "x-request-id": "13396d30-5487-46c1-9d21-b3fd675447e0"
   },
   "body": "test func1\n"
 }

The error is the following
SyntaxError: Unexpected token
  in JSON at position 11
     at JSON.parse (<anonymous>)
     at parseJSON (/opt/app-root/src/node_modules/cloudevents/dist/parsers.js:39:67)
     at JSONParser.parse (/opt/app-root/src/node_modules/cloudevents/dist/parsers.js:40:16)
     at parseBinary (/opt/app-root/src/node_modules/cloudevents/dist/message/http/index.js:166:23)
     at Object.deserialize [as toEvent] (/opt/app-root/src/node_modules/cloudevents/dist/message/http/index.js:86:20)
     at /opt/app-root/src/index.js:70:24
     at Layer.handle [as handle_request] (/opt/app-root/src/node_modules/express/lib/router/layer.js:95:5)
     at next (/opt/app-root/src/node_modules/express/lib/router/route.js:137:13)
     at Route.dispatch (/opt/app-root/src/node_modules/express/lib/router/route.js:112:3)
     at Layer.handle [as handle_request] (/opt/app-root/src/node_modules/express/lib/router/layer.js:95:5)

cc @lance

@csantanapr you are right to point out that the SDK should be able to handle this event. I will note, however, that the event itself is not valid - at least not as represented in the HTTP protocol format.
From the spec:

For some binary mode protocol bindings, this field is directly mapped to the respective protocol's content-type metadata property. Normative rules for the binary mode and the content-type metadata mapping can be found in the respective protocol

Which is basically saying, check the HTTP transport spec. Which states:

In the binary content mode, the value of the event data is placed into the HTTP request, or response, body as-is, with the datacontenttype attribute value declaring its media type in the HTTP Content-Type header; all other event attributes are mapped to HTTP headers.

In this case, the event has neither a datacontenttype attribute nor a content-type header. So, what's an SDK expected to do? We can guess, I suppose. But if we go back to the spec for guidance, the next paragraph after the one quoted above says this:

In some event formats the datacontenttype attribute MAY be omitted. For example, if a JSON format event has no datacontenttype attribute, then it is implied that the data is a JSON value conforming to the "application/json" media type. In other words: a JSON-format event with no datacontenttype is exactly equivalent to one with datacontenttype="application/json".

Which leads me to believe that the Node.js SDK is actually doing things correctly, and interpreting the incoming event as application/json. TBH, I'm not sure exactly what should happen here, as it's not very clear. I'd be interested in seeing the golang logic for figuring out what to do in this case. Are you familiar with that SDK?

@n3wscott should know what the golangsdk does in this case and able to handle it correctly.

In the mean time should we also open an issue for kamelete s3 source for not including a content type plain/text?
I'm not you even where to open the issue. I just used openshift and installed the Camel operator

Seems to me that the SDK should not be parsing the body at all - it's binary and should be passed on to the app as an array of bytes. If there was a content-type header that says it is JSON, then the SDK might try to be smart and convert it to a JSON object, but w/o that it seems like the SDK has no choice but to treat it as an array of bytes, not JSON.

TBH I can even see an argument to be made that if the content-type was JSON but the body had invalid JSON, then the SDK should still pass it along to the app 'as is'. It all depends on whether the SDK is supposed to be a pass-thru or a validator. Depending on the usecase, either might be right. A flag to control this type of thing (perhaps exposed as "always pass event as raw bytes") might be useful.

Seems to me that the SDK should not be parsing the body at all - it's binary and should be passed on to the app as an array of bytes.

I'll be willing to bet this is what the Go SDK is doing.


Broken virtual dataset with url_param (Jinja templating macro)

The virtual dataset does not save any column when a url_param is used in the query.
The query is correctly executed in the SQL Lab, but when you save the query as a virtual dataset, an error is raised in the Explore page.
How to reproduce the bug

Go to SQL Lab, and write a new query containing a url_param (needs the ENABLE_TEMPLATE_PROCESSING = True feature flag)

SELECT *
FROM "Flights"
WHERE "ORIGIN_AIRPORT" = '{{ url_param('origin_airport') }}'

Click on Save Dataset and Save & Explore
See the error, the dataset does not contain any column !

Expected results
The virtual dataset should contain columns.
Actual results
An error is raised; this makes the Jinja templating macro url_param() unusable.
Screenshots

Environment
(please complete the following information):

browser type and version: Safari, Firefox, ...
superset version: Superset 3.0.0, and Preset Cloud
any feature flags active: ENABLE_TEMPLATE_PROCESSING

Checklist

[x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[x] I have reproduced the issue with at least the latest released version of superset.
[x] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context
This is working fine on Superset 2.1.1.
This is broken on Superset 3.0.0, and Preset Cloud as well !

Quick update
There is no error anymore since 3.0.1,
and it is expected not to have the columns in the dropdown
The documentation recommends integrating Jinja templates afterwards https://preset.io/blog/intro-jinja-templating-apache-superset/


Option for Context-free and Pointer returning struct

Currently the generated values are:
func (q *Queries) BuffById(ctx context.Context, id int64) (Buff, error) {

it would be nice if there's option to set these values:
   emit_context: false
   emit_pointer: true

so it would generate something like this:
func (q *Queries) BuffById(id int64) (*Buff, error) {

Can you add use case of emit_pointer: true, please?

when the struct is large (>word size of the compiler/os/processor), it's inefficient to copy everything by value (not using pointer), copy by pointer/reference is faster.

Closing this as it's quite old and we already have emit_result_struct_pointers. To remove context from generated output I'd suggest forking and modifying sqlc-gen-go, which is just sqlc's internal codegen package extracted into an external plugin.


cli: singularity not using image cache

to reproduce:
workflow "foo" {
  resolves = "b"
}

action "a" {
  uses = "actions/bin/cli@master"
  args = ["ls -la"]
}

action "b" {
  needs = "a"
  uses = "actions/bin/cli@master"
  args = ["ls -la"]
}

singularity builds the container image from scratch for both a and b, as opposed to reusing the cache for b.

@ivotron I was trying out to reproduce this when I found that after building the container for the first time, it uses cached blobs from the next time. Please refer to this link. Here it seems like, for the first time, 25.84 Mb of data was pulled, but for the second time it was skipped because of caching.
Did I catch the issue correctly? Thanks


Create a Go API for Model Serving

Is your feature request related to a problem? Please describe.
For the Model Controller of the ODH Model Serving Operator to talk to the Model Registry  an API is required
Describe the solution you'd like
Define a Go API interface for Model Registry for

Listing registered models
Listing models by search criteria - such as by deployment, by stage, by name & version, by id.
Add deployment status to Modelversion (need to figure out what metadata with the serving team). Consider environment details here

IIUC this issue strictly depends on the OpenAPI definition (see PR https://github.com/opendatahub-io/model-registry/pull/51), once this is finalized I think it would be about generating the Go client from the defined OpenaAPI, e.g., using automated tools like Kiota. Is my understanding correct?

Based on yesterday's discussion, the issue at hand pertains to the implementation of the service layer within the Model Registry. This service layer encompasses the fundamental logic, often referred to as the core, of the Model Registry itself.
Here are some key considerations regarding this layer:

It manages domain-specific models within the Model Registry, such as the VersionedModel. This is closely tied to the internal model that will be defined as part of the OpenAPI specification (refer to the open PR).

The REST implementation and this service layer must both utilize the same internal domain-specific model. They share this common model to ensure consistency and coherence in their operations.

The service layer is responsible for translating essential core logic operations, like retrieving all versions of a model, into MLMD requests.

To accomplish this, it leverages the auto-generated MLMD gRPC client and schema objects.

A crucial aspect is the establishment of a proper mapping from the domain-specific model, such as VersionedModel, to the underlying MLMD entities, such as Context or Artifact. This mapping is essential to facilitate seamless interactions between the service layer and MLMD.

The REST implementation will rely on this service layer to carry out all its operations efficiently and effectively.

In summary, the service layer is the core component responsible for managing domain-specific models, translating logic into MLMD requests, and serving as the backbone/library for the REST implementation's operations within the Model Registry.