Python: Check the Azure OpenAI settings API key for None

Motivation and Context
Check the Azure OpenAI settings API key for None not the constructor API KEY param

Description
Need to check the Azure OpenAI Settings api_key attribute, not the incoming api_key parameter.

Contribution Checklist

[X] The code builds clean without any errors or warnings
[X] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
[X] All unit tests pass, and I have added new tests where possible
[X] I didn't break anyone :smile:

Python Unit Test Overview

Tests
Skipped
Failures
Errors
Time

2442
4 :zzz:
0 :x:
0 :fire:
1m 16s :stopwatch:


Dropdown type

Adds to Issue #1613
User can select which type their input is, so that we can increase usability to include integers and booleans as well.

Can one of the admins verify this patch?


exclude main branch

What changed?

Why?

@markramm this branch is not for merging, it's for testing certain workflows. going to delete it anyway.


Add input box push template support

Description
Adds support for input box / text input field push templates. The user input will be accessible via a remote input intent and the caller extension will be responsible for broadcasting the received user input to the developer's application. A intent action name must be provided so the caller extension will be able to broadcast an Intent which the app can be prepared to handle.
The following key value pairs are used for input box push templates:

Key
Description

adb_input_txt
Optional, Placeholder text for the text input field

adb_feedback_txt
Optional, Once feedback has been submitted, use this text as the notification's body

adb_feedback_img
Optional, Once feedback has been submitted, use this as the notification's image

adb_input_receiver
Required, name of the intent action to use when broadcasting the user input

Sample message payload containing the input box key value pairs:
"message": {
        "token":  {{fcm token}},
        "data": {
            "_dId": "2ba7",
            "_mId": "113034",
            "adb_version": "1",
            "adb_title": "Game request",
            "adb_body": "Shall we play a game?",
            "adb_sound": "bells",
            "adb_n_count": "1",
            "adb_n_priority": "PRIORITY_HIGH",
            "adb_image": "https://images.pexels.com/photos/260024/pexels-photo-260024.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",
            "adb_uri": "https://chess.com/games",
            "adb_a_type": "WEBURL",
            "adb_act": "[{\"label\":\"Go to chess.com\",\"uri\":\"https:\/\/chess.com\/games\/552\",\"type\":\"DEEPLINK\"},{\"label\":\"Open the app\",\"uri\":\"\",\"type\":\"OPENAPP\"}]",
            "adb_template_type": "input",
            "adb_body_ex": "Input box testing.",
            "adb_clr_body": "873600",
            "adb_clr_title": "283747",
            "adb_clr_icon": "123456",
            "adb_clr_bg": "FFFFFF",
            "customKey": "custom data",
            "adb_channel_id": "2024",
            "adb_small_icon": "chat_bubble",
            "adb_large_icon": "https://cdn-icons-png.flaticon.com/128/864/864639.png",
            "adb_sticky": "true",
            "adb_input_txt": "do you like chess?",
            "adb_feedback_txt": "thank you for the input!",
            "adb_feedback_img": "https://t3.ftcdn.net/jpg/00/25/16/70/240_F_25167006_jVW0KPzUq0ArZPG811i13kJYVc9ZlkBL.jpg",
            "adb_input_receiver": "developer input receiver"
        }
    }

Awaiting user input:

Input received:

The caller extension can store the received input in the SharedPreferences:
public class InputBoxFeedbackReceiver extends BroadcastReceiver {
    private static final String SELF_TAG = "InputBoxFeedbackReceiver";

    @Override
    public void onReceive(final Context context, final Intent intent) {
        if (intent == null || intent.getExtras() == null || intent.getExtras().isEmpty()) {
            Log.trace(CampaignPushConstants.LOG_TAG,
                    SELF_TAG, "Received empty intent. Ignoring.");
            return;
        }
        final String input = intent.getStringExtra(CampaignPushConstants.IntentKeys.INPUT_BOX_CONTENTS);
        Log.trace(CampaignPushConstants.LOG_TAG,
                SELF_TAG, "InputBoxFeedbackReceiver received input: %s", input);
        final SharedPreferences preferences = context.getSharedPreferences("inputBoxFeedback", Context.MODE_PRIVATE);
        preferences.edit().putString("inputBoxFeedback", input).apply();
    }
}

The app can then listen for changes made to the "inputBoxFeedback" shared preferences:
Add the input box broadcast receiver to the app manifest
<receiver android:name="com.adobe.marketing.mobile.InputBoxFeedbackReceiver"
            android:enabled="true"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.developer input receiver"/>
            </intent-filter>
        </receiver>

Add a shared preference change listener for the "inputBoxFeedback" saved preference
// register a shared preference change listener to capture input box feedback
		final SharedPreferences inputBoxFeedbackPrefs = getSharedPreferences("inputBoxFeedback", Context.MODE_PRIVATE);
		final SharedPreferences.OnSharedPreferenceChangeListener listener = (preferences, key) -> {
			if (key.equals("inputBoxFeedback")) {
				final String inputBoxFeedback = inputBoxFeedbackPrefs.getString("inputBoxFeedback", null);
				if (!StringUtils.isNullOrEmpty(inputBoxFeedback)) {
					Log.d(LOG_TAG, "Test app, received input box feedback: " + inputBoxFeedback);
				}
			}
		};
		inputBoxFeedbackPrefs.registerOnSharedPreferenceChangeListener(listener);

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):
Types of changes

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

Checklist:

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

I'm curious about the recommendation to listen to shared preferences. More specifically why the app would need it given that the intent is already being sent to the app.

the caller extension portion of the input box changes are not final and are just what i used to verify that the input received could be retrieved on the app. we can definitely have a discussion on the best way to get the user entered input to the developer's app.


As an SRE - I would like a way to rotate the AKS service principal

As an: SRE
I want: an ability to rotate a service principal in use by an AKS cluster
So that: secrets can be versioned in a reasonable manner.
Acceptance Criteria:. The cluster is provisioned with a new service principal and continues operation accordingly -- access to network, access to key vault, etc.

This seems very general. What is the proposed solution? Is this something we wan spk infra to handle, or spk alone to handle? Or should this be manually done somehow?
@jmspring  @andrebriggs

@yradsmikham We are expecting instructions on how to do this

The process is documented here -- https://docs.microsoft.com/en-us/azure/aks/update-credentials
I need to see what happens when one uses Terraform.


investigate doing multi-part prefetch for read

currently read doesn't saturate 1Gbps, possibly because we only ever have one GET request outstanding per-file handle.

+1. I think this could make a big difference for working with multi-gigabyte files.

Is goofys currently not fast enough? Could you elaborate on your environment and use case so I can prioritize better?

I'm experimenting with goofyfs and riofs for running various validation utilities on genome sequence files uploaded to our S3 bucket. These files can be anything from a 1-60 GB. Some of the validation utilities use seek() so I can't simply stream from curl / aws s3 cp.
On a t2.large (a c4.xlarge performs similarly), md5sum maxes out at 5% cpu while some of the other utilities we run max out at around 25% cpu. The bounding factor is obviously the speed that s3 serves data in a single response.
(During these tests top shows riofs using ~7 cpu % and goofyfs ~30%. The support for using instance role credentials makes goofyfs more easily deployable for me.)
For us, the speed is not a showstopper, though faster would obviously be great! This is batch processing so I can probably get some more efficiency by running parallel jobs on the worker machines.

Could you do a strace on a smaller job and post the result? Do you know what's the actual throughput you get?

Here's some more timings along with excerpts of the strace for cat and md5sum.
$ time curl "http://<bucket>.s3.amazonaws.com/TEST.fastq.gz" > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1551M  100 1551M    0     0  51.2M      0  0:00:30  0:00:30 --:--:-- 49.0M

real	0m30.362s
user	0m0.001s
sys	0m0.861s

# Downloads in parallel using many parts.
$ time aws --region us-west-2 s3 cp s3://<bucket>/TEST.fastq.gz TEST.fastq.gz
download: s3://<bucket>/TEST.fastq.gz to ./TEST.fastq.gz

real	0m16.876s
user	0m7.916s
sys	0m8.695s

$ time cat /mnt/TEST.fastq.gz > /dev/null

real	0m50.482s
user	0m0.000s
sys	0m0.623s

# Another run, remounted in between.
$ time cat /mnt/TEST.fastq.gz > /dev/null

real	1m6.399s
user	0m0.000s
sys	0m0.639s

$ strace cat /mnt/TEST.fastq.gz > /dev/null
...
open("/mnt/TEST.fastq.gz", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=1627202877, ...}) = 0
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
read(3, "\37\213\10\10\2B\377U\2\377DS39386_GTGGCC_L005_R2"..., 65536) = 65536
write(1, "\37\213\10\10\2B\377U\2\377DS39386_GTGGCC_L005_R2"..., 65536) = 65536
read(3, "\243\260&\202n&\211j\313}\267b|~\3612\267o,\311\227Xs\331Q\0I\3013\27\34|"..., 65536) = 65536
write(1, "\243\260&\202n&\211j\313}\267b|~\3612\267o,\311\227Xs\331Q\0I\3013\27\34|"..., 65536) = 65536
...

$ time md5sum /mnt/TEST.fastq.gz
458add84ee7ecfb38d399d8002c2f3aa  /mnt/TEST.fastq.gz

real	1m22.392s
user	0m3.068s
sys	0m0.579s

$ strace md5sum /mnt/TEST.fastq.gz
...
open("/mnt/TEST.fastq.gz", O_RDONLY) = 3
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=1627202877, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ddd81000
read(3, "\37\213\10\10\2B\377U\2\377DS39386_GTGGCC_L005_R2"..., 32768) = 32768
read(3, "\376\361\1-\255\324\275A_\346\21\276a\354e\240\363\204\235\6\10\324\34\222\215\276?\302n\237\356e"..., 32768) = 32768
read(3, "\243\260&\202n&\211j\313}\267b|~\3612\267o,\311\227Xs\331Q\0I\3013\27\34|"..., 32768) = 32768
...

$ time cp /mnt/TEST.fastq.gz TEST.fastq.gz

real	0m46.084s
user	0m0.000s
sys	0m1.560s

$ sudo su
# echo 3 > /proc/sys/vm/drop_caches
# exit
$ time md5sum TEST.fastq.gz
e1eade9f7e9419bd8c2655a61d59486a  TEST.fastq.gz

real	0m16.389s
user	0m2.947s
sys	0m0.244s

This is on a c4.xlarge running Ubuntu 14.04.

I was more curious about the IO patterns for your other utilities

As well as verifying the md5sum and the gunzipped md5sum, we have two cases of custom validation on large files:

Gzipped line data (fastq). The validation utility simply opens a gunzip stream. This one will also open stdin so I can potentially pipe in from aws s3 cp which saves about half the time, 55s vs 1m50s. (Piping from curl is also ~55s.)

