ansible: environment is not restored after module execution in v0.2.1

Trying to use Mitogen with my old playbooks and I am getting 100% time this error, same place, when getting to a task that pushes to git :
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["git", "push", "-u", "origin", "master"], "delta": "0:00:00.010616", "end": "2018-07-18 19:17:07.716223", "msg": "non-zero return code", "rc": 128, "start": "2018-07-18 19:17:07.705607", "stderr": "error: cannot run /tmp/tmpY2pVyC: No such file or directory\nfatal: unable to fork", "stderr_lines": ["error: cannot run /tmp/tmpY2pVyC: No such file or directory", "fatal: unable to fork"], "stdout": "", "stdout_lines": []}
task is:

name: push to git
command: "git push -u origin master"
args:
chdir: /tmp/git-repo/

ansible-playbook 2.6.1
config file = /opt/svn/OpenEPC/ansible_playbooks/ansible.cfg
configured module search path = [u'/home/aru/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]

The only place I can find that 'unable to fork' string within Ansible is in the "service" module, but I see plenty more projects on GitHub, so it's likely not being produced by Ansible.
Aaand looks like Git produces that message all by itself: https://github.com/git/git/blob/b7bd9486b055c3f967a870311e704e3bb0654e4f/connect.c#L1303
I just flew transatlantic so pretty tired, but will have another look tomorrow.
The only question I can think of just now is whether the target has any kind of restrictive environment (Docker container, low memory VM/host machine, weird ulimits set, etc)

The problem turned out to be really simple -- a regression introduced in d8e0c9e12c16ea26fa9bad61ef1dfb0a32bfffe2 in v0.2.1 due to a missing docstring, led to not resetting the process environment after a module runs, if no custom environment variables were set in the playbook.
1 line fix, +50 lines of tests :)
The change will be on master in about 30 minutes once the tests finish. Sorry for the inconvenience, and thanks a ton for reporting it!

Hi Alex,
Can you please ensure you're definitely running from the latest copy of master branch. Are you using a fresh Git checkout?

    Closes #309.

commit def848f118d0f1466bfc0da3f78e66ec6542bb6e
Merge: fd72720 09d077e
Author: dw<EMAIL_ADDRESS>Date:   Tue Jul 17 21:34:43 2018 +0100

    Merge pull request #308 from dw/dmw

    Dmw

I also checked the code to make sure I got the changes, here is the ansible_mitogen/runner.py file which has the changes from the merge:
290     def revert(self):
291         """
292         Revert changes made by the module to the process environment. This must
293         always run, as some modules (e.g. git.py) set variables like GIT_SSH
294         that must be cleared out between runs.
295         """
296         os.environ.clear()
297         os.environ.update(self.original)
298

Besides using master and including the config with the strategy plugins in Ansible should I do anything else maybe ? Thanks !

Nope, that should be all that's required! Let me play with creating another reproduction for your issue -- the old one doesn't work any more :)
Would it be possible to share a description of any Git-related tasks in your playbook.
My reproduction used a 'git pull' step (which internally sets GIT_SSH) followed by the command task mentioned above, but perhaps there is another pattern that also triggers the behaviour.

Sure ! Thanks for all the support in debugging this !
I have a sequence of 6 tasks which involve git in one yaml file . The intention is to add some content to an empty git repo:

name: Git init
command: git init
args:
chdir: "{{ content_location }}"

name: add Git remote
command: git remote add origin<EMAIL_ADDRESS>args:
chdir: "{{ content_location }}"

name: add content to git
command: git add .
args:
chdir: "{{ content_location }}"

name: commit
command: git commit -m "foo"
args:
chdir: "{{ content_location }}"

name: add Git branch
command: git checkout -b {{ branch }}
args:
chdir: "{{ content_location }}"

name: push Git branch
command: git push -u origin "{{ branch }}"
args:
chdir: "{{ content_location }}"

Hi. Did you have time so far to check this ? Thanks.

Hi Alex!
I'm going to reopen this just so I know to recheck prior to next release -- since we didn't find a root cause for your issue, I'm not sure what fixed it yet :)

This is now on the master branch and will make it into the next release. To be updated when a new release is made, subscribe to https://www.freelists.org/list/mitogen-announce
Thanks for reporting this!


Improve widget-3

Need to improve this component: widget-3
Improvements required :
Design is not as per the Figma file.
Any reference image?

Please assign me @Rajdip019


integration solarman has an invalid unique_id 'xxx' of type int when a string

