Fix Gifu reference on macOS

Exclude typealias if building for macOS
Fixes #16

👍

It builds under macOS, but still doesn't under Catalyst.

@kean @waltflanagan there is a new targetEnvironment thing to check for catalyst
#if !targetEnvironment(macCatalyst)
// Code to exclude from Mac.
#endif

Found here: https://developer.apple.com/documentation/uikit/mac_catalyst/creating_a_mac_version_of_your_ipad_app


With recent Deployment - open ai chat completion throws error

I built new container image in my mac using Memgpt Docker file..It was working file earlier...but the latest deployment is throwing following error
Sending request to https://api.openai.com/v1/chat/completions
response.json = {'id': 'chatcmpl-A27Vy7nwmHWEnXdSva2I1kFNCsVU8', 'object': 'chat.completion', 'created':<PHONE_NUMBER>, 'model': 'gpt-4o-2024-05-13', 'choices': [{'index': 0, 'message': {'role': 'assistant', 'content': 'Good morning, Chad! How are you feeling today?', 'refusal': None}, 'logprobs': None, 'finish_reason': 'stop'}], 'usage': {'prompt_tokens': 2425, 'completion_tokens': 12, 'total_tokens': 2437}, 'system_fingerprint': 'fp_157b3831f5'}
step() failed
user_message = <memgpt.data_types.Message object at 0xffff8469b080>
error = API call didn't return a message: id='chatcmpl-A27Vy7nwmHWEnXdSva2I1kFNCsVU8' choices=[] created=datetime.datetime(2024, 8, 31, 1, 48, 26, tzinfo=TzInfo(UTC)) model='gpt-4o-2024-05-13' system_fingerprint='fp_157b3831f5' object='chat.completion' usage=UsageStatistics(completion_tokens=12, prompt_tokens=2425, total_tokens=2437)
I am blocked on this .. really appreciate any help in this regard
thanks
lnr

I am using gpt-4o model


Start-Process - Allow redirecting output while using a verb

Summary of the new feature / enhancement
As it is, there's no way I can find to actually get output from start-process if I'm starting a process as admin.
I'd really like it if there were some functionality that would allow me to see what the program I'm starting is printing to standard out, as that includes important debug information that I cannot get otherwise.
Some proposals:

allow the use of RedirectStandardOutput and RedirectStandardError when using Verb RunAs
Allow the use of NoNewWindow when using Verb RunAs
Add the ability for the spawned powershell window to be prevented from closing so standard output can be read

Proposed technical implementation details (optional)
No response

This is unfortunately not possible as the underlying verb execution goes through ShellExecuteEx which does not expose a way way to redirect the output.

That is unfortunate.
Such is life, I understand that it'd be a massive, compatibility breaking undertaking to implement this functionality.
Thanks for the answer