A chunked gzipped format (bam). This can seek around to read from the specific blocks, however our current usage simply reads the header block so speed is not an issue.

The curious thing that stands out now is that according to my own benchmarks, I can get 58MB/s read with dd bs=1MB which is similar to your curl number. Can you try to use the same block size to see if you can get around the same speed? If not there maybe bigger difference between our setups.

has #26 improved your speed here?

#26 fixes the small difference (~10%) between 32K and 128K block reads. (1M blocked reads are almost the same as 128K reads as they get split by the kernel down to 128K.) I'll try running on a larger instance and in another region (I''m currently using us-west-2, Oregon) to see if that makes a difference.

Testing with latest master goofyfs@bda497bc7862ddbad25cc79b4964fb61cc126a86 I'm seeing almost double the read speed compared to goofyfs@0a1959b702382a9a488a7f13309df7db193b28ee on a c4.8xlarge instance running Ubuntu Wily. Awesome!

The gap with curl is definitely closed now, with both goofyfs and curl taking ~18s to download a 1GB file, though there is still some potential in using multiple concurrent downloads as aws s3 cp s3://encodedcc-speed-test-oregon/1GB - | dd of=/dev/null bs=128K takes ~8s.
There is https://github.com/aws/aws-sdk-go/wiki/S3Manager-Downloader but that requires the ability to write to a position in a buffer rather than just a stream. The python aws-cli deals with that problem by queuing up the pending parts before writing to the stream: https://github.com/aws/aws-cli/blob/1.9.2/awscli/customizations/s3/tasks.py#L392
However that functionality probably belongs in aws-sdk-go rather than here so maybe it is worth opening a ticket there to ask them to implement it.

I was getting ~18s before (see the benchmark result in README) so I am not sure why you only see this just now. 19ed6f91a4012ce03234d61aa02ffa3727c4a6ea could improve things but probably only in high latency cases.
The aws-sdk-go api is fine for concurrent read, I just haven't gotten to it yet.

Which region, instance type, and ami are you running on? Both my s3 bucket and ec2 instance were in the same region (Oregon).

The setup and test scripts are all in README and in the bench directory
On Oct 29, 2015 22:46, Laurence Rowe<EMAIL_ADDRESS>wrote:Which region, instance type, and ami are you running on? Both my s3 bucket and ec2 instance were in the same region (Oregon).
—Reply to this email directly or view it on GitHub.

also regarding cpu usage, could this be because riofs uses http by default and goofys uses https?

http vs https seems a likely culprit for the difference in cpu usage.

in case you care, you can disable ssl by specifying a http endpoint manually (--endpoint "http://s3-us-west-2.amazonaws.com")

@lrowe could you try out https://github.com/kahing/goofys/pull/38 to see how well it works for you? In my tests I get roughly 100MB/s

After a couple of warm-up runs I'm seeing ~100MB/s with #38 too. (That's about double the speed of current master.)
However, I've seen goofys completely stall about 1/5 or 1/10 times. My dd process just seems to hang. The log seems to show three response headers but no data being read after that: https://gist.github.com/lrowe/a68b37583494597f26e7
Perhaps goofys needs to set some socket timeouts so that the responses error after a while and then retry?

I am not able to reproduce this yet. I created a file that's the same size as yours, and then ran:
$ for i in $(seq 1 10); do goofys -f --debug_s3 --debug_fuse goofys bench-mnt/ >& xout & true; PID=$!; sleep 3; dd if=bench-mnt/ENCFF531KNS.fastq.gz of=/dev/null bs=131072; kill $PID; done

tried a couple times and there's no stall. Next time it happens for you, could you try to send SIGQUIT to goofys to get the stacktraces?

This is a different error, to reproduce:
In the first terminal, run goofys.
In a second terminal:

dd the file normally.
dd the same file again, this will be fast as it is now in the fs cache.

In the first terminal notice that goofys has crashed:
2015/11/16 22:51:15.656505 fuse.DEBUG Op 0x000056ea        connection.go:395] <- OpenFile (inode 6)
2015/11/16 22:51:15.656865 fuse.DEBUG OpenFile 6 2015/06/19/67365aaf-b53d-46a4-b26f-8bd61dbabd25/ENCFF531KNS.fastq.gz []
2015/11/16 22:51:15.656895 fuse.DEBUG Op 0x000056ea        connection.go:474] -> OK
2015/11/16 22:51:15.656980 fuse.DEBUG Op 0x000056eb        connection.go:395] <- FlushFile (inode 6)
2015/11/16 22:51:15.657376 fuse.DEBUG FlushFile 6 2015/06/19/67365aaf-b53d-46a4-b26f-8bd61dbabd25/ENCFF531KNS.fastq.gz []
2015/11/16 22:51:15.657408 fuse.DEBUG Op 0x000056eb        connection.go:474] -> OK
2015/11/16 22:51:16.071473 fuse.DEBUG Op 0x000056ec        connection.go:395] <- FlushFile (inode 6)
2015/11/16 22:51:16.071808 fuse.DEBUG FlushFile 6 2015/06/19/67365aaf-b53d-46a4-b26f-8bd61dbabd25/ENCFF531KNS.fastq.gz []
2015/11/16 22:51:16.071842 fuse.DEBUG Op 0x000056ec        connection.go:474] -> OK
2015/11/16 22:51:16.071919 fuse.DEBUG Op 0x000056ed        connection.go:395] <- ReleaseFileHandle
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x4715f2]

goroutine 27364 [running]:
github.com/kahing/goofys/internal.(*FileHandle).Release(0xc830a4ac30)
	/opt/goofys/src/github.com/kahing/goofys/internal/handles.go:730 +0xd2
github.com/kahing/goofys/internal.(*Goofys).ReleaseFileHandle(0xc82011a1e0, 0x7fd475d27c30, 0xc82acf41e0, 0xc82ace5990, 0x0, 0x0)
	/opt/goofys/src/github.com/kahing/goofys/internal/goofys.go:716 +0xf4
github.com/jacobsa/fuse/fuseutil.(*fileSystemServer).handleOp(0xc8204e7460, 0xc820199800, 0x7fd475d27c30, 0xc82acf41e0, 0x7dd540, 0xc82ace5990)
	/opt/goofys/src/github.com/jacobsa/fuse/fuseutil/file_system.go:181 +0x862
created by github.com/jacobsa/fuse/fuseutil.(*fileSystemServer).ServeOps
	/opt/goofys/src/github.com/jacobsa/fuse/fuseutil/file_system.go:107 +0x18f

goroutine 1 [select]:
github.com/jacobsa/fuse.(*MountedFileSystem).Join(0xc8204f4690, 0x7fd472e86500, 0xc820012340, 0x0, 0x0)
	/opt/goofys/src/github.com/jacobsa/fuse/mounted_file_system.go:42 +0x167
main.main.func1(0xc8200f2120)
	/opt/goofys/src/github.com/kahing/goofys/main.go:194 +0x8a4
github.com/codegangsta/cli.(*App).Run(0xc8200f2000, 0xc82000a2a0, 0xe, 0xe, 0x0, 0x0)
	/opt/goofys/src/github.com/codegangsta/cli/app.go:180 +0x1028
main.main()
	/opt/goofys/src/github.com/kahing/goofys/main.go:203 +0xf6

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/usr/lib/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 5 [syscall]:
os/signal.loop()
	/usr/lib/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
	/usr/lib/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 23 [select, locked to thread]:
runtime.gopark(0xa7e220, 0xc820028f28, 0x98cff8, 0x6, 0x42e518, 0x2)
	/usr/lib/go/src/runtime/proc.go:185 +0x163
runtime.selectgoImpl(0xc820028f28, 0x0, 0x18)
	/usr/lib/go/src/runtime/select.go:392 +0xa64
runtime.selectgo(0xc820028f28)
	/usr/lib/go/src/runtime/select.go:212 +0x12
runtime.ensureSigM.func1()
	/usr/lib/go/src/runtime/signal1_unix.go:227 +0x353
runtime.goexit()
	/usr/lib/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 12 [semacquire]:
sync.runtime_Syncsemacquire(0xc8201996c0)
	/usr/lib/go/src/runtime/sema.go:237 +0x201
sync.(*Cond).Wait(0xc8201996b0)
	/usr/lib/go/src/sync/cond.go:62 +0x9b
io.(*pipe).read(0xc820199680, 0xc8201c5000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/lib/go/src/io/pipe.go:52 +0x2d2
io.(*PipeReader).Read(0xc82002a0c0, 0xc8201c5000, 0x1000, 0x1000, 0x43c454, 0x0, 0x0)
	/usr/lib/go/src/io/pipe.go:134 +0x50
bufio.(*Scanner).Scan(0xc820028730, 0x1000)
	/usr/lib/go/src/bufio/scan.go:180 +0x877
github.com/Sirupsen/logrus.(*Logger).writerScanner(0xc8204dd630, 0xc82002a0c0)
	/opt/goofys/src/github.com/Sirupsen/logrus/writer.go:20 +0x129
created by github.com/Sirupsen/logrus.(*Logger).Writer
	/opt/goofys/src/github.com/Sirupsen/logrus/writer.go:12 +0x17b

goroutine 24 [chan receive]:
main.registerSIGINTHandler.func1(0xc82011e840, 0x7ffe40df688a, 0x10)
	/opt/goofys/src/github.com/kahing/goofys/main.go:52 +0x71
created by main.registerSIGINTHandler
	/opt/goofys/src/github.com/kahing/goofys/main.go:63 +0xe7

goroutine 13 [semacquire]:
sync.runtime_Syncsemacquire(0xc820199780)
	/usr/lib/go/src/runtime/sema.go:237 +0x201
sync.(*Cond).Wait(0xc820199770)
	/usr/lib/go/src/sync/cond.go:62 +0x9b
io.(*pipe).read(0xc820199740, 0xc820197145, 0xebb, 0xebb, 0x0, 0x0, 0x0)
	/usr/lib/go/src/io/pipe.go:52 +0x2d2
io.(*PipeReader).Read(0xc82002a0d0, 0xc820197145, 0xebb, 0xebb, 0x0, 0x0, 0x0)
	/usr/lib/go/src/io/pipe.go:134 +0x50
bufio.(*Scanner).Scan(0xc8201bff10, 0xc8201bfeb8)
	/usr/lib/go/src/bufio/scan.go:180 +0x877
github.com/Sirupsen/logrus.(*Logger).writerScanner(0xc820010820, 0xc82002a0d0)
	/opt/goofys/src/github.com/Sirupsen/logrus/writer.go:20 +0x129
created by github.com/Sirupsen/logrus.(*Logger).Writer
	/opt/goofys/src/github.com/Sirupsen/logrus/writer.go:12 +0x17b

goroutine 22 [syscall]:
syscall.Syscall(0x0, 0x8, 0xc820512018, 0x21000, 0xc81fa98d2b, 0x0, 0x411566)
	/usr/lib/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x8, 0xc820512018, 0x21000, 0x21000, 0xc820174480, 0x0, 0x0)
	/usr/lib/go/src/syscall/zsyscall_linux_amd64.go:783 +0x5f