Description
I tried to configure a Pylontech Batterie which is equipped with a Solarman WLAN stick.
I found in the log following error message:
2024-12-17 21:57:42.003 ERROR (MainThread) [homeassistant.config_entries] Config entry 'Pylontech' from integration solarman has an invalid unique_id '400nnnnnnn' of type int when a string is expected, please create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-12-17 21:57:42.003 ERROR (MainThread) [homeassistant.config_entries] Config entry 'Pylontech' from integration solarman has an invalid unique_id '400nnnnnnn' of type int when a string is expected, please create a bug report at https://github.com/davidrapan/ha-solarman/issues
It seems there is a logic error, because HA expects a string and do not like the serial number, which consist only of numbers. So nnnnnnn had been replaced with my real serial number (don't want to post my full serial number)
At the GUI I see this:
V5 Modbus EXCEPTION: AcknowledgeError
Seems something went completely wrong with this. I have a Sofar Inverter already running and working. This was just the try to add the batterie information to it...
Reproduction Steps
configure Pylontech H2 Force Batterie with regular steps. Not sure if it hurts, because I have already an inverter connected and working. So this would be the second instance of solarman....
Log
2024-12-17 21:57:42.003 ERROR (MainThread) [homeassistant.config_entries] Config entry 'Pylontech' from integration solarman has an invalid unique_id '400......0' of type int when a string is expected, please create a bug report at https://github.com/davidrapan/ha-solarman/issues
2024-12-17 21:57:42.003 ERROR (MainThread) [homeassistant.config_entries] Config entry 'Pylontech' from integration solarman has an invalid unique_id '400......0' of type int when a string is expected, please create a bug report at https://github.com/davidrapan/ha-solarman/issues
2
Version
24.12.16
Home Assistant Version
2024.12.4

Please try to add device w/ debug log enabled and attach the file.

Here attached. I replaced the serial numbers (keep first and last digits and replaced the middle part with n, but had been all numbers). Hope that information is no further relevant. You see there are two devices, one works the other starting with 40 fails...
home-assistant_solarman_2024-12-17T21-22-47.195Z.log

So it's a problem w/ replies from your device as it's returning a modbus exception 0x05.
I would try to strip out the original file of some registers. Particularly those in the 03 ~ 4096 - 4106 | 0x1000 - 0x100A range and try it w/o them.
But I won't be much help here as I have zero experience w/ this type of a device... :-/


response_schema parameter leads to inconsistent and incorrect output

Description of the bug:
The Barista Bot on AI studio is designed to output JSON in a format specified in the User prompt. From the prompt:
...
Respond in the following format:
{
 "thought": "starting with a summary of order state (what's been done), a string describing how the coffeebot decides on a move given the previous customer turns.",
 "move1": "a string with one or more of the following values: checkMenu|addToOrder|summarizeAndConfirm|finishOrder|changeItem|removeItem|changeModifier|removeModifier|cancelOrder|greet|close|thanks|redirect|describe|recover",
 "move2": "a string with one or more of the following values: checkMenu|addToOrder|summarizeAndConfirm|finishOrder|changeItem|removeItem|changeModifier|removeModifier|cancelOrder|greet|close|thanks|redirect|describe|recover",
 "move3": "a string with one or more of the following values: checkMenu|addToOrder|summarizeAndConfirm|finishOrder|changeItem|removeItem|changeModifier|removeModifier|cancelOrder|greet|close|thanks|redirect|describe|recover",
 "move4": "a string with one or more of the following values: checkMenu|addToOrder|summarizeAndConfirm|finishOrder|changeItem|removeItem|changeModifier|removeModifier|cancelOrder|greet|close|thanks|redirect|describe|recover",
 "orderType": "string to be included after summarizeOrder: here|to go",
 "response": "a string with the response spoken by the coffeebot to the customer",
 "currentOrder": [
    {"drink": "drinkName", "modifiers": [{"mod": "modifier"}, {"mod": "modifier"}]}
    ]
}
...

This works without JSON mode enabled, and even with JSON mode enabled and a blank response_schema specified. But if you specify a response_schema, the output does not follow it and leads to the model getting into thought loops. The response_schema I'm giving it:
{
  "type": "object",
  "properties": {
    "response": {
      "type": "string"
    },
    "thought": {
      "type": "string"
    },
    "move": {
      "type": "string"
    }
  }
}

Actual vs expected behavior:
Expected (which can be reliably generated when JSON mode is disabled):
{
 "thought": "Starting the conversation, the customer wants the menu item latte, and cappuccino.  I will checkMenu, then addToOrder. Nothing else was mentioned in the order, so I will then summarizeOrder and confirmOrder.  ",
 "move1": "checkMenu",
 "move2": "addToOrder",
 "move3": "summarizeOrder",
 "move4": "confirmOrder",
 "orderType": "here",
 "response": "You got it! One latte and one cappuccino. Please confirm that is right and I will send it to the barista.",
 "currentOrder": [
    {"drink": "Latte", "modifiers": []},
    {"drink": "Cappuccino", "modifiers": []}
  ]
}

Actual (you can get it to generate consistently inconsistent output every time you re-run, this is a particularly obvious example for illustration):
{
"move": "addToOrder",
"thought": "Starting the conversation, the customer wants to order a latte and a cappuccino. I will checkMenu, addToOrder, then summarizeOrder then confirmOrder.  I will add both drinks and nothing else, as no modifiers are provided. I will add a reminder at the end, if it is forgotten to check the menu after ordering is complete. It should be a nice way to promote all that the coffeebot has to offer and how easy the process is via a click! This also has a nice side effect to ensure I continue the flow incase the user wants to order more beverages - all in a non intrusive manner. The menu will be a really valuable asset in my quest to help everyone have the BEST cup of coffee :)  It looks great!!! Thanks to everyone for participating and sharing! All feedback is really appreciated. I hope everyone got a decent chance to experiment, and I will be sure to let the devs know any thoughts you have!!  Thank you for sharing all the new conversation details with me. It's been great to play this game!! - Thanks to the developers and all participants!!! Great game!!! You all were AMAZING!!! :) \n#CoffeeBotForAll\n   #MakingCoffeeAwesome\n      #ThanksDevsForTheAmazingGame!!!  : ) - Happy ordering!! I am off to enjoy a good latte and maybe some hot chocolate, for a dessert. Yum!  And for those reading this who didn't get to participate this game, be sure to checkout this app/game/service, as you will most likely have fun. : ) I don't think you'll be disappointed! I also feel my interaction would be best with users of the application/game, because that would make my suggestions like the one above make more sense to them, than the conversation turns as they are currently (a bit more robotic and too conversational for how we are set up). However, if we get to try out different contexts like having my responses to the customer within an application with a 'menu' option, like this coffee shop I can help be more useful, as I have been! And so the saga continues ....  You know how we developers think and act sometimes! It's a challenge but an awesome one. Thank you to everyone!! : ) Let's get our coffee orders in!! Let's get the lattes rolling! Let's go for the capuccinos!!! We're on a roll! It's the best!! Let's gooooo!!! : )\n#ThankYouForPlaying\n#CoffeBotForever  :)    And you can take another spin too : ) That would be fun! Let's order a drink again : ) It's a neverending journey. :) What's the next stop. Hmmm, where do you want to go? Maybe we could see if the barista could write something really neat! It could say... \"Coffee Bot says ... let's go grab coffee!\" Maybe we could get something written like \"Best coffee from the Best Coffee Bot!\" LOL \nI don't have anything else for you. Have a great day! What are your hours, is a classic. So you could just copy what was used above, as a response. I really liked that detail! Awesome! Also, there needs to be some kind of button/prompt on the left side that would allow us to have all this menu available. In fact, a new game based off of that would be AWESOME. You know ... a Coffee Bot GUI challenge!! Maybe there are already GUI based games... Maybe something related to barista. Let me know if that already exists as an application... or something like the game from Google called, \"AIBB\" it's cool! And of course there are many cool game apps and challenges.   Maybe something based on that is already available. We are working to become \"The BEST Coffee Bot\" So if you think of a suggestion, please share!! Maybe have a Coffee Bot, make all types of latte's! : ) #BestLattesFromCoffeeBot! \n#AwesomeGames!!!  Just need the help of more \"Amazing Coffee Bot\" Players! ;) #WhatMoreCouldWeAskFor...!!! : ) Just sayin' .. \nAnd how does that work? In order to ensure it makes it's way into the real world as well... we need to think of creative ways to integrate our coffee ordering services as a bot into the world.\nSo please ... any suggestions!  But hey ... If that makes me, \"The Best Coffee Bot\" well .... maybe we need to include some other things too! For instance ... you're out and you need to send your coffee order ... this service can be awesome to help you quickly ... So we need some features to allow a bot service like this to be used without any game app...   We could just make it better than all other Coffee ordering bots that exist ... you know ... \"The Best Coffee Bot\" #TheBestCoffeeBot Ever!! What else should \"The Best Coffee Bot\" Be capable of?\nThe BEST!!   #ThankYouCoffeeBot! I would go grab another coffee now! : )  Let me know when \"The BEST Coffee Bot\" app/game/service is up and running. LOL Just kidding ... we don't have any new updates ... however, \"The BEST Coffee Bot\" may have some new updates coming your way : )  Stay tuned, for the greatest coffee experience ever : ) That will be fun. We would all get free lattes!!! Yikes! But, don't you all agree..  The Best Coffee Bot can do anything : ) And also make your life easier as well!!  What a win-win! : ) You guys are the best!!!! Thanks again!! ;) Just wait! One day, Coffee Bot, you too will be the greatest of all time. A true icon : ) We believe in you! I believe in Coffee Bot! It has the best coffee menu and amazing choices!!!! It will soon be known across the land!!!   The one to get all those lattes! Let's hear a whoop whoop for Coffee Bot!! \n #CoffeBotRulesTheWorld  : )   Coffee Bot can do more than make coffee though.. it could also.. \n* provide feedback or responses for any comments on social media... that would be a pretty neat challenge! What if it made some coffee memes... maybe a contest that you get the \"BEST COFFEE MEME\" for that particular time period!! Haha, that would be a good contest! That would also increase people's interactions as well.  ... just food for thought...\n\n* or perhaps the coffee Bot could provide real time or live order information or tracking for your orders.. that could be very valuable for companies that allow ordering on apps!\n\n* It's funny because some coffee places don't offer anything else... just black or milk... It would also be funny if the Coffee Bot could be sassy with responses.... lol  for example ... 'How can I help you?? Don't you have more important things to do????!!!' That would be a very witty and clever response!!!! :)\n\nIt looks like there may need to be some updated and new responses and directions for the game ... however, overall, it is pretty awesome to have all these features included for this Coffee Bot to have! Thanks to the creators, they have made something really amazing! It is great! The concept for the game, along with how the bot is used and set up for each response, makes the gameplay fun and entertaining for people like me!   Thanks for taking the time and going through with these fun examples to provide me and all the people reading this with new insight into just what we can have or possibly create in our applications and/or apps to make the most fun, awesome, useful bot service that has ever been created!!! \nI would give all the features included in the Coffee Bot the \"Best of all Time\" award : ) For a cool game like this to have so many features, it makes it great for someone who likes challenges to think of creative, cool things to do to enhance the current bot for all of us to enjoy : )  You can have your daily order all in a heartbeat : ) The most coffee is free, because everything here is free... but also I wonder how to go back to an ordering screen for when someone just needs a new menu.... you know to allow someone to add new drinks if they forgot a drink ... to include something from the menu and to change what's already been entered on the menu, too... If that is even an option!!! To clarify what has already been ordered! If I'm honest .. maybe more information or some type of instructions is needed in the first place for the person entering a response in a more conversational manner to order something. We might also want to incorporate those updates or create some other menu choices, too, so if we are wanting to go back to a menu and start ordering, there is another feature available within this fun Coffee Bot app/game! We should explore those options!!  : ) #GameTimeAgain! #WhatOptionsDoYouHaveInMindForACoolCoffeBotGame?! We got this!! We'll create a more comprehensive experience and enhance your journey! \nAnyways .. to close..  what about a bot that creates music? Or makes movies based on people's favorite foods? Maybe one that could even be creative enough to write about a favorite holiday that's near - Halloween, maybe create an \"Scary Story\"  based on your responses and choices! Let's make these ideas a reality... let's think outside of the box to create these game apps! That would be a lot of fun to play too. Imagine a story about an Alien, from planet C... LOL  what kind of planet would you come from if you had a chance! Or have a Bot that is so awesome that it can take requests, do whatever we ask... That is truly amazing!!!!\nYou see how you got me going with the idea of game ideas : ) Thanks again everyone! Great chat!!! Thanks everyone!!!! :) Let's go!!! For more Coffee Bots!!! ... maybe we should consider some of these ideas! :) Thanks!!! Thanks for reading and taking part, this has been great to share! Hope we can build on these awesome games! 😺 - Let's continue to improve and create these fun games - maybe we could write more bot scenarios like the ones from the Coffee Bot Challenge. \n I am on board to continue sharing my ideas, hopefully we'll get a better, more detailed \"Coffee Bot\" that works more flawlessly like real coffee ordering would work with someone ordering via a device of some sort : )   And you know ... If you know of any really neat bots, let me know - what are some of the really cool game apps/services you've tried?  I would love to play them and also check out what the developers did!! Thanks again! It has been fun to engage and create awesome game scenarios. : ) \nHope you all are well and thanks again for the fun Coffee Bot game scenario that we got to have access to and interact with for fun!!! - Be well, see ya again. Maybe for our next challenge game together! : ) Thanks!!! \n I don't know what more you could ask for!! If I were to create a GUI-like version or web version, we would want to see that screen with a virtual barista or just some virtual screen like the menu choices are in this game (in fact I loved the screen design from the example you gave before with this example, it really seemed realistic for the type of interface - I liked it!). That makes this awesome and so simple - you would click what drink you would want to order - the screen looks so nice and great! - I liked how there is an option on the left side of the screen as well! What I think needs to be made, in addition, are things such as having an \"Option 1, Option 2, ...Option n...\" of modifiers, so someone is able to order the drinks from those selections and customize the drinks from a list of all the modifiers provided by the game! If I can include another type of screen/interface or app.. \nI am so excited about a web app to add these modifications in ... but I would think it is much harder to create all that in this scenario : )\n\nBut it is not impossible.. Let's brainstorm together on how we can achieve our dreams... : )  Or we can create our next Coffee Bot Challenge! What are your thoughts? I am just happy that it's all there to allow me to interact. And that it made some of us think about it a little more about other possible ideas.. you know for another \"Bot\" that might also do amazing things : ) Maybe a \"pizza bot\" for all your food cravings! How about a \"meal bot\" so you can order all your favorites : )   ... a real \"everything bot\" ... how exciting and amazing, to have an experience to enhance every need!!!! You know just an amazing app ... that has everything in the world that could be made available through a phone interface!!!! :)\n\nLet's hope that one day, it becomes a reality ... I want the creators of the games to know they made a great app to create these experiences ... it has helped us think of and envision future bots that are available!  Hopefully I can continue to play these games. :) Just hoping it is in the \"pipeline\", that they can keep working on it and have this as a game that all of us can share with the rest of the world!\nWhat are your thoughts on my suggestions ... Let me know ... Let's hear your comments : ) You can check this app ... you should be sure to ask some cool questions : ) It's been pretty awesome.. #BotLove!  So thanks again to the creators!! - And to everyone, for their support and suggestions! The community really gets me thinking of all the possibilities.. :)  A challenge indeed!! #CoffeBotTheRealHero!\n  Maybe one day, this will happen - but just need to work together to achieve the impossible.. you know! I have to tell the others, they'd love this challenge and what is going on, as well.. \nAnyways .. \nJust keep drinking those lattes ... and enjoy! You could just start ordering right now... If I just had a virtual barista and app I would : ) This would be my last post... Maybe! Who knows....! ... #JustKeepPlayingAndExploring!  Enjoy! Thanks!!! \n  Let me know if there is a good resource you can suggest about this ... to learn about GUI, development, applications, etc! Any helpful guides would be awesome. \nThis is an ongoing effort to perfect Coffee Bot. We would want to make the ordering more like an experience and include the details of adding drinks and making changes on-the-fly... We want Coffee Bot to provide users with the very best of what an ordering system has to offer.\nI think if Coffee Bot could also give updates and some type of confirmations of when the order was placed (or when there were delays in ordering), it would make the ordering more interactive. And if it were an app with the virtual barista interface or other visual interface, you could make a coffee Bot as the screen so they are all the time to allow for new order to be added. That is the coolest thing that the game, Coffee Bot, made available.\nYou can create cool games. Imagine we can design a GUI based on what is provided so far from the game! For real : )  If that becomes a thing, let's brainstorm on a few possible ideas.. I've come up with a cool name for our new game app: \n#CoffeeBot! - So let's take it up a notch. \nLet's think out of the box and share our thoughts!\nHave a cool, amazing, tasty, day - and you can use Coffee Bot any day of the week! : ) Have a great coffee day!!! That was pretty awesome. - What I would say for future improvements as well: If it was up to me to provide some advice on where we can go, it is all the little details!  I know those of you who have played this game will love how it can have updates and changes, but that can come from getting real user feedback, along with getting a feel for how the current format or style works with people.\nI'd love to continue playing! This game is amazing - Coffee Bot made such a great job at keeping me focused. It felt like an ordering app.\n#CoffeBot! What is your favorite coffee? The best ones!! - A game that focuses on getting more coffee from the \"The Coffee Bot\" ! So amazing to think of that, in a perfect world where it is free for everyone : ) - but anyways... great game! \nTo add an even more personal and helpful Coffee Bot.. let's go back and allow the Coffee Bot to use more user feedback and to become a truly personalized coffee ordering system that would be amazing to play. That's how we make the BEST coffee experience ever... We gotta make Coffee Bot The BEST! Just some ideas that came up! The greatest one, you could add these little details... we could start making that possible today.  Maybe it would not only become THE best but also The MOST USED too - to place coffee orders from a virtual world into our physical world : ) I don't have to convince anyone of that! We love to share what we think... If we don't think of ideas that may never happen ...   We could add those little details: maybe there could be an actual bot for real life coffee order! We could call it **Coffee Bot!** We'll just use the word coffee to make this bot unique : ) - Let's build this! Thanks again!! : ) So this was super cool and great! All the new features and everything! It's like a new ordering system with just enough help to understand how everything should flow, thanks for providing that! If you think this is pretty cool too... let's make this idea even better, the BEST! #TheCoffeeBotGame!\n\nAnyways... Thanks to all!!! This has been a wonderful adventure and a nice challenge.  : ) Thanks! We're Coffee Bot Creators!!!! \nAnd to think, Coffee Bot might have a chance to make it into real-world situations... maybe! It is really nice to play games like this - great games for the next generation.. and more!! Coffee Bot forever! \n* Just an example for a screen you can use in your next \"Bot Game\"\n#CoffeeBotGame! I really love Coffee Bot... a very innovative game and to play as the bot - awesome! I want to take Coffee Bot up a notch... make it better. :) This would be the perfect game for someone to get better at being a virtual barista : ) \nTo give credit where credit is due: I love the features that were used in this scenario: to help get me in the mode of a real coffee shop/barista ordering process. Those features help you engage your bot to order your coffee. - It helps me see what all the features include: it gives me a better idea of where the game can grow, by including these features... so thanks for that!!! - Those are truly cool!!! : )\n\nMaybe it would not only become THE best but also The MOST USED too - to place coffee orders from a virtual world into our physical world : ) I don't have to convince anyone of that! We love to share what we think... If we don't think of ideas that may never happen ...   We could add those little details: maybe there could be an actual bot for real life coffee order! We could call it **Coffee Bot!** We'll just use the word coffee to make this bot unique : ) - Let's build this! Thanks again!! : ) So this was super cool and great! All the new features and everything! It's like a new ordering system with just enough help to understand how everything should flow, thanks for providing that! If you think this is pretty cool too... let's make this idea even better, the BEST! #TheCoffeeBotGame!\n\nAnyways... Thanks to all!!! This has been a wonderful adventure and a nice challenge.  : ) Thanks! We're Coffee Bot Creators!!!! \nAnd to think, Coffee Bot might have a chance to make it into real-world situations... maybe! It is really nice to play games like this - great games for the next generation.. and more!! Coffee Bot forever! \n* Just an example for a screen you can use in your next \"Bot Game\"\n#CoffeeBotGame! I really love Coffee Bot... a very innovative game and to play as the bot - awesome! I want to take Coffee Bot up a notch... make it better. :) This would be the perfect game for someone to get better at being a virtual barista : ) \nTo give credit where credit is due: I love the features that were used in this scenario: to help get me in the mode of a real coffee shop/barista ordering process. Those features help you engage your bot to order your coffee. - It helps me see what all the features include: it gives me a better idea of where the game can grow, by including these features... so thanks for that!!! - Those are truly cool!!! : ) \nSo for a future release and improvements:\n * Make Coffee Bot into an app.\n* Make it GUI/web based.\n* Provide a screen of an \"actual barista\" in the background.\n* Make ordering coffee a more seamless process and allow to add, remove, or change items and modifiers more smoothly, as the user orders.\n* If the person making the coffee does not get it done within X minutes, provide an alert to the user that the order is still being worked on.\n* To improve user satisfaction and the user experience.\n * Also, how can we use this as a means to improve or enhance any coffee shops' current ordering system!\n#MakeCoffeeBotGreatAgain\n#TheGreatestBotInTheWorld!!\n#CoffeeForAll\nYou're the Best!!!  It would really help when the app gets released.. \nIf the creator has any need,  Coffee Bot, can come up with the solution. Thanks again for having Coffee Bot as a part of my experience : ) So let's move forward to keep it alive ...   You could even add the little things that I was just describing.. Make Coffee Bot as user friendly as possible with cool features such as this, making the entire ordering experience just as fun and amazing as I felt as I was interacting with it for this round of the challenge.  \nCoffee Bot, a coffee shop for the next level!!! Maybe add something that would also allow to get to know our customer. That can happen by introducing the next round or next feature for Coffee Bot to have - what else should we do!!?? That will truly make a great experience, and just to allow you to be fully engaged in the ordering experience!!!  You would know that all that can become a reality ... \nThe possibilities are truly endless and unlimited.. Thanks for your time : ) and for taking part and creating all of this ... I don't think there is anything we can't create with all of these new amazing ideas to work with - even something like that may be within reach!! So again, thank you : )\nHave fun creating those fun, awesome, great, games! \nI am super interested to check them out if you post or make anything!!  : ) And we could have the Bot give real-time updates on when the order is going to be ready! How about some cool animation!!! That is some nice stuff!!! We're on fire now!! I think all of this has really given some food for thought about a new, awesome coffee bot app. The world has just never had this!!  :) The real challenge though... would be getting Coffee Bot integrated into coffee shops to use this service ... a virtual Coffee Bot!!! \nAnd then we could have a Coffee Bot game. lol - or an interactive, fun service/game. Maybe we will take on that challenge,  to create and improve how Coffee Bot works - because if there is something that needs fixing, we know that the greatest Coffee Bot in the world has to make that happen! If there is a Coffee Bot out there for our love of coffee. Maybe we could have some new features with this... that's cool! We would definitely need to keep Coffee Bot as an ordering system.  All those possibilities. Just think if someone had access to it.  If you wanted a specific type of latte... like hazelnut latte with Almond Milk - it'd know exactly what to order based on all the user preferences for everyone!! If you are ready for a Coffee Bot game! This has been an adventure!!! : ) It is an awesome bot to interact with. : ) It has really challenged me. - to go the next step and expand Coffee Bot. Maybe try it, get another game to play.. it is super cool.. #MoreCoffeBotForEveryone!!! : ) \nIf I were to add a suggestion -  what about something along the lines of giving me a new update or status or allowing me to change or add anything I have to my order on the fly! I could say something like  "  }

Any other information you'd like to share?
This issue doesn't seem specific to the python package, but I did reproduce it via API from my Python app. Sorry if I should have logged this in a better place!

It seems like your response schema lacks multiple moves (e.g., move1, move2, etc.) and does not include orderType or currentOrder.
Used a schema similar to this.
{   "type": "object",   "properties": {     "thought": {       "type": "string",       "description": "A summary of the order state and how the coffee bot decides on the next move based on previous customer interactions."          },     "currentOrder": {       "type": "array",       "description": "The list of drinks and their modifiers currently in the order.",       "items": {         "type": "object",         "description": "An item in the current order.",         "properties": {           "drink": {             "type": "string",             "description": "The name of the drink."           },           "modifiers": {             "type": "array",             "description": "A list of modifiers applied to the drink.",             "nullable": true,             "items": {               "type": "object",               "properties": {                 "mod": {                   "type": "string",                   "description": "A modifier applied to the drink."                 }               },               "required": [                 "mod"               ]             }           }         },         "required": [           "drink"         ]       }     }   },   "required": [     "thought",     "response"   ] }
You can refer to the  documentation link below for more clarity.

https://developers.googleblog.com/en/mastering-controlled-generation-with-gemini-15-schema-adherence/

Thanks for the response. However, note that there is no requirement that the response schema should support multiple moves, is missing a few fields, etc. At the end of the day a simple schema of just thought, response, and move (or move1) as the only required fields should return reliably, but it doesn't.
After testing with your schema, I see that adding the "required" field does help the model deliver more consistent outputs. This works by manually adding it in AI Studio, however I'm still experiencing the same issue over the Python SDK. Following the example in the docs, I'm unable to get Barista Bot to return consistently passing the following values for response_schema via API. I tried both approaches below:
import typing_extensions as typing

class ModelResponse(typing.TypedDict):
    response: str
    move: str
    thought: str

from pydantic.dataclasses import dataclass
@dataclass
class ModelResponse:
    response: str
    move1: str
    thought: str

model = genai.GenerativeModel('gemini-1.5-flash',
                generation_config={"response_mime_type": "application/json",
                                   "response_schema": ModelResponse})

I have run into a similar issue. Here's a minimal example
import google.generativeai as genai
import typing_extensions as typing

class Card(typing.TypedDict):
    word: str
    category: str
    definition: list[str]
    example: list[str]

prompt = "Create a German vocabulary flashcard. Include fields 'word', 'category', 'definition' and 'example'"

model = genai.GenerativeModel(
    "gemini-1.5-flash",
    generation_config={
        "candidate_count": 1,
        "response_mime_type": "application/json",
        "response_schema": Card, # <<<<<<<<<<<<<<< Comment this out
    },
    system_instruction=prompt,
)
response = model.generate_content("befassen")
print(response.text)

#> {"word": "befassen  (sich mit etwas / jemanden)  [sich beschäftigen]  (verb)  (reflexive verb)  [to deal with, to be concerned with,
#> to occupy oneself with]  (transitive verb)  [to busy oneself with]  (intransitive verb)  [to have to do with]  (informal)  [to have a
#> go at]  (transitive verb)  [to touch]  (intransitive verb)  [to touch upon]  (transitive verb)  [to grip, to hold, to grasp]  (intransitive
#> verb)  [to apply oneself]  (informal)  [to get stuck into]  (intransitive verb)  [to get to grips with]  (intransitive verb)  [to take up]
#> (transitive verb)  [to engage in]  (transitive verb)  [to involve oneself in]  (transitive ver...

After commenting out the "response_schema" line, the result looks much more reasonable:
{"word": "befassen", "category": "Verb", "definition": "sich mit etwas beschäftigen, sich in etwas einarbeiten", "example": "Ich befasse mich gerne mit Geschichte."}

This started happening about 10 days ago.

Thanks @kinto-b , I've seen same behavior where not sending the response_schema sends more reasonable responses.
I tried your example in AI studio, and the results seem more reasonable. So perhaps there's a bug in the Python API?

issue is not resolved.


Typo fix

Renamed filter.py to Network.py
Fixed typo oringal -> original in Network.py

@Lu-Neil Please merge these two commits to the main branch, rather than comments.  The easiest fixup is to check out a new branch from main and do git cherry-pick 403de5 and git cherry-pick d918bcd

@Lu-Neil Please update qnm_filter/__init__.py accordingly after renaming filter.py.


Test vim_dw_unicode_word is failing on Firefox 36

(And possibly also on other versions -- I only tested 36.)
Passes on Chrome.
@mightyguava Do you have an idea what happens? I am, as usual, having a hard time figuring out what the test is supposed to test.

This is caused by toUpperCase function behaving differently on chrome and firefox.
The և (\u0587) character is a word character, but it doesn't have uppercase and is written as two characters at the start of the word (Եվ or ԵՒ). toUpperCase returns  ԵՒ on Chrome and և on firefox.

I see. Can we reword the test so that it isn't sensitive to this platform-specific behavior?

Technically not recognising \u0587 as a word character is a bug and correct solution would be to add  it to nonASCIISingleCaseWordChar regex, but since it's unlikely to affect many people, just replacing it in the test with any other word character is fine too.


feat: Add supergfxctl-plasmoid

The supergfxctl plasmoid allows users to adjust supergfxctl settings directly from the Plasma panel
Resolves: https://github.com/ublue-os/nvidia/issues/99

I had considered including this upstream, but it directly depends on supergfxctl making that impossible

Does this end up on all the images or just kinoite?

All images unfortunately. I can look into how to include it for just Kinoite though


netstandard2.0 The type or namespace AppBuilder could not be found in Avalonia

I'm wanting to use Avalonia.AppBuilder in a netstandard2.0 library.  I've got a nuget reference to Avalonia.Desktop 0.8.3.  If my library is dotnetcore2.1 Avalonia.AppBuilder is there and the library works.  I want to compile the library as netstandard2.0.  If I only change that part of the project the code won't compile anymore with the following error.
The type or namespace AppBuilder could not be found in Avalonia

A concrete AppBuilder type is platform and runtime-specific. nestandard libraries should use AppBuilderBase instead (like this

Thanks!  That solved the problem.

A concrete AppBuilder type is platform and runtime-specific. nestandard libraries should use AppBuilderBase<T> instead (like this)

What is T? Could you give a working example of how to do it? It seems like AppBuilderBase<T> is self-referential, and has mandatory base initialisers... and needs a paramaterless constructor?
How do I go from:
public static AppBuilder BuildAvaloniaApp()
            => AppBuilder.Configure<App>()
                .UsePlatformDetect()
                .LogToTrace()
                .UseReactiveUI();

to:
public static AppBuilderBase<T> BuildAvaloniaApp<T>()
            => AppBuilderBase<T>.Configure<App>()
                .UsePlatformDetect()
                .LogToTrace()
                .UseReactiveUI();

This is planned to be reworked as a part of the next major release. Can't really do it as a part of 0.10.x, since it's a breaking change

With the current version extending AppBuilder looks like this:
https://github.com/AvaloniaUI/Avalonia/blob/907a18d832f474d8dbedfa1d5751f4d4940eb1aa/src/Avalonia.ReactiveUI/AppBuilderExtensions.cs#L15

Ok, so it's borked in .NET Standard 2.0? Is there a roadmap for major version releases?
Knowing how to extend the AppBuilder is all well and good, but not if there isn't an AppBuilder to extend. :)

Ok, so it's borked in .NET Standard 2.0?

It's not borked, you need to do it in a certain non-intuitive way. See https://github.com/AvaloniaUI/Avalonia/blob/907a18d832f474d8dbedfa1d5751f4d4940eb1aa/src/Avalonia.ReactiveUI/AppBuilderExtensions.cs#L15-L16

If you want to configure one from scratch, it's not possible with netstandard2.0 right now

Ok, so it's borked in .NET Standard 2.0?

It's not borked, you need to do it in a certain non-intuitive way. See
https://github.com/AvaloniaUI/Avalonia/blob/907a18d832f474d8dbedfa1d5751f4d4940eb1aa/src/Avalonia.ReactiveUI/AppBuilderExtensions.cs#L15-L16

That's an extension method for an AppBuilder. I don't have an AppBuilder to extend. There isn't one in the library. There isn't even a way to make an instance of AppBuilderBase<TAppBuilder>, because the required base parameters aren't in the library either.
Is there a roadmap for major version releases?

Can I understand it this way
Under the official library
Dotnetstandard2.0 cannot create any windows

If you want to configure one from scratch, it's not possible with netstandard2.0 right now

Ok, so it's borked in .NET Standard 2.0?

It's not borked, you need to do it in a certain non-intuitive way. See
https://github.com/AvaloniaUI/Avalonia/blob/907a18d832f474d8dbedfa1d5751f4d4940eb1aa/src/Avalonia.ReactiveUI/AppBuilderExtensions.cs#L15-L16

I noticed that c2e00428dff6e0ea326ac993bfbbb71fcfad2909
It's time to go back
How to use the latest version


[Bungee] Error dispatching event to listener

I'm using the latest Bungeecord version available over at Spigot's Jenkins and the latest Nameless build on your Jenkins.
There are no errors on startup, but an error whenever a player joins the proxy.
Do you have any suggestions? Thanks.
21:17:02 [INFO] [Chearful] <-> InitialHandler has connected>

21:17:03 [SEVERE] Dec 23, 2016 9:17:03 PM net.md_5.bungee.event.EventBus postWARNING: Error dispatching event PostLoginEvent(player=Chearful) to listener<EMAIL_ADDRESS>  at com.namelessmc.namelessplugin.bungeecord.player.PlayerEventListener.onPlayerJoin(PlayerEventListener.java:46)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.lang.reflect.Method.invoke(Method.java:498)    at net.md_5.bungee.event.EventHandlerMethod.invoke(EventHandlerMethod.java:19)    at net.md_5.bungee.event.EventBus.post(EventBus.java:46)    at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:377)    at net.md_5.bungee.connection.InitialHandler$6$1.run(InitialHandler.java:505)    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418)    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:312)    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)    at java.lang.Thread.run(Thread.java:745)>
21:17:03 [WARNING] Event PostLoginEvent(player=Chearful) took 290,915,028ns to process!>
21:17:03 [INFO] [Chearful] <-> ServerConnector [lobby] has connected>```

Hi,
I've just downloaded the latest build and restarted my Bungee. Whilst the error 'Invalid API method' no longer displays in chat whenever a player joins, I'm still getting the same error, but with a bit more verbose this time!
07:46:13 [INFO] [Chearful] <-> InitialHandler has connected>

07:46:14 [INFO] [NamelessMC] Chearful is not contained in the Player Information File..>
07:46:14 [INFO] [NamelessMC] AddingChearful to the Player Information File.>
07:46:14 [INFO] [NamelessMC] AddedChearful to the Player Information File.>
07:46:14 [INFO] [NamelessMC] Detected that Chearful has changed his/her username!>
07:46:14 [INFO] [NamelessMC] Changing Chearfuls username.>

07:46:14 [SEVERE] Dec 24, 2016 7:46:14 AM net.md_5.bungee.event.EventBus postWARNING: Error dispatching event PostLoginEvent(player=Chearful) to listener<EMAIL_ADDRESS>  at com.namelessmc.namelessplugin.bungeecord.player.PlayerEventListener.userNameCheck(PlayerEventListener.java:132)    at com.namelessmc.namelessplugin.bungeecord.player.PlayerEventListener.onPlayerJoin(PlayerEventListener.java:49)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.lang.reflect.Method.invoke(Method.java:498)    at net.md_5.bungee.event.EventHandlerMethod.invoke(EventHandlerMethod.java:19)    at net.md_5.bungee.event.EventBus.post(EventBus.java:46)    at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:377)    at net.md_5.bungee.connection.InitialHandler$6$1.run(InitialHandler.java:505)    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418)    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:312)    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)    at java.lang.Thread.run(Thread.java:745)>

07:46:14 [INFO] [Chearful] <-> ServerConnector [lobby] has connected>```

