"amplify mock function <>" pending for a few hours

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

Describe the bug
I have a lambda function owlpostsfunction, I want to test it locally, so I run the following command, it is pending on "Starting execution..." for a few hours. I am using rest, not graphql API.
$ amplify mock function owlpostsfunction

? Provide the path to the event JSON object relative to ********/amplify/backend/f
unction/owlpostsfunction src/event.json
Starting execution...

I don't touch event.json, here is what it is:
{
  "key1": "value1",
  "key2": "value2",
  "key3": "value3"
}

Amplify CLI Version
amplify -v
4.26.0
To Reproduce
Run "amplify mock function owlpostsfunction"
Expected behavior
I think it shouldn't pending for a few hours. Even if I doesn't configure it correctly, it should throw some errors out.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. Mac/Windows/Ubuntu] Mac
Node Version. You can use node -v to check the node version on your system
node -v
v14.5.0

Additional context
Add any other context about the problem here.

@AugustusLi This would be what happens if your lambda function is awaiting a promise that is never resolved. I would suggest checking your lambda function for that case.
That being said, I agree we could timeout the mock execution after some time (probably 15 mins as that is the max execution time for Lambda functions)
marking this as an enhancement

Thank you, Edward. In this case, what's this promise? Could you tell me how can I find out what promise Amplify sent to Lambda after I ran "amplify mock function owlpostsfunction"?

Mock doesn't send a promise to the Lambda handler. It will invoke it in the same way as the Lambda service: https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html
If your handler is async, you need to make sure the promise is eventually resolved. And if you are using the callback, you need to make sure that the callback is eventually called. Otherwise execution will hang forever.

I am still confused how to use "amplify mock function<>". I use exactly the same code as Nader Dabit's tutorial:  https://dev.to/aws/10-minute-tutorial-deploy-an-apollo-graphql-server-with-amplify-functions-38p1.  And the codes has been "amplify push", and it works successfully on "localhost:3000". But if I use the same code and run "amplify mock function<>", it shows:
$ amplify mock function owlpostsfunction
? Provide the path to the event JSON object relative to ***/owl-web/amplify/backend/function/owlpostsfunction src/event.json
Starting execution...
^Cundefined:1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at ChildProcess.<anonymous> (/****/.nvm/versions/node/v14.5.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-nodejs-function-runtime-provider/lib/utils/invoke.js:45:37)
    at ChildProcess.emit (events.js:314:20)
    at ChildProcess.EventEmitter.emit (domain.js:486:12)
    at maybeClose (internal/child_process.js:1051:16)
    at Socket.<anonymous> (internal/child_process.js:442:11)
    at Socket.emit (events.js:314:20)
    at Socket.EventEmitter.emit (domain.js:486:12)

If I follow the tutorial https://docs.amplify.aws/cli/usage/mock#function-mocking-setup, adding the following @function directive, it would be pending for very long time as I mentioned before.
const typeDefs = gql`
  type Query {
    hello: String @function(name: "owlpostsfunction-${env}")
  }
`

So why it works after "amplify push", but doesn't work using "amplify mock function <>". Anything I missed to configure? If yes, any tutorial with more details about how to use "amplify mock" for rest api?
Thank you

@AugustusLi what do you mean by "works sucessfully on localhost:3000"?
The unexpected end of JSON input will be fixed by #4978
When running amplify mock function are you passing in the same event as when it works?

@edwardfoyle Thank you. Just figured out how to set a correct event.json for Graphql, and succeed to get the correct response by running "amplify mock function ". My problem is solved.
Btw, if I run "amplify mock", it returns nothing. Is it because "amplify mock" only works on AppSync? Not work for REST?
$ amplify mock
$               <-- returns nothing

@AugustusLi yes amplify mock only works for AppSync APIs at this time. To simulate a REST request you would need to create an API gateway event as a .json file and pass it in to the function using amplify mock function


the problem of setting default value

i found the offical method to set default value have a problem. when you call the setValue, you will have a error in the method isDecimal. the original method body is return ((this.options.value + this.options.from + this.options.to).indexOf(".")===-1) ? false : true;
this.options.value + this.options.from + this.options.to plus together will be the int type value, it can't call the string type method indexOf, so, i try to have a modify with this method body.
return (((this.options.value + this.options.from + this.options.to)+"").indexOf(".")===-1) ? false : true;

What is the reason of using concatenation with string against of using String(val) or val.toString()? Every object has toString() method...


Kucoin perpetual - Error requesting exchange info