syscall.Read(0x8, 0xc820512018, 0x21000, 0x21000, 0x0, 0x0, 0x0)
	/usr/lib/go/src/syscall/syscall_unix.go:160 +0x4d
os.(*File).read(0xc82002a138, 0xc820512018, 0x21000, 0x21000, 0xa7ab7c, 0x0, 0x0)
	/usr/lib/go/src/os/file_unix.go:211 +0x53
os.(*File).Read(0xc82002a138, 0xc820512018, 0x21000, 0x21000, 0x411566, 0x0, 0x0)
	/usr/lib/go/src/os/file.go:95 +0x8a
github.com/jacobsa/fuse/internal/buffer.(*InMessage).Init(0xc820512000, 0x7fd475d1a270, 0xc82002a138, 0x0, 0x0)
	/opt/goofys/src/github.com/jacobsa/fuse/internal/buffer/in_message.go:53 +0xa2
github.com/jacobsa/fuse.(*Connection).readMessage(0xc820199800, 0xc820512000, 0x0, 0x0)
	/opt/goofys/src/github.com/jacobsa/fuse/connection.go:317 +0x7a
github.com/jacobsa/fuse.(*Connection).ReadOp(0xc820199800, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/goofys/src/github.com/jacobsa/fuse/connection.go:379 +0x81
github.com/jacobsa/fuse/fuseutil.(*fileSystemServer).ServeOps(0xc8204e7460, 0xc820199800)
	/opt/goofys/src/github.com/jacobsa/fuse/fuseutil/file_system.go:97 +0x53
github.com/jacobsa/fuse.Mount.func1(0x7fd475d27ab8, 0xc8204e7460, 0xc820199800, 0xc82002a0e0)
	/opt/goofys/src/github.com/jacobsa/fuse/mount.go:89 +0x35
created by github.com/jacobsa/fuse.Mount
	/opt/goofys/src/github.com/jacobsa/fuse/mount.go:92 +0x827

I think this was already fixed in the parallel_read branch

closed via b1d50fc3a49e2c39b94ab888b1efe974d43fefe3


cube demo has no-op barrier

demos/cube.c does this:
    VkPipelineStageFlags src_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
    VkPipelineStageFlags dest_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;

    vkCmdPipelineBarrier(demo->cmd, src_stages, dest_stages, 0, 0, NULL, 0,
                         NULL, 1, pmemory_barrier);

.. which is a no-op per the explanation in #1006.
At least one of these barriers are inserted after a vkCmdCopyImage command, so src_stages must include at least VK_PIPELINE_STAGE_TRANSFER_BIT. Having dest_stages be TOP_OF_PIPE is overly conservative, but not wrong. (I'm guessing FRAGMENT_SHADER_BIT|TRANSFER_BIT would be sufficient, but I haven't checked in detail.)

Fixed with df484631


PolyData

As requested, I send a very simple modification which allows to handle polydata and a test which shows that it works.
Disclaimers:

I did not know what to set as n_cells. Polydata does not really have cells. I set it to zero.
Be warned that I am a mathematician. Not a programmer.
Polydata also allow lines and triangle patches which I did not test.

I made several more changes:

I set n_cells for PolyData to be sum of vertices + lines + polygons
I realized that cell information cannot be obtained using the get_cells function. This is because PolyData can have cells of different kinds and have no attribute "Types". So I made separate struct for them, which I called VTKPrimitives and a function get_primitives to extract them. In case you don't like it, I can return these changes.
I added another test for PolyData
I updated the README

Thank you very much for being a reviewer. I believe it is not easy.


Implement an InputSourceProvider

That allows to define providers that separate declare what should be considered as inputs.
The API would look as shown in the test:
abstract class MyInputSource implements InputSource<String, Parameters> {

    interface Parameters extends InputSourceParameters {
        @InputFile
        @PathSensitive(PathSensitivity.NONE)
        RegularFileProperty getMyNestedInputFile()
    }

    @Override
    String obtain(){
        return parameters.myNestedInputFile.get().asFile.absolutePath
    }
}
def myInputSource = project.providers.inputOf(MyInputSource) {
    parameters {
        myNestedInputFile = file(project.providers.gradleProperty("inputFile"))
    }
}

abstract class MyTask extends DefaultTask {
    @Optional
    @Input
    abstract Property<String> getMyInput()

    @OutputFile
    abstract RegularFileProperty getMyOutput()

    @TaskAction
    void letsGo() {
        myOutput.get().asFile.text = new File(myInput.get()).text
    }
}

tasks.register("myTask", MyTask) {
    myInput = myInputSource
    myOutput = file("build/outputFile.txt")
}

We are probably going to do something different, like being able to have tasks actions that define their own inputs and are allowed to modify the task parameters.


Instructions

You have :
'providers' => array(
		'XenforoBridge\XenforoBridgeServiceProvider::class',
)

Because you changed the name space, shouldn't that be :
'providers' => array(
		'Urb\XenforoBridge\XenforoBridgeServiceProvider::class',
)

?

Yea :) I haven't had a chance to update the readme plus there will be other breaking changes that you may need to account for. Not quite done with this update but its a work in progress.  Just happen to be sloppy with my update late at night for the changes I needed to make. I should have kept it on a separate branch while I was still working on it.
I'll try to get to finishing up work on this and updating the documentation ASAP. I wasn't aware that it was still being used or tracked by anyone still since I don't update it very often.


Removed functional test configuration

Before creating a pull request make sure that:

[ ] commit messages are meaningful and follow good commit message guidelines
[ ] README and other documentation has been updated / added (if needed)
[ ] tests have been updated / new tests has been added (if needed)

Please remove this line and everything above and fill the following sections:
JIRA link (if applicable)
Change description
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[ ] No

Does the @TestPropertySource(properties = { "spring.config.location=classpath:application-functional-test.yaml" }) annotation need to be removed from SampleFunctionalTest?


Read allowed color temperature values from API

Is your feature request related to a problem? Please describe.
Color temperature range is set with fixed values inside the library.
Describe the solution you'd like
According to 1.3 version of the API docs this range is given for each device. This could just be used to...

Tell Home Assistant, what the min/max values are
validate input.

Describe alternatives you've considered
Additional context
https://govee-public.s3.amazonaws.com/developer-docs/GoveeAPIReference.pdf
, "properties": {  "colorTem": {  "range": {  "min": 2000,  "max": 9000  }  }  }

When the color temperature is set outside of the supported range, all requests begin to fail... for now I modified const.py in my own installation to the correct values for my lamp (2200K-6500K). Would appreciate a fix.


Showing a simple message dialog in fullscreen apps - possible with simple code?

Hi,
I would like to show a message dialog in a full screen application but I can't find anything about this in the docs. I have seen what I want in examples/fullscreen/text-editor.py, specifically the 'About' dialog (I simply need something to confirm). The example contains a lot of code in order to get the dialog box appear and I was hoping to find something more simple like one or two function calls. Is that possible?
I thought message_dialog would do, but it doesn't due to the 'event loop is already running' exception (similar to #652).

I also look to fix this one:
  File "prompt_toolkit/shortcuts/dialogs.py", line 110, in message_dialog
    return _run_dialog(dialog, style, async_=async_)
  File "prompt_toolkit/shortcuts/dialogs.py", line 193, in _run_dialog
    return application.run()
  File "prompt_toolkit/application/application.py", line 682, in run
    return run()
  File "prompt_toolkit/application/application.py", line 655, in run
    run_until_complete(f, inputhook=inputhook)
  File "prompt_toolkit/eventloop/defaults.py", line 123, in run_until_complete
    return get_event_loop().run_until_complete(future, inputhook=inputhook)
  File "prompt_toolkit/eventloop/posix.py", line 57, in run_until_complete
    raise Exception('Event loop is already running')

Exception Event loop is already running