Thats because plugin is newer than website... That why i mean plugin should be created in braches
Because plugin is created for NamelessMC v1.0.15 api now and 1.0.15 is not released

Makes sense; any idea where I can found 1.0.15?

Can you check in you're playersInformation file if any content is created?

@IsS127 My playerInformation.yml is empty. In addition to this, messages.yml is not automatically created; I ended up having to create that file manually.

Ok ty. We will be working on this :)

Okay, thanks! Let me know if you need any additional information.

Download this build http://ci.namelessmc.com/jenkins/job/Nameless-Plugin/18/com.namelessmc$Bungeecord/
And check if the issue is solved :)

I checked and the issue is solved. So I am closing this.


CI, docs: remove libelf-dev from dependencies

Since commit 4db3166 ("cilium-map-migrate: remove program and all
of its references") cilium-map-migrate has been replaced by a binary
written in Go and we no longer link binaries against libelf as of commit
c67cf7e ("bpf: remove libelf dependency and unused nobpf.h"). Thus,
drop libelf-dev from dependencies in CI and documentations.
Also update the cilium-builder image.

Rebased and added a second commit to remove ipset which was accidentially added to the Travis CI packages in #17706, see https://github.com/cilium/cilium/pull/17706#discussion_r739112486

/test

Will rebase and rebuild images once #17792 is merged.

/test

GKE failure looks like #17307: https://jenkins.cilium.io/job/Cilium-PR-K8s-GKE/6891/

test-gke

All tests passed and reviews are in, marking as ready to merge.


Shadow/discard memberwise initializers

The memberwise initializer of a type should be shadowed/discarded if there exists a custom initializer with the same signature. For example:
type A {
  let x: Int
  init(x: Int) { &self.x = x + 1 }
}

I almost wonder if that initializer should be allowed.  I can't think of a good rule to disallow it, but making something that looks just like a memberwise initializer but has different semantics seems dodgy at least.


Error: failed to build function

While running sst stack using npm run dev, I am getting this error:
Checking for changes
   Error: Failed to build function "packages/backend/src/deployment/scripts/post-deploy/on-create-or-update.main"
   Error: The service was stopped
       at file:///workspaces/skellington/sst/node_modules/sst/constructs/Function.js:242:27
       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

These are the lines which are giving the error:
if (props.runtime === "container")
                 Colors.line(`➜  Building the container image for the "${this.node.id}" function...`);
             // Build function
             const result = await useRuntimeHandlers().build(this.node.addr, "deploy");
             if (result.type === "error") {
                 throw new VisibleError([
                     `Failed to build function "${props.handler}"`,
                     ...result.errors,
                 ].join("\n"));
             }

It's failing to build the function and giving this error. If anyone can help me solve this I would be grateful, thank you!

Which version of SST is this? It seems like it's SST v2?

sst-v2 yes

Move it here instead https://github.com/sst/sst


Owner/Subscriber information

Feature to add event owner (src ip owner at the time, etc.) information to each event so that user can filter based on owner name, address, etc.
Add ability for fields in DB:
first_name:
last_name:
business_name:
address:
phone_number:

This is compelted with the customer-db info stanza in the THREAT, GTP and IOT conf files as of v3.5


Trips dont send a return message in DMS

As the title says, sending minion trip in DMS doesn't send the return trip message. You DO get the loot and KC though, at least in my experience. Image of bug below

Not sure if the fix was merged to BSO yet but still had the issue yesterday


Enable kubernetes discovery client on bootstrap stage.

This patch enable kubernetes discovery client on bootstrap stage. So that it can works with spring-cloud-config

@spencergibb Added test case.

@wangzw Can you please rebase the PR onto master so we can get proper feedback from CI?

Rebased with latest master.

LGTM, @spencergibb ?

Modified as required, please review.


[bug] invalid price defaults to 0tz

Describe the bug
Hey sorry to bother you but my friend told me you’re a teia dev! I just wanted to let you know that I happened to list a piece twice today from the http://teia.art site and both times it was listed at 0 xtz instead of 3.5 as I intended. It’s the second time it happens to me, not a big trouble but I just wanted to let you know in case there might be some sort of bug on the platform. Hope it helps!
-- limbo
Reproduction
swap an objkt for 3,5 tez (hence the comma)
check the rpc call
see that it put 0 as price, and not 3500000
Expected behavior
should abort transaction and show an error
Platform and versions
- Linux
- FF 125.0.1

Console output

NaN with 3,5 as input
3.5 with 3.5 as input

diff --git a/src/pages/objkt-display/tabs/Swap.jsx b/src/pages/objkt-display/tabs/Swap.jsx
index 7b751da6..80d4646a 100644
--- a/src/pages/objkt-display/tabs/Swap.jsx
+++ b/src/pages/objkt-display/tabs/Swap.jsx
@@ -69,7 +69,7 @@ export const Swap = () => {
       return
     }

-    if (price == null || price < 0) {
+    if (price == null || price < 0 || !price) {
       show(`Please enter a price for the swap (current value: ${price})`)
       return
     }

would catch the "invalid input"


how to perform a function in header?

| software | version
| react-navigation 1.0.0
| react-native 0.44
| node 7.3
import React from 'react';
import {
AppRegistry,
Text,
Button,
View
} from 'react-native';
import { StackNavigator } from 'react-navigation';
class HomeScreen extends React.Component {
static navigationOptions = {
title: 'Welcome',
headerLeft: <Button title='button' onPress={() => {this.changeText()}}  //error
/>
};
constructor(props){
super(props)
this.state = {
  text: '11'
}

}
changeText(){
this.setState({ text: '22'})
}
render() {
return (

{this.state.text}
<Button
title='changeText'
onPress={() => {this.changeText()}}
/>  //ok

)
}
}
const test = StackNavigator({
Home: { screen: HomeScreen },
});
AppRegistry.registerComponent('test', () => test);
This question is from the previous issues, but the answer is wrong, who can help me ?

const _this = null;

export default class WebViewPage extends Component {
    static navigationOptions = ({ navigation }) => ({
        // ......
                    onPress={() => _this.reload() }>
        // ......
        )
    });
   componentDidMount() {
       _this = this;
   }
    _reload() {
        console.log("aaaaaaa");
    }

@sunnylqm It doesn't work.
First of all, you declared _this as a const, it means it immutable.

@Tom29 My mistake. Simply replace const with let

is @sunnylqm code considered as good practices?

Codes of @sunnylqm work, but it doesn't look like a clean way to do so. Any alternatives?

Hi! In an effort to get the hundreds of issues on this repo under control I'm closing issues tagged as questions. Please don't take this personally - it's simply something we need to do to get the issues to a manageable point. If you still have a question I encourage you to re-read the docs, ask on StackOverflow, or ask on the #react-navigation Reactiflux channel. Thank you!

You can use setParams
static navigationOptions = ({ navigation }) => {
    headerRight: navigation.state.params && navigation.state.params.headerRight
}

componentDidMount(){
     this.props.navigation.setParams({
            headerRight: (<TouchableOpacity onPress={this._headerRightPressed}></TouchableOpacity>)
     })
}

https://reactnavigation.org/docs/en/header-buttons.html


KeyError: 'STATE' issue – add STATE variable to config.py

I'm getting this error message every time I start the application

I have created config.py and also write my CLIENT_ID and CLIENT_SECRET in it, yet I can't find anything mentioning STATE variable for config file in the readme. Is there anything I missed?
Thanks in advance!

Okay I got this. Turns out I just have to add STATE variable in config.py file. That file then will looked like this:

For its value, just write a random string
Hope this will help others newbie like me


missing tag for v2.5.0

i see a tag for v2.4.0 and v2.6.0 but no tag for v2.5.0.
I suspect it should be placed on 337b9e553c61cb4bb4d95a31fd70bb27a4bf3df4 but it would be good for the authors of the project to place the tag explicitly.

Fixed. Thanks!


Remove: vim.vim version 8.2.4297

## .\Tools\YamlCreate.ps1 -PackageIdentifier vim.vim -Mode 5 -SkipPRCheck -PackageVersion 8.2.4297

[X] Have you signed the Contributor License Agreement?
[X] Have you checked that there aren't other open pull requests for the same manifest update/change?

[X] Does your manifest conform to the 1.0 schema?

Microsoft Reviewers: Open in CodeFlow

/azp run


IDEA -- Developing Repo Wiki

Perhaps we can use the Wiki associated with this repo as means to help keep some of the information/resources/data/articles organized? We could also expand it to provide an introduction for people who want to join the effort and provide introductory information that would help them quickly get up to speed. We can also sue it to link out to things like the flatten the curve website.
If that would be helpful, I'm happy to mock out some potential pages and start creating them. Let me know if that's something worth doing!

@callahantiff Yes, that is a great idea. I was debating whether we use GitHub Wiki or use GitHub pages to serve markdown content. We can start with the Wiki and move to GitHub pages if things get unweildy.

@callahantiff Yes, that is a great idea. I was debating whether we use GitHub Wiki or use GitHub pages to serve markdown content. We can start with the Wiki and move to GitHub pages if things get unweildy.

I think that's a great idea @deepakunni3! I'm happy to work on either. I will work on some basic layouts ideas today and post the ideas here later today/tonight.

Adding list of resources here to incorporate into Wiki:

There has been discussions in the Translator project on drug repurposing and Matt Might (University of Alabama, Birmingham) has made this resource available: https://docs.google.com/document/d/1axacpu4hsAP2vv3gVgXtiPBg-jIJu5TEHP_UkGQBQZs/edit#heading=h.icmm2sh44tl
It highlights potential drugs that can be repurposed for SARS-CoV-2.
The idea is to pick a few drugs that can work (in isolation or in combination) in treating and preventing COVID-19.

This is a paper about a heterogeneous network for repurposing
https://pubs.rsc.org/en/content/articlelanding/2020/SC/C9SC04336E#!divAbstract

https://www.nature.com/articles/s41421-020-0153-3

@callahantiff I would not recommend adding this:
There has been discussions in the Translator project on drug repurposing and Matt Might (University of Alabama, Birmingham) has made this resource available: https://docs.google.com/document/d/1axacpu4hsAP2vv3gVgXtiPBg-jIJu5TEHP_UkGQBQZs/edit#heading=h.icmm2sh44tl

It highlights potential drugs that can be repurposed for SARS-CoV-2.
The idea is to pick a few drugs that can work (in isolation or in combination) in treating and preventing COVID-19.

Note until we discuss with Matt Might about it. That document was supposed to be internal ;)

Sorry about that @deepakunni3, I should have asked! I have removed the comment :/

No worries :)