From: Jordan Borean @.>
Sent: Saturday, October 5, 2024 4:56:17 PM
To: PowerShell/PowerShell @.>
Cc: Christopher Trent @.>; Author @.>
Subject: Re: [PowerShell/PowerShell] Start-Process - Allow redirecting output while using a verb (Issue #24388)
This is unfortunately is not possible as the underlying verb execution goes through ShellExecuteExhttps://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecuteexw which does not expose a way way to redirect the output.
—
Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/PowerShell/issues/24388#issuecomment-2395229947, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDWJ2MGOMNITM7NPTTAKCLDZ2B4CDAVCNFSM6AAAAABPNVGWXOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGIZDSOJUG4.
You are receiving this because you authored the thread.Message ID: @.***>


feat: allow cmake built executable to be run anywhere

Provides reasonable results to situations like #9

LGTM

could be a good idea to add a check if the 'assets' folder is present in the directory as well to be 100% sure this is correct, otherwise print/display an error prompting to check if the binary is placed in the correct place


Installing all dependencies on a virtual environment does not work - Setting the project Python Interpreter

Hi!
I'm trying to install the dependencies that ships with the project (docker/config/requirements) + additional python dependencies from dags/requirements in a venv so I can point the Python Interpreter to it, but I can't get the dependencies installed (it throws some errors related to psycopg2).
Is anyone facing the same problem or have an alternative way to set up the Python Interpreter for the project?
Kind regards.

Same here, How didi you resolve it?


[BUG] count_occurences

[BUG] count_occurences
snippet is :
from functools import reduce

def count_occurences(arr, val):
    return reduce(
        (lambda x, y: x + 1 if y == val and type(y) == type(val) else x + 0),
        arr)

count_occurences([1, 1, 2, 1, 2, 3], 1) # 3

but when I want to run that :
count_occurences([2, 1, 2, 1, 2, 3], 1)  # 2

But it returns the count_occurences is 4. A mistake has happened.
I think this code  run successfully only when the first element of list is 1 and the val is 1.
And I can't find a more pythonic code to repalce list.count()

I remember but testing it. But if you find qny solution just PR it. I am currently on my mobile so I will have to wait


Error: Program type already present

I have been successful in building the project with no errors in java or layout, but when i'm running the code, so I'm getting the error... Error: Program type already present: com.nexenio.bleindoorpositioning.ble.advertising.AdvertisingPacket..
I'm stuck here and im unable to test this application. Any help will be immensely appreciated..

Hey, thanks for checking out this project!
You are declaring multiple dependencies on this project in your build.gradle, you should remove all but one of them.
You should use implementation project(':BLE Indoor Positioning') when you are working on the demo app module. This will always re-compile the library module and you will have changes made in the library module instantly available in the app module.
You should use implementation 'com.github.neXenio:BLE-Indoor-Positioning:dev-SNAPSHOT if you are working on your own project and want the latest changes of branch (e.g. dev) from this GitHub project. Check out JitPack for details.
To get reproducible builds, you should avoid -SNAPSHOT dependencies. You can still use JitPack for that, just replace dev-SNAPSHOT with a release version name (e.g. 0.3.0) or a commit hash (e.g. a87fe8b).

Dear Mr. Schultz,
I'm extremely grateful that you responded, unfortunately I couldn't see your mail sooner because your mails were sent in my spam box that I recovered today. I implemented your suggestions and they worked, but now I'm facing new errors. The errors state that they aren't able to resolve setElevation and getTimeStamp methods. I'm attaching the screenshots below, I hope you'll respond soon..
kind regards,Khizrum
Sent from Yahoo Mail. Get the app
On Tuesday, October 2, 2018, 1:56:45 PM GMT+5, Stephan Schultz<EMAIL_ADDRESS>wrote:

Hey, thanks for checking out this project!
You are declaring multiple dependencies on this project in your build.gradle, you should remove all but one of them.
You should use implementation project(':BLE Indoor Positioning') when you are working on the demo app module. This will always re-compile the library module and you will have changes made in the library module instantly available in the app module.
You should use implementation 'com.github.neXenio:BLE-Indoor-Positioning:dev-SNAPSHOT if you are working on your own project and want the latest changes of branch (e.g. dev) from this GitHub project. Check out JitPack for details.
To get reproducible builds, you should avoid -SNAPSHOT dependencies. You can still use JitPack for that, just replace dev-SNAPSHOT with a release version name (e.g. 0.3.0) or a commit hash (e.g. a87fe8b).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

When I used the project (':BLE Indoor Positioning') dependency then the screen that I have attached popped up.... I switched on my beacon but nothing really happened... What should i do?
Sent from Yahoo Mail on Android
On Tue, Oct 2, 2018 at 1:56 PM, Stephan<EMAIL_ADDRESS>wrote:
Hey, thanks for checking out this project!
You are declaring multiple dependencies on this project in your build.gradle, you should remove all but one of them.
You should use implementation project(':BLE Indoor Positioning') when you are working on the demo app module. This will always re-compile the library module and you will have changes made in the library module instantly available in the app module.
You should use implementation 'com.github.neXenio:BLE-Indoor-Positioning:dev-SNAPSHOT if you are working on your own project and want the latest changes of branch (e.g. dev) from this GitHub project. Check out JitPack for details.
To get reproducible builds, you should avoid -SNAPSHOT dependencies. You can still use JitPack for that, just replace dev-SNAPSHOT with a release version name (e.g. 0.3.0) or a commit hash (e.g. a87fe8b).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Please create new issues for problems that are not related to this one. Also, I can't see any attachments because you responded to the GitHub notification emails instead of using the website.


Fix session name

Allow setting a specific session name and use that everywhere. This enables having other tmux (or catmux) sessions run in parallel while starting a catmux session.

I'll give this another test with a real system (probably on Sunday) and then merge this if everything works fine.


[Star Wars 5e] - Fix Sheet.json

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[x] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[x] The pull request makes changes to files in only one sub-folder.
[x] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

Changes / Description
*Chore : Change of url for the inspiration icon
*Bugfix : Fix of sheet.json

Character Sheet Info Roll20 Internal Use only.

@NorWhal A file was missing, just noticed now...


CB-20135:Turn off KMS validations / allows keys in remote AWS account

PR created for master : https://github.com/hortonworks/cloudbreak/pull/14182/files

The swagger compatibility failures are expected as per this thread : https://cloudera.slack.com/archives/CF66M7WP6/p1675094183296449


import { allDocs } from "contentlayer/generated"

app/docs/[slug]/page.tsx
import { allDocs } from "contentlayer/generated"
cannot find the 'contentlayer/generated' module or its corresponding type declaration. (ts 2307)"
I don't know why it shows me the error. I tried to install many times.

Make sure to run npm run build

Hi, Can you tell me how to get started with this repo, so I can contribute to it.

did you solve the problem? i have the same problem right now ..

I’m on Windows, and I don’t have the option to install WSL. I think the first thing you should do is run
pnpm --filter=www build docs

and then start the development with
pnpm --filter=www dev

As for Contentlayer, it absolutely refuses to work on Windows, and support is not planned.

npm run build

build is failing with
command (C:\Users\LENOVO\Desktop\shadcn\apps\www) pnpm run build exited (1)
Tasks:    0 successful, 3 total
Cached:    0 cached, 3 total
Time:    5.907s
Failed:    www#build
ERROR  run failed: command  exited (1)


Feature Request: Only show indent lines on my current code "block"

Say I have this code block
impl Location {
│ pub async fn get_by_id(id: i32) -> Result<Self, Error> {
│ │ Ok(sqlx::query_as!(Self, r#"SELECT * FROM location WHERE location_id = $1"#, id).fetch_one(&ctx.pool).await?)
│ }
}

impl Address {
│ pub async fn get_by_id(id: i32) -> Result<Self, Error> {
│ │ Ok(sqlx::query_as!(Self, r#"SELECT * FROM location WHERE location_id = $1"#, id).fetch_one(&ctx.pool).await?)
│ }█
}

Notice the cursor is in the second code block. I would hope the guides would only show under the impl Address block:
impl Location {
  pub async fn get_by_id(id: i32) -> Result<Self, Error> {
    Ok(sqlx::query_as!(Self, r#"SELECT * FROM location WHERE location_id = $1"#, id).fetch_one(&ctx.pool).await?)
  }
}

impl Address {
│ pub async fn get_by_id(id: i32) -> Result<Self, Error> {
│ │ Ok(sqlx::query_as!(Self, r#"SELECT * FROM location WHERE location_id = $1"#, id).fetch_one(&ctx.pool).await?)
│ }█
}

I think it could look cleaner

I'm not against the idea, but this would actually be pretty difficult to add with the current implementation.

Practically speaking, it seems like you are looking for twilight

Wasn't this possible in < v3 with the show_current_context = true option? I remember thats how mine used to work and I'm trying to get it to behave the same with v3 without any luck :/

No, this was never supported and still isn't.

I have a very small addition to the code that does this now, but what behavior would you want when the cursor is between the two impl blocks? Should it show indents for both or no indents at all? (My current code shows indentation blocks for everything when you are not inside any block.)

I think showing indents for everything is a fine idea. I would say make it a setting so users can choose. Thanks for doing the work on this

Ah, I just edited it to not show indents when not in a block now, since I thought that could save work too. But this could definitely be an option, though I worry adding extra options to what is already a sub-option could be confusing. I would probably want @lukas-reineke's input on how we would want this to be implemented before adding that kind of option.
If you want me to change anything (I have only briefly checked that it worked as I expected), you can try it from my latest commit here: #703
The option can be enabled by adding something like indent = { current_block_only = true } to your config when using that commit.

Your PR is already really big, let's focus on current indent first. I'm happy to add this as well, but let's make that a separate PR.
Then we can discuss there how it should work.

If you didn't see, I also asked in the PR if you prefer to have it split up. I will just split it into smaller parts tomorrow.


Replace request fails - Ambiguous BalanceTooLow Error

Describe the bug
When making a replace request without enough griefing collateral in INTR, the transaction fails with BalanceTooLow, which sounds more like the user entered an iBTC amount that is too high (at least for me)?
To Reproduce
Steps to reproduce the behavior:

Go to Vaults -> My Vault
Click on 'Replace Vault'
Enter amount and click 'Request'
The transaction will fail with the error

Expected behavior
It should show the estimated griefing collateral for replace in the UI, just like the one for issuing.
The griefing collateral should also be added to the docs (e.g. as % of USD value to be replaced).
Screenshots

Someone from the community ran into this as well - I think this should be given some priority

The UI should verify that whoever is making the request has enough griefing collateral before the user can make the transaction.


More advanced Dapr example

I'm new to Dapr (and Aspire!) so I may be missing something, but I've read everything I can find without finding an answer. I'm starting a new project using microservices and I'd like to use Aspire and Dapr (and Radius?) with the goal of easy local development and production deployment to Kubernetes. I can't find any examples that use Radius. The examples I can find using Aspire and Dapr only use pubsub and state components; there's no more detailed examples using other components such as configuration. I'm also unclear on how to provide Dapr config for production. The AspireWithDapr example in aspire-samples uses the default pubsub or state component if they exist, otherwise the config for the in-memory component is created and used. So where/when do we provide the prod config? Will configuration components be added to Aspire.Hosting.Dapr or should we use AddContainer, AddDaprComponent and a yaml config file to add them to the AppHost? I'd really appreciate any guidance on the best practice and intended workflow here. I'm happy to provide feedback as well as this is something I'm currently working on.

Hi, one place I'm struggling with in code and documentation is how to specify a dapr state store as the dapr actor state store.  Is this possible?


Storyteller button alignment

Versions with the content on the left, the text alignment is off.

the button is at screens edge
Title is to the right under picture

https://main--esri-eds--esri.aem.live/en-us/about/about-esri/overview#we-make-the-worlds-most-powerful-gis-software

@twhite313 - I will work on this issue.

@twhite313 - This issue appears to have been resolved already. Closing.


Official apollo mocking

What is your Test Scenario?
I need to mock an apollo mock
What are you suggesting?
It would be great if the testcafe team shared with us a way to mock apollo calls and a way to get mock data
see: https://stackoverflow.com/questions/59845424/mock-apollo-queries-inside-of-testcafe

Hi @MeisterTea
As far as I understand, to mock Apollo queries, you need a capability to specify an asynchronous function for the onResponse handler of the RequestMock function. This feature is not implemented - please track the https://github.com/DevExpress/testcafe/issues/4467 issue to be informed of our progress or try to implement it yourself.


Change the title color

The title Color doesn't look eye-catching. Do change it

Hey @thekavikumar I would like to work on this can you assign me this.

can i do it that  ..

can you provide the link plz..

Can I work on this issue

can you provide the link plz..

https://gallery-37066.web.app/

can it do as it .

yeah

so what do i have to change my gallery or my picture

Thanks everyone


loosen our engine version specs, to allow the same major version

https://usemechanic.slack.com/archives/CURE65U2W/p1688354837252619
@vfonic 👋

oo, #256, that's a fun number for this pr


Improvements to Consistency

o Support configuration of Consistency Feature in YML file.
o Support getting the current consistency set on the stats port.

Here is the testing details, for a conf file like this:
dyn_o_mite:
dyn_listen: <IP_ADDRESS>:8101
data_store: 0
listen: <IP_ADDRESS>:8102
dyn_seed_provider: simple_provider
servers:

<IP_ADDRESS>:22122:1
tokens: 437425602
read_consistency : dc_quorum

Here is the output on the stats (aka admin) port
sbirari@ubuntu:~/redis-3.0.0$ curl "http://localhost:22222/get_consistency"
Read Consistency: DC_QUORUM
Write Consistency: DC_ONE

Looks good to me!


User can reset password without current password

A clear and concise description of what the bug is.
Expected results
User must provide current password to reset password
Actual results
User can reset password without of current password
Screenshots
If applicable, add screenshots to help explain your problem.
How to reproduce the bug

Go to '...'
Click on '....'
Scroll down to '....'
See error

Environment
(please complete the following information):

superset version: superset version
python version: python --version
node.js version: node -v

Checklist
Make sure to follow these steps before submitting your issue - thank you!

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

Additional context
Add any other context about the problem here.

@liamnv can you provide a few more details on the bug you're reporting here?  This could be a serious security issue.  I'm relatively new to Superset but I think providing more information per the issue template would help the Superset team triage this bug.

@liamnv can you provide a few more details on the bug you're reporting here?  This could be a serious security issue.  I'm relatively new to Superset but I think providing more information per the issue template would help the Superset team triage this bug.

@lamielle I found this is an issue of Flask App Builder, I'm contributing for its here https://github.com/dpgaspar/Flask-AppBuilder/pull/1553

@lamielle I found this is an issue of Flask App Builder, I'm contributing for its here https://github.com/dpgaspar/Flask-AppBuilder/pull/1553

@dpgaspar ^^^

@dpgaspar ^^^

This is likely fixed by now, and is pretty out of date if not. If people are still encountering this in current versions (3.x) please open a new Issue or a PR to address the problem.


Setup hosting for files not in version control

Large files, such as images should not be in version control as they unnecessarily increase the size and do not benefit from version control. This will use the static hosting server on cdn.mhsengineering.club to host images.
Files are stored in a dropbox folder and published to the web using updog.co, a free donation-sponsored service. Cloudflare has been configured to aggressively cache content from this subdomain, lessening the load on updog and providing us with the same speeds as the rest of the site.
If you need write access to the dropbox folder to add or remove content please contact me so I can share it with you. We have 2 GB of space to add content.

The banner is definitely loading faster for me now.  Waiting for CI to pass so I can press the big green button.


nconf.file merges don't work correctly

2 problems:

nconf.file defaults operate in the wrong order. You can see in this list below that the chain of overriding goes from top to bottom; the things listed higher up override the ones lower down. The nconf.file one operates in the reverse order, however. I had to swap those two lines to get this to work correctly in my app.

If the first file listed is missing, it will delete all config, causing the defaults to be what gets selected. This is bad. Instead it should just not change any config.

nconf
  .argv()
  .env()
  .file({file: "#{process.env.HOME}/.groovebasinrc"})
  .file({file: "/etc/groovebasinrc"})
  .defaults
    log_level: 3
    http:
      port: 80
    mpd:
      host: 'localhost'
      port: 6600
      conf: "/etc/mpd.conf"

I remember being burned by this as well.  This scenario is not well documented, and perhaps an update should be made since I am not the only one who expected the library to work the way your sample is written.
Anyway, the way things currently stand...
You can only use each of the convenience (argv, env, file, defaults, overrides) methods once because each uses it's name as the key for the config store.  If you want to use multiple files, you need to add them like this:
var conf = require('nconf');
conf.add('env-file', {type: 'file', file: path.join(path.resolve(__dirname, '../config'), (conf.get('NODE_ENV') || 'development') + '.json')});
conf.add('default-file', {type: 'file', file: path.resolve(__dirname, '../config/default.json')});

The important part is giving the config store a unique key, which is the first argument passed to add.
I'm surprised this issue sat for a month without a response.  What's up, @flatiron ? @indexzero ? @mmalecki ?  Is this lib being maintained?

@jstewmon Yes. It is. Unfortunately life can't be all open-source maintenance all the time =D

@jstewmon A pull-request to fix this issue would make you a hero in my book.

Fwiw, I solved this problem by deploying my app with npm and using npm's
built-in config framework.

@indexzero  Watch out - that commit has that showHelp change in it too.  Did you ever put that elsewhere?  I'd like to align my master with flatiron, but I'm using that feature in a project.


Switched from exp to non-exp apiVersion for azure MachinePools

Towards: https://github.com/giantswarm/giantswarm/issues/22631
This PR fixes kubectl gs get nodepool command for azure clusters >= 17.1.0.
And breaks if for clusters < 17.1.0 (currently  clusters)

As the creator of a pull request, please consider:

[x] Describe the goal you are trying to accomplish here, above the line.
[x] Add a user-friendly description of your change to CHANGELOG.md.
[x] Provide a link to the issue you are solving or working towards, if available.
[ ] Request SIG UX for review. They care about almost all user-facing changes.
[ ] Update the public kubectl-gs documentation to reflect the changes here.
[ ] add the breaking-change label to the PR if the change you are making changes the existing behaviour. Examples: removal of a flag, removal of a command, change of a default value. (Such changes should be released with a major version bump.)

Feel free to remove this checklist when done.

@giantswarm/team-rainbow go tests are passing locally and failing on circle CI. Can you please help?

And breaks if for clusters < 17.1.0 (currently clusters)

Could you please clarify this a bit more?

@marians are you ok with me merging this PR?

@whites11 I'm worried about breaking functionality for users. Normally we would try to adapt the implementation to work with both old and new clusters. I can't judge the impact though, as I don't know what percentage is still older than 17.1.0.


WIP : Feat/ramda latest assoc and assoc path mixed source object

I see that some definitions have not been formatted by prettier yet and ran that over the latest ramda definitions in the first commit with the command:
node_modules/.bin/prettier --write npm/ramda_v0.x.x/flow_v0.39.x-/*
This change allows for mixed types in the source object and using assoc and assocPath to update such a source without flow errors.

@mwalkerwells I see your name for the commit that introduced the test that fails with the changes introduced in this commit:
//$ExpectError
const a1:{[k:string]:number|boolean} = _.assoc('c', 's', { a: 1, b: 2 })

What I would like to have is a Map that has different values in different keys, like this:
const mixedA: { x: { [string]: number }, y: Array<string> } = _.assoc(
  "x",
  { x1: 11 },
  { y: ["y1"] }
);

Is there any reason to demand that the Map is "homogenous" types and not allow for the example above?

@marudor any thoughts on this?

seeing other MRs be accepted, guessing triage includes failed tests; removed the $ExpectError test that does not fail as this change allows for mixed values in an object.

thanks @marudor
@mwalkerwells if you do have some thoughts on this at a later time, I'm open to hear them


Problem: hax does not report the actual drive status in nvec reply

It is important to send actual device status to any motr process
(server/client) joining the cluster in reply to a nvec request.
Hax is replying drive and sdev status as M0_NC_ONLINE by default
instead of fetching the status from Consul KV.
This may lead to notifying the wrong device status to motr process
and cause further failures during IO.
Solution:
Fetch drive and sdev statuses from Consul KV to reply to the nvec
request.
Signed-off-by: Mandar Sawant<EMAIL_ADDRESS>

Stopped/failed a node,
[root@ssc-vm-1623:root] hctl status -d
Data pool:
    # fid name
    0x6f00000000000001:0x6c 'pool_0'
Profile:
    # fid name: pool(s)
    0x7000000000000001:0xa7 'default': 'pool_0' None None
Services:
    ssc-vm-1624.colo.seagate.com
    [started]  hax        0x7200000000000001:0x29  <IP_ADDRESS>@tcp:12345:1:1
    [started]  confd      0x7200000000000001:0x2c  <IP_ADDRESS>@tcp:12345:2:1
    [started]  ioservice  0x7200000000000001:0x2f  <IP_ADDRESS>@tcp:12345:2:2
    [started]  s3server   0x7200000000000001:0x40  <IP_ADDRESS>@tcp:12345:3:1
    [unknown]  m0_client  0x7200000000000001:0x43  <IP_ADDRESS>@tcp:12345:4:1
    [unknown]  m0_client  0x7200000000000001:0x46  <IP_ADDRESS>@tcp:12345:4:2
    ssc-vm-1623.colo.seagate.com  (RC)
    [started]  hax        0x7200000000000001:0x6   <IP_ADDRESS>@tcp:12345:1:1
    [started]  confd      0x7200000000000001:0x9   <IP_ADDRESS>@tcp:12345:2:1
    [started]  ioservice  0x7200000000000001:0xc   <IP_ADDRESS>@tcp:12345:2:2
    [started]  s3server   0x7200000000000001:0x1d  <IP_ADDRESS>@tcp:12345:3:1
    [unknown]  m0_client  0x7200000000000001:0x20  <IP_ADDRESS>@tcp:12345:4:1
    [unknown]  m0_client  0x7200000000000001:0x23  <IP_ADDRESS>@tcp:12345:4:2
    ssc-vm-1625.colo.seagate.com
    [unknown]  hax        0x7200000000000001:0x4c  <IP_ADDRESS>@tcp:12345:1:1
    [unknown]  confd      0x7200000000000001:0x4f  <IP_ADDRESS>@tcp:12345:2:1
    [unknown]  ioservice  0x7200000000000001:0x52  <IP_ADDRESS>@tcp:12345:2:2
    [unknown]  s3server   0x7200000000000001:0x63  <IP_ADDRESS>@tcp:12345:3:1
    [unknown]  m0_client  0x7200000000000001:0x66  <IP_ADDRESS>@tcp:12345:4:1
    [unknown]  m0_client  0x7200000000000001:0x69  <IP_ADDRESS>@tcp:12345:4:2
Devices:
    ssc-vm-1624.colo.seagate.com
    [online]  /dev/sdb
    [online]  /dev/sdc
    [online]  /dev/sdd
    [online]  /dev/sde
    [online]  /dev/null
    ssc-vm-1623.colo.seagate.com
    [online]  /dev/null
    [online]  /dev/sdc
    [online]  /dev/sdd
    [online]  /dev/sde
    [online]  /dev/sdb
    ssc-vm-1625.colo.seagate.com
    [offline]  /dev/sdb
    [offline]  /dev/sdc
    [offline]  /dev/sdd
    [offline]  /dev/sde
    [offline]  /dev/null

m0client join still fails because Node, controller and enclosure failures for the failed node are not part of the nvec reply, thus client tries to connect to the failed node.
[root@ssc-vm-1623:root] m0client -l '<IP_ADDRESS>@tcp:12345:4:1' -H '<IP_ADDRESS>@tcp:12345:1:1' -p '<0x7000000000000001:0xa7>' -P '<0x7200000000000001:0x20>'
motr[61985]:  e890  ERROR  [rpc/frmops.c:474:item_done]  packet 0x7f9e08046950, item 0x7f9e08207690[32] failed with ri_error=-5
motr[61985]:  e890  ERROR  [rpc/frmops.c:474:item_done]  packet 0x7f9e08046950, item 0x7f9e0883c1a0[32] failed with ri_error=-5
motr[61985]:  e890  ERROR  [rpc/frmops.c:474:item_done]  packet 0x7f9e08046950, item 0x7f9e08207690[32] failed with ri_error=-5
motr[61985]:  e890  ERROR  [rpc/frmops.c:474:item_done]  packet 0x7f9e08046950, item 0x7f9e08207690[32] failed with ri_error=-5
motr[61985]:  e890  ERROR  [rpc/frmops.c:474:item_done]  packet 0x7f9e08046950, item 0x7f9e0883c1a0[32] failed with ri_error=-5
motr[61985]:  e890  ERROR  [rpc/frmops.c:474:item_done]  packet 0x7f9e08046950, item 0x7f9e08207690[32] failed with ri_error=-5
motr[61985]:  e890  ERROR  [rpc/frmops.c:474:item_done]  packet 0x7f9e08046950, item 0x7f9e08207690[32] failed with ri_error=-5
motr[61985]:  e890  ERROR  [rpc/frmops.c:474:item_done]  packet 0x7f9e08046950, item 0x7f9e08207690[32] failed with ri_error=-5

From m0trace file of a m0client,
6680488  3943710.042.626362  87f79d0  CALL    rpc/item.c:1141:m0_rpc_item_send                    > 0x7f9e08207690 [REQUEST/M0_RPC_CONN_ESTABLISH_OPCODE(32)] dest_ep=10.230..250.48@tcp:12345:2:2 ri_session=0x2346570 ri_nr_sent_max=1 ri_deadline=0 ri_nr_sent=0

ssc-vm-1625.colo.seagate.com
    [unknown]  hax        0x7200000000000001:0x4c  <IP_ADDRESS>@tcp:12345:1:1
    [unknown]  confd      0x7200000000000001:0x4f  <IP_ADDRESS>@tcp:12345:2:1
    [unknown]  ioservice  0x7200000000000001:0x52  <IP_ADDRESS>@tcp:12345:2:2

But nvec reply looks to be having appropriate drive status,
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,138 [DEBUG] {qconsumer-1} Got HaNvecGetEvent(group=476, hax_msg=140096875115648, nvec=[HaNJul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,138 [DEBUG] {qconsumer-1} Preparing the reply for HaNvecGetEvent (nvec size = 159)
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,145 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x8c state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,151 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x5b state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,156 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x59 state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,162 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x57 state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,168 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x55 state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,173 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x8a state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,179 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x38 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,185 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x36 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,190 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x34 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,195 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x32 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,201 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x88 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,206 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x15 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,215 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x13 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,222 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x11 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,229 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0xf state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,234 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x8c state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,238 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x5b state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,241 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x59 state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,245 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x57 state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,249 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x55 state=offline
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,527 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x8a state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,530 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x38 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,533 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x36 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,537 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x34 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,540 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x32 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,836 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x88 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,839 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x15 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,842 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x13 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,846 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0x11 state=online
Jul 20 11:22:54 ssc-vm-1623.colo.seagate.com hare-hax[124913]: 2021-07-20 11:22:54,849 [DEBUG] {qconsumer-1} Sdev=0x6400000000000001:0xf state=online
Jul 20 11:22:55 ssc-vm-1623.colo.seagate.com hare-hax[124913]: motr[124913]:  c2a0   WARN  [ha/halon/interface.c:1111:m0_halon_interface_send]  hl=0x7f6ad878bac0 ep=<IP_ADDRESS>.51@tcp:12345:4:1 epoch=0 tag=3 type=2


What is proper way to set an initial value on TextField component?

The component does not have setter for initial input value.
Setting input via javascript DOM manipulation works but  the floating label does not float to the top.  Inspecting the input I see that "mdc-textfield--upgraded" would need to be added to the containing div to make DOM manipulation work.
However it would probably be better to add a setter of initial value directly on TextField component similar to the "checked" getter/setter provided for Checkbox component.

hi!
For setting the input value please use value='test here' as it directly applies to the input.
As far as floating label is concerned, it is a valid bug, will fix it in the next update.

Thanks for the quick response...I tried setting value as well.  Had the
same issue.  The issue may have something to do with the shadow dom.
On Sun, Jun 4, 2017 at 10:09 PM, Prateek Bhatnagar<EMAIL_ADDRESS>
wrote:

hi!
For setting the input value please use value='test here' as it directly
applies to the input.
As far as floating label is concerned, it is a valid bug, will fix it in
the next update.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/prateekbh/preact-material-components/issues/145#issuecomment-306086778,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADX8A2acLVME-zsD0MqdMylClDa_TWYfks5sA2NygaJpZM4NvhvJ
.

@kbrownhbs are you using any form of web components?
cuz react-material-components does not have anything to do with shadow dom.

No I'm not using web components.  Just saw something in Chrome dev tools that led me to think shadow was being used by your components...my prior statement was likely inaccurate, as I don't know much about web components.

Thanks a lot...will you be updating NPM shortly with a new release?
On Mon, Jun 5, 2017 at 2:22 AM, Prateek Bhatnagar<EMAIL_ADDRESS>wrote:

Closed #145
https://github.com/prateekbh/preact-material-components/issues/145 via
#142 https://github.com/prateekbh/preact-material-components/pull/142.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/prateekbh/preact-material-components/issues/145#event-1109484896,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADX8A3RYm6kRnkneAXajK1ghGnn3ObUoks5sA566gaJpZM4NvhvJ
.

yeah will do it in a day or two...

Verified linear progress addressed #145.
Your fix worked like a charm.  Thanks!

just released the new package 😄
thanks for using preact-material-component


Bug or feature? "toggle_after “ in function node payload

Hello,
Thanks for a very useful node!
One issue I see is that the node appears to act in an unintended way when using the
"toggle_after “ function in the node payload. I might be misunderstanding the intended functionality
but here is an example:
If I want to set a Shelly 1PM plus relay to switch off and then switch back on after X secs (very important feature in my work)
This is the code that this node red flow example suggest we use:
msg.payload = {
    id : 0,
    on : false,
    toggle_after : 2
};
return msg;

This will indeed switch the relay off, as indicated but will not switch it back on after 2 secs.
If I however send the payload again when the relay is off, it will switch back on.
This seems wrong but please let me know if I am misunderstanding something or if this is a a bug?
The Shelly 1pM plus I am testing with has firmware 0.10.0 and the node is 7.1.0
Many thanks.

Hm I just send that flag to the shelly … I will try to reproduce it.

Hm I just send that flag to the shelly … I will try to reproduce it.

Great, thanks @windkh
I look forward to your reply. Let me know if I can test something. Many thanks!

@houser42 it works in both directions on --> off after 2s and off --> on after 2s
I tested it using this flow
[{"id":"7899c86207400f26","type":"debug","z":"f45ce90b3151803b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":440,"wires":[]},{"id":"9d972196920e1ce5","type":"function","z":"f45ce90b3151803b","name":"0 on","func":"msg.payload = {\n    id : 0,\n    on : true,\n    toggle_after : 2 // optional flip back time in seconds\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":440,"wires":[["2c6bffe0d8827f5f"]]},{"id":"3b2db8394dc6ea85","type":"function","z":"f45ce90b3151803b","name":"0 off","func":"msg.payload = {\n    id : 0, \n    on : false,\n    toggle_after : 2 // optional flip back time in seconds\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":500,"wires":[["2c6bffe0d8827f5f"]]},{"id":"72b2ecfbb65b923b","type":"inject","z":"f45ce90b3151803b","name":"Turn On","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":204.99413108825684,"y":440.193359375,"wires":[["9d972196920e1ce5"]]},{"id":"2972b780145b01f1","type":"inject","z":"f45ce90b3151803b","name":"Turn Off","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":500,"wires":[["3b2db8394dc6ea85"]]},{"id":"5aa54bfb2f16f55c","type":"inject","z":"f45ce90b3151803b","name":"Poll Status","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":380,"wires":[["2c6bffe0d8827f5f"]]},{"id":"2fdb598c3a9f0e8e","type":"function","z":"f45ce90b3151803b","name":"0 toggle","func":"msg.payload = {\n    id : 0, \n    method: "Switch.Toggle"\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":560,"wires":[["2c6bffe0d8827f5f"]]},{"id":"1597a10879f722a3","type":"inject","z":"f45ce90b3151803b","name":"Toggle","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":560,"wires":[["2fdb598c3a9f0e8e"]]},{"id":"2c6bffe0d8827f5f","type":"shelly-gen2","z":"f45ce90b3151803b","hostname":"<IP_ADDRESS>","description":"","pollinginterval":5000,"pollstatus":false,"getstatusoncommand":true,"devicetype":"Relay","outputs":1,"x":530,"y":440,"wires":[["7899c86207400f26"]]}]

@houser42 did you check if the latest firmware is used. What version of the nodes do you use?

Hello @windkh
As mentioned, I have the latest versions of either. 7.1.0 of the node and 0.10.0 of the Shelly 1 PM plus relay.
I tried to test your flow but it its giving me an error when attempting to import into Node Red.
"SyntaxError: JSON Parse error: Expected '}
I am unable to figure out how to fix the formatting.
Would love to test it!
This is what JSON formatter gives:
Error: Parse error on line 104: ... : 0, \n method: "	Switch.Toggle "\n};\ ----------------------^ Expecting 'EOF', '}', ':', ',', ']', got 'undefined'

flows.zip
I had to zip it as github refused the file extension

Thanks @windkh
Yes, that works here also. Many thanks!
Must have been something wrong with the flow I used.
May I also ask if it is possible to use flip back on and flip back off after x secs.  rather than toggle with this node? As you can withMQTT.
If so what is the suggested payload? There is no example here that I can see? Many thanks again.

@houser42 hm… to be honest I do not know how the API calls interfere with MQTT as I never used it in both ways at the same time

Thanks again @windkh
I would also prefer to only use your node..
The only thing missing for my purposes is the ability to be able to override an auto on set on the relay with a
temporary one called in a payload for something like a reboot. I hope that makes sense.
The shelly API is very decent but a little confusing at times. That is why your node is very attractive to me at least.
Many thanks again.

I am not sure if got your point. What do you mean with "auto on set" ???
The setting that controls how the switch should be set when powering up??? on, off, last mode?

Yes, @windkh  sorry for being unclear.
I am using the shelly relays in a purely off-grid scenario to save power via automations.
I would like to be able to do a remote 10 sec. reboot of one Shelly 1 PM plus that also has an "auto on in 8 hours"
setting for security purposes. A bit esoteric perhaps, but that is why I am here ;)

can you send me the json that is returned for http://yours-witch-ip-here/settings?
Just to see how you configured your shelly

I am not at the remote site now, so not sure I can get that information  for you
unless I can get it from the node red install, as I have remote access to that.
But there is nothing special with the Shelly 1PM Plus, apart from that it is, as I am sure you are aware
a Gen 2 device. Standard MQTT setup and other than that the only thingI have changed  is an 8 hour auto-on
which means it will always switch on after 8 hours.

Hello,
I just updated to your new 7.2.0 version that says it has support for changing the cofiguration
via payloads to the node. Does this help with my issues by any chance?
The docs do not reflect this at this time, which is understandable. Juste very curious?
Many thanks!

Right now this is only implemented for gen1 devices…I will add support for gen2…soon

Great to hear! Thanks for your time and patience!

Just so I understand what the intended functionality is for this node in this regard?
Can we expect:

to be able to have an auto-on timer always set on the relay that is,for example 8 hours.
and also at the same time as that is set, be able to do a 10 sec reboot that overrides the auto-on timer?
Your node only preferred but any combination of node and MQTT payloads is ok.
This is the MQTT payload I am trying if that helps:
var newMsg =  {"topic":"shellyplus1pm-xxxxxx/rpc","payload":{"id":123, "src":"user_1", "method":"Switch.Set", "params":{"id":0,"on":false, "auto_on": true, "auto_on_delay":5}}} return newMsg;
This switches of the Shelly, but does not come back on.
Grateful for a comment when you have a moment. Many thanks.

I reworked the rpc protocol for shelly gen 2 switch. Please have a look at the new example for shelly plus in version 8.0.0

Yes, this appears to be a great improvement and works pretty much as at least I had expected.
In my tests I am using the new 8.0 version of your node and the standard new 0.10.1 firmware on a Shelly 1PM plus that was also new.

Now, when first setting a timer on the device itself, in my case 8 hours
Sending the commands in your gen 2 example will override with a 2 sec toggle flip back on. This is great and is close to what I wanted.
With the 0.10.1 firmware on the Shelly it I also reflected in the webgui.

I prefer the discrete auto on, as the toggle command might accidentally turn the device off if one is not careful.
This also works as expected after updating the Shelly to 0.10.1

Many thanks for this.

Edit: One thing that could maybe be even better that is probably for the Shelly developers to look at rather than you:
Should the webgui not updated by the Set Config payloads?
As it is now it is a little confusing:

If we set the Auto On timer in the webgui, it will count down in the web gui
regardless if the Shelly is switched off via the webgui or your node commands.
like so:

However, if the Auto On timer in the webgui is not set, it will still behave exactly the same with the payloads sent to your node, , but the webgui will not say anything about what is going on. Not ideal. But workable. Many thanks!

Hello,
If you would be so kind to have look at the attached flow some time when you have a moment I would really appreciate it.
This flow works but is a bit of a hack and I would appreciate a hint or two of how you would do this to optimise it
as your Shelly node is the master state in the flow, but it also needs to have two more switches wired in parallel, one for Home kit and one for the Node red dashboard. All serve to switch the Shelly the same way.
A physical moment switch at the shelly and the two soft switches should reflect a change anywhere between the three of them, yet not create a loop. I am unable to come up with a clean and robust solution. But again, this appears to work, so is perhaps a half-decent way to show why I am trying to do..
Can you suggest a cleaner and more robust way of doing this by any chance, optimised for your new Shelly node?
Many thanks regardless!
[     {         "id": "bd02da3896c29e8e",         "type": "group",         "z": "eef618ccc6e2ee8c",         "name": "",         "style": {             "fill": "#c8e7a7",             "label": true         },         "nodes": [             "6cf1745b3ff6c936",             "4af867cdef1fe329",             "471bab8f3e6f3ee5",             "2d525d44e40f0620",             "7474a3430fe26c3b",             "fc59cc75739f647e",             "275e3477b122dccb",             "d51fad32e4e06e01",             "9d8303659e2b8c88",             "1ba86a8a37c44aad",             "4a56db0a0217c071",             "bee423ae8e3b77bd",             "ee6fb4a6d08475c3",             "06ddbd6bdb128515",             "1d06c797a0da1a3a",             "9f7eb3b869ac7d8a",             "24ffd3e970e86e62",             "8347e45955618064",             "56b25b4442efe183",             "7724b8fa22901271"         ],         "x": 74,         "y": 119,         "w": 1192,         "h": 522     },     {         "id": "6cf1745b3ff6c936",         "type": "homekit-service",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "isParent": true,         "hostType": "0",         "bridge": "1d2439381726168b",         "accessoryId": "",         "parentService": "",         "name": "Switch 3 - Homekit",         "serviceName": "Switch",         "topic": "",         "filter": false,         "manufacturer": "NRCHKB",         "model": "1.3.6",         "serialNo": "Default Serial Number",         "firmwareRev": "1.3.6",         "hardwareRev": "1.3.6",         "softwareRev": "1.3.6",         "cameraConfigVideoProcessor": "ffmpeg",         "cameraConfigSource": "",         "cameraConfigStillImageSource": "",         "cameraConfigMaxStreams": 2,         "cameraConfigMaxWidth": 1280,         "cameraConfigMaxHeight": 720,         "cameraConfigMaxFPS": 10,         "cameraConfigMaxBitrate": 300,         "cameraConfigVideoCodec": "libx264",         "cameraConfigAudioCodec": "libfdk_aac",         "cameraConfigAudio": false,         "cameraConfigPacketSize": 1316,         "cameraConfigVerticalFlip": false,         "cameraConfigHorizontalFlip": false,         "cameraConfigMapVideo": "0:0",         "cameraConfigMapAudio": "0:1",         "cameraConfigVideoFilter": "scale=1280:720",         "cameraConfigAdditionalCommandLine": "-tune zerolatency",         "cameraConfigDebug": false,         "cameraConfigSnapshotOutput": "disabled",         "cameraConfigInterfaceName": "",         "characteristicProperties": "{}",         "waitForSetupMsg": false,         "outputs": 2,         "x": 810,         "y": 440,         "wires": [             [                 "4af867cdef1fe329",                 "7474a3430fe26c3b",                 "8347e45955618064"             ],             []         ]     },     {         "id": "4af867cdef1fe329",         "type": "ui_switch",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "Switch 2 - NR Dash",         "label": "Switch 2 - NR Dash",         "tooltip": "",         "group": "e48e8a33f9fc6cf2",         "order": 1,         "width": 7,         "height": 1,         "passthru": true,         "decouple": "false",         "topic": "payload",         "topicType": "msg",         "style": "",         "onvalue": "{\"On\":true}",         "onvalueType": "json",         "onicon": "",         "oncolor": "",         "offvalue": "{\"On\":false}",         "offvalueType": "json",         "officon": "",         "offcolor": "",         "animate": true,         "className": "",         "x": 820,         "y": 380,         "wires": [             [                 "6cf1745b3ff6c936",                 "56b25b4442efe183"             ]         ]     },     {         "id": "471bab8f3e6f3ee5",         "type": "shelly-gen2",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "hostname": "<IP_ADDRESS>",         "description": "Switch 1 Shelly",         "pollinginterval": 5000,         "pollstatus": true,         "getstatusoncommand": true,         "devicetype": "Relay",         "outputs": 1,         "credentials": {             "username": "",             "password": ""         },         "x": 500,         "y": 500,         "wires": [             [                 "275e3477b122dccb",                 "7724b8fa22901271"             ]         ]     },     {         "id": "2d525d44e40f0620",         "type": "switch",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "split",         "property": "payload",         "propertyType": "msg",         "rules": [             {                 "t": "eq",                 "v": "{\"On\":true}",                 "vt": "str"             },             {                 "t": "eq",                 "v": "{\"On\":false}",                 "vt": "str"             }         ],         "checkall": "true",         "repair": false,         "outputs": 2,         "x": 250,         "y": 320,         "wires": [             [                 "9d8303659e2b8c88"             ],             [                 "4a56db0a0217c071"             ]         ]     },     {         "id": "7474a3430fe26c3b",         "type": "delay",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "",         "pauseType": "rate",         "timeout": "5",         "timeoutUnits": "seconds",         "rate": "1",         "nbRateUnits": "5",         "rateUnits": "second",         "randomFirst": "1",         "randomLast": "5",         "randomUnits": "seconds",         "drop": true,         "allowrate": false,         "outputs": 1,         "x": 180,         "y": 500,         "wires": [             [                 "fc59cc75739f647e"             ]         ]     },     {         "id": "fc59cc75739f647e",         "type": "json",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "",         "property": "payload",         "action": "",         "pretty": false,         "x": 250,         "y": 360,         "wires": [             [                 "2d525d44e40f0620"             ]         ]     },     {         "id": "275e3477b122dccb",         "type": "json",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "",         "property": "payload",         "action": "",         "pretty": false,         "x": 770,         "y": 220,         "wires": [             [                 "bee423ae8e3b77bd"             ]         ]     },     {         "id": "d51fad32e4e06e01",         "type": "inject",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "Turn On",         "props": [             {                 "p": "payload",                 "v": "",                 "vt": "date"             },             {                 "p": "topic",                 "v": "",                 "vt": "str"             }         ],         "repeat": "",         "crontab": "",         "once": false,         "onceDelay": 0.1,         "topic": "",         "payload": "",         "payloadType": "date",         "x": 490,         "y": 220,         "wires": [             [                 "9d8303659e2b8c88"             ]         ]     },     {         "id": "9d8303659e2b8c88",         "type": "function",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "0 on",         "func": "msg.payload = {\n    method: \"Switch.Set\",\n    parameters : {\n        id : 0,\n        on : true,\n        // toggle_after : 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",         "outputs": 1,         "noerr": 0,         "initialize": "",         "finalize": "",         "libs": [],         "x": 490,         "y": 260,         "wires": [             [                 "471bab8f3e6f3ee5"             ]         ]     },     {         "id": "1ba86a8a37c44aad",         "type": "inject",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "Turn Off",         "repeat": "",         "crontab": "",         "once": false,         "onceDelay": 0.1,         "topic": "",         "payload": "",         "payloadType": "date",         "x": 490,         "y": 300,         "wires": [             [                 "4a56db0a0217c071"             ]         ]     },     {         "id": "4a56db0a0217c071",         "type": "function",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "0 off",         "func": "msg.payload = {\n    method: \"Switch.Set\",\n    parameters : {\n        id : 0,\n        on : false,\n        // toggle_after : 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",         "outputs": 1,         "noerr": 0,         "initialize": "",         "finalize": "",         "libs": [],         "x": 490,         "y": 340,         "wires": [             [                 "471bab8f3e6f3ee5"             ]         ]     },     {         "id": "bee423ae8e3b77bd",         "type": "switch",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "",         "property": "payload",         "propertyType": "msg",         "rules": [             {                 "t": "cont",                 "v": "output\":true",                 "vt": "str"             },             {                 "t": "cont",                 "v": "output\":false",                 "vt": "str"             }         ],         "checkall": "true",         "repair": false,         "outputs": 2,         "x": 770,         "y": 260,         "wires": [             [                 "ee6fb4a6d08475c3"             ],             [                 "06ddbd6bdb128515"             ]         ]     },     {         "id": "ee6fb4a6d08475c3",         "type": "ui_button",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "{\"On\":true}",         "group": "e48e8a33f9fc6cf2",         "order": 14,         "width": 0,         "height": 0,         "passthru": true,         "label": "{\"On\":true}",         "tooltip": "",         "color": "",         "bgcolor": "",         "className": "",         "icon": "",         "payload": "{\"On\":true}",         "payloadType": "json",         "topic": "topic",         "topicType": "msg",         "x": 790,         "y": 300,         "wires": [             [                 "4af867cdef1fe329"             ]         ]     },     {         "id": "06ddbd6bdb128515",         "type": "ui_button",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "{\"On\":false}",         "group": "e48e8a33f9fc6cf2",         "order": 14,         "width": 0,         "height": 0,         "passthru": true,         "label": "{\"On\":false}",         "tooltip": "",         "color": "",         "bgcolor": "",         "className": "",         "icon": "",         "payload": "{\"On\":false}",         "payloadType": "json",         "topic": "topic",         "topicType": "msg",         "x": 790,         "y": 340,         "wires": [             [                 "4af867cdef1fe329"             ]         ]     },     {         "id": "1d06c797a0da1a3a",         "type": "comment",         "z": "eef618ccc6e2ee8c",         "g": "bd02da3896c29e8e",         "name": "3 switches in parallell. Each switch needs to be able to switch on and off and the other two switches need to reflect changes.


DynamicDocumentSerializer doesn't include embedded field

class MyModel2(mongoengine.EmbeddedDocument):
     sn = mongoengine.StringField()
     # more fields

class MyModel(mongoengine.DynamicDocument):
    field1 = mongoengine.StringField(unique=True)
    field2 = mongoengine.DateTimeField()
    field3 = mongoengine.BooleanField()
    field4 = mongoengine.EmbeddedDocumentField(MyModel2)

and here is the serializer
from rest_framework_mongoengine.serializers import DynamicDocumentSerializer

class MyModelSerializer(DynamicDocumentSerializer):
    class Meta:
        model = MyModel
        fields = ('field1', 'field4')

and view
class myListAPI(generics.ListAPIView):
     model = MyModel
     serializer_class = MyModelSerializer
     queryset = MyModel.objects.all()

but in this api returns only field1, field2, field3. even after explicitly mentioning the field4.
PS: I'm using
django-rest-framework-mongoengine==3.3.0
mongoengine==0.10.5

I believe, you need to explicitly define MyModel2Serializer and declare it as a field on MyModelSerializer:
class MyModel2Serializer(EmbeddedDocumentSerializer):
    class Meta:
        model = MyModel2

class MyModelSerializer(DynamicDocumentSerializer):
    field4 = MyModel2Serializer()

    class Meta:
        model = MyModel
        fields = ('field1', 'field4')

I've written a unit-test for your case and it is partially successful (though, fails for create() and update() methods, which should be sorted-out).

@gjain0 Could you try pulling the most recent commit and testing your case with it? I think it should be working by now. At least, similar unit-tests pass.


Wear: Use specific content layout

Uses the responsive components.

@joreilly requesting post review, would like to make some follow on updates.


message.nack is not a function

Environment details

OS: Linux/Ubuntu
Node.js version: 10.5.0
npm version: 6.4.1
@google-cloud/pubsub version:  >= 0.23.0

Steps to reproduce

I'm using pull strategy to consume Pub/Sub messages
When I'm trying to call message.nack() I've an error:

TypeError: message.nack is not a function at ....

But everything is OK in version <= 0.22.2
I can't found any breaking changes in release CHANGELOG (https://github.com/googleapis/nodejs-pubsub/releases/tag/v0.23.0)
Thanks!

Well that doesn't sound good! We did a sizable refactor to the codebase for 0.23.0, so that might explain why you're experiencing issues, but our system test for nack seems to be working as expected. Would you be able to provide some code to help reproduce the issue you're experiencing?

yeah, sure
Here is my PubSub service provider
import { injectable } from 'inversify'
import { PubSub } from '@google-cloud/pubsub'
import { Observable, fromEvent } from 'rxjs'
import { map, catchError } from 'rxjs/operators'

interface IPubSubMessage {
    id: number
    data: any
    attributes: any
    ack(): void
    nack(): void
  }

export interface IPubSubService {
  publish<T>(data: T, topic_name: string): Promise<void>
  consume<T extends IPubSubMessage>(
    sub_topic: string
  ): Observable<T>
}

/**
 * PubSub Service Provider
 */
@injectable()
export class PubSubService implements IPubSubService {

  private pubsub = new PubSub()

  public async publish<T>(
    data: T,
    topic_name: string
  ): Promise<void> {

    try {

      const message = Buffer.from(JSON.stringify(data))

      const messageId = await this.pubsub
        .topic(topic_name)
        .publish(message)

      console.log(`Message ${messageId} published`)

    } catch (err) {

      console.error(`Message wasn't published.\nStack: ${err}`)

    }

  }

  public consume<T extends GooglePubSub.IPubSubMessage>(
    sub_topic: string
  ): Observable<T> {

    return fromEvent(this.pubsub.subscription(sub_topic), 'message')
      .pipe(

        map<T, T>(message => Object.assign({}, message, {
          data: JSON.parse(message.data)
        })),

        catchError((err, caught) => {

          // todo handle error here
          console.error('ERROR: parsing the message', err)

          return caught

        })

      )

  }

}

Controller:
import { inject, postConstruct } from 'inversify'

const ROUTE_SUB_COURIER = 'subscribtion_name'

export class XController {

  @inject(TYPES.PubSubService)
  private readonly _PubSubService: IPubSubService

  /**
   * Sends push to courier when route message received
   */
  private send() {

    this._RouteService.sendPush(
      this._PubSubService.consume<GooglePubSub.IRoute>(ROUTE_SUB_COURIER)
    )
    .subscribe(message => {

      console.log(`Ack message ${message.id}`)
      message.ack()

    })

  }
...
...
  @postConstruct()
  private init() {
    this.send()
  }

}

Service:
...
/**
   * Sends push
   */
  public sendPush(
    target: Observable<GooglePubSub.IRoute>
  ): Observable<GooglePubSub.IRoute> {

    return target.pipe(

      tap(message => {

        if (moment().format('YYYY-MM-DD') !== message.data.relevant_day)
          message.ack()
      }),

      // emits only notifications which are relevant for the current day
      filter(
        message => moment()
          .format('YYYY-MM-DD') === message.data.relevant_day
      ),

      tap(message => {

        if (message.data.issuer === COURIER_CONFIG.MICROSERVICE_NAME)
          message.nack() //  <== Here is an error: TypeError message.nack() is not a function (((

      }),

      filter(
        message => message.data.issuer !== COURIER_CONFIG.MICROSERVICE_NAME
      ),

      mergeMap(
        message => from(
          this.getFCMTokensByCourierRef(message.data.courier_ref)
        )
          .pipe(

            map(fcm_tokens => [message, fcm_tokens])

          )
      ),

      tap(([message, fcm_tokens]) => {

        if (!fcm_tokens.length) {
          console.log(`no_fcm_token for ${message.data.courier_ref}`)
          message.nack()
        }

      }),

      filter(([message, fcm_tokens]) => !!fcm_tokens.length),

      mergeMap<
        [GooglePubSub.IRoute, string[]],
        GooglePubSub.IRoute
      >(
        ([message, fcm_tokens]) => from(
          this._FirebaseService.sendToDevices(
            fcm_tokens,
            {
              data: {
                ...EW_STATUS_CHANGED,
                payload: JSON.stringify(
                  Object.assign(
                    {},
                    {
                      ew_id: message.data.ew_id,
                      ew_ref: message.data.ew_ref,
                      courier_ref: message.data.courier_ref,
                      district_ref: message.data.district_ref,
                      issuer: message.data.issuer
                    },
                    message.data.issuer_ref ? {
                      issuer_ref: message.data.issuer_ref
                    } : null
                  )
                )
              }
            }
          )
        )
          .pipe(

            map(() => message)

          )
      ),

      catchError((err, caught) => {

        console.error(`Error:`, err)

        return caught

      })

    )

  }
...

@Maidanskiy thanks for the code! I believe the issue is with this section
map<T, T>(message => Object.assign({}, message, {
  data: JSON.parse(message.data)
})),

We used to return messages as plain old objects, but part of the refactor introduced a Message class. As a result ack and nack don't get copied over since they now live on the prototype chain. I had originally considered this to be more of an implementation detail, but clearly that was a mistake 😞. I'll update the release notes to include this as an additional breaking change.

@callmehiphop thanks for help


Utility vbuild no longer available project is updated

Under utilities, vbuild project redirects to poi. The project seems to have updated and taken a new direction.
Will shortly submit a pull request updating this.

Thanks!


[Opinions] Relicensing as MIT

Using LGPL means that WTPL/etc subgames can't use this mod.
It's very useful to have one common mod to do a thing, and act as a library - sharing code and a API, shared bug fixes, etc.
Do you think this overrules the benefits of LGPL?
Would people find this useful?
All contributors:

@Calinou
@Wuzzy2
@MrIbby
@Traxie21

I'd also like @kaadmy's feedback, as he's made an alternative to awards with a WTFPL license. Did you do that because this was LGPL, or was it because of other concerns?
Awards certainly has a DRY problem, especially in triggers.lua that I'd like to solve

Which of my mods are you talking about? My achievements mod in Pixture?
I've relicensed it as LGPL a while back, it doesn't have any copied/preexisting code from anything else.

:+1:

I'm fine with either license.

I'm OK with a license change to MIT.


Update Jaeger upstream-community-operators to v1.19.0

Thanks submitting your Operator. Please check below list before you create your Pull Request.

Flat operator directory structure is obsolete from 23-rd of October 2019, only nested directory structure will be accepted.

New Submissions

[x] Has you operator nested directory structure?
[x] Have you selected the Project Community Operator Submissions in your PR on the right-hand menu bar?
[x] Are you familiar with our contribution guidelines?
[x] Have you packaged and deployed your Operator for Operator Framework?

[x] Is your submission signed?

Updates to existing Operators

[x] Is your new CSV pointing to the previous version with the replaces property?
[x] Is your new CSV referenced in the appropriate channel defined in the package.yaml ?
[ ] Have you tested an update to your Operator when deployed via OLM?
[x] Is your submission signed?

Your submission should not

[x] Modify more than one operator
[x] Modify an Operator you don't own
[x] Rename an operator - please remove and add with a different name instead
[x] Submit operators to both upstream-community-operators and community-operators at once
[x] Modify any files outside the above mentioned folders
[x] Contain more than one commit. Please squash your commits.

Operator Description must contain (in order)

[x] Description about the managed Application and where to find more information
[x] Features and capabilities of your Operator and how to use it
[x] Any manual steps about potential pre-requisites for using your Operator

Operator Metadata should contain

[x] Human readable name and 1-liner description about your Operator
[x] Valid category name1
[x] One of the pre-defined capability levels2
[x] Links to the maintainer, source code and documentation
[x] Example templates for all Custom Resource Definitions intended to be used
[x] A quadratic logo

Remember that you can preview your CSV here.
--
1 If you feel your Operator does not fit any of the pre-defined categories, file a PR against this repo and explain your need
2 For more information see here

Can someone please help me understand what's going on?
TASK [extract_operator_bundle : Copy the bundle image layers into a local directory using skopeo] ***

task path: /home/travis/.ansible/pull/localhost/roles/extract_operator_bundle/tasks/main.yml:16

fatal: [localhost]: FAILED! => changed=true

  cmd: skopeo copy docker-daemon:kind-registry:5000/test-operator/jaeger:v1.19.0 oci:/tmp/operator-test/operator-bundle:latest

  delta: '0:00:00.047351'

  end: '2020-08-27 14:43:19.158249'

  msg: non-zero return code

  rc: 1

  start: '2020-08-27 14:43:19.110898'

  stderr: 'time="2020-08-27T14:43:19Z" level=fatal msg="Error initializing source docker-daemon:kind-registry:5000/test-operator/jaeger:v1.19.0: Error loading image from docker engine: Error response from daemon: reference does not exist"'

  stderr_lines: <omitted>

  stdout: ''

  stdout_lines: <omitted>

@J0zi: ping

@jpkrohling, Rerunning tests

Any news?

/test CVP

Thanks!


add functionality to deploy cloud-sa secret and driver

@davidz627 @wojtek-t @jingxu97 @diversario
This PR adds the ability to test PVs provisioned and managed by the CSI GCP PD Driver. Included is a change to cl2's run-e2e.sh that deploys a secret (if it exists) and a yaml that deploys the driver and all its associates rbacs and SAs (one of which uses this secret).
I will rebase this after https://github.com/kubernetes/perf-tests/pull/657 is merged so that the ability to deploy the driver yaml (if necessary) is build into the storage test config. It will be turned off by default and an additional override file in volume-types/persistentvolume will turn it on.

/hold for rebase

/hold
for rebase

Ive rebased it, but as it stands this PR 99% will not work. A couple to consider:

what will happen if i hard code default into the driver yaml and the CL2 tries to deploy to a test namespace? The driver and its secrets should be in namespace default.
if an error is raised or the test namespace overrides the hard coded one, then should i add functionality to manually specify a namespace in phase? This breaks the abstraction of phase a little because phasr allows multiple possible namespaces, hence a range.
if not, then how can i deploy the driver? Possibly via a script to be run pre test, but then this script will be an exact copy of the deploy script in the pd driver repo.

Ive rebased it, but as it stands this PR 99% will not work. A couple to consider:

what will happen if i hard code default into the driver yaml and the CL2 tries to deploy to a test namespace? The driver and its secrets should be in namespace default.
if an error is raised or the test namespace overrides the hard coded one, then should i add functionality to manually specify a namespace in phase? This breaks the abstraction of phase a little because phasr allows multiple possible namespaces, hence a range.
if not, then how can i deploy the driver? Possibly via a script to be run pre test, but then this script will be an exact copy of the deploy script in the pd driver repo.

I missed this initially - those are good question.
I don't have very strong opinion here - I believe we should allow users to overwrite namespaces if they want (so not specifying namespace range would mean that we don't try to use automanaged ones).
OTOH, I would also be fine with running something as part run-e2e.sh before we trigger CL, but then we need some way to wait for waiting for them, so we may need to reimplement some stuff too...
@mm4tt - for thoughts too

OTOH, I would also be fine with running something as part run-e2e.sh before we trigger CL, but then we need some way to wait for waiting for them, so we may need to reimplement some stuff too...

I should point out in our tests we do this by just waiting 60 seconds after deploying the driver. But i dont know if that will work for larger scale clusters.

Keep in mind that eventually the driver will be bundled in gke. Which can be optin during gcloud container create

Regarding waiting for the driver to be up, we can watch csinode and wait for the driver to be registered

Regarding waiting for the driver to be up, we can watch csinode and wait for the driver to be registered

If we just deploy with an addition script in run-e2e.sh, we can actually just use kubectl wait I believe. (https://www.jeffgeerling.com/blog/2018/updating-kubernetes-deployment-and-waiting-it-roll-out-shell-script) This also makes the config a lot simplier because CSI and non CSI configs will now look the same where as previously I would need an {{ if $CSI }} condition.

@hantaowang - did you verify that this actually works? I think that @mm4tt yesterday mentioned that having multiple objects in one file will not work with CL...

If we just deploy with an addition script in run-e2e.sh, we can actually just use kubectl wait I believe. (https://www.jeffgeerling.com/blog/2018/updating-kubernetes-deployment-and-waiting-it-roll-out-shell-script) This also makes the config a lot simplier because CSI and non CSI configs will now look the same where as previously I would need an {{ if $CSI }} condition.

I'm fine with that too. Technically, installing driver is more cluster-setup than test itself, so I would be fine with running something in run-e2e (if we can wait for it)

@hantaowang - did you verify that this actually works? I think that @mm4tt yesterday mentioned that having multiple objects in one file will not work with CL...

No I believe with how object bundles work right now, it  won't work. This was just to mock what deploying with CL2 would look like. The default namespace issue also presents a problem, so thats another thing that won't work.
I'll try the run-e2e.sh method and make sure that works, and then ill push here and remove the hold.

I tested this method and it does work. The deployment is built into run-e2e.sh. There is no tear down, but that should be fine - we just need to not run csi and non csi tests on the same cluster.
To use it, add --deploy-csi-driver as the first flag of run-e2e.sh. Then override the USE_CSI config variable.
/assign @wojtek-t
/cc @davidz627 @jingxu97
cc @msau42 @verult
/hold cancel

/ok-to-test

/lgtm
/approve


adding scroll progress bar

@ajay-dhangar
i would like to add a scroll progress bar
could you please assign me this issue

Can you share with us a demo of the scroll progress bar? We'd like to see it in action.

@ajay-dhangar
https://github.com/user-attachments/assets/34778108-40ac-4cb7-8238-ee3f7f60e762

Thank you for your suggestion, @AswaniBolisetti. While your idea is good, it doesn't fit our site. Unfortunately, we can't use your idea or make our site look like yours.


handle outside dependencies

[ ] comtypes
[ ] matplotlib
[ ] numpy
[ ] psutil
[ ] PyDAQmx
[ ] pythoncom
[ ] PyQT4
[ ] pyqtgrph
[ ] pyvisa
[ ] pywin32
[ ] scipy
[ ] serial
[ ] win32

in general I have decided to ignore this. will handle dependencies manually for now.
may institute install.py functionality later but it is by no means a requirement.


Export all button generates unreadable JSON

When exporting all map-based metrics, the resulting JSON cannot be loaded into GIS. I haven't posted an example since it would contain data, but ping me if you want this.
Probably related to: https://github.com/sharedstreets/sharedstreets-mobility-metrics/issues/33

This is the intended behavior. The "export all" is not GeoJSON, but the raw data that is used to generate all metrics and maps. It is hundreds of times more compact than storing every GeoJSON rendering possibility. I'll open a ticket to document the structure of this JSON object.


[BUG]Upload files failed

Describe the bug
I deployed the project natively using Python and configured the .env file. I encountered the same problem as #36. When logging in to the backend, it showed "detail": "Not Found".
To Reproduce
steps on readme.md
I deployed the project natively on a server. And used ssh to connect. The remote connection command is like this:
ssh -L 8889:localhost:5173 -L 8890:localhost:8000 -p xxxx xxx@xxxx
I visited the front-end page: http://localhost:8889. Click add data to upload the file. After loading for a while, the uploaded file was not displayed.
Then I visited the back-end page: http://localhost:8890, and it was displayed as follows:
{
"detail": "Not Found"
}
The following content popped up on the back-end server interface:
INFO: <IP_ADDRESS>:36656 - "GET / HTTP/1.1" 404 Not Found
I am not using OpenAI's model, I am using qwen and qwen's embeddings model. I changed some codes in the backend openai_llm_service.py and openai_embedding_service.py.
self.client = OpenAI(base_url="https://dashscope.aliyuncs.com/compatible-mode/v1", api_key=settings.openai_api_key)
Just added base_url in this line
Logs and Error Reports
On the backend show like this:
{
"detail": "Not Found"
}
In the server show like this:
INFO: <IP_ADDRESS>:36656 - "GET / HTTP/1.1" 404 Not Found
Screenshots

After quite some while of waiting and now re-installing from scratch I seem to be at the same place:

all tests complete without any errors
backend and front-end are working
i can't upload any files => simply nothing happens after I select a .pdf to upload

Also no errors show in the backend or in the frontend. However when I access the backend via browser I get the same 404 error response as @xjh6:
INFO:     Loading config settings from the environment...
INFO:     Started server process [72808]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
INFO:     <IP_ADDRESS>:59349 - "GET / HTTP/1.1" 404 Not Found


Adding Type2 targeting package and tests

This changes continues building on the work in feature/decomp to enable targeting alternate gate sets via packages specifying the supported set of intrinsics and decompositions for that gate set. This introduces Type2, which targets a set of intrinsics that includes SWAP and the 3 Pauli Ising gates. It also adds support for executing against this target package in the QDK simulator, and shares some of the existing intrinsic unitary tests to validate behavior of the package.
See #249 for the rundown on what work is part of this overall feature.

One thing these changes do not yet support is the EntryPointDriver, which for now pulls in the QsharpCore-based simulator as a compilation dependency. I think there is a way to refactor it such that it takes a generic dependency on SimulatorBase and then uses which ever simulator comes in the target package the executable was compiled against, but I'm not sure how to make that work with the Toffoli simulator and Resource Estimator as default options (those are not present in Type2 yet). This shouldn't affect the current PR, but definitely something we need to figure out as part of surfacing targeting packages as a finished feature.
@samarsha for FYI.

To make this large and unwieldy PR a little bit easier to review, I'll call out the files that a new or significantly modified here...

src/Simulation/Common/Simulators.Type2.Dev.props

src/Simulation/Simulators.Core/Microsoft.Quantum.Simulators.csproj

src/Simulation/Simulators.Tests/OperationsTestHelper.cs

src/Simulation/Simulators.Tests/OperationsTestHelperSimSupport.cs

src/Simulation/Simulators.Tests/TracerHelper.cs

src/Simulation/Simulators.Type2.Tests/*

src/Simulation/Simulators.Type2/*

src/Simulation/Simulators/QuantumSimulator/Checks.cs

src/Simulation/Simulators/QuantumSimulator/IsingXX.cs

src/Simulation/Simulators/QuantumSimulator/IsingYY.cs

src/Simulation/Simulators/QuantumSimulator/IsingZZ.cs

src/Simulation/Simulators/QuantumSimulator/Rx.cs

src/Simulation/Simulators/QuantumSimulator/Ry.cs

src/Simulation/Simulators/QuantumSimulator/Rz.cs

src/Simulation/Simulators/QuantumSimulator/SWAP.cs

src/Simulation/TargetDefinitions/Decompositions/ExpFracFromIsing.qs

src/Simulation/TargetDefinitions/Decompositions/ExpFracFromIsing.qs

src/Simulation/TargetDefinitions/Decompositions/MResetXWithNoReuse.qs

src/Simulation/TargetDefinitions/Decompositions/MResetYWithNoReuse.qs

src/Simulation/TargetDefinitions/Decompositions/MResetYWithNoReuse.qs

src/Simulation/TargetDefinitions/Decompositions/MeasureWithNoReuse.qs

src/Simulation/TargetDefinitions/Decompositions/R.qs

src/Simulation/TargetDefinitions/Decompositions/ResetWithNoReuse.qs

src/Simulation/TargetDefinitions/Decompositions/Utils.qs

src/Simultors/TargetDefinitions/Intrinsic/Checks.qs

src/Simultors/TargetDefinitions/Intrinsic/IsingXX.qs

src/Simultors/TargetDefinitions/Intrinsic/IsingYY.qs

src/Simultors/TargetDefinitions/Intrinsic/IsingZZ.qs

src/Simultors/TargetDefinitions/Intrinsic/M.qs

src/Simultors/TargetDefinitions/Intrinsic/Rx.qs

src/Simultors/TargetDefinitions/Intrinsic/Ry.qs

src/Simultors/TargetDefinitions/Intrinsic/Rz.qs

src/Simultors/TargetDefinitions/Intrinsic/SWAP.qs

src/Simulation/TargetDefinitions/TargetPackages/Type2.Package.props

src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj

One thing these changes do not yet support is the EntryPointDriver, which for now pulls in the QsharpCore-based simulator as a compilation dependency. I think there is a way to refactor it such that it takes a generic dependency on SimulatorBase and then uses which ever simulator comes in the target package the executable was compiled against, but I'm not sure how to make that work with the Toffoli simulator and Resource Estimator as default options (those are not present in Type2 yet). This shouldn't affect the current PR, but definitely something we need to figure out as part of surfacing targeting packages as a finished feature.

Does this mean EntryPointDriver will need to create the simulator via reflection in the same way that it creates the target quantum machine for Azure Quantum?

Does this mean EntryPointDriver will need to create the simulator via reflection in the same way that it creates the target quantum machine for Azure Quantum?

That’s certainly one possibility, yeah. The other idea I had but haven’t tried out yet is reworking the dependency so that the entry point code only depends on SimulatorBase and then it just depends on the common package. Then each simulator package would pull in the entry point driver as a dependency, instead of the other way around.

Then each simulator package would pull in the entry point driver as a dependency, instead of the other way around.

That seems strange, since it's possible to use the simulators without needing the command-line interface that the EntryPointDriver provides? However, another option is that the Q# executable project would depend on both a simulator package and the driver package, and give simulator factories to the driver at runtime.
How many different simulators will there be? My understanding was that we would still have just one simulator for all execution targets, is that incorrect?

That seems strange, since it's possible to use the simulators without needing the command-line interface that the EntryPointDriver provides? However, another option is that the Q# executable project would depend on both a simulator package and the driver package, and give simulator factories to the driver at runtime.

That's a cool idea. I was trying to think about how something like that might work, so I would really appreciate any ideas or advice you have on the design there.

How many different simulators will there be? My understanding was that we would still have just one simulator for all execution targets, is that incorrect?

Unfortunately, I'm disappointed by how this part of the work turned out. I was hoping to have a single simulator that would support all targets, and I still think we should keep an eye out for the opportunities to refactor everything into one simulator to handle all targeting packages. I'll give a summary here of the issues I ran into with supporting multiple targeting packages on the same simulator...
Each targeting package collects the subset of intrinsics and decompositions that comprise it. The simulator needs to implement the intrinsics in C# so that they can wrap the appropriate calls into the native C++ simulator. However, some operations that are intrinsic for one package are decompositions for another, and in that case if the compiled simulator included C# implementations of those operations they would end up overriding the corresponding decomposition. To pick a specific example, Exp is an intrinsic operation for the QsharpCore package and so has an implementation in the simulator that inherits from the Q# declaration, public class QSimExp : Quantum.Intrinsic.Exp. This works because the body intrinsic Exp is just an abstract base class that gets overridden by the simulator implementation. However, Exp in the Type2 package is supposed to be a decomposition on top of the Ising gates, so it is fully implemented in Q# instead of abstract. But if that package is built along with the core simulator, the implementation of QSimExp that defines itself as a child of the Exp class ends up overriding the decomposition with the wrapper for the native simulator. Technically, the circuit will be run correctly, but the decomposition does not get used, so anything like qubit counts or gate counts won't really be correct, and tracing the execution will be confusing. If the goal of a simulator is just to calculate the overall result of the quantum algorithm by any means then this doesn't really matter. But if the goal is to actually simulate the sequence of operations defined by the Q# then it should include the defined decompositions and not take any short cuts. I tried to find a way around this, but as long as the design for intrinsic implementation uses inheritance and overrides I don't think we can avoid this problem. The only path forward I could come up with is ensuring that the simulator for a given target package only includes implementations for that package's intrinsics and nothing else, which necessitates a simulator per package. At least by utilizing the same patterns I used for the targeting packages we can avoid duplicating the implementation, but there will still have to be separate projects for each simulator to match the separate target packages.

@samarsha Rather than figure the entry point handling all as part of this PR, I've added it as an additional ToDo on the #249 so that I can ensure it gets addressed before this feature branch is merged into master. I can try a couple of the ideas we've had so far and get that together as a separate PR soon.

That's a cool idea. I was trying to think about how something like that might work, so I would really appreciate any ideas or advice you have on the design there.

Sure, I haven't thought that much about it but I could elaborate if that'd be helpful, maybe it would be easier to chat more about it offline.

Unfortunately, I'm disappointed by how this part of the work turned out. I was hoping to have a single simulator that would support all targets, and I still think we should keep an eye out for the opportunities to refactor everything into one simulator to handle all targeting packages. I'll give a summary here of the issues I ran into with supporting multiple targeting packages on the same simulator...

Thanks for the explanation. If I understood correctly, does that mean that if the simulator could tell if a particular operation had a Q# implementation or was an intrinsic, and could decide whether to implement something based on that information, then there could be only one simulator for all targets? (Or equivalently, if a Q# implementation of an operation had higher priority over the simulator implementation?)

If I understood correctly, does that mean that if the simulator could tell if a particular operation had a Q# implementation or was an intrinsic, and could decide whether to implement something based on that information, then there could be only one simulator for all targets? (Or equivalently, if a Q# implementation of an operation had higher priority over the simulator implementation?)

Yes, that is exactly what we would need. Inheritance with abstract methods and overrides doesn't give us a way to do that. The only mechanism C# offers that prevents a given implementation of a method from being overridden is sealed but rather than suppressing the child class override it would result in a compile time failure, which also doesn't work for this usage. I did spend some time trying to think of a schema whereby the generated classes are actually children of the simulator classes instead of the other way around such that the generated implementations always take precedence, but I didn't come up with a reasonable way to make such a hierarchy work.

If I understood correctly, does that mean that if the simulator could tell if a particular operation had a Q# implementation or was an intrinsic, and could decide whether to implement something based on that information, then there could be only one simulator for all targets? (Or equivalently, if a Q# implementation of an operation had higher priority over the simulator implementation?)

Yes, that is exactly what we would need. Inheritance with abstract methods and overrides doesn't give us a way to do that. The only mechanism C# offers that prevents a given implementation of a method from being overridden is sealed but rather than suppressing the child class override it would result in a compile time failure, which also doesn't work for this usage. I did spend some time trying to think of a schema whereby the generated classes are actually children of the simulator classes instead of the other way around such that the generated implementations always take precedence, but I didn't come up with a reasonable way to make such a hierarchy work.

I think you can override the current mechanism by modifying the InitBuiltinOperations method on SimulatorBase, or alternatively by changing the simulator class initialization and registering the Q# decompositions as overrides (using AbstractFactory.Register).

I think you can override the current mechanism by modifying the InitBuiltinOperations method on SimulatorBase, or alternatively by changing the simulator class initialization and registering the Q# decompositions as overrides (using AbstractFactory.Register).
Oh, that's an interesting idea! I think I could try enlightening InitBuiltinOperations to only register overrides of base types that are abstract, and then the simulator could be a single implementation. Thanks @alan-geller, I'm going to try that now!

@alan-geller Ok, I tried the approach you suggested and still didn't quite work, but it shows promise. The issue I ran into is that the simulator still defines it's classes as inheriting from the intrinsic operations, as in class QSimExp : Quantum.Intrinsic.Exp. This means that the simulator project needs to be compiled with references to a targeting package that defines those classes. But once it's compiled with one (either QsharpCore or Type2Core) it cannot later be pulled in as a dependency with the other. When I try to do that, in the tests for example, it will complain that it can't resolve the conflict between the identically named classes in the two dlls. I was thinking I could try to disconnect the simulator from the core package by having the intrinsic implementations inherit directly from Unitary and ICallable, but then that would require reworking the way the intrinsics are discovered and registered in the simulator initialization and it would require the simulator classes define all the class methods instead of just the abstract ones, all while loosening the type safety we have right now. I'm likely going to adapt this change and push it up anyway, but for now it will still require two simulator projects instead of just one, which doesn't really fix the problem we were hoping to address.

Turns out dotnet does not support multiple .csproj files in the same folder, so my attempts at a clever combination of the two simulator folders was only accidentally working. Thankfully it failed in the Build mac pipeline to draw my attention to that; the mac dotnet must more aggressively parallelize the builds, preventing that approach from "working" as consistently.

@alan-geller @samarsha I think I've gotten these changes to the local maximum for the time being. Please let me know if you've got any other feedback or ideas for me to follow up on. I'm hoping I can get this merged today and move to the next target package. By way of summary, here's the issues we've identified as out of scope for this PR that I hope to handle later:

EntryPointDriver should not have a compile-time dependency on the simulator, as that would require a new driver per target package/simulator package. I added this to the task list in #249 so it gets addressed as part of finishing this feature.

One simulator should be able to act as implementation for many target packages. This is a challenging design problem, as the current use of inheritance means we must compile a simulator per target package. We have some ideas about how this might be address, but so far all of them imply some redesign and heavy reliance on some new stub generation (hopefully helped by Alan's new tooling).

Why not Adj + Ctl? Exp is Adj+Ctl, so this could be, unless there's a reason for it not to be.

That's a good catch, thanks! The Ising gates are sort of special cases of a two qubit Exp rotation, so should be adjointable with the negative angle. I'll make sure to add that in!

Thanks for all the feedback and reviews!


Extremely slow fp8 conv2d wgrad operation

Describe the bug
fp8 e4m3 wgrad seems to be extremely slow compared to both FP32 and FP16, often 50x to 100x slower.
I have attached the profiling results in this Google spreadsheet.
I have tested a variety of problem sizes. For each size I have measured fp16 wgrad and fp8 wgrad with a number of different variants (wrt the IO/intermediate/compute data types).
Expected behavior
We expect fp8 wgrad operators to be at least as fast (if not faster) than its fp16 and fp32 counterparts.
System Environment (please complete the following information):

cudnn_frontend version: v1.6.1 (commit 2533f5e5c1877fd76266133c1479ef1643ce3a8b)
cudnn_backend version: v9.3.0
GPU arch: H100
cuda runtime version: 12.2
cuda driver version: 535.161.08
host compiler: g++
OS: Ubuntu 22.04.4 LTS

API logs
Both frontend and backend logs are attached in this gist.
To Reproduce
Compile and run the benchmarking script.
Command I used to compile is:
/usr/local/cuda/bin/nvcc -I/home/ybgao/third_party/cudnn-frontend/include -std=c++20 -gencode=arch=compute_90,code=sm_90 -lcudnn -o main main.cu

Additional context
This issue references this post on nvidia forums.

Hi jimgao1,
I noticed that you are using NHWC layout for both dy and X tensor for fp8 wgrad, which is a low performance configuration (https://docs.nvidia.com/deeplearning/cudnn/latest/developer/graph-api.html#supported-graph-patterns : "All tensors can be in either NHWC or CHWN layout. In general, both dy and X tensors provide the best performance when they are in a CHWN layout.").
Could you try to set dy and X tensors to have CHWN layout?

Hi @yanqinz2, thanks for the suggestion! I tried setting the layout to CHWN but the performance remains to be suboptimal. Included below is my change as well as the profiling results for CHWN.
Code change:
    auto X = graph->tensor(fe::graph::Tensor_attributes()
                    .set_name("image")
                    .set_dim({n, k, p, q})
		    // .set_stride({k * p * q, 1, k * p, k})
                    .set_stride({1, n * p * q, n * q, n})
                    .set_data_type(io_type));

    auto DY = graph->tensor(fe::graph::Tensor_attributes()
                    .set_name("grad")
                    .set_dim({n, c, h, w})
                    // .set_stride({h * w * c, 1, w * c, c})
                    .set_stride({1, h * w * n, w * n, n})
                    .set_data_type(io_type));

Measurements for n = 64, h = 56, w = 56, k = 64, c = 64, r = 3, s = 3, stride = 1, padding = 1:

config
runtime

fp16
52.16us

fp8 float accum
1.41ms

fp8 half accum
1.41ms

fp8 half accum fast math
1.14ms

May I know if this issue is related to the:

For some ConvolutionBwdFilter depthwise convolutional workloads, cuDNN may generate racecheck hazard warnings. This issue exists in previous v9 releases and will be fixed in a future release.

item in the cuDNN release notes?

It is not related with the item in the release note. It is actually an issue with heuristics mode A. We are actively working on this one.