Describe the bug
Upon starting the hummingbot client, observe the error on the log panel There was an error requesting exchange info.
2023-07-17 13:11:05,241 - 36677 - hummingbot.connector.derivative.kucoin_perpetual.kucoin_perpetual_derivative.KucoinPerpetualDerivative - ERROR - There was an error requesting exchange info.
Traceback (most recent call last):
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 874, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/rapcomia/github/development/hummingbot/connector/derivative/kucoin_perpetual/kucoin_perpetual_derivative.py", line 789, in _initialize_trading_pair_symbol_map
    all_exchange_info = await self._market_data_for_all_product_types()
  File "/Users/rapcomia/github/development/hummingbot/connector/derivative/kucoin_perpetual/kucoin_perpetual_derivative.py", line 780, in _market_data_for_all_product_types
    exchange_info = await self._api_get(
  File "/Users/rapcomia/github/development/hummingbot/connector/exchange_py_base.py", line 865, in _api_get
    return await self._api_request(*args, **kwargs)
  File "/Users/rapcomia/github/development/hummingbot/connector/derivative/kucoin_perpetual/kucoin_perpetual_derivative.py", line 936, in _api_request
    resp = await rest_assistant.execute_request(
  File "/Users/rapcomia/github/development/hummingbot/core/web_assistant/rest_assistant.py", line 66, in execute_request
    response = await self.call(request=request, timeout=timeout)
  File "/Users/rapcomia/github/development/hummingbot/core/web_assistant/rest_assistant.py", line 84, in call
    resp = await wait_for(self._connection.call(request), timeout)
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/asyncio/tasks.py", line 408, in wait_for
    return await fut
  File "/Users/rapcomia/github/development/hummingbot/core/web_assistant/connections/rest_connection.py", line 10, in call
    aiohttp_resp = await self._client_session.request(
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/Users/rapcomia/anaconda3/envs/hummingbot/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api-sandbox-futures.kucoin.com:443 ssl:default [nodename nor servname provided, or not known]

Checking the kucoin perpetual connector with perpetual market-making strategy seems to work just fine, created this ticket for monitoring purpose 👀
Steps to reproduce

Start hummingbot client
Check the log panel for the error message

Release version
dev-1.18.0
Type of installation
Source
Attach required files
No response

Fixed with https://github.com/hummingbot/hummingbot/pull/6589, merged to latest development


Incorrect version of node listed in CONTRIBUTING.md?

Does select2 really still prefer node version 0.10? Or is the CONTRIBUTING.md file just not updated? That document states:

Select2 can be built and developed on any system which supports Node.js. The preferred Node.js version is 0.10, but 0.12 and later versions can be used without any noticeable issues. You can download Node.js at their website.

0.12 to 4.2 was a pretty large jump for Node to make, didn't realize that happened.
Select2 is compiled and released with Node 0.10/0.12 (depending on who does it, and when), and we haven't tested it on newer versions of Node yet.

OK, thanks for the heads up! Yeah, there was a big leap when they merged io.js back into Node. The node site says:

Releases 1.x through 3.x were called "io.js" as they were part of the io.js fork. As of Node.js 4.0.0 the former release lines of io.js converged with Node.js 0.12.x into unified Node.js releases.

Then in the last six months they worked their way from version 4.0.0 through 5.9.1.

I'm going to reopen this while we wait to find out if Select2 can be built on newer versions of Node.


nixVersions.nix_2_13: init at 2.13.0

Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

cc
@adisbladis @Mic92 nix-eval-jobs
@lf- nix-doc

Thank you for pinging me. I'll have a look.

I have updated nix-doc so it will build with nix 2.13, as well as adding integration tests.
The update PR is here: https://github.com/NixOS/nixpkgs/pull/211310
Let's get the nix-doc update PR merged before updating Nix so people using the plugin won't have any issues :)

@ofborg build nix-doc

@lf- Looks like nix-doc is broken again with 2.13.1.

damn! I'll fix it in the next couple days.

@zowoq it looks like nix reverted one of the API changes in 2.13.1. I've fixed nix-doc upstream to support that as well, nixpkgs PR: https://github.com/NixOS/nixpkgs/pull/211499

I did an rc1 release for nix-eval-jobs but there is still a double-free bug that I need to fix.

I did an rc1 release for nix-eval-jobs but there is still a double-free bug that I need to fix.

@Mic92 Are you fine with merging this pinning nix-eval-jobs or do you want to wait?

She update of default nix broke the tarball job and is thus blocking channels:
https://hydra.nixos.org/log/wlx6pqyzczhpzl4ips8f9gim3l3kwzqw-nixpkgs-tarball-23.05pre445417.ad161ee67ce.drv
(So far I don't get what exactly got broken there.)

She update of default nix broke the tarball job and is thus blocking channels: hydra.nixos.org/log/wlx6pqyzczhpzl4ips8f9gim3l3kwzqw-nixpkgs-tarball-23.05pre445417.ad161ee67ce.drv
(So far I don't get what exactly got broken there.)

maybe related to https://github.com/NixOS/nix/pull/6204

Should we revert https://github.com/NixOS/nixpkgs/commit/956bc25a803ac00394f2a6d98b7a901ab3065dcf and https://github.com/NixOS/nixpkgs/commit/37a44ff3a0415ab84fe52e9c78ad4bafd227737b for now? (no need to revert the other two)

@zowoq sgtm

https://github.com/NixOS/nixpkgs/pull/212010
@roberth Thanks for debugging and follow up on the nix side.

@zowoq for my release process of nix-eval-jobs it would be nice if I could have 2.13 before it is made the default. Than I can make a release of nix-eval-jobs with the new version.

nix 2.13.1 is in master, we just reverted making it the default.
nix-eval-jobs is still pinned to 2.12, didn't revert as I wasn't sure if it or nix would get fixed first.

nix 2.13.2: https://github.com/NixOS/nixpkgs/pull/212769


Add SecureHardwareState accessor to AsymmetricKey interface + implementation

This work needed to support getters defined in OneAuth, MSAL CPP

@saugup-ms I've added you to this PR as FYI. I am chipping away at this since I am presently blocked on other tasks


feat: update java workshop content and code to cdk v2

this updates the java workshop content and code to cdk v2.
re #308

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

Wanted to make sure the builds passed. Final update will bump the aws-cdk-lib version to 2.0.0

Fixed in #358


Rule 4.7 is unclear

I'm not fully understanding rule 4.7 - "Ensure update instructions are not use alone in the Dockerfile"
First of all, docker history --no-trunc is probably a better solution there, otherwise there is a lot of the command being missed.
Second, is the intent to find when something like apt-get update is used on a line by itself?  What happens if yum is being used in the container? apt-get update != yum update
I see no code to determine if update is being "not use alone"
Should the description be "not used alone" vs. "not use alone"?

Hi @zeddicus76, 4.7 is a simple, not scored, check to inform that previously cached layers might be used if an "update command" is used on a single line in the Dockerfile.
docker history is enough since we're just interested in a stand alone command on a single line.
https://github.com/docker/docker-bench-security/blob/master/tests/4_container_images.sh#L132
The test just checks for the word update so it will catch any application using that option.
<missing>           11 minutes ago      /bin/sh -c apk update &&     apk upgrade && …   3.09MB
<missing>           12 minutes ago      /bin/sh -c apk update && apk upgrade            1.24MB
<missing>           About an hour ago   /bin/sh -c #(nop)  ONBUILD RUN apk update &&…   0B
<missing>           About an hour ago   /bin/sh -c apk update &&     apk upgrade && …   1.7MB

Doesn't this line mean that it is scored?
https://github.com/docker/docker-bench-security/blob/master/tests/4_container_images.sh#L147

You're absolutely correct @zeddicus76, my bad. This has been fixed in #310


Improved input validation error messages for values from env variables

In terms of the publicly-facing API, nothing changed in this PR, except for the error messages presented to end users when input validation fails for values that were provided via environment variables.  Now, when an invalid value is found in an environment variable, the name of the environment variable that contained the invalid value is included in the error message.  This should make it easier to troubleshoot errors caused by forgotten environment variables and other similar cases.
In the internal API, potentially breaking changes were made to some internal methods related to ParamActions and their interaction with Parameters while parsing / validating values.  Unused cruft was removed, a method was refactored to move away from having a param used for a single purpose to having a separate method for that purpose, and the new env_var param was added so it could be included in error messages.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.00%. Comparing base (7db5287) to head (71342d4).
Report is 19 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #78   +/-   ##
=======================================
  Coverage   98.00%   98.00%
=======================================
  Files          49       49
  Lines        6772     6780    +8
  Branches     1064     1065    +1
=======================================
+ Hits         6637     6645    +8
  Misses        110      110
  Partials       25       25

Flag
Coverage Δ

unittests
98.00% <100.00%> (+<0.01%)
:arrow_up:

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

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


fix(frontend): fix incorrect datatable selection count on text filter…

fix incorrect datatable selection count on text filter change

close ce#76


About maevitbackbone and unetr decoder

Thank you for your paper,

When you apply the MAE vit, in MAE architecture there are encoder and decoder, did you used mae encoder ? did you use mask ratio of 0 to make same size of token embeddings to reconstruct to original size.
if we have mask ratio, then token embeding size get smaller as you know.

did you freeze mae encoder which consist patch, block, normalization.

Finally, the architecture will be Mae encoder (before merging mask tokens in mae decoder, not using this) + Unetr decoder is the architecture that you used.?

thanks

Did you freeze mae encoder and only train unetr decoder? or just initialized with pre-trained weight on mae encoder?

Hi,

We used an MAE encoder which only processes visible patches instead of all the patches while pre-training.
In both the pre-training and fine-tuning stages, the encoder is not frozen.
ViT encoder (MAE pre-trained) + UNETR decoder is the architecture
We fine-tuned the whole network including the pre-trained encoder and unetr decoder.

Hope I have understood and answered all your questions well. Please follow up if you have further questions.
Best,
Lei

Thanks.
To summarize,

MAE pre-training : MAE encoder (VIT) and MAE decoder (VIT) is used for pre-training MAE.
Segmentation Downstream task : Especially, did not use MAE decoder (VIT) and used MAE encoder (VIT) with visible patches and UNETR decoder are used for down stream tasks.

Yup

Great, thanks for clarification.


use generic names for Data Foundation

Updated names from "OpenShift Data Foundation" to "Data Foundation" to keep it generic.

/lgtm

/cherry-pick release-4.12

/cherry-pick release-4.12-compatibility


enable the GameMaster to start the Game even if there are less than 4 players

https://github.com/sopra-fs23-group-28/sopra-fs23-group-28-server/commit/e35efa2a2620016b53c07d79f18d9ae11fa5b018


Upgrade to Netbeans 12

Fixes issue #1290
Brief summary of changes
Use Netbeans 12.3 instead of discontinued 8.2 for the platform the GUI is based upon and for actual building on ci
Testing I've completed
CHANGELOG.md (choose one)

no need to update because...
updated...

@carmichaelong @nickbianco @jenhicks If you can give the artifact of this PR a spin would be great. Things to pay attention to:

Installation (Icons)
Toolbar and text size/layout
Resolution of the graphics window (latest netbeans is DPI aware with pros and cons)

@aymanhab Looking good on Windows so far. Installation was good. Font seems about right for my setup. I also tried some standard things that worked as expected:

loaded gait2392 with normal.mot motion
loaded gait10dof18 with CMC results
performed OpenSense pipeline
tested plotting forces from files given with the distribution

@mitkof6 @adamkewley or @halleysfifthinc Not sure if you'd be interested in this as I don't have access to an Ubuntu machine to fix the github action script.

Thanks much @halleysfifthinc I applied your change and will see how the log compares to osx build.

Build is now successful but script to build tar fails because case sensitive name opensim.zip doesn't match OpenSim.zip

My last suggestion missed that unzip-distro depended on build-zip, and now it doesn't actually (attempt to) build the project. :upside_down_face:
After I remedied that there were a couple other OpenSim => opensim case changes to fix:
diff --git a/Gui/opensim/build.xml b/Gui/opensim/build.xml
index 466ee962..4e4df3fb 100644
--- a/Gui/opensim/build.xml
+++ b/Gui/opensim/build.xml
@@ -32,7 +32,7 @@
     <condition property="opensim.dist.dir" value="dist/OpenSim.app/Contents/Resources/OpenSim">
         <os family="mac"/>
     </condition>
-    <condition property="opensim.dist.dir" value="dist/installer/OpenSim">
+    <condition property="opensim.dist.dir" value="dist/installer/opensim">
         <and>
             <os family="unix"/>
             <not>
@@ -319,7 +319,7 @@
         </exec>

     </target>
-    <target name="build-linux" depends="copy-visualizer,copy-models">
+    <target name="build-linux" depends="build-zip,copy-visualizer,copy-models">
         <!-- <echoproperties/> -->
         <unzip src="dist/opensim.zip" dest="dist/installer" />
         <copy todir="${opensim.dist.dir}/Resources/Code/GUI">
@@ -327,12 +327,12 @@
         </copy>

         <delete>
-            <fileset dir="${opensim.dist.dir}/OpenSim/modules/ext"
+            <fileset dir="${opensim.dist.dir}/opensim/modules/ext"
                 includes="**/jxbrowser-*mac*.jar"/>
-            <fileset dir="${opensim.dist.dir}/OpenSim/modules/ext"
+            <fileset dir="${opensim.dist.dir}/opensim/modules/ext"
                 includes="**/jxbrowser-*win*.jar"/>
             <fileset file="${opensim.dist.dir}/bin/opensim.exe"/>
-            <fileset file="${opensim.dist.dir}/bin/OpenSim64.exe"/>
+            <fileset file="${opensim.dist.dir}/bin/opensim64.exe"/>
             <fileset file="dist/opensim.zip"/>
         </delete>

@@ -354,7 +354,7 @@
         <zip basedir="${opensim.dist.dir}/Resources/" destfile="${opensim.dist.dir}/Resources.zip" />
         <delete dir="${opensim.dist.dir}/Resources"/>

-        <replace file="${opensim.dist.dir}/etc/OpenSim.conf" value="${app.version}">
+        <replace file="${opensim.dist.dir}/etc/opensim.conf" value="${app.version}">
             <replacefilter token="@VERSION@" />
         </replace>

I am now able to successfully build. Font size and spacing matches the system font better now!

Awesome, thanks @halleysfifthinc Please commit your changes as above and this PR will be good to go.

@aymanhab I merged @halleysfifthinc 's PR into this branch

Thanks @carmichaelong so are we good to merge?

Great, thank you @carmichaelong and @halleysfifthinc Merging


Use pygmsh to make built-in grids

Using pygmsh would be neater than using os.system("gmsh file.geo") and will be less likely to have issues on (eg) Windows

Does pygmsh work in Windows? Our current method is clunky but works in Windows.

I will check before doing anything about this

We've decided not to do this


OpenAI has already released the "gpt-4-turbo" model, when will the plugin update this model?

RT.

Development has been completed, pls wait for 3.0.6 released today. Due to market review, it may not be available until tomorrow.


Update hdinsight-use-availability-zones.md

Adjusting the position of 'Korea Central' to align with the alphabetical order of the list

@anuj1905 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@sreekzz
Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @sreekzz


Document concept of "host local" API

The GRPC API exported by containerd has the assumption the caller and daemon will have access to the same host resources (filesystem, network, etc.). This means that methods may return local path references or may shared access to a part of the filesystem (ie a bundle).
Put another way, it can be said that the API exported via GRPC is not a remote.

This may not be the exact case anymore. I think we can close this until we come up with something more definitive.


Support search new friends by phone number or user name.

Is your feature request related to a problem? Please describe.
Wechaty have bot.Friendship.add() method for add new friend, but we can not make sure the new friend is who we want to add, so we hope Wechaty could support search friend, and then we could check the new friend by this API.
Describe the solution you'd like
Base
In primary level, the add() method has two steps :

search friends and get the v1 and v2 attributes for add friends
add friends by v1 and v2 (v1 changeless, v2 has expire time)

Design
So let's make search() as a static method for Friendship.
wechaty
public static search (contact: Contact): Promise<Contact>

wechaty-puppet
public abstract friendshipSearch (contactId: string): Promise<void>

wechaty-puppet-padplus
In friendshipSearch() method, there has two important things to do:

save v1, v2 data to cache
abstract data to generate one contact and save it to cache as not friend

There's no need to request v1, v2 again if they are in cache, so we could get them from cache and use them in add() method.
Example
const _contact = bot.Contact.load('phone number')
const contact: Contact = await bot.Friendship.search(_contact)

if (contact.name() === 'nick name') {
  await bot.Friendship.add(contact, 'hello')
}

Question

For the type of param in search(), I think string is better than Contact, easy to use indeed.

After we searched new friend, it will generate one Contact which is not friend, so we should delete this Contact when add() method finished. Or we should save it for 24 hours (maybe it due to the expire time of v2) for one case :

If the friend has not accept friend request, and the bot want to add again.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
[enhancement]

we can not make sure the new friend is who we want to add

Cloud you please explain that what's the meaning of the above description?
In other words, what's the purpose of this new API?

If we want to add new friend, the first step we need to search him and then the next step add the new friend.
The purpose is for the first step.

Thanks for your quick response.
If we want to search for anyone by their mobile phone number, I would like to use the following API:
const contact = await bot.Friendship.search({ phone: '13913813711' })
if (contact) {
  await bot.Friendship.add(contact)
}

I feel the above code will be easy to read and be understood, please feel free to let me know what you think.

How about the user name? We know we can search friends by two ways : phone and user name.
I think it's better to use string parameter for search.
const contact = await bot.Friendship.search(phoneOrUserName)
if (contact) {
  await bot.Friendship.add(contact)
}

We can support the weixin Id by defining:
{
  phone?: string,
  weixin?: string,
}

Then we can support two ways for the search.

{
  phone?: string,
  weixin?: string,
}

This design should solve the problem.


Are you open building a scraping Website?

Hello TM,
Checked out your repos, web scraping + Quant. Would you be open to building a data intensive website (example website: https://docoh.com).  Of course, you will be compensated for your time.
Open to hiring a support to assist you if needed.  Frontend will be bootstrap ReactJS framework, and you will be working the backbone of the website.
This project will be more than interesting and challenging for you although experienced due to the website requires a bit more flavor (ML + Quant) integration and more...
Really hope you will consider working on this project.
Ciao~

Sorry for the late reply, could you provide more context on what you are trying to achieve? I took a quick look at docoh. That website doesn't seem like ML+quant at all.

Thanks for your reply,
Being this post being public,  could you email me so I can provide full detail including ML feature?  jmins500@gmail

Unable to open email due to incorrect pw.  Sent you an email, are you able to confirm?

I sent you my reply roughly two weeks ago but I haven't received any further incoming emails. Any further comments? Otherwise I will close the issue.

Oh!  I did not see any reaponse….  Will check again right now.
On Wed, Dec 15, 2021 at 10:50 AM T.M. @.***> wrote:

I sent you my reply roughly two weeks ago but I haven't received any
further incoming emails. Any further comments? Otherwise I will close the
issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/je-suis-tm/je-suis-tm/issues/3#issuecomment-995080801,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC3YI6J36UXNWAPK2CWFWTTURDPOLANCNFSM5IQO6NAQ
.

--
Best Regards,
Jay Min


New Scenario: Crypt Dragon

Name:  Crypt  Dragon
Link
https://github.com/MatthewThornton/Valkyrie_Crypt_Dragon
Please  add to  mission list.

Hello, @MatthewThornton
I saw you didn't change the name to your scenario. You can't use a generic one like "editorquest1.valkyrie".
One step you must mandatorily do is to change the name, i.e., cryptdragon.valkyrie, on your repository (avoid any special character on the name).
Another step is to label this scenario either MoM or Descent (I guess it's a Descent quest).
@scrubbless , is there anything else he must do?

@MatthewThornton Still waiting to play your Scenario. Please update the name as vidimus described otherwise it will not be possible to upload it.
Don't let it get lost like this one: https://github.com/NPBruce/valkyrie/issues/1316

I'll add this one it has a supported name :)

What did it happen at the end? Would it be added or not?

Without any changes from the author this won't be possible. This would be the second descent mission that can't be added because the author abandoned his scenario. :(

So sad...

Yeh, it's just out of reach. If you want to play it, you can download the contents of the repo and paste it into your de\download folder to play "offline"

Hi @MatthewThornton
I can't publish this with the current path, @vidimus  posted how to fix this above.
If you are unsure and would like me to fix this for you, please feel free to give me contributer access to you repo. I would happily help maintain the scenario for you, such as adding translations help fix game breaking bugs.

I'll close this issue down for now. @MatthewThornton  if you would like this added, please perform the steps above and reopen this issue.


ARTEMIS-1221 Duplicated ID causes LargeMessage lost at backup

When a large message is replicated to backup, a pendingID is generated
when the large message is finished. This pendingID is generated by a
BatchingIDGenerator at backup.
It is possible that a pendingID generated at backup may be a duplicate
to an ID generated at live server.
This can cause a problem when a large message with a messageID that is
the same as another largemessage's pendingID is replicated and stored
in the backup's journal, and then a deleteRecord for the pendingID
is appended. If backup becomes live and loads the journal, it will
drop the large message add record because there is a deleteRecord of
the same ID (even though it is a pendingID of another message).
As a result the expecting client will never get this large message.
So in summary, the root cause is that the pendingIDs for large
messages are generated at backup while backup is not alive.
The solution to this is that instead of the backup generating
the pendingID, we make them all be generated in advance
at live server and let them replicated to backup whereever needed.
The ID generater at backup only works when backup becomes live
(when it is properly initialized from journal).

@clebertsuconic ok, I'll fix it.

@clebertsuconic
well, it turns out more work need to be done. It happens that the changes of code just avoids the bug and makes the test pass. The pendingIDs are not used at all. I need a bit more time to correct it. :)

@clebertsuconic I think I've done it correctly this time. Pls review again.
Thanks
Howard

whoa.. that's a nice Fix!!! Very nice!!!!

@clebertsuconic Thanks! :)


Username isn't updated after steal_token

Empire Version
1.5.0
OS Information (Linux flavor, Python version)
Linux HOSTNAME 4.5.0-kali1-amd64 #1 SMP Debian 4.5.5-1kali1 (2016-06-06) x86_64 GNU/Linux
Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.
When stealing a token using the steal_token command, the username doesn't refresh in either the info or agents menus unless you run a sysinfo first.
Screenshot of error, embedded text output, or Pastebin link to the error
Any additional information

This should be fixed in dev with https://github.com/PowerShellEmpire/Empire/commit/21893bacde237677947decf22916dc3d2a1a21ed
The sysinfo command is now implicitly called when running steal_token or revtoself.


Facebook login is not working anymore

The facebook login is not working anymore and the error screen is attached to better understanding about the error
Screenshot attached

How to reproduze the user scenario

Create a account, exit from account, or any notification from the system

More details in how to contribute, read the contribution guidelines
codemill$10

Facebook issue that now has strict matching Oauth return url
https://developers.facebook.com/docs/facebook-login/security/#strict_mode


Flaw in AbstractConfigProvider

Hello,
Currently I am investigating an issue we have in one of our shops. The issue is that the buckaroo fee for transactions was not displayed inclusive tax. But I believe the exact issue is not relevant because the cause is much deeper than this.
I have tracked this down to the AbstractConfigProvider::__call  method. What this method does is dynamically create a string which should be a constant in the class that implements AbstractConfigProvider and then pass it into $this->getConfigFromXpath(constant($constant), $store);
This however is not possible, because of Magento creating Interceptor classes for all classes, this is to enable the plugin system.
The string that is created for example XPATH_BUCKAROOFEE_PRICE_DISPLAY_CART should be static::XPATH_BUCKAROOFEE_PRICE_DISPLAY_CART but instead is static::XPATH_INTERCEPTOR_PRICE_DISPLAY_CART
This is a fundamental problem with all config providers. My suggestion is get rid of the AbstractConfigProvider::__call all together and implement the methods defined above the implementing classes instead of relying on magic.
class BuckarooFee extends AbstractConfigProvider
{
    ...
    public function getPriceDisplayCart(?Store $store): int
    {
         return $this->getConfigFromXpath(self::XPATH_BUCKAROOFEE_PRICE_DISPLAY_CART, $store);
    }
    ...
}

I will solve my issue in a template for now.

@Buckaroo-Rens

@robbertstevens  thank you for your report !
But as far as we know interceptors are used not in all of cases in Magento.
They are in use only in case if plugin(s) were assigned to specific class.
ConfigProvider classes exactly that case.
You can check that logic inside Magento's framework core (for example 'getInstanceType' method)
We've also debugged "$constant" variable inside method mentioned by you (AbstractConfigProvider::__call) in many places of application and we had no cases where "INTERCEPTOR" substring was in
that debug.
So we can suspect that maybe you're using some custom plugin for our ConfigProvider classes.
Let us know if so please.
As well as please provide any other additional useful details to check your issue (e.g. : exact place where that setting is in use, debug statement, maybe access to staging where it can be reproduced, etc) , because it looks like we can not reproduce it at our side and assuming that code was unchanged within last year and didn't cause issues at many merchants.
Thanks in advance !

We indeed have an plugin on the Buckaroo\Magento2\Model\ConfigProvider\BuckarooFee this should be possible, but because of the above it breaks.
The solution I gave is really easy to implement and it will make the code much better in general. It will make the code also much easier to extend via plugins because you do not have to do some trickery with making plugins on a magic method. And you do not have to do trickery with annotation to notify the IDE that we have indeed certain methods available.

it's good to know that we were right in our research according to custom plugin you have
solution you gave is easy to implement, but when it's for only one config variable
when you have tens of variables, then it will be tens of copy-paste methods also which is not good assuming DRY principle, so we will remain compact (__call) based approach

You are not repeating anything right?  All the methods you will add are different and will return different values. So you will not repeat yourself.

making of tens similar access methods is possible and much more trivial than existing approach , but existing approach allows us to remains code more compact and easy to change if needed

@robbertstevens Like my colleague @vladislav-padalka-hys mentioned, we are currently not planning to change this. This piece of code is in here since the start of our plugin. We are always open to new/better changes but for now we see no direct improvement for all of our merchants by changing this.
I will put your feedback on our backlog and we will discuss this later this year.
If you need some help with your original issue 'buckaroo fee for transactions was not displayed inclusive tax' please let us know.

I'd like to second the issue. I wrote a plugin for the iDeal config provider to apply a custom sorting on the issuers and then discovered that the module stopped working.
I have written a patch (for which I created a pull request in the TIG era) that uses another approach: just strip off the 'Interceptor' part:
diff --git a/Model/ConfigProvider/AbstractConfigProvider.php b/Model/ConfigProvider/AbstractConfigProvider.php
index aacc0fea..463c23fd 100644
--- a/Model/ConfigProvider/AbstractConfigProvider.php
+++ b/Model/ConfigProvider/AbstractConfigProvider.php
@@ -120,6 +120,10 @@ public function __call($method, $params)
             $class = get_class($this);
             $classParts = explode('\\', $class);
             $className = end($classParts);
+            if ($className == 'Interceptor') {
+                array_pop($classParts);
+                $className = end($classParts);
+            }

             /**
              * Uppercase and append it to the XPATH prefix & child class' name

You can find the commit here: https://github.com/ecomni/buckaroo-magento2/commit/7ba9c35f6b7c0b70e15ba646f5c131ee478a6df7
I'd be happy to submit a new PR if you want to.

@markvds Thank you for your comment. Need to Look at the details from @robbertstevens which look valid to me. In the meantime feel free to submit a PR, please branch off develop - Contribution Guidelines

@robbertstevens
FYI, In this PR I am trying to tackle the raised issue - removing the magic __call() and implementing the actual functions - https://github.com/buckaroo-it/Magento2/pull/246 - feedback would be welcome.

I'm surprised this issue still has not been solved (1.44).
@markvds I implemented the same solution, and the issue is gone.
@serpentscode please solve this in the next bugfix release.
Also, I suggest doing additional testing with Proxy classes. I only encountered issues with classes that have plugins and, therefore, Interceptors, but it is easy to imagine that Proxy classes could trigger the same bug.

@TerrorSquad we have refactored this issue on another branch Buckaroo v2.0 #246. We are preparing a bigger release with the refactored code, changing the main branch to address this problem is not now our priority, because it will be fixed soon in the new release.

@TerrorSquad we have refactored this issue on another branch Buckaroo v2.0 #246. We are preparing a bigger release with the refactored code, changing the main branch to address this problem is not now our priority, because it will be fixed soon in the new release.


Cannot update VSCode (Insider System Installer)

Does this issue occur when all extensions are disabled?: Yes/No
Not related to extensions

VS Code Version:
OS Version: Windows 10 Pro 19044.1620

Steps to Reproduce:

Try to update the VSCode Insider to the current available version

This is not a duplicate of other update issues because this is happening to the "System Installer" version.
I switched to "System Installer" version around 2 months ago because the "User Installer" version couldn't be updated and developers closed the issue without any fix.
Now this is happening again for System Installer version (Insider build).

/duplicate #47841
This issue is independent of System vs User installers. Please disable Windows background updates by setting update.enableWindowsBackgroundUpdates to false.

How about you fix the issue like hundreds of millions of Windows software and applications we can update for years?


Fix broken import of go.opentelemetry.io/otel

Changes

This PR includes 2 commits:

"Cleanup: migrate off deprecated trace.NewNoopTracerProvider()" migrates off the deprecated trace.NewNoopTracerProvider func to use what's provided in go.opentelemetry.io/otel/trace/noop.
"Fix broken import of go.opentelemetry.io/otel" This commits fixes the broken dependencies on go.opentelemetry.io/otel. It patches the tracing package with an updated tracingProvider to
implement the embeddedTracingProvider with the provider in the go.opentelemetry.io/otel/trace/noop pkg.

/kind bug
fixes: #7464
Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[ ] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
[ ] Has Tests included if any functionality added or changed
[ ] Follows the commit message standard
[ ] Meets the Tekton contributor standards (including functionality, content, code)
[ ] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
[ ] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
[ ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes
NONE

@JeromeJu are you working on this right now? Or I think we can close this and come back when we really need to update otel

@JeromeJu are you working on this right now? Or I think we can close this and come back when we really need to update otel

Agreed. Since we have the workaround for concurrent modification error. Let's close this for now.

Not too sure why the go coverage test fails or how to debug this 🤔


Ensure we're handling client responses for window show message

Motivation

Implementation

Automated Tests

Manual Tests

#2814  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @vinistock and the rest of your teammates on  Graphite


[spl-stake-pool] not able to import types from JS package

Cannot import types such as StakeAccount in a React 18 application.

The underlying library also appears to use superstruct which looks like overkill?
For now we just need the things that are marked for export to actually be exported and usable.
Project reproducing the issue: https://github.com/aaronovz1/stake-pool-issues

I don't necessarily have a problem exporting these types, but it looks like they were intentionally left out of the exports:
https://github.com/solana-labs/solana-program-library/blob/177a6c94d751e49be0e299b0155823195a21e7fe/stake-pool/js/src/index.ts#L46-L48
In the meantime, you should be able to get by with a type alias like this:
type StakeAccount = Awaited<ReturnType<typeof getStakeAccount>>;

I also wonder if we should just include these in @solana/web3.js under the Stake Program submodule.

Your suggestion partially works but we have a function which converts an AccountInfo into a StakeAccount but this can't be done as the superstruct method create can't take just the StakeAccount type for the second param.
export function accountInfoToStakeAccount(account: AccountInfo<Buffer | ParsedAccountData>): StakeAccount | undefined {
  return ("parsed" in account?.data && create(account.data.parsed, StakeAccount)) || undefined;
}

'StakeAccount' only refers to a type, but is being used as a value here.
A similar thing is done here https://github.com/solana-labs/solana-program-library/blob/177a6c94d751e49be0e299b0155823195a21e7fe/stake-pool/js/src/index.ts#L129 but we load a number of accounts within one gMA call, so need access to parsing the account separate to a single gAI call.

So, this library is specific to the Stake Pool program. The type StakeAccount is the jsonParsed account data for an account owned by the Stake Program, so it doesn't belong in this library as an exported member of Stake Pool.
Technically, if it was to be exported anywhere, it would be the legacy @solana/web3.js, under programs/stake.
With that being said, there will soon be a new client library specifically for the Stake Pool program, where types for the program's account state will be available. Considering we don't currently export jsonParsed types for accounts at the moment, it might make sense to wait until that library is available.

The underlying library also appears to use superstruct which looks like overkill?

I'm a little bit confused why you consider the use of superstruct in @solana/spl-stake-pool to be overkill, but you're also using it in your library?
With that being said, and considering my points above, is there another way you can do this without superstruct, or do you need this library? Maybe something like:
type StakeAccount = Awaited<ReturnType<typeof getStakeAccount>>;

export function accountInfoToStakeAccount(account: AccountInfo<Buffer | ParsedAccountData>): StakeAccount | undefined {
  return 'parsed' in account?.data ? account.data.parsed as StakeAccount : undefined;
}

Sorry for late response - using your example we can get away with not using superstruct. It was just there from some old legacy code. I think this can be closed now thanks.


fix: refacrtoring and solves #2321

Which problem is this PR solving?

fixes https://github.com/open-telemetry/opentelemetry-js/issues/2321
refactored commit https://github.com/open-telemetry/opentelemetry-js/pull/2357
refactoring of CollectorExporterBrowserBase, utils and test cases for CollectorTraceExporter
extended test cases for CollectorTraceExporter

Short description of the changes

blob type as header is send with beacon
user has the ability to set the blobType in collectorConfiguration
after looking at the codebase , i think that the utils.ts should not have logic behavior for correcting the headers, given in the code base , the CollectorExporterBrowserBase knows about headers and logic

saved as draft until a result merge output from https://github.com/open-telemetry/opentelemetry-js/pull/2336
in short this commit has tests that pass
CollectorTraceExporter - web

when "sendBeacon" is available

and user defines headers
✓ should successfully send user defined headers using XMLHttpRequest
✓ Request Headers should contain "Content-Type" header
✓ Request Headers should contain "Accept" header

and user does not define headers
✓ should successfully send the spans using sendBeacon
✓ should successfully send expected blob type using sendBeacon

and user sets headers as undefined
✓ should successfully send the spans using sendBeacon
✓ should successfully send expected blob type using sendBeacon

and user defines blob type
✓ should successfully send the spans using sendBeacon
✓ should successfully send user defined blob type using sendBeacon

and user does not define blob type
✓ should successfully send the spans using sendBeacon
✓ should successfully send expected blob type using sendBeacon

and user defines blob type as undefined
✓ should successfully send the spans using sendBeacon
✓ should successfully send expected blob type using sendBeacon
should be able to handle logs
✓ when successful with can-send message
✓ when errored with cannot send message

when "sendBeacon" is NOT available

and user defines headers
✓ Request Headers should contain user defined headers
✓ Request Headers should contain "Content-Type" header
✓ Request Headers should contain "Accept" header

and user does not define headers
✓ should successfully send the spans using XMLHttpRequest
✓ Request Headers should contain "Content-Type" header
✓ Request Headers should contain "Accept" header

and user sets headers as undefined
✓ should successfully send the spans using XMLHttpRequest
✓ Request Headers should contain "Content-Type" header
✓ Request Headers should contain "Accept" header

and user defines blob type
✓ should successfully send the spans using XMLHttpRequest
✓ Request Headers should contain "Content-Type" header
✓ Request Headers should contain "Accept" header

and user does not define blob type
✓ should successfully send the spans using XMLHttpRequest
✓ Request Headers should contain "Content-Type" header
✓ Request Headers should contain "Accept" header

and user defines blob type as undefined
✓ should successfully send the spans using XMLHttpRequest
✓ Request Headers should contain "Content-Type" header
✓ Request Headers should contain "Accept" header

should be able to handle logs
✓ should log the successful message
✓ should log the error message

CollectorMetricExporter - web

when "sendBeacon" is available

✓ should successfully send metrics using sendBeacon

✓ should successfully send blob type using sendBeacon

... tests cases can be extended with further tests in context of review ....

Before you take this PR out of draft status please give it a meaningful name. The PR name goes into the git log as the main message when the PR is squashed and having to refer to an external issue to learn its meaning is a frustrating workflow.

closing this PR because of https://github.com/open-telemetry/opentelemetry-js/pull/2336


Bug: Slider with carousel stutters after upgrading from 1.5.0 to 1.5.8

Here are my settings:
    var $carousel = $( "div.slick-carousel" );
    var $slider = $( "div.slick-slider" );

    // Carousel with 5 smal images above the slider
    $carousel.slick({
        asNavFor: '#slider .slick-slider',
        slidesToShow: 5,
        slidesToScroll: 1,
        centerMode: true,
        focusOnSelect: true,
        prevArrow: '#carousel .prev-arrow',
        nextArrow: '#carousel .next-arrow'
    });
    // Big slider
    $slider.slick({
        asNavFor: '#carousel .slick-carousel',
        slidesToShow: 1,
        slidesToScroll: 1,
        prevArrow: '#slider .prev-arrow',
        nextArrow: '#slider .next-arrow'
    });

When I upgrade, I have a stuttering slider. Not much but very wel noticable. I keep it provisional on 1.5.0.
Maybe more noticed this bug?

Hey, I'm closing this because there're no test cases, but I think there are other open issues that consider this. Thanks!


rasterize_triangles_kernel_1.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs

Error in compiled renderer. Says : rasterize_triangles_kernel_1.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
Running :
Ubuntu 16.04
Tensorflow-gpu 1.12.0
CUDA 9.0

Hi, this is very strange, since I have test the .so file in the environment. This error may occur when the tf version  does not match the .so file. However, based on the information you provided, it seems the tf version you are using is right. Maybe you can wait for #4 's reply.


Scheduled webjob aborted existing running instance every schedule

The scheduled webjob generally waits for the running instance to complete before launching a new one.   However, there is a situation where it can overlap and terminating new instance every schedule.
Assuming for some unknown reason (such as short network blip in lockfile), the new scheduled job instance did not detect an ongoing instance (meaning it was able to grab the LockFile) and proceeded to start the new instance.     As part of starting new one, it terminated all the existing webjob instances.    The issue was the terminated webjob instance released the same LockFile on exit.
Now we have the new instance running but no lock was held.   Once the new schedule fires, it grab the lock and terminate existing instance (which caused the lock to be released).    This overlapping cycle led to a premature termination of webjob every schedule.
Restart or webjob  taking < schedule period to complete will auto resolve this.   We could consider improvement by using a more primitive lock (ManualResetEvent) to ensure one instance running in addition to lock file.

Hi
If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request
This way we can better track and assist you on this case
Thanks,
Joaquin Vano
Azure App Service


Added a stale configuration: https://probot.github.io/apps/stale/.

https://probot.github.io/apps/stale/ is a service that automatically closes issues/PRs after a configurable number of days of inactivity.
It is somewhat controversial to put this forward, but essentially my personal stance is: if an issue is untouched for >20 weeks it is probably not the biggest issue that the Iris development community should be focussing on (that is not to say that individuals can't chose to focus on whatever they like, it is just not representative of the focus of the Iris community as a whole).
I've picked these numbers out of the blue, and am completely up for a reasoned justification for their change. I'm certain the message itself could be significantly improved - let's focus on the wording if we decide to actually go with this.
cc: @SciTools/iris-devs - would be great to get some visual feedback in the form of 👍 / 👎 on this description. The votes will be taken into consideration by the steering council when it makes the final call.

I'm thumbs down for now – not because I think this is a bad idea but because I think the problem lies with us not servicing issues, rather than because the issue is a bad idea...

I assumed this proposal implicitly implies that a ticket will be serviced by a scitools dev within this period for this to work.
That is, this helps to remove the ownus of scitools devs to kick tickets into touch where action is awaiting from a contributor (lying dormant).
@pelson, are tickets belonging to a milestone excluded?  This might be useful if not.

There is no special config here - if an issue is untouched for the specified period of time, it gets closed. Whether the issue is important or not. There is a means to configure exclusions based on labels (the example given is for a label of "security"), but honestly, if the issue is important enough, there should be enough traffic on it to avoid the bot closing it down...
@dkillick - I agree with your statement about servicing issues, but essentially that comes down "in a world where we have infinite time". In practice, I believe the really important stuff will be talked about/commented upon and that will give us a good sense of what we (as a community) should focus our efforts on.

I'm undecided on this, but I think the open issues are a good repository of "would-like-to-haves." I agree we need to be more aggressive than we have been about closing old issues, but I'm not sure automating it is a good idea. I can imagine there might be a lot of issues where the discussion has run it's course, perhaps with an agreement that it's something we'd like at some point. I wouldn't like to see issues of that sort being closed.

As an idea, I think we may want to pick this up again sometime, but for now, I'm going to park it.
This is partially down to the fact that I'm not certain the tool is actually working in the way I wanted it to.


failed to find this automation in '/config' folder

I am sure this is me being dumb but I have gone through the installation process multiple times and cannot find what I have done wrong.
I am running:
Home Assistant 2022.8.7
Supervisor 2022.08.5
Operating System 8.5
Frontend 20220802.0 - latest
I installed Shortumation via HACS and all went fine but when I start it up I get an error in the UI:
"failed to find this automation in '/config' folder"
and this error in the log:
"AssertionError: configurations.homeassistant.packages[vacuum] must be a dictionary!"

This seems related to https://github.com/asosnovsky/Shortumation/issues/159
Can you share your shortumation logs and maybe some of the configuration yaml / folder structure for your packages?

@ezfrag2021 please go to https://github.com/asosnovsky/Shortumation/issues/159 to track this issue


Make button hover consistent

Related Issue

Make hover effect on button consistent

Closes: #340
Describe the changes you've made

Type of change
What sort of change have you made:

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Checklist

[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] My changes generate no new warnings.

Code of Conduct

[x] I agree to follow this project's Code of Conduct

@amanjaiman1 Kindly merge this PR

@amanjaiman1 Will you please tell me the reason why this PR is approved but not merged?

@MisterMickey File structure has changed, So try to resolve the conflicts.


Fixed support for "additionalProperties"

Checklist

[x] I'm adding or updating code

[x] I've added and/or updated tests

[x] I'm adding a new feature

[x] I've updated the playground with an example use of the feature

Details
I fixed the bug of the original property 'additionalProperties' and can support the delete function to beautify the style.

@EasyTuan hi, what's the status? Do you plan to keep on working on this PR?


Security issues

It looks like an output of a PRNG (a field element) allows to determine the internal state (self.seed), and therefore to determine future output values. If correct, this would violate the definition of a secure PRNG.
Also, the hash_method received by generate() is not verified to be in {0, 1, 2} (as noticed by @GustaveCharles).

So this is not safe to use in prod? cc @manu-bhadoria


Not connected to server with reporters: ['remote']

When i run
karma start karma.conf.js
I am getting the below error:
c:\NIWorkSpace\network-insights-web-portal>karma start karma.conf.js
24 05 2016 12:24:51.473:INFO [karma]: Karma v0.13.22 server started at http://lo
calhost:9876/
24 05 2016 12:24:51.488:INFO [launcher]: Starting browser PhantomJS
24 05 2016 12:24:52.488:INFO [reporter.remote]: Error while communicate to remot
e server ("localhost:8888") to report test results.
Error: connect ECONNREFUSED <IP_ADDRESS>:8888
24 05 2016 12:24:52.489:INFO [reporter.remote]: Connection closed
24 05 2016 12:24:53.057:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on s
ocket /#dGuxYeoDdWFNol1QAAAA with id 55430891
24 05 2016 12:24:53.079:ERROR [reporter.remote]: Not connected to server.
24 05 2016 12:24:53.089:ERROR [reporter.remote]: Not connected to server.
24 05 2016 12:24:53.091:INFO [reporter.remote]: Error while communicate to remot
e server ("localhost:8888") to report test results.
Error: This socket is closed
24 05 2016 12:24:54.095:INFO [reporter.remote]: Karma finished...
c:\NIWorkSpace\network-insights-web-portal>
My karma.conf.js file is:
// Karma configuration
// Generated on Tue May 24 2016 10:48:30 GMT-0400 (Eastern Daylight Time)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],

// list of files / patterns to load in the browser
files: [

  //'js/angular/angular.min.js',
  //'web-app/test/angular-mocks.js',
  //'js/angular/angular-mocks.js',
  'web-app/test/*Spec.js'

],

// list of files to exclude
exclude: [
],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['remote'],
remoteReporter: {
    host: 'localhost',
    port: '8888'
},

// web server port
port: 9876,

// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,

// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,

logLevel: config.LOG_INFO,

plugins: [
  'karma-jasmine',
  //'karma-junit-reporter',
  'karma-chrome-launcher',
  'karma-phantomjs-launcher',
  'karma-remote-reporter'
],

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity

})
}
Any help would be appreciated.
Thanks

Hi,
in your karma config you've configured the remote reporter to point to localhost:8888 which is not the default port (9889). If you want to use a different port then you must annotate the test class with
@KarmaTestSuiteRunner.KarmaRemoteServerPort(8888)  (I've described that almost at the end of the documentation)...
Have you done that?
With kind regards

Thanks for the response. I initially   tried it with the default port but got the same error, Please find the error for your reference:
c:\NIWorkSpace\network-insights-web-portal>karma start karma.conf.js
24 05 2016 13:06:44.803:INFO [karma]: Karma v0.13.22 server started at http://lo
calhost:9876/
24 05 2016 13:06:44.803:INFO [launcher]: Starting browser PhantomJS
24 05 2016 13:06:45.809:INFO [reporter.remote]: Error while communicate to remot
e server ("localhost:9889") to report test results.
Error: connect ECONNREFUSED <IP_ADDRESS>:9889
24 05 2016 13:06:45.809:INFO [reporter.remote]: Connection closed
24 05 2016 13:06:46.356:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on s
ocket /#fN2SRkxmFOciQtzsAAAA with id 78011606
24 05 2016 13:06:46.377:ERROR [reporter.remote]: Not connected to server.
24 05 2016 13:06:46.387:ERROR [reporter.remote]: Not connected to server.
24 05 2016 13:06:46.389:INFO [reporter.remote]: Error while communicate to remot
e server ("localhost:9889") to report test results.
Error: This socket is closed
24 05 2016 13:06:47.392:INFO [reporter.remote]: Karma finished...

Can you post one of the test cases?

i have not event started with writing test case. I was just trying the setup.When i tried to run
'karma start karma.conf.js' there was an error.
Below is the link that i am referencing for setting-up :
https://objectpartners.com/2014/08/19/add-javascript-unit-tests-and-run-them-with-grails-test-app/

haha - interesting - I didn't know that somebody actually wrote about that plugin :)
So back to the problem:
You need at least one test case e.g.
`import de.is24.util.karmatestrunner.junit.KarmaTestSuiteRunner
import org.junit.runner.RunWith
@RunWith(KarmaTestSuiteRunner.class)
@KarmaTestSuiteRunner.KarmaConfigPath("./path/to/karma.conf.js")
public class JavaScriptUnitTestKarmaSuite {
}`
The test runner I've implemented (@RunWith(KarmaTestSuiteRunner.class)) will start a server and will receive the tests results from karma which are send by the configured remote reporter karma plugin...
When the server receives the test results from karma it will publish them as JUnit test reports...
But without one test case - nobody starts the server, that's why the remote reporter karma plugin outputs the connection refused exception ...
Does that make sense to you?
with kind regards

Totally makes sense. Let me try it. Thanks again

I got it working. Thanks for the help
A quick question though
I have my own grails plugins where we have given angular.min.js
Now in my module where i have configured karma.conf.js i need to use the angular.min.js from the plugin as i don't want to duplicate it in all the modules.
When i run the unit test with ''test-app unit:javascript" it is not able to reference the "angular.min.js" from the plugin. Though if i give "angular.min.js" locally its running fine.

Hmm - I'm not sure I understand your problem correctly - let me summarise what I think you've meant:
You've have a grails application which consists of several modules (plugins) -> one of you're plugins contains the static js resources like angular.min.js let's call it my-resources-plugin
Another plugin or the main app let's call it foo-module depends on that my-resources-plugin and foo-module contains the js tests.
Now you have the problem that foo-module can not run the tests since you can't reference the my-resources-plugin::angular.min.js in the foo-module::karma.conf.js?
If that's the case - I'm not sure whether I can help you that much since my grails-time is over for almost 2 years and I don't know grails in that detail anymore...
But let me ask a question: if your foo-module depends on my-resources-plugin (I guess the dependency is a compile dependency) the my-resources-plugin should be stored somewhere in the directory of the foo-module (e.g. //target/work/plugins)? If so you still can reference the angular.min.js (you just need to move the karma.conf.js in a parent directory....
Does that help you?


EI 2028 - Function app terraform module should be extended with Private endpoint support (1 of 2)

Jira link (if applicable)
https://tools.hmcts.net/jira/browse/EI-2028
Change description
Modified code to make function apps accessible internally only via private endpoints.
Checklist

[x] commit messages are meaningful and follow good commit message guidelines
[x] README and other documentation has been updated / added (if needed)
[x] tests have been updated / new tests has been added (if needed)
[ ] Does this PR introduce a breaking change

All issues remediated. P/R ready to be re-reviewed/re-examined


Modified blog previews on home page and worked on individual post pages

Wow, lot's of stuff here. Nice work.


core: try to prevent command lockup

This is an attempt to fix a lockup issue that we see in the Swift
example app when the camera capture status subscription is used.
Presumably, the lockup has nothing to do with the actual camera capture
status but it just leads to the right timing to trigger something else.
What happens is that receive_timeout() is called but then the command
queue turns out to be empty (returns nullptr). After that, no more
commands can be processed and we keep getting the warning:
"Command ack not matching our current command: 257".
This makes sense because we stop doing work, so send any commands as
long as _state is State::WAITING and there is no other timeout that
would reset this.
Therefore, this change should resolve that case by reseting _state, so
that we can keep going.
However, this change does not fix or explain why the queue is empty in
the first place and out of sync with _state.

I tested this and it doesn't break the integration test, so I suggest it's worth a try in the iOS example.


[2.0] Support modules attribute of the event by logging Composer packages

Q
A

Branch?
2.0

Bug fix?
no

New feature?
yes

BC breaks?
no

Deprecations?
no

Tests pass?
yes

License
MIT

A long standing issue (#175) is open to request the implementation of the support for the modules attribute of the event. In Sentry this means that the name and versions of the Composer packages used by the project where the SDK is used would be logged and displayed. This PR adds support for this feature

I'm not sure if we should enable this by default

I don't think we should enable it by default as it could slow down the whole sending of an event because it has to read the filesystem, parse the lock file (which can be huge) and probably Composer itself does a lot of other things

we should add a config option to enable this

Actually the middleware does nothing if the composer.json file does not exists or cannot be found in the root of the project. If this is not enough, having the middleware disabled by default would save us from having to add a new option just for this feature as the config options are already too much

we should provide and document this middleware

As no documentation has been written yet for any of the new features I would postpone this task to a later stage where everything is complete and we can focus on writing it

Should I leave the composer/composer dependency in the composer.json? As the middleware will not be enabled by default we could avoid users users to download the dependency and maybe throw an error if the Composer class does not exists with an hint to install it to use the middleware

I think we shouldn't add anything to the composer.json, also because the right dependency would be composer-plugin-api like here.
I simple class_exists with an exception throw should suffice.

composer-plugin-api seems a virtual package for authors that want to provide a plugin for Composer, our middleware is not a plugin so I'm not sure we should use that dependency. Also, for tests we should require composer/composer at least in require-dev, right?

You're right, the example that I brought is a plugin. Yes, requiring it in dev should be enough.


debounceTime does not emit with jasmine.clock.tick in v7

Bug Report
\cc @leggechr
Current Behavior
In v7, debounceTime does not emit any values when installing the jasmine clock and using tick. (This works in v6)
Expected behavior
rxjs is compatible with jasmine.clock, or there is a documented workaround.
Reproduction
Note the reproductions below contain examples using the jasmine clock (which fails in v7) and the native clock (which succeeds).
v7: https://stackblitz.com/edit/rxjs-v7-debouncetime?file=test.ts
v6: https://stackblitz.com/edit/rxjs-v6-debouncetime?file=test.ts
describe('failing time tests with jasmine clock', () => {
  beforeEach(() => {
    jasmine.clock().install();
  });

  afterEach(() => {
    jasmine.clock().uninstall();
  });

  it('debounces time', async () => {
    const duration = 10;
    const source = new Subject<string>();
    const debouncedSource$ = source.pipe(
      debounceTime(duration),
      shareReplay(1)
    );
    debouncedSource$.subscribe();

    source.next('should not be emitted');
    source.next('expected value');
    jasmine.clock().tick(duration + 1); // Wait for debounce to happen.

    expect(await firstValueFrom(debouncedSource$)).toEqual('expected value');
  });
});

@benlesh the operator is broken in jest too?
something can be done over here to fix the failing tests please?

@matheo @avast-ye found a work around for it: change debounceTime(x) to debounce(() => interval(x)).
You can also mock it inside your tests:
import { interval } from 'rxjs';
import { debounce } from 'rxjs/operators';
import * as rxjsOperators from 'rxjs/operators';

// inside beforeEach
jest.spyOn(rxjsOperators, 'debounceTime').mockImplementation((timeout) => debounce(() => interval(timeout)));

Found here.

Hey @AntonioEduardo1998 @ortegamarcel , thank you a lot for these ideas! Do you know if there is any recent approach that is able as well to use fakeAsync with debounceTime or something?


Variable_names_map can change depending on previous model

https://github.com/NOAA-OWP/ngen-cal/blob/804c200a052395a92a7f7494d33f562faaa0e2cc/python/ngen_conf/src/ngen/config/cfe.py#L28
This is problematic because it depends on which model is run before CFE. If we are running Noah-OWP:
_variable_names_map =  {
"water_potential_evaporation_flux": "EVAPOTRANS",
"atmosphere_water__liquid_equivalent_precipitation_rate": "QINSUR"
}
If running PET we dont need to define anything, since the variables are named appropriately. Or for completeness:
                     "variables_names_map": {
                                "atmosphere_water__liquid_equivalent_precipitation_rate": "atmosphere_water__liquid_equivalent_precipitation_rate",
                                "water_potential_evaporation_flux": "water_potential_evaporation_flux"
                            }

Not sure why that needs to change in the realization file. Can we just keep those variables the same as provided by the user?

So this is the definition of a standalone CFE formulation with no additional context (e.g. no other models).  So the default name map is just there as convienence.  It can definitely be overwritten:
#can set some default name map entries...will be overridden at construction
#if a name_map with the same key is passed in, otherwise the name_map
#will also include these mappings

I imagine we probably want to remove that default in this case, since it's specific to a case where another model preceeds CFE... since it effectively defaults to the CSDMS name, I would say that's a reasonable enough default.


template sensor "Find cheapest hours in selected interval"

Hi, I have problem with template sensor "Find cheapest hours in selected interval". Each day starts as unavailable and turns on during the day. Don't know where the problem could be?
here my code :
hodinovka:
        value_template:
          "{# Define your intervals here as tuples (hour starting the interval, hour ending the interval (excluded)) #}
          {% set intervals = [
          (1, 8),
          (8, 16),
          (16, 24),
          ] %}

          {# We need to use namespace so we can write into it in inner cycle #}
          {% set min = namespace(price=None, dt=None, cheapest_hours=[]) %}
          {% set cheapest_hours = [] %}

          {% for interval in intervals %}
          {# Reset min price from previous runs #}
          {% set min.price = None %}

          {# Go through all the hours in the interval (end excluded) and find the hour with lowest price #}
          {% for i in range(interval[0], interval[1]) %}
          {# Get datetime of current hour in current interval #}
          {% set hour_dt = now().replace(hour=i, minute=0, second=0, microsecond=0) %}

          {# Get value for that hour #}
          {% set value = states.sensor.current_spot_electricity_hour_order.attributes.get(hour_dt.isoformat()) %}

          {# Skip if not found #}
          {% if value is not defined %}
          {% break %}
          {% endif %}

          {# value is tuple (order, price), we'll use the price #}
          {% set price = value[1] %}

          {# Min price is not set or is higher than price of current hour => store the min price and hour #}
          {% if min.price is none or price < min.price %}
          {% set min.price = price %}
          {% set min.dt = hour_dt %}
          {% endif %}
          {% endfor %}

          {# Store cheapest hour in current interval #}
          {% set min.cheapest_hours = min.cheapest_hours + [min.dt.hour] %}
          {% endfor %}

          {# use this to get the cheapest hours #}
          {# {{ min.cheapest_hours }} #}

          {# return True if current hour is in the cheapest hour of any interval #}
          {{ now().hour in min.cheapest_hours }}"

I would kindly ask for new boolean sensor/switch "cheapest within defined interval". The purpose is to avoid "templating" for owners of photovoltaic power plants (not only).  It will require three additional config parameters:
"Begin" - a hour when production starts
"End" - a hour when production ends
"Hours" - count of hours with cheapest price, non consecutive.
The sensor will help us to determine when to prefer consumption against export of electricity.
I know it can be handled by suggested template, but having this sensor it will simplify related automation (and our life)

Could you please check that sensor.current_spot_electricity_hour_order has attributes with prices during the times when the template result is unavailable?

sorry, problem on my end.  the problem is,  that  the router is turned off at midnight.  everything is fine now.


Make golangci-lint leaves buildkitd container running

Running make golangci-lint from a default CI repo state results in a buildkitd container still running.
Successfully remade target file 'golangci-lint'.
[shipyard]$ make --debug=b golangci-lint
[~/go/src/submariner-io/shipyard]$ docker ps                                                                                [devel]
CONTAINER ID   IMAGE                           COMMAND       CREATED        STATUS         PORTS     NAMES
fa0c03da140a   moby/buildkit:buildx-stable-1   "buildkitd"   21 hours ago   Up 2 minutes             buildx_buildkit_buildx_builder0

Note that the golangci-lint make target doesn't depend on the clean-buildx target, so this isn't the same as https://github.com/submariner-io/shipyard/issues/659.

@dfarrell07 I marked the priority as low as it's not affecting Submariner functionality and its like a stale resource running on the host. But feel free to modify the priority if required. Thank you.

+1 to prio:low, this is more of an annoyance than a problem.

This might go away as we change the underlying build infra.

@dfarrell07 is this still relevant?

@dfarrell07 ^^

@nyechiel ACK

Still seeing the same behavior with latest Shipyard after make clean/make pune-images.
$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

[~/go/src/submariner-io/shipyard]$ git fetch
[~/go/src/submariner-io/shipyard]$ git reset --hard origin/devel
[21:09:18.546] [shipyard]$ make --debug=b golangci-lint
[~/go/src/submariner-io/shipyard]$ docker ps                                                                                [devel]
CONTAINER ID   IMAGE                           COMMAND       CREATED       STATUS         PORTS     NAMES
84429d84c797   moby/buildkit:buildx-stable-1   "buildkitd"   4 weeks ago   Up 2 minutes             buildx_buildkit_buildx_builder0

I don't think this needs to be done for 0.12.


Rework how read-only objects are handled

The currently approach is problematic. Using a flag seems a more understandable.

No, the current approach of using different prototypes is fine. The problem is actually due to incorrect auto-vivification of pointer targets.


Corrected Spelling Mistakes

I reviewed and mostly these are actually incorrect. I've taken the following and will fix them in a separate commit:
distibuted
the the
remved
login


Update PostreSQL icons

Okay the PostgreSQL icons reallllllyy bothered me during testing. I know these aren't perfect, but at least they make some sense in my mind instead of being completely inaccurate like the old ones. Can we please include this in the release? 😄 Since we're waiting for the "Prep for release" PR anyways

Before
After

Dark

Light

The icon for 'abc' in dark theme isn't accessible. It's toooo dark.

@jinglouMSFT I already said "I know these aren't perfect"

@EricJizbaMSFT  the old set of the icons was just ugly, but no issues. The new set introduced an accessibility issue.  And I believe there are a lot dark theme users out there.  Can the 'f' icon/svg be configured to be theme sensitive?

They're not ugly - we use these icons elsewhere and I'm totally fine with it. The problem is that we were using an icon for a "document collection" when it's actually a "function". That is an issue because it's an icon for the wrong resource type

Can the 'f' icon/svg be configured to be theme sensitive?

Yes, but I'll let the actual icon designers do that for the next release. I originally got this icon from the portal and we use it in the Functions extension


speed up export by querying the database for the required fields only

Problem
Exports can be very slow with big fields such as ArrayField if they do not need to be exported.
Seems pointless to get all fields from the database if your Resource defines a limited amount of fields.
Especially with huge ArrayField fields, it makes a massive difference if you limit the fields to the ones defined by the user at the time of getting the queryset in get_queryset().
Solution
Limiting the queryset by default to the fields defined in the Resource's metaclass.
Acceptance Criteria
Tests completed without a problem

Coverage decreased (-2.5%) to 94.218% when pulling a87be0f6bafd8a144c102ac9a655ad83dc0474c5 on bluppfisk:patch-1 into b367e106794ef3a029f933702644b4f81453a0be on django-import-export:master.

Thanks for the contrib. Im going to convert this to a draft since it is lacking test coverage, documentation and some sort of benchmarking analysis.

Hi @bluppfisk it's been a year since the last activity on this PR.  Please let us know if you would like to proceed, in which case we would need some tests and benchmarking.
thanks

I'd like for this to become part of the codebase yes. I'm a bit low on time to conduct benchmarks and set-up tests. I'll try to come up with something in the next week(s)

I've added a quick test now to verify whether the queryset indeed defers the loading of fields not mentioned in the Resource.Meta.fields tuple.
Setting up a benchmark: I could probably do that even if it'll be time consuming. How would you like me to do this?
I may be missing something, but I think it's a good practice to limit the query to what data you need (i.e., in plain SQL: don't do a SELECT * FROM table when you can do SELECT field1, field2 FROM table). The speed implications should be clear when those elided fields contain vast amounts of data. In my particular use case, they contain ArrayFields of > 20,000 positions.

Thanks for the updates.

How would you like me to do this?

I have ran some benchmarks previously.  There are some instructions here.  It should be fairly easy to load up the test db with a few thousand rows, and then measure the performance increase between current method and your proposed changes.

OK I figured it out. I simulated the previous condition (prior to my patch) by selecting more fields (do_full_export), then created a new limited case where only a set number of fields will be exported. It is decidedly faster even for small datasets like the books. With huge ArrayFields, this will be even clearer (because they are essentially never loaded).
bulk export
Should show a clear difference in performance depending on the number of fields selected.
./manage.py runscript bulk_export

Condition
Time (secs)
Memory (MB)

limited export
0.2999
0.0273

normal export
0.0625
0.0625

Thanks again for submitting this PR.  I've had a look and this is my personal opinion:
The django docs make it clear that only() should be used in advanced use cases, and even then should be used with caution.  I believe that we should respect that and therefore it should not be the default behaviour.  It might well be fine to limit the select to fields, but it's quite a big chance to take when we don't need to.  This change would potentially affect every user of the library, including for import and export.
Since this functionality will be of use in specific use-cases it will only be relevant to a relatively small number of users.  Therefore my suggestion would be to not add this to the code base, and instead to document that it can be used, and provide an example.  Since we already have bulk_import in the documentation, I think it would be ideal to add a new bulk_export page which can describe how this optimisation can be introduced (by over-riding get_queryset()).  I think anyone wanting to export in this fashion will be calling export() programatically (as opposed to using the Admin interface), hence it would be straightforward for them to override get_queryset().
In summary, I think that the way forward is to remove the code change and test, and instead document this as a performance improvement.

Fair enough :) It was a fun exercise for me anyway.
I do think the warning is a little bit overly cautious. I think it's mostly meant for people who decide to load their objects from the database with only() or defer(), hoping to achieve a speed boost, but then proceed to inadvertently use the object in such a way that a second database call is needed to retrieve the rest of the data. In that case, performance would indeed drop.
However, in the case of exporting, you're just doing that: writing it to a file and done.
We use only() a lot at work because we have a few fields that contain huge arrays that we often don't need. This is why I patched django-import-export for our use cases because over the network, it resulted in 1 minute of exporting vs 20-30.
All that said and done, I agree with you that it may be more useful to then call it programmatically and overwrite get_queryset().

It was a fun exercise for me anyway.

Useful for us too, we do get occasional issues asking about performance, so I'm sure this will help others.  Thanks for your efforts which are definitely appreciated :-)


[storage-file-datalake] Fix the rename/move method to support sas in both source and destination

Need to provide a SAS for the x-ms-rename-source.  For the case below, you can use the same SAS that you used in the URI (“x-ms-rename-source header: {path}?{sas}”).
"request": {
    "streamResponseBody": false,
    "url": "https://url?sasToken&mode=legacy",
    "method": "PUT",
    "headers": {
        "x-ms-rename-source": {
          "name": "x-ms-rename-source",
          "value": "/bugbash/keytarTest2"
        },

And there is some logic to avoid re-encoding the destination in .NET. Make sure we get it right.
https://github.com/Azure/azure-sdk-for-net/blob/dfbc7aa9ee5f053d2d84f85d4d142152886f53ed/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakePathClient.cs#L1679

Fixed by #12769

Fixed by #12769


Format code using 'cargo fmt'

Thank you for your enthusiasm, but I don't like the default style of rustfmt, so I close it.


Add label positioning

Sometimes it may be desired that labels are positioned outside of the trapezoids, especially if the text will overflow. We should have an option to allow the labels be placed within the funnel or outside of the funnel (say, to the right). This would ultimately leave less real estate for the actual funnel itself and would require calculations on the text width.

Hi,
is there any way to put text outside the funnel chart.
As like the attached image.
Please take a look and let me know.
Thanks in advance,

@jakezatecky hi，how about this milestone 1.2？

Any updates?

@jakezatecky can we have this soon? :)

It is my intention that this would be made available in the next feature release, which has no target date. This feature is a bit more time consuming to implement vs. some of the other additions, which is why it has largely sat here.


Update run-docs to avoid duplicate code

Update run-docs to avoid duplicate code

@mreso  @kwen2501 @lessw2020 do you have a perspective what list of models will run with distributed? I know we had a separate model doc
Any attempts at 405B? Wer should def add some of the super large models to the models.Json so they're accessible for distributed inference?
Also, should we create a spare table here, or we could put a second column in the main readme for "distributed inference"? Next to "mobile" column?


question: user-defined fix rules

Is that possible to have user-defined fix rules to fix certain type of violation?
e.g. replace all MD040 error with console in code block
{
    "fix": {
        "MD040": "console"
    }
}

You could write a custom rule to add the "console" type to any unmarked code fence, but MD040 does not do that for you.

Thanks, I think I will need to read https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/CustomRules.md


Add unit tests for the daemonset

Add unit tests for the daemonset code that do not include the nvml calls
Add sairameshv to the daemonset code approvers' list
Minor refactors and fix

make test-e2e-kind-emulated, make test, make lint are passing locally
Fixes https://github.com/openshift/instaslice-operator/issues/61

/lgtm

/approve


feat: support type casting for DataStore hooks

Description of changes:
Support type casting for Datastore hooks introduced in UI Components version 2.13.0 (related PR)
by passing local schema object as param to the hooks.
Additional changes:
Some tests involving DataStore were broken before these changes were introduced (reproducible on another dev machine).
RCA pending but fixes introduced with current understanding of the issue.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #460 (d92de4a) into main (e4062c8) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #460      +/-   ##
==========================================
+ Coverage   93.58%   93.61%   +0.03%
==========================================
  Files          48       48
  Lines        1809     1818       +9
  Branches      395      396       +1
==========================================
+ Hits         1693     1702       +9
  Misses        112      112
  Partials        4        4

Impacted Files
Coverage Δ

...ges/codegen-ui-react/lib/imports/import-mapping.ts
100.00% <100.00%> (ø)

packages/codegen-ui-react/lib/workflow/action.ts
97.22% <100.00%> (+0.34%)
:arrow_up:

Continue to review full report at Codecov.

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


add height-auto class

we have width-auto, but i want height-auto too! because i need it!

Loving the contribution!


anchoring stopped working

I had to:
 apiVersion: sources.knative.dev/v1beta1
 kind: ContainerSource
 metadata:
-  name: &srcname awssqs-source
+  name: awssqs-source
   namespace: devops
 spec:
   template:
@@ -24,7 +24,7 @@ spec:

         # Knative system variables
         - name: NAME
-          value: *srcname
+          value: awssqs-source
         - name: NAMESPACE
           valueFrom:
             fieldRef:

when upgrading from v0.14.2 to v0.15.0, ie upgrading kustomize-controller:
-        image: ghcr.io/fluxcd/kustomize-controller:v0.12.2
+        image: ghcr.io/fluxcd/kustomize-controller:v0.13.0

See: https://github.com/fluxcd/kustomize-controller/pull/367

There's a workaround that was suggested on https://github.com/kubernetes-sigs/kustomize/issues/3675#issuecomment-850442262. It basically introduces a plugin that resolves anchors and aliases beforehand using yq. Since plugins are not supported yet (https://github.com/fluxcd/kustomize-controller/issues/120), it's not trivially possible to deploy the workaround. Depending on how likely it is for the upstream issue to be fixed in the near future, could we consider embedding such plugin in the kustomize-controller controller?


RHEL-08-010141: Unique Superuser Name for Maintenance | Non-Standard Configuration Method

Describe the Issue
Changes to the Superuser section of the grub.cfg file are done via /etc/grub.d/01_users. The RHEL8-STIG role currently applies these changes directly to the /boot/efi/EFI/redhat/grub.cfg which causes them to get overwritten when the grub.cfg is regenerated in later steps. If these changes were applied to the /etc/grub.d/01_users file instead, they would apply correctly.
Expected Behavior
Set rhel8stig_boot_superuser and have it apply, overwriting the default root configuration found in the 01_users file.
Actual Behavior
Changes are written to grub.cfg but are overwritten when the grub.cfg is recompiled, since the 01_users file takes precedence.
Control(s) Affected
RHEL-08-010141
Possible Solution
For just this control, the changes should instead be written to /etc/grub.d/01_users instead of the standard grub.cfg path.
OR
The default 01_users file should be deleted as part of the application of the STIG, to ensure the manual changes to the grub.cfg file are applied.

rhel8stig_boot_superuser: root is set in the defaults/main.yml
https://github.com/ansible-lockdown/RHEL8-STIG/blob/f062cac55b2fbd49ccf6a1e8b3b2404a5036bcf3/defaults/main.yml#L579
Then it's applied here.
https://github.com/ansible-lockdown/RHEL8-STIG/blob/f062cac55b2fbd49ccf6a1e8b3b2404a5036bcf3/tasks/fix-cat2.yml#L293
My recommendation is check if rhel8stig_boot_superuser != 'root'
Similar to this https://github.com/ansible-lockdown/RHEL8-STIG/blob/f062cac55b2fbd49ccf6a1e8b3b2404a5036bcf3/tasks/main.yml#L74
If it rhel8stig_boot_superuser == root then fail.

@matthew-willis The issue is not so much that root is getting applied, but the manner in which it is being applied. The superuser name is being set directly into the /boot/efi/EFI/redhat/grub.cfg -- by default, a configuration exists in /etc/grub.d/01_users which gets written into /boot/efi/EFI/redhat/grub.cfg when it is recompiled.
This line is the problem:
https://github.com/ansible-lockdown/RHEL8-STIG/blob/f062cac55b2fbd49ccf6a1e8b3b2404a5036bcf3/tasks/fix-cat2.yml#L297
Therefore, instead of writing those lineinfile items to the grub.cfg, they should be written to the /etc/grub.d/01_users file so that when the grub.cfg is compiled, they are propagated in correctly AND the old "root" default is overwritten.
However, I don't disagree that a flag to ensure the name has been changed from root is a good idea -- although it won't do anything and it'll keep getting reset to root until this configuration problem is solved.

Got it. Agree with your comment. I did this manually when the RHEL 7 STIG changed to this. Because prior, root was ok, but then later revision (I think v3r5) it changed to non-system account.
Personally, I like templates method :)

hi @Rwarcards762
Thanks again for all your work on this.
uk-bolly

This issue is fixed in release 2.6.0, thank you for opening the issue!
-George


Update Readme.txt

fix the grammar error in the documentation.

websites/web sites is debatable ... https://en.wikipedia.org/wiki/Website (American vs English)
commas are debatable - that came up a couple of weeks ago, though in the context of a multi-item list. Your correction does look correct.
acknowledgement/acknowledgment - both acceptable (English vs American)

I personally think it better to just stick with what we have. I suspect there are similar examples throughout the docs, and we don't need to be so picky.


Dump sector range (/ra) for BD discs too

Is your feature request related to a problem? Please describe.
Similar to issue #211 I have a Blu-ray disc that has an unreadable part. I'd like to be able to check how well cleaning the disc is working without having to dump the entire disc.
Describe the solution you'd like
A way to dump a sector range on BDs, like the existing /ra option for DVDs.
Describe alternatives you've considered
Putting up with the length of time it takes to dump from the start up to the bad patch!
Additional context
Also, as far as I can see, the /ra option isn't documented anywhere, e.g. in the help text.
Thanks!

DiscImageCreator_test.zip
added /ra to the bd command.

Also, as far as I can see, the /ra option isn't documented anywhere, e.g. in the help text.

Thanks.

DiscImageCreator_test.zip added /ra to the bd command.

Thanks, although I'm running this on Linux. If you can point me to the source for this change, I can compile it...

Uploaded source code.

Many thanks. I have tested that and it works as expected with a start and end argument :)
However, I notice that if I leave out one or both of the arguments after /ra, it will segmentation fault.

However, I notice that if I leave out one or both of the arguments after /ra, it will segmentation fault.

Tell me all arguments, plz.

For example:
DiscImageCreator bd /dev/sr0 DISCNAME 0 /q /d /rr /ra 100000
or
DiscImageCreator bd /dev/sr0 DISCNAME 0 /q /d /rr /ra
both of which segfault.
For interest (and this isn't really a feature request) I was trying the first form, with just the StartLBA, because I was hoping it would interpret that as meaning "dump from StartLBA to the end of the disc" and I hadn't yet looked up the end LBA of the disc. I only tried the second form to see if that would segfault too, which it did.

both of which segfault.

Fixed it.

Thanks, that seems to work great :)

Also note https://github.com/saramibreak/DiscImageCreator/commit/2bce5d166d518ed3bd8c1fb66909d41bdb34e8d3#r145248358 if you missed it...