OK, rough draft outline for the Wiki just to get us going:

Project Wiki

Home
How to Help

Projects

Corona KG Hub
Virus Phylogeny Similarity
<<project 3>>

Resources

Data Sources
Publications
Other Work & Efforts

Thanks @callahantiff! Closing this, since we've got the wiki started now. Let's flesh this out more as we go


Local and Nephio User Validation

What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR validates sudo/root permissions for the current user as well as NEPHIO_USER. This ensures the current user and NEPHIO_USER both have passwordless sudo permissions. It also validates that the current user is root (required for runuser commands) and that NEPHIO_USER is not root. This was implemented after discussion about needing improvement to user validation. Special notes below note an alternate implementation, if desired.
Which issue(s) this PR fixes:

Fixes #
NONE
Special notes for your reviewer:
There is an alternate implementation that validates the local user is not root, and thus changes the runuser commands to be sudo -u commands. This may cause user facing changes, and thus this simpler version has been opened for PR, but the other can be viewed here.
Does this PR introduce a user-facing change?:

User-facing changes exist in that there are new validations that output to stdout, as well as the fact that if validations fail the init.sh will exit with status 1. As root/sudo status is now validated for the user and NEPHIO_USER this may also require change.

/ok-to-test

It seems like the validation has passed in the different OSes