Hi @rolfschr,
Unfortunately, there is not really a shortcut to achieve this.
The reason is that the pop-up dialog should become part of the application layout in order to be displayed. There can be only one application running, so you have to add it to your main application. (The 'dialogs' shortcuts won't do that.) Further, the dialog shortcuts start the event loop, this doesn't work in the middle of a running application, and causes the error you had.
You can have a FloatContainer as the root of the application, and add new Float objects to it whenever you need them.
from prompt_toolkit.layout import FloatContainer, Float
from prompt_toolkit.widgets import Dialog, Label, Button

def button_handler():
    pass

dialog = Dialog(
        title=title,
        body=Label(text="YOUR_TEXT", dont_extend_height=True),
        buttons=[
            Button(text="BUTTON_TEXT", handler=button_handler),
], with_background=True)

floatcontainer.floats.append(
    Float(content=dialog),  # optionally pass width and height.
)

Hi,
thanks a lot. I was able to get the dialog as you described. Some hints that helped me:

The floatcontainer is actually also the object where the "main" content is placed (I first created a new FloatContainer instead of replacing my exising Window object). I checked examples/full-screen/simple-demos/floats.py and understood that stuff better than.
I made  button_handler() contain floatcontainer.floats = [] to remove the button upon user press.
I also had to use layout.focus(floatcontainer) after floatcontainer.floats.append(...)


FIXED: handle different Windows Terminal profile settings

Should fix #7

Sorry didn't realize the PR before fixing it myself 😦 appreciate it though. Looks like the fix I published should work


Neuer DP "map_flag" für Q7 Max+ benötigt

Hier das DEBUG Log:
roborock.0
2024-01-14 22:51:42.560	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:42.560	debug	Not clearing messageQueue. null - 95436
roborock.0
2024-01-14 22:51:42.559	debug	dps debug: {"id":65,"result":["ok"]}
roborock.0
2024-01-14 22:51:42.391	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.14.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:41.943	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:41.857	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:40.378	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:40.352	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_water_box_custom_mode
roborock.0
2024-01-14 22:51:40.351	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:40.344	debug	Length of message queue: 2
roborock.0
2024-01-14 22:51:40.344	debug	Not clearing messageQueue. null - 94580
roborock.0
2024-01-14 22:51:40.343	debug	dps debug: {"id":61,"result":["ok"]}
roborock.0
2024-01-14 22:51:40.216	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_carpet_clean_mode
roborock.0
2024-01-14 22:51:40.215	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:40.149	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.13.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:40.130	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_carpet_mode
roborock.0
2024-01-14 22:51:40.129	debug	get_timer: "[]
roborock.0
2024-01-14 22:51:40.128	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:40.052	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_timer
roborock.0
2024-01-14 22:51:40.051	debug	get_server_timer: " + [["1690754187481","disable",0]]
roborock.0
2024-01-14 22:51:40.048	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:39.958	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_server_timer
roborock.0
2024-01-14 22:51:39.956	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:39.866	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_network_info
roborock.0
2024-01-14 22:51:39.865	debug	Consumables of robot: {"main_brush_work_time":138784,"side_brush_work_time":138784,"filter_work_time":138784,"filter_element_work_time":0,"sensor_dirty_time":24211,"dust_collection_work_times":196}
roborock.0
2024-01-14 22:51:39.865	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:39.781	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_consumable
roborock.0
2024-01-14 22:51:39.781	debug	Mapped room matched: 15575357 with name: Treppe
roborock.0
2024-01-14 22:51:39.781	debug	Mapped room matched: 12866080 with name: Flur
roborock.0
2024-01-14 22:51:39.781	debug	Mapped room matched: 15575279 with name: Max
roborock.0
2024-01-14 22:51:39.780	debug	Mapped room matched: 15575277 with name: Schlafzimmer
roborock.0
2024-01-14 22:51:39.780	debug	Mapped room matched: 15575268 with name: Badezimmer
roborock.0
2024-01-14 22:51:39.779	debug	Mapped room matched: 15575273 with name: Zoe
roborock.0
2024-01-14 22:51:39.779	debug	All mapped rooms: [[16,"15575273",12],[17,"15575268",15],[18,"15575277",1],[19,"15575279",12],[20,"12866080",8],[21,"15575357",12]]
roborock.0
2024-01-14 22:51:39.778	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:39.703	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:39.535	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_room_mapping
roborock.0
2024-01-14 22:51:39.517	debug	get_status: {"msg_ver":2,"msg_seq":2058,"state":8,"battery":100,"clean_time":2197,"clean_area":36290000,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":1,"fan_power":102,"dnd_enabled":1,"map_status":3,"is_locating":0,"lock_status":0,"water_box_mode":203,"distance_off":170,"water_box_carriage_status":1,"mop_forbidden_enable":1,"adbumper_status":[0,0,0],"dock_type":5,"dust_collection_status":0,"auto_dust_collection":1,"debug_mode":0,"switch_map_mode":0,"dock_error_status":0,"charge_status":1}
roborock.0
2024-01-14 22:51:39.517	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:39.367	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:39.281	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_status
roborock.0
2024-01-14 22:51:39.280	debug	Latest data requested
roborock.0
2024-01-14 22:51:37.777	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:37.754	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:37.753	debug	Not clearing messageQueue. null - 92835
roborock.0
2024-01-14 22:51:37.751	debug	dps debug: {"id":51,"result":["ok"]}
roborock.0
2024-01-14 22:51:37.520	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.12.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:37.212	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:35.632	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:35.603	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:35.603	debug	Not clearing messageQueue. null - 92051
roborock.0
2024-01-14 22:51:35.601	debug	dps debug: {"id":49,"result":["ok"]}
roborock.0
2024-01-14 22:51:35.431	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.11.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:35.063	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:33.495	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:33.468	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:33.468	debug	Not clearing messageQueue. null - 91227
roborock.0
2024-01-14 22:51:33.467	debug	dps debug: {"id":47,"result":["ok"]}
roborock.0
2024-01-14 22:51:33.246	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.10.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:32.861	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:31.328	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:31.296	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:31.296	debug	Not clearing messageQueue. null - 90462
roborock.0
2024-01-14 22:51:31.294	debug	dps debug: {"id":45,"result":["ok"]}
roborock.0
2024-01-14 22:51:31.199	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.9.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:30.663	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:29.286	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:29.260	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:29.260	debug	Not clearing messageQueue. null - 89702
roborock.0
2024-01-14 22:51:29.259	debug	dps debug: {"id":43,"result":["ok"]}
roborock.0
2024-01-14 22:51:29.065	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.8.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:28.655	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:27.152	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:27.114	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:27.113	debug	Not clearing messageQueue. null - 88882
roborock.0
2024-01-14 22:51:27.112	debug	dps debug: {"id":41,"result":["ok"]}
roborock.0
2024-01-14 22:51:26.895	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.7.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:26.570	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.980	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.949	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:24.949	debug	Not clearing messageQueue. null - 88071
roborock.0
2024-01-14 22:51:24.948	debug	dps debug: {"id":38,"result":["ok"]}
roborock.0
2024-01-14 22:51:24.916	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:24.829	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_water_box_custom_mode
roborock.0
2024-01-14 22:51:24.828	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.751	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.6.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:24.747	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_carpet_clean_mode
roborock.0
2024-01-14 22:51:24.746	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.668	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_carpet_mode
roborock.0
2024-01-14 22:51:24.668	debug	get_timer: "[]
roborock.0
2024-01-14 22:51:24.668	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.587	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_timer
roborock.0
2024-01-14 22:51:24.587	debug	get_server_timer: " + [["1690754187481","disable",0]]
roborock.0
2024-01-14 22:51:24.586	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.519	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_server_timer
roborock.0
2024-01-14 22:51:24.517	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.396	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_network_info
roborock.0
2024-01-14 22:51:24.396	debug	Consumables of robot: {"main_brush_work_time":138784,"side_brush_work_time":138784,"filter_work_time":138784,"filter_element_work_time":0,"sensor_dirty_time":24211,"dust_collection_work_times":196}
roborock.0
2024-01-14 22:51:24.395	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.340	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_consumable
roborock.0
2024-01-14 22:51:24.339	debug	Mapped room matched: 15575357 with name: Treppe
roborock.0
2024-01-14 22:51:24.339	debug	Mapped room matched: 12866080 with name: Flur
roborock.0
2024-01-14 22:51:24.338	debug	Mapped room matched: 15575279 with name: Max
roborock.0
2024-01-14 22:51:24.338	debug	Mapped room matched: 15575277 with name: Schlafzimmer
roborock.0
2024-01-14 22:51:24.337	debug	Mapped room matched: 15575268 with name: Badezimmer
roborock.0
2024-01-14 22:51:24.337	debug	Mapped room matched: 15575273 with name: Zoe
roborock.0
2024-01-14 22:51:24.336	debug	All mapped rooms: [[16,"15575273",12],[17,"15575268",15],[18,"15575277",1],[19,"15575279",12],[20,"12866080",8],[21,"15575357",12]]
roborock.0
2024-01-14 22:51:24.334	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.270	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:24.148	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_room_mapping
roborock.0
2024-01-14 22:51:24.115	debug	get_status: {"msg_ver":2,"msg_seq":2056,"state":8,"battery":100,"clean_time":2197,"clean_area":36290000,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":1,"fan_power":102,"dnd_enabled":1,"map_status":3,"is_locating":0,"lock_status":0,"water_box_mode":203,"distance_off":170,"water_box_carriage_status":1,"mop_forbidden_enable":1,"adbumper_status":[0,0,0],"dock_type":5,"dust_collection_status":0,"auto_dust_collection":1,"debug_mode":0,"switch_map_mode":0,"dock_error_status":0,"charge_status":1}
roborock.0
2024-01-14 22:51:24.115	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:23.908	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:23.802	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_status
roborock.0
2024-01-14 22:51:23.801	debug	Latest data requested
roborock.0
2024-01-14 22:51:22.301	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:22.278	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:22.278	debug	Not clearing messageQueue. null - 86416
roborock.0
2024-01-14 22:51:22.277	debug	dps debug: {"id":27,"result":["ok"]}
roborock.0
2024-01-14 22:51:22.163	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.5.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:21.781	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:20.384	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:20.353	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:20.353	debug	Not clearing messageQueue. null - 85659
roborock.0
2024-01-14 22:51:20.352	debug	dps debug: {"id":25,"result":["ok"]}
roborock.0
2024-01-14 22:51:20.199	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.4.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:19.814	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:18.117	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:18.089	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:18.088	debug	Not clearing messageQueue. null - 84876
roborock.0
2024-01-14 22:51:18.088	debug	dps debug: {"id":23,"result":["ok"]}
roborock.0
2024-01-14 22:51:17.966	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.3.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:17.665	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:15.767	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:15.740	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:15.740	debug	Not clearing messageQueue. null - 84091
roborock.0
2024-01-14 22:51:15.739	debug	dps debug: {"id":21,"result":["ok"]}
roborock.0
2024-01-14 22:51:15.606	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.2.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:15.226	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:13.521	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:13.497	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:13.497	debug	Not clearing messageQueue. null - 83321
roborock.0
2024-01-14 22:51:13.496	debug	dps debug: {"id":19,"result":["ok"]}
roborock.0
2024-01-14 22:51:13.270	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.1.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:12.896	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:11.302	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:11.276	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:11.276	debug	Not clearing messageQueue. null - 82577
roborock.0
2024-01-14 22:51:11.275	debug	dps debug: {"id":17,"result":["ok"]}
roborock.0
2024-01-14 22:51:11.138	warn	State "roborock.0.Devices.5kt1jy0ATJPgji5k0hJAZg.cleaningInfo.Records.0.map_flag" has no existing object, this might lead to an error in future versions
roborock.0
2024-01-14 22:51:10.944	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:10.859	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_water_box_custom_mode
roborock.0
2024-01-14 22:51:10.858	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:10.787	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_carpet_clean_mode
roborock.0
2024-01-14 22:51:10.786	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:10.673	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_carpet_mode
roborock.0
2024-01-14 22:51:10.672	debug	get_timer: "[]
roborock.0
2024-01-14 22:51:10.671	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:10.509	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_timer
roborock.0
2024-01-14 22:51:10.508	debug	get_server_timer: " + [["1690754187481","disable",0]]
roborock.0
2024-01-14 22:51:10.506	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:08.617	debug	bounding box debug selectedMap: 0
roborock.0
2024-01-14 22:51:08.617	debug	bounding box debug deviceStatus: [{"msg_ver":2,"msg_seq":2055,"state":8,"battery":100,"clean_time":2197,"clean_area":36290000,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":1,"fan_power":102,"dnd_enabled":1,"map_status":3,"is_locating":0,"lock_status":0,"water_box_mode":203,"distance_off":170,"water_box_carriage_status":1,"mop_forbidden_enable":1,"adbumper_status":[0,0,0],"dock_type":5,"dust_collection_status":0,"auto_dust_collection":1,"debug_mode":0,"switch_map_mode":0,"dock_error_status":0,"charge_status":1}]
roborock.0
2024-01-14 22:51:08.616	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:08.607	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_server_timer
roborock.0
2024-01-14 22:51:08.606	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:08.533	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:08.492	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_network_info
roborock.0
2024-01-14 22:51:08.491	debug	Consumables of robot: {"main_brush_work_time":138784,"side_brush_work_time":138784,"filter_work_time":138784,"filter_element_work_time":0,"sensor_dirty_time":24211,"dust_collection_work_times":196}
roborock.0
2024-01-14 22:51:08.490	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:08.450	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:08.441	debug	Length of message queue: 2
roborock.0
2024-01-14 22:51:08.415	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:08.415	debug	Not clearing messageQueue. null - 80630
roborock.0
2024-01-14 22:51:08.413	debug	dps debug: {"id":3,"result":["ok"]}
roborock.0
2024-01-14 22:51:08.390	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_consumable
roborock.0
2024-01-14 22:51:08.389	debug	Mapped room matched: 15575357 with name: Treppe
roborock.0
2024-01-14 22:51:08.389	debug	Mapped room matched: 12866080 with name: Flur
roborock.0
2024-01-14 22:51:08.388	debug	Mapped room matched: 15575279 with name: Max
roborock.0
2024-01-14 22:51:08.388	debug	Mapped room matched: 15575277 with name: Schlafzimmer
roborock.0
2024-01-14 22:51:08.388	debug	Mapped room matched: 15575268 with name: Badezimmer
roborock.0
2024-01-14 22:51:08.387	debug	Mapped room matched: 15575273 with name: Zoe
roborock.0
2024-01-14 22:51:08.387	debug	All mapped rooms: [[16,"15575273",12],[17,"15575268",15],[18,"15575277",1],[19,"15575279",12],[20,"12866080",8],[21,"15575357",12]]
roborock.0
2024-01-14 22:51:08.386	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:08.317	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:08.250	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:08.166	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:08.158	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_room_mapping
roborock.0
2024-01-14 22:51:08.103	debug	get_status: {"msg_ver":2,"msg_seq":2053,"state":8,"battery":100,"clean_time":2197,"clean_area":36290000,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":1,"fan_power":102,"dnd_enabled":1,"map_status":3,"is_locating":0,"lock_status":0,"water_box_mode":203,"distance_off":170,"water_box_carriage_status":1,"mop_forbidden_enable":1,"adbumper_status":[0,0,0],"dock_type":5,"dust_collection_status":0,"auto_dust_collection":1,"debug_mode":0,"switch_map_mode":0,"dock_error_status":0,"charge_status":1}
roborock.0
2024-01-14 22:51:08.101	debug	Length of message queue: 0
roborock.0
2024-01-14 22:51:08.096	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_multi_maps_list
roborock.0
2024-01-14 22:51:08.092	debug	Length of message queue: 1
roborock.0
2024-01-14 22:51:07.882	debug	Firmware features request for 5kt1jy0ATJPgji5k0hJAZg
roborock.0
2024-01-14 22:51:07.310	debug	Robot key: roborock.vacuum.a75
roborock.0
2024-01-14 22:51:07.309	debug	Update map
roborock.0
2024-01-14 22:51:07.306	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_status
roborock.0
2024-01-14 22:51:07.306	debug	Latest data requested
roborock.0
2024-01-14 22:51:07.304	debug	getParameter for 5kt1jy0ATJPgji5k0hJAZg: get_fw_features
roborock.0
2024-01-14 22:51:07.297	debug	5kt1jy0ATJPgji5k0hJAZg online. Starting mainUpdateInterval.
roborock.0
2024-01-14 22:48:53.061	debug	MQTT connection connected {"cmd":"connack","retain":false,"qos":0,"dup":false,"length":2,"topic":null,"payload":null,"sessionPresent":false,"returnCode":0}.
roborock.0
2024-01-14 22:48:52.928	debug	tcp client for 5kt1jy0ATJPgji5k0hJAZg connected
roborock.0
2024-01-14 22:48:52.926	debug	tcp client for 4Si5s3DNcsl0ATAl8e5UdI connected
roborock.0
2024-01-14 22:48:52.035	debug	Robot key: roborock.vacuum.a38
roborock.0
2024-01-14 22:48:52.034	debug	RoomIDs debug: {"12827142":"Küche","12827149":"Wohnzimmer","12827153":"Esszimmer","12827157":"Flur EG","12866080":"Flur","12866083":"Küche1","12866239":"Gästebad","15575268":"Badezimmer","15575273":"Zoe","15575277":"Schlafzimmer","15575279":"Max","15575357":"Treppe"}
roborock.0
2024-01-14 22:48:52.033	info	MQTT initialized
roborock.0
2024-01-14 22:48:51.927	debug	localDevices: {"5kt1jy0ATJPgji5k0hJAZg":"<IP_ADDRESS>","4Si5s3DNcsl0ATAl8e5UdI":"<IP_ADDRESS>"}
roborock.0
2024-01-14 22:48:46.044	info	Starting adapter. This might take a few minutes depending on your setup. Please wait.
roborock.0
2024-01-14 22:48:45.973	info	starting. Version 0.5.1 (non-npm: copystring/ioBroker.roborock#dev) in /opt/iobroker/node_modules/iobroker.roborock, node: v18.17.0, js-controller: 5.0.17
roborock.0
2024-01-14 22:48:45.345	debug	Plugin sentry Initialize Plugin (enabled=true)
roborock.0
2024-01-14 22:48:45.223	debug	States connected to redis: <IP_ADDRESS>:9000
roborock.0
2024-01-14 22:48:45.112	debug	States create User PubSub Client
roborock.0
2024-01-14 22:48:45.110	debug	States create System PubSub Client
roborock.0
2024-01-14 22:48:45.074	debug	Redis States: Use Redis connection: <IP_ADDRESS>:9000
roborock.0
2024-01-14 22:48:44.979	debug	Objects connected to redis: <IP_ADDRESS>:9001
roborock.0
2024-01-14 22:48:44.969	debug	Objects client initialize lua scripts
roborock.0
2024-01-14 22:48:44.809	debug	Objects create User PubSub Client
roborock.0
2024-01-14 22:48:44.807	debug	Objects create System PubSub Client
roborock.0
2024-01-14 22:48:44.805	debug	Objects client ready ... initialize now
roborock.0
2024-01-14 22:48:44.705	debug	Redis Objects: Use Redis connection: <IP_ADDRESS>:9001

Der Fehler taucht im Log nicht auf. Aber egal. Hab es ja im Forum gesehen.


ringpop: update hashring immediately on ring change

What changed?
When a cadence host is added/removed/restarted, every other host in the cluster will receive a change notification via ringpop. This is the primary mechanism by which discovery / failure detection works today. When such a change notification is received, every node updates its consistent hash ring to route future requests to the correct owner. Its critical that the hashring update happens as soon as possible during deployments / restarts etc to avoid downtime / availability drops. Currently, there is an optimization to avoid updates too many updates to hashring within a short span of time. But this is hurting availability.
This patch adds a fix by updating ring as soon as notification is received. In addition, the dedup map is added to resolver to avoid updating the ring when (a) nothing changed (b) the host added or removed is for a different role. This should mitigate the too many updates within a short span of time problem.
Why?
To reduce availability dips during deployments and host restarts.
How did you test it?
Localhost as well as in a staging environment.
Potential risks
In the worst case, discovery / failure detection can be broken. This would mean unavailability or host stealing shards from each other continuously.

Coverage increased (+0.4%) to 67.557% when pulling 6dbc2b0be5921e743c112833200d282b354b06dd on venkat1109:v_rp_fixes into 74c2c6910b6fd4194fa0a2b918f4168e0a4a6263 on uber:master.


Create model for Boxes below picture gallery

Create a simple model for the box below picture gallery (http://f20kk8.axshare.com/#g=1&p=home_screen). It needs:

A TextField for the heading
A TextField for the content. This has a bigger size.

I can add this to the models but it might be useful if we decide on a few details beforehand:

Will the box content be plain text or should we allow links as well?
How do we pick the boxes to be displayed when someone opens the homepage? Some options I can think of are:

Boxes are linked to pictures and only the displayed picture's boxes will be on the screen
A number of (three in the example) boxes are picked randomly from the DB and displayed on the page each time the page loads
We will have only three (or however many we wish to display on the page) "active" boxes which will be on the main page every time the page loads. If this is the case we should also decide on what to do with deactivated boxes in the DB (i.e. keep them but change the status to INACTIVE or delete them)

I kept the model to bare minimum (no published/archived/deleted status, no publish from/until date etc.)
Also, as we later discussed at last week's meetup, instead of adding a more info field I added an (optional) link field so that the box can also be used to highlight an event, a local business or to draw attention to an external website.


Correctly load test env variables

What this PR does:

Remove foreman from the Gemfile
Update setup script to check if foreman is installed in the system
Delete spec file, no longer needed

Notes
Foreman should not be present in the Gemfile:

“Ruby users should take care not to install foreman in their project's Gemfile”
https://github.com/ddollar/foreman

I moved rspec-rails gem to the dev and test bundler groups

Add rspec-rails to both the :development and :test groups in the Gemfile
https://github.com/rspec/rspec-rails

@theharq actually, thinking about it we can remove forman and the profile all together


Fix FlagAsDeletedJob handling under load

Prevent duplicated jobs: resque-loner?
Figure out how to work off more than one document per fork.  These jobs run very fast and as such we spend way too much time forking new processes.  Can resque-jobs-per-fork help?

resque-multi-job-forks also supports multiple jobs per fork.  I need a way to selectively enable this behavior.  I don't want every worker to do this.

I'm fairly certain that I want to split the index jobs and the flag jobs into different queues so I can have different workers on different cores handling them.
It would also be nice to know if you can run multiple instances of indexer together.  We could change how the locking works to allow multiple DeltaJobs to run at once as long as each one had a unique index.

This has been implemented and is undergoing review in agibralter/ts-resque-delta#12.


Fix issues with alter queryset and added DynamicRoute for non detail …

…views
Closes: #DNE
What's Changed

Added a DynamicRoute to be used with ViewSetUI custom actions when it is not a detail view.
Fixed an issue with alter_queryset not being implemented when constructing a table.

TODO

[x] Explanation of Change(s)
[x] Added change log fragment(s) (for more information see the documentation)
[ ] Documentation Updates (when adding/changing features)

I can add docs if so desired for the DynamicRoute update, please let me know if that will be required.
Can someone take a look at the alter_queryset logic? This is the second issue I ran into and probably worth 15 minutes to review other places this needs to be applied.

I can add docs if so desired for the DynamicRoute update, please let me know if that will be required.
Can someone take a look at the alter_queryset logic? This is the second issue I ran into and probably worth 15 minutes to review other places this needs to be applied.

Docs would be super helpful if you have time to add it. A test case would also be desirable although I am not sure how to test the DyanmicRoute.

I did not see any tests on the prior so I presume it was problematic. I will add the docs.

I carved out the DynamicRoute feature over to https://github.com/nautobot/nautobot/tree/u/itdependsnetworks-4529-custom-actions-dynamic-routes, and we should group with https://github.com/nautobot/nautobot/pull/4512/files to address #4529


Why create a reconnection logic other than the offered in StackExchange.Redis package?

This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

N/A

Any log messages given by the failure

N/A

Expected/desired behavior

N/A

OS and Version?

N/A

Versions

N/A

Mention any other details that might be useful
Just a question to understand the reason behind handling reconnection manually instead of relying on the logic offered by the library (ref: https://stackexchange.github.io/StackExchange.Redis/Configuration.html#reconnectretrypolicy). Is there an edge case not covered by the native retry feature?

Hi @ricardomomm in older versions of StackExchange.Redis (and in other Redis client libraries) there are various issues that can interfere with the library's ability to automatically restore connections internally. As a backstop for those edge cases, we recommended a ForceReconnect pattern to replace the entire connection object that may be stuck in a bad state with a fresh instance that's more likely to connect successfully.
The latest versions of StackExchange.Redis contain fixes for all such edge cases that we've detected, and internal connection restoration is now very reliable. As long as you're on a recent version (and updating regularly), it's unlikely that you'll need to implement ForceReconnect.

Thanks for the quick feedback @philon-msft , we are on latest StackExchange.Redis so we are safe then.


no display using debugA

First, thanks for a wonderful utility
I found debugA doesn't display
changed line 247 of RemoteDebug.h from
#define debugA(fmt, ...) rdebugVln(fmt, ##__VA_ARGS__)
to
#define debugA(fmt, ...) rdebugAln(fmt, ##__VA_ARGS__)
and seems to work

Hi @jetpax, thanks to found this bug.
I will correct the code
Regards

Hi @jetpax , this is fixed in lastest version (3.0.0)
Thanks a lot for your colaboration

Thanks Joao, look forward to the web app
Funnily enough I am using your RemoteDebug to debug an issue in my webapp, (resets after 6 hours or so) but think this may be the asyncwebserver that I am using
Actually this shows what maybe a bug in RemoteDebug but I will submit that on another ticket

This does not appear to be fixed - as of 3.0.4 it is still "V" instead of "A".  Tnx!

Hi @cmidgley and @jetpax ,
My mistake, I changed in incorrect directory and not published to repo
Please download the latest version.
Thanks for your feedback

It works. My version is 3.0.4


Write comment about direction normalization in gradient_check.check_backward

The purpose of normalization of the direction vector is not easily guessed from the code.
I described the purpose and assumption.

LGTM!


Mapper().toJSON() returning an expected result

This is a really fantastic library. Thanks. I have been using it in conjunction with Alamofire 3, but I'm noticing some odd things with the Mapper().toJSON() method.
What I'm trying to do is map my object to a JSON object so that I can pass it as a parameter for a .POST request. But, when I do let params = Mapper().toJSON(login), it returns ["email"<EMAIL_ADDRESS>"password": pass] and when I tried Mapper().toJSONString(login, prettyPrint: false), I'm getting {\"email\":\"user@domain.com\",\"password\":\"pass\"}.
My expected output is something like this:
{
<EMAIL_ADDRESS>   "password":"pass"
}

Am I missing something obvious? Would really appreciate any feedback.
Here is my object and the Alamofire request.
class login: Mappable {

    var login:      String? = nil
    var password:   String? = nil

    init(forLogin login: String, forPassword password: String) {
        self.login      = login
        self.password   = password
    }

    required init?(_ map: Map){

    }

    func mapping(map: Map) {

        login       <- map["email"]
        password    <- map["password"]

    }

}

let params = Mapper().toJSON(login)

Alamofire
  .request(.POST, URL!, parameters: params, encoding: .JSON)
  .validate()
  .responseJSON { response in
    debugPrint(response)
}

Hi @dotmike, this is actually the expected output. ObjectMapper uses the keys passed into the map object to construct the JSON string.

I see. Thanks, @tristanhimmelman. Do you recommend any other method to have the values to be wrapped in double quotes like so: ["email"<EMAIL_ADDRESS>"password": "pass"]? Appreciate the help and 🍺 for the library.

@dotmike, you can check the mappingType property of Map to detect when the mapping is FromJSON or ToJSON. ex:
func mapping(map: Map) {
	if map.mappingType == .FromJSON {
	     login <- map["email"]
	} else {
	     login <- map["login"]
	}
}


BaseCache::recvTimingResp can trigger in getTarget() assertion error due to MSHR in senderState having no targets

This was identified by Eliot moss on our gem5-users mailing list (https://www.mail-archive.com/gem5-users@gem5.org/msg21771.html). Copy and pasted verbatim:
Dear gem5-ers -

I've run across something, which unfortunately I cannot reliably repeat, that
suggests an oversight in the code of src/mem/cache/base.cc.  In particular, it
appears that a HardPFResp can arrive where the MSHR remembered in the packet's
senderState no longer has any targets.  This causes this line to fail with an
assertion error in getTarget():

const QueueEntry::Target *initial_tgt = mshr->getTarget();

Presumably some suitable conditionalization on mshr->hasTargets() could be
used to fix things, unless the problem is that somehow the target(s)
disappeared when they should not have.  My suspicion is that something to do
with snooping by another cache caused the target to go away, and the situation
should just be ignored, but I did not want to attempt a fix along the lines of
testing hasTargets() without further confirmation.  There is also the question
of what to do about the stats in this case, there being no obvious basis for
determining a latency.  [We could change the senderState to include the time
the prefetch began, though, and use HardPFReq as the command.]

Regards - Eliot Moss

The `` line mentioned in the email referred to:
https://github.com/gem5/gem5/blob/af72b9ba580546ac12ce05bfaac3fd53fa8699f4/src/mem/cache/base.cc#L528

The configuration where this seems to have happened (it's not an easily repeated thing) is ARM DerivO3 with two processors.  The setup is not entirely symmetrical - one "host" processor runs Linux has has at least an L2 cache.  The other "embedded" processor is more "bare metal" and has at least an L1 cache.  Their point of mutual connection is the system's membus.
If desired I can propose a patch that avoids doing getTarget when there are no targets, and supplies something reasonable for incrementing the statistics (namely the command of the packet received).

My worry is this could symptomatic of a bigger bug. If we work around the assertion we may struggle to ever detect it. I'm tempted to wait until we can reproduce it, explain why it happens, or someone has a good explanation as to why it's ok for the MSHR in senderState to have no targets at this point.

That's reasonable, Bobby.  While I've dug into - and extended - various parts of cache behavior, prefetching is one part I have not.  I'll see if I can make some time to dig out how targets might disappear while a prefetch is pending.  My guess is that some kind of snoop may have caused contents, including some outstanding MSHRs / targets, to be dropped, but that just a starting point for exploration.  Another angle would be an eviction.  Happy if anybody else chooses to look into it as well, of course!

I wonder about this line:
https://github.com/gem5/gem5/blob/af72b9ba580546ac12ce05bfaac3fd53fa8699f4/src/mem/cache/base.cc#L320


Enabled Scoverage test coverage

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@be92e48). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #3   +/-   ##
=======================================
  Coverage        ?   73.33%
=======================================
  Files           ?        2
  Lines           ?       15
  Branches        ?        0
=======================================
  Hits            ?       11
  Misses          ?        4
  Partials        ?        0

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 be92e48...b3b6a71. Read the comment docs.


Django 2.1a1: cannot import name 'TOKEN_BLOCK'

When trying to run my project with Django 2.1a1, I get the following error
envdir envs/dev/ pytest --cov=mygpo/ --cov-branch
Traceback (most recent call last):
  File "/home/stefan/mygpo/venv/bin/pytest", line 11, in <module>
    sys.exit(main())
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/config.py", line 49, in main
    config = _prepareconfig(args, plugins)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/config.py", line 168, in _prepareconfig
    pluginmanager=pluginmanager, args=args)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
    _MultiCall(methods, kwargs, hook.spec_opts).execute()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
    return _wrapped_call(hook_impl.function(*args), self.execute)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
    wrap_controller.send(call_outcome)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/helpconfig.py", line 68, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
    self.result = func()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
    res = hook_impl.function(*args)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/config.py", line 957, in pytest_cmdline_parse
    self.parse(args)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/config.py", line 1121, in parse
    self._preparse(args, addopts=addopts)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/config.py", line 1092, in _preparse
    args=args, parser=self._parser)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
    _MultiCall(methods, kwargs, hook.spec_opts).execute()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
    return _wrapped_call(hook_impl.function(*args), self.execute)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 254, in _wrapped_call
    return call_outcome.get_result()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
    self.result = func()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
    res = hook_impl.function(*args)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/pytest_cov/plugin.py", line 97, in pytest_load_initial_conftests
    plugin = CovPlugin(early_config.known_args_namespace, early_config.pluginmanager)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/pytest_cov/plugin.py", line 152, in __init__
    self.start(engine.Central)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/pytest_cov/plugin.py", line 174, in start
    self.cov_controller.start()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/pytest_cov/engine.py", line 146, in start
    self.cov.erase()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/coverage/control.py", line 726, in erase
    self._init()
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/coverage/control.py", line 226, in _init
    self.plugins = Plugins.load_plugins(self.config.plugins, self.config, self.debug)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/coverage/plugin_support.py", line 40, in load_plugins
    __import__(module)
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/django_coverage_plugin/__init__.py", line 6, in <module>
    from .plugin import DjangoTemplatePlugin
  File "/home/stefan/mygpo/venv/lib/python3.5/site-packages/django_coverage_plugin/plugin.py", line 16, in <module>
    from django.template.base import (
ImportError: cannot import name 'TOKEN_BLOCK'

I did not find anything in the (under development) release notes. Is this something that should be addressed in django_coverage_plugin, or should I report it to django instead?

Looks like django/django#9938 replaced this and related constants with an enum.

Same issue
$ docker-compose run backend coverage run --source='.' /usr/local/bin/pytest
Starting infrastructure_db_1 ... done
Traceback (most recent call last):
  File "/usr/local/bin/coverage", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/coverage/cmdline.py", line 753, in main
    status = CoverageScript().command_line(argv)
  File "/usr/local/lib/python3.7/site-packages/coverage/cmdline.py", line 488, in command_line
    return self.do_run(options, args)
  File "/usr/local/lib/python3.7/site-packages/coverage/cmdline.py", line 617, in do_run
    self.coverage.erase()
  File "/usr/local/lib/python3.7/site-packages/coverage/control.py", line 726, in erase
    self._init()
  File "/usr/local/lib/python3.7/site-packages/coverage/control.py", line 226, in _init
    self.plugins = Plugins.load_plugins(self.config.plugins, self.config, self.debug)
  File "/usr/local/lib/python3.7/site-packages/coverage/plugin_support.py", line 40, in load_plugins
    __import__(module)
  File "/usr/local/lib/python3.7/site-packages/django_coverage_plugin/__init__.py", line 6, in <module>
    from .plugin import DjangoTemplatePlugin
  File "/usr/local/lib/python3.7/site-packages/django_coverage_plugin/plugin.py", line 16, in <module>
    from django.template.base import (
ImportError: cannot import name 'TOKEN_BLOCK' from 'django.template.base' (/usr/local/lib/python3.7/site-packages/django/template/base.py)

Django==2.1
django-coverage-plugin==1.5.0

Now that #57 has been merged into master, this issue is now fixed.
I will be releasing the latest version later today.
Thanks to all of you for documenting the issue!

I have issued a release-candidate with the changes: https://pypi.org/project/django_coverage_plugin/1.6rc1/


[Request] Bot.get_channel

Already talked about it on the Discord, but for organisation purposes.

Done. Thanks


Add a createResetStyleSet feature

I wanted to convert some makeStyles that had 4 different classNames to resetStyles to reduce the number of classNames produced in my code. In the end I had to create 4 different makeResetStyle function calls, and then call all 4 of them in my component to get the 4 different classNames.
I wish I could have just done this
//before
const useStyles = makeStyles({
  buttonContent: { ... },
  progressBar: { ... },
  bar: { ... },
  dismiss: { ... }
});

// after
const useStyleSets = makeResetStyleSet({
  buttonContent: { ... },
  progressBar: { ... },
  bar: { ... },
  dismiss: { ... }
});

and then
const styles = useStyleSets();

Thanks for bringing up the concern regarding the difference in API between makeResetStyles() and makeStyles(). Let me give you some context behind this design decision.
The difference is due to the fact that makeResetStyles() produces an element that cannot have multiple classes applied to it. Hence, providing the same API as makeStyles() may lead to the expectation that it is possible, which can result in unintended consequences. An example is below:
// ⚠ NOT REAL API

const useClasses = makeResetStyles({
  A: { /* styles */ },
  B: { /* styles */ },
})

function App() {
  const classes = useClasses();

  // https://griffel.js.org/react/api/make-reset-styles#limitations
  // 👇 Results in non deterministic behavior 💥
  return <div className={mergeClasses(classes.A, classes.B)} />
}

Therefore, it was a deliberate choice to prevent such misuse and ensure a balance between usability and avoiding mistakes. I do understand that this may have some implications, but it was a deliberate decision discussed with the team.


Read battery API

Battery API (/api/v2/battery) provides a couple of other details. Especially voltage and temperatures can be of safety interest for battery enthusiasts. Moreover this provides capacity information in Ah.
We should also consider changing existing remaining_capacity_wh() to maybe calculate real wh value from battery remaining Ah (nominal voltage can be calculated from full_charge_wh and full_charge_Ah and multiplied with battery_remaining_capacity to get value in wh). However I am currently still in the process to analyze data returned by remaining_capacity_wh() some more (without that 22000 offset) to maybe get around what really is returned here.

my system is 22000 with 2 blocks but is returning 44000 in remaining_capacity_wh(). I didn't figure out why....
ihave contacted Sonnen but they told me no support for the api :(

my system is 11000 (so one block) and is returning 22000 max. So because of that -22000 values are negativ for me but still I am doubtful about it just reporting double of what it realy is. I am currently in the process of tracing values over time in hopes of getting more insight of what that means.
I will prepare another PR with more info if I could figure something out!


Generate docs for ko commands

Fixes #20

Move ko.Root to its own package.
Generate docs at cmd/gendoc.
Add generated .md to .gitattributes.
Add test to .travis.yml to ensure up-to-date docs.

Hey @ImJasonH @jonjohnsonjr , just pinging if this pulls got buried among others. Is there any fix that I should do? :slightly_smiling_face:
Thank you very much!

This is still vendoring ko (I think you need to drop it from Gopkg.lock).
Also travis is complaining about a failure:
cmd/gendoc/main.go:10:2: cannot find package "github.com/spf13/cobra/doc"

Hi @jonjohnsonjr and @ImJasonH , I think I've found out the root of the problem cmd/gendoc/main.go:10:2: cannot find package "github.com/spf13/cobra/doc" in Travis failure but need to discuss it with the two of you.
So because in this project we're pushing the vendors to the repo, I've found that the github.com/spf13/cobra package is currently on version 0.0.3 and the latest is 0.0.5. But even the 0.0.3 version that was initially committed to this project doesn't contain its doc package while the version 0.0.3 of the original github.com/spf13/cobra package contains the doc package that needs to be used by the cmd/gendoc/main.go. Any chance that this package could be updated?
Thank you very much 🙂

Hi @ImJasonH , I am really sorry that I just commented again now because I was hospitalized for a while.
Even though you have updated the cobra dep, it seems like we still can't find the folder and package doc at the vendor folder of this project, while at the original project of cobra, there is a folder and package named doc which was used as a dependency for generating the docs. Is there any solution for this?
Thank you! :smile:

Oh wow, no worries! I'm glad you're back and I hope you're feeling better! 🤕
Can you paste the full command invocation (with pwd) and error message you get?
If I get some time I'll try to run this myself and see if I can sort it out. 👍

Oh wow, no worries! I'm glad you're back and I hope you're feeling better!
Can you paste the full command invocation (with pwd) and error message you get?
If I get some time I'll try to run this myself and see if I can sort it out.

Hi @ImJasonH , thank you very much for the really kind words! Truly appreciate it! :blush:


Add LRO begin methods to MethodGroup

When an LRO Begin method is created in the AddLongRunningOperations Transformer method, we currently add the created LRO Begin method to the CodeModel, but we forgot to add it to the MethodGroup that the original LRO method belonged to.

@fearthecowboy Pointed out the CodeModel.Add(Method) does this already, so this PR is redundant.


Delete release must delete the blob too

Is it planned that a command will support to delete a release ? @ant31


Update spoiler-converter extension

Description

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Why did the raycast bot mention evanzhoudev? he isn't even a contributor?

Strange. Probably a glitch?

For some reason, @EvanZhouDev is in CODEOWNERS for this file

Have you duplicated any part of the extension from any of my extensions? It may be because of that... I didn't get pinged the original release, anyway...

I don't believe so, unless you made a spoiler-converter?
Or maybe I screwed up the source control and accidentally pushed to some other branch using the VSCode github thingy (because I have forked your extensions in the past)

@pernielsentikaer I'm okay with your changes to the changelog 👍
please merge it to the store.
also, could you please review my changes for the URL shortener as soon as you can? 🙏
tysm


Grand Theft Auto V massive performance drop if on desert

If you are in the desert and you look at the direction of the city the game performance completely falls apart, see the images:
i'm in the desert looking at the city direction:

Software information
Grand Theft Auto V - (Steam)
System information

GPU: AMD RX 6600
Driver: Mesa 23.0.0 (RADV)
Wine version: Proton Experimental (24/04/2023)
DXVK version: 2.1

Apitrace file(s)

Unfortunately looks like the game DRM does not like people apitracing it, i tried many times before but since i'm stupid you guys might have more luck than me to capture it

Log files
steam-271590.tar.gz

Reproduced on my 6600M
Very high Settings
System information

GPU: RX 6600M
CPU: R5 5600H
Driver: Mesa 23.0.0 (RADV)
Wine version: 8.4 (Staging)
DXVK version: 2.1

Is there actually any indication that dxvk is at fault here? perf top might show something.

d3d11.cachedDynamicResources = a noticeably improves performance for me

looks like we need an app profile then, can you try narrowing down which option exactly it is that improves performance?
Please try each of:

d3d11.cachedDynamicResources = c
d3d11.cachedDynamicResources = r
d3d11.cachedDynamicResources = vi

If any of those give you full performance, we should use that.

Both
d3d11.cachedDynamicResources = vi and  d3d11.cachedDynamicResources = a
boosted my performance to normal levels (max settings 60~70/80 fps)
I tested both separately of course.
Framerate in the screenshot is on the bottom left*

Oh wow, that improved performance way more than I expected (6900xt)

I have a few screenshots showing a huge performance difference, even with all cached dynamic resources options set. Not sure if it's related to DXVK, the OS or the driver, but hopefully someone has some ideas about where to look.
I wish I could use DXVK with the game on Windows to rule out some variables, but it doesn't seem to work - as I remember, it always loads dxgi.dll from System32.
Also, if anyone with an AMD GPU could test in the same location in the game, that could give us another useful data point. I can provide map and graphics settings screenshots if necessary.
Anyway, the hardware is:

Ryzen 9 5900x
2x32GB DDR4-3200
MSI RTX 3080 Ti 3X Ventus OC

Windows 10:

Linux Mint 21.1 Cinnamon:

(I included this last one that hits the FPS cap for comparison)

I don't know where that is and haven't really played GTA V much. Can you provide a savegame near the location or do i have to get there?

I don't know if there are any complications with sharing savegames, given that there are Rockstar and Steam accounts involved. I'll try to find out more.
In the meantime, I'll post a map screenshot when I get a chance.

I have a few screenshots showing a huge performance difference, even with all cached dynamic resources options set

Does setting d3d11.cachedDynamicResources = a fix this?

I tried "vi" and "a" and got the same results. It did look promising at first, during the benchmark sequence and in some other situations, but then I came across this.
I seem to remember trying it with the NVAPI hack disabled in the past, but it didn't help. I might check that again just to confirm.
I have tested it on another PC with a Vega 56 GPU to try to rule out any Nvidia driver problems - performance was on par with Windows when GPU bound but turning down graphics settings to load the CPU more showed similar disparities. That PC has a Core i7-6700 CPU - at one point, that was my main PC with the 3080 Ti (yes, that GPU was kind of an overkill, but I did use it for crypto mining as well!)
As I mentioned earlier, it's a pity I can't get the game to run with DXVK libraries on Windows, since I'd love to see it without OS and driver differences getting in the way.

 At least it's good enough at the moment to avoid rebooting if I feel like playing. And it's nowhere near as bad as Halo Infinite!


GuildMemberUpdateNicknameEvent doesn't fire for the first nickname change after startup

General Troubleshooting

[X] I have checked for similar issues on the Issue-tracker.
[X] I have updated to the latest JDA version
[X] I have checked the branches or the maintainers' PRs for upcoming bug fixes.

Expected Behaviour
JDA should fire GuildMemberUpdateNicknameEvent for every nickname change to be able to monitor nicknames reliably. Instead it ignores the first change and then only fires for the next ones.
Code Example for Reproduction Steps
@Override
	public void onGuildMemberUpdateNickname(GuildMemberUpdateNicknameEvent e) {
		System.out.println(e.getNewNickname());
	}

Code for JDABuilder or DefaultShardManagerBuilder used
JDABuilder.createDefault("token").enableIntents(GatewayIntent.GUILD_MEMBERS, GatewayIntent.MESSAGE_CONTENT).setMemberCachePolicy(MemberCachePolicy.ALL).build();

Exception or Error
No response

This is expected behavior, we can't see the update until the member is cached. You can preload members using Member Chunking, or use the GuildMemberUpdateEvent instead.


First attempt at implementing wildcard paths

Apologies for the duplicate earlier on, should have been less jumpy about opening an issue!
First attempt at getting this working, based on my limited understanding of RTSP and the code structure.
This patch introduces a new configuration item: isWildcard, that causes the configured path to be matched against any path that begins with it. The runOnInit/runOnDemand/runOnPublish/runOnRead callers have also been modified to set an environment variable RTSP_SERVER_PATH with the calling path. (For runOnInit, it will be called with the configured path, of course)
findConfForPath() has been modified to return an additional string - the configured path that was matched. It isn't necessary at the moment (only used to print out logs), but might be useful to have.
There are some doubts I have:

Possibly incorrect behaviour if isWildcard is set for the 'all' path
Unsure if there will be odd interactions with sourceOnDemand, thus currently there is a check to make sure that sourceOnDemand is off when isWildcard is on
It seems like it should be sufficient to handle adding the dynamic path during the describe event, but I may be wrong
There is a check to only destroy the dynamic path when both the producer and consumers are disconnected, but it possibly does not handle multiple clients connecting to the same path correctly
I have only tested this for my use case, which is with dynamically generated recorder streams, and only one client per path
The environment variable name should probably be a configuration item, and it should be possible to turn the feature off

Do let me know how I can improve the patch for acceptance, thanks!
(Addresses #47 )

Hello, first of all thanks for your contribution.
If possible, i'd split the work in two separate PRs, since you're addressing two separate features:

one for wildcards in paths
one for variables in commands. Since i've already received some user feedback regarding this feature, i think it would be more versatile to provide values via string replacements instead of environment variables, since a portion of users don't know what environment variables are or don't want to use them  - in this way it would be possible to avoid writing scripts in simple cases like this:

runOnDemand: ffmpeg -i ... -f rtsp rtsp://localhost:8554/$path

where $path is a variable provided with
strings.ReplaceAll(cmd, "$path", path)

Done, I've opened two new pull requests. If they're okay, do proceed to close this one.
(Unrelated to this, the latest changes to UDP handling seems to have broken something on our streaming setup fed with gstreamer rtspclientsink. I'll try to find time next week to investigate this.)


Fix GUI json load.

Related issue: https://forum.babylonjs.com/t/gui-editor-will-generate-error-if-save-locally/34853/2

@carolhmj looks like this broke some tests ?

@carolhmj looks like this broke some tests ?

woops I forgot to tell the tests to wait for a few frames before screenshot, this should be fixed now 🤣


THUG Pro (Tony Hawk's Underground 2 mod) has issues with online play

When playing THUG Pro, some levels seem to have a very long freeze, which hinders online play. If I for example, start a server with College level, the server will be visible in the list, but if I start server with Boston level, the connection between OpenSpy and the game times out (apparently) and the server will not be visible.
Software information
Name of the game, settings used etc.
System information

GPU: RX 550
Driver: Mesa
Wine version: lutris-4.12.1-x86_64
DXVK version: 0.13f

Does it work fine with Wine? I don't do any networking stuff...
An APITrace would also be useful to see if I can see why it's freezing

If you can get more info and its still replicable feel free to re-open...

Sorry, I forgot about this! This issue hasn't occured long time, so I guess it was just a fluke with my system.


Repeat dosn't work

I have a problem with the "Repeat". No matter if I specify the "repeat" in the Room or in a zone cleaning, the robot drives only once.

Adapter version: 3.9.5.
JS-Controller version: 4.0.24
Node version: 12.22.5
vacuum cleaner: Roborock S7 (roborock.vacuum.a15)

Please add debug log. And what is the content of dp unsuportet?

Mea culpa! I should have looked in there myself. I passed a string instead of a number via NodeRed. Now everything works. Thanks for the effort.


docs: outdated documentation for commands

Documentation in https://www.thehubble.xyz/docs/cli.html is lagging cli.ts. In particular:

[x] L2: Document all L2 options, remove duplicated docs from Ethereum section
[x] Networking: document denied peers
[x] Metrics: document statsd command, move gossip metrics here
[ ] Deprecate yarn status from docs (and separately, as a command)
[ ] Debug: Deprecate the fnr address option in debug, remove from hubble (also consider deprecating it from hubble)
[x] Debug:Document disable-console-status option in debug
[ ] Document the profile / storage command (what is this used for?)
[ ] Document events-reset command

@adityapk00 and @sanjayprabhu assigning this to both of you since you each own different commands here and have the best context for making calls on what is safe to be deprecated/ should be updated.

I fixed these, and I also added a linter to make sure all CLI options have helptext
https://github.com/farcasterxyz/hub-monorepo/pull/1353


Add 0049-group-anagrams.c

File(s) Modified: 0049-group-anagrams.c
Language(s) Used: c
Submission URL: _https://leetcode.com/problems/group-anagrams/submissions/879712938/_

Important
Please make sure the file name is lowercase and a duplicate file does not already exist before merging.

Thanks!


triggers for updating updated_at columns

:clipboard: Add associated issues, tickets, docs URL here.
Overview
update updated_at columns when a row is updated
Changes
create triggers for tables with updated_at columns so that they will be updated to now() when the row is updated
Testing
local testing on postgres

This, if I read it correctly, updates all historic entries with now()? Wouldn’t that confuyus what are real real inserted dates, and which were false to begin with?

BEFORE UPDATE ON txoutputs FOR EACH ROW EXECUTE PROCEDURE update_updated_at_column() translates to:
For each row that is about to be updated, run the procedure update_updated_at_column() on that row.
Within the procedure, NEW the row being updated. Set NEW.updated_at to now().

Coverage remained the same at ?% when pulling 2882d73b5adb195f58324a8dac7ae5e44ecff6df on trigger_for_updated_at_columns into ff73fd0b6a95823aeb5071d2be35aa3eb1a50f1f on master.

@jrhite can we close this? I think we can.

@InoMurko - this was never merged into master. Need to reopen and merge, no?

Bur there are no changes?

@InoMurko
Weird. This was just a git mv fail. Not sure what happened. I needed to change the file name timestamp to be ahead of the timestamp of the latest migration. Not sure why the new file ended up empty.
Fixed now. Please have a look.

Question: The Echo.Schema.timestamps/1 already present in those schemas aren't doing its job?

I will get a copy of dev db dump from @kendricktan then standup a watcher against dev childchain and test.
Will get back to you on the testing results.
Let me know if you'd like to see anything else regarding testing.

@unnawut
Yes and also no. :smile:
timestamps is working just fine and defaults are set correctly. But for the updated_atcolumn you need a DB trigger to make sure the timestamp gets set correctly every time the column is updated, thus this PR.

It has been working fine for the ewallet. Plus just checked Ecto's code, it should be refreshing update_at on updates...
https://github.com/elixir-ecto/ecto/blob/v3.1.5/lib/ecto/schema.ex#L652-L655
defmodule Ecto.Schema do
  defmacro timestamps(opts \\ []) do
      # ...

      autogen = timestamps[:autogenerate] || {Ecto.Schema, :__timestamps__, [type]}

      # ...

      if updated_at do
        Ecto.Schema.field(updated_at, type, [])
        Module.put_attribute(__MODULE__, :ecto_autoupdate, {[updated_at], autogen})
      end

      # ...
  end
end

which should then be picked up by https://github.com/elixir-ecto/ecto/blob/v3.1.5/lib/ecto/schema.ex#L522
defmodule Ecto.Schema do
  # ...

  autoupdate = @ecto_autoupdate |> Enum.reverse

  # ...

  def __schema__(:autoupdate), do: unquote(Macro.escape(autoupdate))

  # ...
end

and triggered on update by https://github.com/elixir-ecto/ecto/blob/v3.1.5/lib/ecto/repo/schema.ex
defmodule Ecto.Repo.Schema do
  # ...

  defp autogenerate_changes(schema, action, changes) do
    autogen_fields = action |> action_to_auto() |> schema.__schema__()
    # ...
  end

  defp action_to_auto(:update), do: :autoupdate
end

Can you give some examples where the code is not working as expected? Maybe I can have a look.
Main reason I'm raising this is because IMHO stored procedures can be hard to discover & hard to maintain as they'll be deeply buried in migration files, and the extra attention required for backups and restores.

Thanks for all the info @unnawut! This looks great.

Main reason I'm raising this is because IMHO stored procedures can be hard to discover & hard to maintain as they'll be deeply buried in migration files, and the extra attention required for backups and restores.

I totally agree with this.
The code pointers are super helpful. Let me test out some things and check it out. We haven't used ecto timestamps in watcher's db until I recently started adding them, so it's been a learning experience.
Let me touch base in a bit and maybe we can drop this PR.

Noting down for the team's reference:

Mainly I think it's because Repo.update_all is being called directly, and they work like raw queries so the autoupdate doesn't get triggered.
So I think there are 3 options here:

Go with stored procedures
Continue to use Repo.update_all but add updated_at to the list of attributes to be updated
Replace direct Repo.update_all calls into Ecto.Changeset

It's a new direction to go down the stored procedures route so I want to make sure the team is aware/okay.

@unnawut
I confirmed the behavior you described, and everything works just like you said. 😄
A few things perhaps we can conclude...

No need for DB triggers (thus I will close this PR)
For timestamps, it looks like Ecto supports seconds or microseconds. I don't think seconds are granular enough, given we want regulatory compliance and auditability, it's better to use :utc_datetime_usec for timestamp fields.
There is only 1 place in watcher I saw that uses update_all. I think it's fine to use update_all if that is appropriate, passing in updated_at to the list of attributes to be updated as you said, we'll just want specific tests for inserted_at and updated_at fields.

Thoughts? 👍 or 👎

No need for DB triggers (thus I will close this PR)

🎖🥇🍾🌟❤

For timestamps, it looks like Ecto supports seconds or microseconds. I don't think seconds are granular enough, given we want regulatory compliance and auditability, it's better to use :utc_datetime_usec for timestamp fields.

Sounds good! This was a breaking change in Ecto 3.0 (it used to be microseconds I think). There are a few places to update to make the changes complete. Searching https://github.com/omisego/ewallet/pull/771 's  code for :naive_datetime_usec should help. Though I don't know enough about elixir-omg to know if it has to be :utc_datetime_usec or :naive_datetime_usec. 😅

There is only 1 place in watcher I saw that uses update_all. I think it's fine to use update_all if that is appropriate, passing in updated_at to the list of attributes to be updated as you said, we'll just want specific tests for inserted_at and updated_at fields.

Sounds good to me! Also just in case, it's possible to use Elixir's core module for datetime, or rely on the DB's clock using Repo.update_all(set: [updated_at: fragment("NOW()")]). Again I don't know enough whether which one is more appropriate.


[FEATURE] UI Statistics page for displaying graph

This feature implements a UI that enables users to visualize their progress with charts to know their status

Reopening this ticket as the pull request is still pending. The issue will be link with the pull request and will automatically close after merging the pull request