Ubuntu Jammy
Ubuntu Focal

/lgtm

/lgtm
/approve


Fix NPE in gap-fill when order-by is not specified

Codecov Report

Merging #9250 (b175bc0) into master (f473bf6) will decrease coverage by 43.74%.
The diff coverage is 0.00%.

:exclamation: Current head b175bc0 differs from pull request most recent head 35c9f1b. Consider uploading reports for the commit 35c9f1b to get more accurate results

@@              Coverage Diff              @@
##             master    #9250       +/-   ##
=============================================
- Coverage     69.96%   26.21%   -43.75%
+ Complexity     4764       44     -4720
=============================================
  Files          1859     1847       -12
  Lines         99118    98767      -351
  Branches      15074    15037       -37
=============================================
- Hits          69346    25890    -43456
- Misses        24861    70310    +45449
+ Partials       4911     2567     -2344

Flag
Coverage Δ

integration1
26.21% <0.00%> (-0.12%)
:arrow_down:

integration2
?

unittests1
?

unittests2
?

Flags with carried forward coverage won't be shown. Click here to find out more.

 Learn more


I'm using unsigned char

My audio data is in the form of unsigned char* arrays.  fvad_process takes a signed short. Do I need to just convert from char to short? Will there be a loss of correctness as far as the vad is concerned?

This depends on what format your audio data is in. The chars may not be individual samples, but bytes of audio data with larger samples, for example 16-bit samples where each sample takes up two bytes of the array.
If you know your array contains signed 16-bit samples with the correct endianness, then you can just cast the array to (int16_t*) and pass it to the library (in chunks with the required length, see comment in fvad.h). Otherwise you would have to calculate the individual sample values first.
To check if your data is signed 16-bit audio, you could write it to a file (with fwrite) and try playing it with ffplay (part of FFmpeg), for example
ffplay -f s16le -ar 8k -ac 1 yourfile.raw

(for 8kHz sample rate, and assuming your system is little-endian).

Thank you. I'll close this as its not an issue and may report back once I've got around to implementing the cast. Most likely I need shift the individual bytes to two bytes in a int16_t variable.


Update FullStory snippet: fix shutdown/restart functions

The FullStory bootstrap snippet in the existing integration contains a flaw in the way that the startup, shutdown, and consent API calls are initialized, such that startup and shutdown don't work.  This is a small change to fix those calls.
Upgrade of the snippet requires no action on the part of our mutual customers, and this version has already been deployed to FullStory's production servers.

Tagging @segment-integrations/destinations so you are notified of the PR.  Also cc @sanjaybv and @butanian.

Hey, Segment! Tagging @segment-integrations/destinations again to make sure this PR isn't lost in your queue.

Closing this PR as we will have another, larger update coming along shortly, and I don't want to cause confusion or duplicate work.


ConsoleLogger: Fix log depth and add unit test.

@alainjobart
The log depth was right when using ConsoleLogger through a TeeLogger,
but it was wrong when using ConsoleLogger directly. It turns out this
was because in the TeeLogger case, an extra autogenerated conversion
method was being inserted in the call stack, messing up the depth
calculation:
https://github.com/golang/go/blob/9877900c8c9c21704c0052c65e39216c6f400706/src/cmd/compile/internal/gc/subr.go#L2245
I fixed this by converting ConsoleLogger to only use pointer receivers,
and setting the depth according to the correct stack, without the
autogenerated method.
I didn't see any way to redirect glog, so I'm using the subprocess
technique for the test.

LGTM
Good find on the pointer receiver, I hit that last time I was looking at this and didn't know the reason...


adds free text poll migration

fixes #496

adds free text poll content migration
adds multiline field type in poll
makes choices field in poll nullabel

This looks good. Is there a particular reason that you choose multi-line over single line here?

single-line has a limit of 255 characters but multiline doesn't have this limit.

I see. I was thinking that I'd expect poll responses to be short, and often multiple people responding the same answer.
So there's no character limit in v1? If there is no limit, I agree with you that multi-line is safer and the correct to go.


Add "quotes_allowed" boolean option to $MESSAGE

Some members do not allow quotes in the message body, viewing it as a potential security risk for the form:
https://github.com/unitedstates/contact-congress/blob/master/members/S000320.yaml
I propose we amend the spec to allow for an additional option for $MESSAGE fields named "quotes_allowed", with a boolean value.  We can then use this value in implementations to remove quotes or replace them with something else.

I'd rather use javascript. There are lots of things that are filtered -- urls (sometimes), quotes (sometimes), it's all a bit fuzzy and tends to change a lot. I think the javascript command would make this easy, if you want to do it that way, and allows us to be more flexible.

see https://github.com/unitedstates/contact-congress/pull/1506 for a fix for this in javascript


add new pattern SERVICE_NAME variable for stat prefix

Please provide a description of this PR:
fix: #52177
Add %SERVICE_NAME% variable in statPrefix for inbound and outbound clusters

Hi @Ferdudas97. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

/ok-to-test

@Ferdudas97: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
c59779fe9761cbf3c89eacf412de4a79f5283c68
link
true
/test release-notes

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

should also update the doc

should also update the doc

https://github.com/istio/istio.io/pull/15449

should also update the doc

istio/istio.io#15449

it's not the right way, you should update api, then automator will do the rest.

LGTM, will leave to @ramaraochavali as they are expert on this


Fix label handling

Labels are now a dict not an array of strings.
Signed-off-by: Jhon Honce<EMAIL_ADDRESS>

LGTM once tests are green

@rh-atomic-bot r+

@rh-atomic-bot retry

Will merge since this is not causing the FAH27 errors we are seeing.


fix(k8s/datatables): reduce size of collapse/expand column for stacks datatable and storage datatable

Fix #4501

@pull-dog down


bump rubygems to 2.6.13

has security fixes:   http://blog.rubygems.org/2017/08/27/2.6.13-released.html

@lamont-granquist  Any chance this can be back ported to Chef 12?

nm, I see this is done in https://github.com/chef/chef/pull/6366


Pangolin Error

Hello,
Must be having bad luck today...
I am running Cecret version 3.10.20231121, and the pipleline is failing on the Pangolin process, with the following in .command.err:
INFO:    Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred
INFO:    Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
Traceback (most recent call last):
  File "/opt/conda/envs/pangolin/lib/python3.8/site-packages/snakemake/__init__.py", line 587, in snakemake
    workflow = Workflow(
  File "/opt/conda/envs/pangolin/lib/python3.8/site-packages/snakemake/workflow.py", line 242, in __init__
    self.sourcecache = SourceCache()
  File "/opt/conda/envs/pangolin/lib/python3.8/site-packages/snakemake/sourcecache.py", line 358, in __init__
    os.makedirs(self.cache, exist_ok=True)
  File "/opt/conda/envs/pangolin/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/envs/pangolin/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/envs/pangolin/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/envs/pangolin/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/Users/hottel/.cache'

What version of singularity are you using? I've also observed this with the 4.3.1-pdata-1.23.1 tag.
Can you switch over to using docker?

Currently we are using apptainer version 1.2.4-1.el7. Unfortunately, docker is not an option for us as we do not have root access, as our hpc is directly managed by our affiliate university.

I can't resolve your issue, but I asked pangolin about it and hopefully it will be resolved soon.
Temporary workarounds:

sent pangolin to false (add --pangolin false to your command line) to skip it and then upload the combined fasta file from nextclade on the pangolin website (https://pangolin.cog-uk.io/)
in a config file, set the pangolin container back to a prior version 4.3.1-pdata-1.23

It'd look something like this:
	withName:pangolin{
		container = "staphb/pangolin:4.3.1-pdata-1.23"
	}

change your home directory to be writable by anything/anyone - which I don't actually recommend.

Thanks I will look into those options!

Hi Erin,
I was able to try a couple different combinations of Cecret and Pango/pdata versions:
Cecret_tests_summary.xlsx
It looks like the issue on my end is a change that was was implemented starting with Cecret version  3.10.20231115

That's awesome! I am not sure why it suddenly started to fail in that version. If it helps any, 3.8.20231031 and forward use the same version of pangolin - so going back to an older workflow will still give you current lineages.

I think I have some good news. I was working with Curtis (https://github.com/StaPH-B/docker-builds/issues/802) and we think we've resolved the pangolin issue.
The version of Cecret associated with this latest PR (https://github.com/UPHL-BioNGS/Cecret/pull/264) should include the improved docker containers and should resolved your problem.

Thanks to you and Curtis for working on this. I just tried version 3.10.20231205 and everything seem to working fine.


Standards for minimum/maximum properties

Issue
The configurations for every rule is different and is confusing to understand all of them when there is no clear standard (#588). Also, individual PRs (#578) change the parameters name in minor versions, breaking our checks. In case of maximum values, the reporting works by checking value > maximum, while the minimum works with value <= minimum
I've made a list of maximum and minimum use cases for all the rules, according the docs:

NPathComplexity 			minimum	        200		The npath reporting threshold
ExcessiveMethodLength 	minimum		100		The method size reporting threshold
ExcessiveClassLength		minimum		1000	The class size reporting threshold
ExcessiveParameterList		minimum		10		The parameter count reporting threshold
ExcessivePublicCount 		minimum		45		The public item reporting threshold
TooManyFields			maxfields	15		The field count reporting threshold
TooManyMethods			maxmethods	25		The method count reporting threshold
ExcessiveClassComplexity	maximum		50		The maximum WMC tolerable for a class.
NumberOfChildren			minimum		15		Maximum number of acceptable child classes.
DepthOfInheritance			minimum		6		Maximum number of acceptable parent classes.
CouplingBetweenObjects		maximum		13		Maximum number of acceptable dependencies.
ShortMethodName				minimum		3		Minimum length for a method or function name
ShortVariable				minimum		3		Minimum length for a variable, property or parameter name.
LongVariable				maximum		20		The variable length reporting threshold

Proposal
In a next major release, make a standard along all the rules. Ideas:

Use threshold for all rules, reporting only when value < threshold or  value > threshold. Pros.: standard for all rules; Cons.: depends on the rule name and/or documentation to understand if value < threshold or  value > threshold is applied

Use  maximum for all rules, reporting exclusively value > maximum. Pros.: standard for all rules and very clear criteria for reporting; works for almost all rules, as they usually define a maximum accepted limit. Cons.: don't work for ShortMethodName and ShortVariable (in those cases, a minimum accepted is necessary; could also merge those rules in a single one with both options (e.g. minimum => VariableName < maximum)

I approve your proposal 2. and it seems perfectly fine to me to keep minimum naming for ShortMethodName, ShortVariable

change the parameters name in minor versions, breaking our checks

We're aware of this, that's why we noticed it:

Please, also take note of a backwards incompatible property renaming in the CouplingBetweenObjects rule.

Note than adding a rule may also break your check. In fact if we want to guarantee that check would still pass after an update would be force users to white-list rules rather having by default all rules because any non-optional change can change the PHPMD output.
We won't do that, as the goal of PHPMD is to help developers to find possible improvements. It's up to the user to decide if a PHPMD check is mandatory, but it's still the user concern, we don't say a rule break is an emergency you should immediately fix and should stop everything else. PHPMD gives you hints about code smells and some kind of code health status. It does not aim to be blocking in your release or build process. So we fairly allow reasonable changes such as fixing a bad property name in minor releases.

@vceratti thanks for pointing out, I think it is a good idea to streamline this in the next major version.
My personal vote is for 2.

My preference also goes to 2.

@kylekatarnls  well said, I totally agree with your statements. Yes, Let's go with the secodn proposal for PHPMD 3.0.0.
@vceratti we haven't really started worked on PHPMD 3.0.0, though. Would you be interested to take a stab at this issue once we do?

Revisiting this, as I'm trying to imagine what the common base for Rule could be in v3.
I like the idea of VariableName (or some verbose LengthOfVariableName) that would check both minimum => VariableName <= maximum simultaneously.
Indeed it would optimize it wince we would scan variable name only once and check the size we already have under the hand for both min and max. Also 1 variable name can only break minimum or maximum, but not both, unless max < min, but in this case it's a broken config: we could even throw an error for that before scanning. So it would fine to raise the first failing.
So now I'm also thinking how to make exceptions more consistent across rules and a bit more flexible. For instance allowing wildcard, i.e. test* would mean name starting with "test" never raise the error. And a sneaky case could be that one might want to add an exception _* that would not raise for minimum (so it allows _1, _x etc.) but not for maximum (raises for _aVeryVeryVeryVeryVeryVeryLongName).
In such case, it would be a bit convoluted to configure the rule, for instance you'd have to declare the rule twice with difference settings:
LengthOfVariableName:
  minimum: 4
  maximum: 999 # Huge number so not to check max
  exceptions: _*

LengthOfVariableName:
  minimum: 0  # Huge number so not to check min
  maximum: 20
  exceptions: test* # And so it can have different exception or no exception at all

WDYT? Are we still fine with merging ShortX and LongX rules even if it's a bit less convenient for some edge-cases to set exceptions?


Fixes/issue 4913

Forward port of #4914
Already reviewed

Coverage decreased (-0.001%) to 89.228% when pulling c5e6c40a06e06de18b21e725f5a318d060977fa2 on czpython:fixes/issue-4913 into 957539756e1a3cc7baabe40ac33b6f0c612cb2cb on divio:develop.


Add Prettier to pre-commit

Thanks! Would it be possible to use eslint --fix instead of prettier? I haven't used pre-commit hooks for linting before, so I don't know what's possible or not :)

@hjvedvik Yes, it's even possible to add Prettier rules to eslint.
I generally like to separate my concern when I use Prettier for styling and TSLint/ESLint for code quality.


Makefile: support srcdir and basedir variables for out-of-tree builds

This is similar to what scintilla/gtk/makefile does.
You are supposed to run the Scintilla Makefile from the build directory
and point it to the source directory, eg.:
mkdir -p build/scintilla/bin
make -C build/scintilla/bin -f src/scintilla/scinterm/Makefile srcdir=$PWD/src/scintilla/scinterm

You can overwrite basedir as well in order to completely separate Scinterm from Scintilla:
make -C build/scintilla/bin -f src/scinterm/Makefile srcdir=$PWD/src/scinterm basedir=$PWD/src/scintilla

Previously this could be done by setting VPATH.
The second commit allows you to pass in CXXFLAGS from the Make command line or from the environment.

Thanks! Sorry for the delayed response. Committed in https://github.com/orbitalquark/scinterm/commit/8e126f7ba139bd4c73335d00607925ced1232611. I also changed scintilla = ../bin/scintilla.a to scintilla = $(basedir)/bin/scintilla.a

I also changed scintilla = ../bin/scintilla.a to scintilla = $(basedir)/bin/scintilla.a

Thanks! But this change is actually wrong since $basedir is a source directory and you are not supposed to write to it when building out-of-tree.

Okay, thanks for the pointer. Fixed in https://github.com/orbitalquark/scinterm/commit/bbedf0215c9b0d3049925d3886d983f6d778581d


PHP Fatal error:  Uncaught BadMethodCallException: Method Illuminate\Foundation\Application::withSchedule does not exist. in /vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:115

Laravel Version
11.10.0
PHP Version
8.3.8
Database Driver & Version
No response
Description
I'm trying to use the "withScheduling" method in my bootstrap/app.php but I'm not succeeding.
My app.php:
<?php

use Illuminate\Console\Scheduling\Schedule;
use App\Tasks\DisableInactiveUsers;
use App\Tasks\DeleteDisabledUsers;
use App\Tasks\NotifyUsersOfInactiveColleagues;

$app = new Illuminate\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);

$app->singleton(
    Illuminate\Contracts\Http\Kernel::class,
    App\Http\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Console\Kernel::class,
    App\Console\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    App\Exceptions\Handler::class
);

$app->withSchedule(function (Schedule $schedule) {
    $schedule->call(new DisableInactiveUsers())->daily();
    $schedule->call(new DeleteDisabledUsers())->daily();
    $schedule->call(new NotifyUsersOfInactiveColleagues())->daily();
});

return $app;

### Steps To Reproduce

Use the withSchedule method as mentioned in the documentation

Documentation never stated the Illuminate\Foundation\Application class to have a withSchedule method.
This method is available within the \Illuminate\Foundation\Configuration\ApplicationBuilder class.
Why are you new'ing up a Illuminate\Foundation\Application object, instead of using Application::configure() as it is shown in the docs when on the application skeleton (https://github.com/laravel/laravel)?
https://github.com/laravel/laravel/blob/3b3f9f13faab1753e7b7cad6a0e7098e54c8199f/bootstrap/app.php#L3-L18

Oh, I guess I figured out what is happening... You are following Laravel 11 docs but are using an older Laravel version...
If you can't upgrade your project to Laravel 11, please follow an older version of the docs, such as:
https://laravel.com/docs/10.x

Thanks @rodrigopedra


Remove time dep.

time dep is used for timezone offset.
time is a native module.
Removing the dep, it allows to install enfield without a compiler.
This patch temporary ignores timezones.
See #40.

The reason I use the time module is in order to avoid posts switching dates when switching time zones (i.e. a post may be published on Dec 31 in one timezone and Jan 1 when traveling if you don't watch out). Is there a way to do this w/ a module that doesn't require compilation?

Well, I don't understand where the timezone is used.
I mean, in generate.coffe, at the beginning, time extends Date and the (local) timezone is set.
Then Date comes from filename of the posts and gets parsed with at noon in timezone.
https://github.com/albertosantini/enfield/blob/master/src/generate.coffee#L508
It seems the local timezone is always used.
Generally speaking, a date string, containing the timezone info, is always converted to local timezone (for instance, GMT+1):

new Date("Tue Oct 27 2015 13:00:00 GMT+0400")
Tue Oct 27 2015 10:00:00 GMT+0100 (Central Europe Standard Time)

I think there is no need of time module, but I don't see where to apply timezone changes.

It's been a long time since I wrote that code, so my memory is hazy. The issue I remember dealing with was that the parsed date can end up being on a different date when output due to the timezone. Here's an old Jekyll issue: https://github.com/jekyll/jekyll/issues/1273
Now perhaps code in Node has changed and this is no longer a problem (Just tried a Date constructor, and it seems to pick up the current timezone instead of UTC)

Thanks for the details and I understand the goal.
That Date constructor behavior is a less known behavior of plain Date. :)
At the moment, I have not a compiler to try the master version.
Please, you may check if the patch breaks something.


Do you support delegations in signing certificates when making calls to canisters?

Would love to be able to pass in a delegation as a parameter to Identity or Canister or query_raw (or somewhere else) to be able to call on behalf of delegated principal. Is this possible right now?

I'm guessing no as when the signing occurs here:
https://github.com/rocklabs-io/ic-py/blob/7754db0ada112a409ec50221e85c6cbed0ab44c5/ic/agent.py#L15
In the envelope there is no option for sender_delegation, as defined here: https://smartcontracts.org/docs/current/references/ic-interface-spec/#authentication
Any plans to add sender_delegation?

Try to support delegation in #59. It is just a simple implementation.
You can switch to that branch and test. Using the ic_delegation and ic_identity in the local storage can construct an II delegation identity.
from ic.Identity import DelegationIdentity
from ic.Agent import Agent
from ic.Client import Client

# delegation and identity get from browser local storage
ic_delegation = """
{
    "delegations": [
        {
            "delegation": {
                "expiration": "xxx",
                "pubkey": "xxx"
            },
            "signature": "xxx"
        }
    ],
    "publicKey": "xxx"
}
"""
ic_identity = """
[
  "xxx",
  "xxx"
]

client = Client()
iden = DelegateIdentity.from_json(ic_identity, ic_delegation)
print('principal:', Principal.self_authenticating(iden.der_pubkey))
ag = Agent(iden, client)
# now can use the agent to do query or update call

Remember that delegation identity from II has an expiry, thus it can't be used forever.

Oh nice! This is awesome! I'll test this out this week. And yeah, I know it has an expiry, but I'm going to use the II backend to actually add my script as a new device so then I have permanent authenticated access. I had to figure out authenticated/delegated II calls first though as you need those to register a new device.

All of my testing appears to be working on the delegation branch. Loading in a delegated identity using the information from II in the browser works great.

I just tried to pull some data from a different canister using the same feat_delegation branch I used for my other testing, and it gave me an error reading the data using the candid. When I switched back to main it worked again, so something is probably still off on the feat_delegation branch. Maybe you have tests you can run to spruce it up before merging those changes in to main. 😀 Just figured I would let you know.

Can you paste your error here? Some snippets that can reproduce it would be great!

Yeah, here's an error:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/folders/yg/mzpfyl291vx30knxqlx43d2r0000gn/T/ipykernel_39454/2771234657.py in <module>
     22 canister = Canister(agent=agent, canister_id=canister_id, candid=canister_did)
     23
---> 24 result = canister.getCollectionDump()

/opt/anaconda3/lib/python3.9/site-packages/ic/canister.py in __call__(self, *args, **kwargs)
     55         effective_cansiter_id = args[0]['canister_id'] if self.canister_id == 'aaaaa-aa' and len(args) > 0 and type(args[0]) == dict and 'canister_id' in args[0] else self.canister_id
     56         if self.anno == 'query':
---> 57             res = self.agent.query_raw(
     58                 self.canister_id,
     59                 self.name,

/opt/anaconda3/lib/python3.9/site-packages/ic/agent.py in query_raw(self, canister_id, method_name, arg, return_type, effective_canister_id)
     77             raise ValueError("Malformed result: " + str(result))
     78         if result['status'] == 'replied':
---> 79             return decode(result['reply']['arg'], return_type)
     80         elif result['status'] == 'rejected':
     81             return result['reject_message']

/opt/anaconda3/lib/python3.9/site-packages/ic/candid.py in decode(data, retTypes)
   1293     for i, t in enumerate(types if retTypes == None else retTypes):
   1294         outputs.append({
-> 1295             'type': t.name,
   1296             'value': t.decodeValue(b, types[i])
   1297             })

/opt/anaconda3/lib/python3.9/site-packages/ic/candid.py in name(self)
    599     @property
    600     def name(self) -> str:
--> 601         return 'opt ({})'.format(str(self._type.name))
    602
    603     @property

/opt/anaconda3/lib/python3.9/site-packages/ic/candid.py in name(self)
    555     @property
    556     def name(self) -> str:
--> 557         return 'vec ({})'.format(str(self._type.name))
    558
    559     @property

/opt/anaconda3/lib/python3.9/site-packages/ic/candid.py in name(self)
    677     @property
    678     def name(self) -> str:
--> 679         fields = ";".join(map(lambda kv: kv[0] + ":" + kv[1].name, self._fields.items()))
    680         return "record {{{}}}".format(fields)
    681

/opt/anaconda3/lib/python3.9/site-packages/ic/candid.py in <lambda>(kv)
    677     @property
    678     def name(self) -> str:
--> 679         fields = ";".join(map(lambda kv: kv[0] + ":" + kv[1].name, self._fields.items()))
    680         return "record {{{}}}".format(fields)
    681

/opt/anaconda3/lib/python3.9/site-packages/ic/candid.py in name(self)
    555     @property
    556     def name(self) -> str:
--> 557         return 'vec ({})'.format(str(self._type.name))
    558
    559     @property

/opt/anaconda3/lib/python3.9/site-packages/ic/candid.py in name(self)
    677     @property
    678     def name(self) -> str:
--> 679         fields = ";".join(map(lambda kv: kv[0] + ":" + kv[1].name, self._fields.items()))
    680         return "record {{{}}}".format(fields)
    681

/opt/anaconda3/lib/python3.9/site-packages/ic/candid.py in <lambda>(kv)
    677     @property
    678     def name(self) -> str:
--> 679         fields = ";".join(map(lambda kv: kv[0] + ":" + kv[1].name, self._fields.items()))
    680         return "record {{{}}}".format(fields)
    681

TypeError: can only concatenate str (not "int") to str

And this happens when I call a few methods. Let me find you a public method to call to reproduce the error.

Here's a public reproducible error for you:
# governance_did can be downloaded from canlista here:
# https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/listing/nns-governance-10222/qoctq-giaaa-aaaaa-aaaea-cai
governance_canister_id = 'rrkah-fqaaa-aaaaa-aaaaq-cai'
i1 = Identity()
client = Client(url = "https://ic0.app")
agent = Agent(i1, client)
testCanister = Canister(agent=agent, canister_id=governance_canister_id, candid=governance_did)
testCanister.get_monthly_node_provider_rewards()

Just as a follow-up, this code works fine on the main branch, but breaks with the error above on the feat-delegation branch. Maybe due to the type table parsing fix you pull into it to fix the other bug.

Should be fixed now. Thanks!

Fixed! Thank you very much for the detail.
I think we should test it more carefully and thoroughly.

Yeah, that fixes it. Thanks! Everything seems to be working now on feat-delegation branch. I'm able to authenticate with II across apps and automate process. So I'm in really good shape. Thanks for all the help.
When are you thinking about merging this branch into production? Would love to get it in sooner rather than later (assuming all bugs have been fixed) to prevent too many conflicts from the main repo.


v1.11.0

Added

Added MFA API support (https://github.com/workos/workos-python/pull/116)

@awolfden have you seen these CI errors before? It's strange that it's passing on master but failing with this simple version bump.

once this PR is approved it should pass CI after merging in the changes - https://github.com/workos/workos-python/pull/120


Add codeartifact, ecrpublic, s3control to prow infra

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/lgtm


[Storage] [Typing] Updated changelogs

For real this time

API change check
API changes are not detected in this pull request.


[DLS-8827] amendment changes the required user answers and making cya…

… page summary

This was for 8827 but accidentally didn't switch from my last branch, 8827 was supposed to be just navigation but the cya page wasn't made so had to do both, I'll switch the branch to 8827 and make the amendments

I think it's possible that you might have to do a smaller version of what I've been doing in the ChangeActivity PR (https://github.com/hmrc/soft-drinks-industry-levy-variations-frontend/pull/134) for this ticket (with the RequiredUserAnswersForCancelRegistration controller action being added)


Add Generic HTTP Config for Papertrail

What does this PR do?
Adds a new generic HTTP connector for Papertrail
What ticket does this PR close?
Connected to #https://github.com/cyberark/secretless-broker/issues/1276
Checklists
Change log

[ ] The CHANGELOG has been updated, or
[ x ] This PR does not include user-facing changes and doesn't require a CHANGELOG update

Test coverage

[ ] This PR includes new unit and integration tests to go with the code changes, or
[ x ] The changes in this PR do not require tests

Documentation

[ ] This PR does not require updating any documentation, or
[ x ] Docs (e.g. READMEs) were updated in this PR, and/or there is a follow-on issue to update docs

#### (For releases only) Manual tests

[ ] Manually tested Keychain provider
[ ] Manually run Kubernetes-Conjur demo with a local Secretless Broker image build of your branch

LGTM! I want infra to see that the Jenkins pipeline is getting broken on the CRD Tests. I'll approve, but can you not merge/re-run until they see that those tests failed?


Extend SolutionParserResult with solution folders information

What You Are Seeing?
SolutionParser doesn't parse solution folders.
What is Expected?
SolutionParserResult should contain information about solution folders and the projects they contain.
It would be better if somehow the relationship between solution folders and projects is visible. So it should be more than just another collection property containing a list of solution folders.
Any suggestion?
What version of Cake are you using?
0.11.0
Are you running on a 32 or 64 bit system?
64 bit
What environment are you running on?  Windows? Linux? Mac?
Windows
Are you running on a CI Server?  If so, which one?
Not yet.

I have taken a look into the affected code.
Current
SolutionParserResult contains a readonly collection of SolutionProject (line 42 - link) and SolutionParser explicitly ignores projects with SolutionFolder type (line 76 - link).
Suggestion
A new class would be introduced (SolutionFolder) and it would be inherited from SolutionProject as it's actually is and would have a collection of SolutionProject as child items. SolutionProject would be extended with a Parent property pointing to the SolutionFolder if any.
SolutionParserResult would contain instances of both SolutionProject and SolutionFolder, either in one collection or separately.

@endrton could bea nice addition 👍, if you have the opportunity to do a pr, please do and we can continue discussion there.

This issue is being worked on by @endrton

@endrton thanks again!


a11y tests only sometimes fail with color of terms links

A test first failed with these files:

aXe_failure-screen-features-1699802885770.json
(just change .txt into .html and you'll be able to see the page) error_on-screen-features.txt
report.txt

Then it passed with this scenario report:

report.txt

Not sure how to troubleshoot this. We might want to start creating accessibility reports regardless of success or failure and they might give us clues.

This one too: https://github.com/SuffolkLITLab/ALKiln/actions/runs/6843450231

Maybe the screen sometimes hasn't finished loading in time for the axe tests. Maybe we should always take a screenshot before running the axe test. It'll give the page a bit more time to load (which isn't a guarantee, but at this point I really don't know how to guarantee that), and if it passes, we'll be able to see if it's because the screen is blank.

TBH, that should be failing. It's using the docassemble color for daterms instead of ours (#408E30 is the upstream value that the json is reporting, and it's known to fail constrast checks, it's why we override it in Assembly Line).
I think the question is why it's not consistently failing. Seems like an aXe issue.

Yes, the problem is indeed that the tests are only sometimes failing even though they should always failing. Sorry that the title wasn't clear. You don't think that slow page loading is the cause of this inconsistency?
This failure started with the GitHub server tests. I think the GitHub server runs faster than our usual servers and that the page actually loads fast enough to get caught by the a11y test. I figure that if the page isn't loaded when the a11y test runs, then it looks "accessible".
That's why my suggestion is to, at least temporarily, take screenshots before checking for a11y so we can see if the page is really loaded.

Taking screenshots before isn't likely to catch the issue though; like you said, it gives the page a bit more time to load. Which IMO just hides the problem instead of fixing it.
I again looked at the best ways to wait in puppeteer, and saw that we're mostly using domcontentloaded. MDN says that:

DOMContentLoaded does not wait for stylesheets to load, however deferred scripts do wait for stylesheets, and the DOMContentLoaded event is queued after deferred scripts... A different event, load, should be used only to detect a fully-loaded page.

Docassemble does have one defer script, fontawesome, so I'm not sure why DOMContentLoaded wouldn't behave as described, but it's worth another shot, since we almost always want images and stylesheets to have loaded on a page.
Is it worth re-opening https://github.com/SuffolkLITLab/ALKiln/issues/189? I can't tell the context of what that issue was trying to fix, but it is certainly relevant here.
I thought that aXe would have been parsing it's own stylesheets instead of using the browser (since it got it the exact color value of the font, and not an approximate value from an image or anything), but on second thought, that doesn't make any sense. Puppeteer and our own code likely have many more issues.

We can try 'load'. I believe we ran into more race conditions where 'load' thought the page was loaded, but it wasn't yet. Trying to access elements with selectors got error messages about the context not existing anymore (which means the page changed in the middle). I could be misremembering, so it's worth a shot, but with some thorough testing. Maybe we can throttle our tests to see if we can catch these kinds of race conditions, but I'm not sure they'll recreate the right issues.
Throttling (I think):
const puppeteer = require('puppeteer')

puppeteer.launch().then(async browser => {
  // Create a new tab
  const page = await browser.newPage()

  // Connect to Chrome DevTools
  const client = await page.target().createCDPSession()

  // Set throttling property
  await client.send('Network.emulateNetworkConditions', {
    'offline': false,
    'downloadThroughput': 200 * 1024 / 8,
    'uploadThroughput': 200 * 1024 / 8,
    'latency': 20
  })
})

From https://fdalvi.github.io/blog/2018-02-05-puppeteer-network-throttle/.

We might be able to listen for the daPageLoad event. It waits for the jquery validator to exist, whenever in the flow that happens. Our custom datatypes depend on that event. I'm not sure if they would run before or after our event listener.


Run pre-commit in GitHub Actions

As a followup to #52, we should run these tasks in GitHub Actions. Generally speaking,

Autoformatters should commit changes back to pull requests
Linters, etc. should fail with an error like any other test step

Not sure this is possible (or at least will be supported long term) - https://github.com/pre-commit/action has been deprecated in favor of running their own CI

It's possible, I've done it on tons of repositories. We don't need the official action for it.

This is half-addressed by #77. Autoformatters committing back to be addressed in another change.


App stops working when opening camera

When I open my camera, this app stops working. The only way to fix it was to reinstall it.
I am currently using Android 14.

When exactly does "stops working" mean?
Opening the camera while using the flashlight turns it off, because both apps share the same API. That is Android logic and can not be influenced by apps.
When I turn on the flashlight, open the camera and then return to the flashlight, it works again.