Moor Upsert statement error : insertOnConflictUpdate

I am trying to insert or update a table depending on whether that key exist or not with this simple statement
Future insertOrUpdateUser(Insertable<User> item) => into(users).insertOnConflictUpdate(item);
This logs  the following error

E/SQLiteLog(17529): (1) near "ON": syntax error
I/flutter (17529): DatabaseException(near "ON": syntax error (code 1 SQLITE_ERROR): , while compiling: INSERT INTO users (id, first_name, last_name, phone, profile_pic_url) VALUES (?, ?, ?, ?, ?)  ON CONFLICT(id) DO UPDATE SET id = ?, first_name = ?, last_name = ?, phone = ?, profile_pic_url = ?' args

These are the  package versions am using:
moor: ^3.0.2   moor_flutter: ^3.0.0   moor_ffi: ^0.5.0
Can somebody help me understand this? Could it be that the generated code is wrong?

I would guess your sqlite version is too old.
First you only need moor_flutter or moor_ffi, not both.

@kuhnroyal
Thanks for your response. AM removing moor_ffi and see what happens. I actually didnt know i only need either and not both.
And also.. Do i really have to include sqlite ? My understanding is that moor is built on top of sqlite so if i have the latest moor that should be it. The syntax is supported meaning i might be running the new sqlite.

You don't need to add sqlite, moor uses the sqlite library provided by the OS.
But the device you are running may in some cases have an old sqlite library - the UPSERT was only added in sqlite 3.24.0: https://www.sqlite.org/lang_UPSERT.html
If you follow the https://moor.simonbinder.eu/docs/getting-started/ then you will see that the current recommendation is to use moor_ffi.

If you need a recent sqlite version on Android, you need moor_ffi as that bundles the latest sqlite library with your app.
When using moor_flutter, moor will use the builtin sqlite library as @kuhnroyal mentioned. That can reduce apk size by a bit, but the downside is that you're stuck with the sqlite version from the OS.
On iOS both moor_ffi and moor_flutter will use sqlite from the OS. When using moor_ffi, you can bundle a custom sqlite version on iOS as well by following these steps: https://github.com/simolus3/moor/issues/547#issuecomment-624526982
The documentation warns about upserts not being available on older sqlite versions and moor generates correct sql here, so I'll close this issue. If you need any help, let me know.

I am having same issue on android only working fine on IOS. I am using moor_flutter and moor_ffi

I am using moor_flutter and moor_ffi

There's no need to use both of them, you can probably drop the moor_flutter dependency.
It's pretty weird that this wouldn't work on Android, since that's where we ship the latest sqlite3 version. Which Android version are you using?

moor_ffi 0.8.0:
This package has been deprecated!
All these recommendations, deprecated packages, and confusing package names with moor is a complete mess.
Please update the docs on the website and make them more clear:
Why not creating separate 'Getting started' docs for Flutter and for Web (plain Dart)?
Also, this code is bad for Flutter devs since it creates a db file that is not recognized by the new Database Inspector tool in Android Studio 4.1+ which is super handy for debugging while working the DB.
LazyDatabase _openConnection() {   // the LazyDatabase util lets us find the right location for the file async.   return LazyDatabase(() async {     // put the database file, called db.sqlite here, into the documents folder     // for your app.     final dbFolder = await getApplicationDocumentsDirectory();     final file = File(p.join(dbFolder.path, 'db.sqlite'));     return VmDatabase(file);   }); }
In order to make it visible to the Database Inspector the file should be placed in the /database internal folder and has a "db" extension, for example by using this:
FlutterQueryExecutor.inDatabaseFolder(
path: 'app.db',
logStatements: true,
)

@kuhnroyal
moor_ffi 0.8.0:
This package has been deprecated!
All these recommendations, deprecated packages, and confusing package names with moor is a complete mess.
Please update the docs on the website and make them more clear:
Why not creating separate 'Getting started' docs for Flutter and for Web (plain Dart)?
Also, this code is bad for Flutter devs since it creates a db file that is not recognized by the new Database Inspector tool in Android Studio 4.1+ which is super handy for debugging while working with your DB.
LazyDatabase _openConnection() { // the LazyDatabase util lets us find the right location for the file async. return LazyDatabase(() async { // put the database file, called db.sqlite here, into the documents folder // for your app. final dbFolder = await getApplicationDocumentsDirectory(); final file = File(p.join(dbFolder.path, 'db.sqlite')); return VmDatabase(file); }); }
In order to make it visible to the Database Inspector the file should be placed in the /database internal folder and has a "db" extension, for example by using this:
FlutterQueryExecutor.inDatabaseFolder(
path: 'app.db',
logStatements: true,
)
but... it requires moor_flutter

Yes the package has been deprecated!

Your broad criticism isn't very helpful. I think the getting started page is pretty self explanatory and the documentation  contains much more than you will find in most small open source projects. You are welcome to create an issue or even better a PR  if you think the documentation lacks something.

You are answering on an issue from may. In the fast changing ecosystem that Dart and Flutter are, this is basically years old so the information in this issue is outdated.

You can always checkout the examples and test cases, in most well-maintained projects these are the best documentation.

If you don't like moor and think it is a mess then please don't use it. Feel free to create your own database library.

Most importantly, my opinions don't reflect the opinions of the moor project or its author. You just mentioned me so I am responding.


[downloader/http] Make retrying more lenient

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[X] At least skimmed through contributing guidelines including yt-dlp coding conventions
[X] Searched the bugtracker for similar pull requests
[X] Checked the code with flake8

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[X] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Bug fix
[X] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Makes the http downloader much more lenient on what it retries on, to survive any sort of brief network interruption etc. (given enough retries for such).
We are thinking it is better to retry on more even though some may be unrecoverable, vs retrying on few, known and likely to be recoverable errors but missing many other cases.
Resolves https://github.com/yt-dlp/yt-dlp/issues/3056, https://github.com/yt-dlp/yt-dlp/issues/3034, https://github.com/yt-dlp/yt-dlp/issues/2969 and prob many upstream
Might also help sorting exceptions in #2861 simpler.

I notice that exceptions raised by reading the response may also occur during request, due to part of the response being read for headers etc. These are not wrapped by URLError.

Not sure if we should exclude ssl.SSLCertificateError

Any other exceptions we should exempt?

Keeping in mind for the network overhaul (#2861), having general set of errors instead of specifics makes it a lot easier to adapt exceptions from higher level backends :laughing:)


enhancement: Asteroids crash down on planets

With the comet system we have now, there is distance, mass and so on. Maybe, if a comet has specific stats, it could crash down on planets with craters and no atmosphere and leave the resources the comet is made of in a crater.

So, you can mine Asteroids. By comets they mean asteroids, because a comet needs a tail, but besides that it's an asteroid. So, basically, they sometimes crash, and land on the planet. Makes sense to me.

Craters now have their ores definable per-planet in the XML. Having asteroid spawn their ores is.... iffy, because they can take itemstacks. This is (overall) the better route.


Collection link in region

I've created a region with a 'Collection link', linking to an existing collection. However, my regions output is empty. I'm also not sure what output to expect, basic idea is to create a menu by populating the region with collection links. Is this even possible?

I can't figure it out either..
I've just in the template-tab, added my loop. But I find that very hard to work with.
I would love to know how to use the collection link!!


Added Striver's most Space Optimized LCS code in Striver's SDE Sheet.

The code looks good
Thanks for the contribution @Kunal-8789
If you appreciate my work, please 🌟 this repository. It motivates me. 🚀

Enjoy HacktoberFest 💜


What are the supported APIs in HIP Graph Management?

https://docs.amd.com/projects/HIP/en/docs-5.0.0/doxygen/html/group___graph.html#:~:text=Reference%3A Graph Management-,Graph Management,-%23
Some Math Libraries have Graph Support, but I cannot identify supported APIs on the above-linked documentation page. Please have a section for all supported APIs which are graph safe!

Our new features are marked as beta. Feel free to use them and report any issues you might encounter.
The document you listed has all the Graph APIs we support.

I don't see any math library listed in there, if you can point me to the right doc where I see all support Math libraries perhaps that helps.

@jaykolla and @kjayapra-amd:

Please check HIP 6.1.0 Documentation
https://rocm.docs.amd.com/projects/HIP/en/latest/doxygen/html/index.html
Is this what you are looking for ?
https://rocm.docs.amd.com/projects/HIP/en/latest/doxygen/html/group___graph.html

Hi @jaykolla, thanks for reaching out. Unfortunately, we currently do not have a clear documentation page on the supported libraries. I'll escalate this issue to the docs team. In the meantime, I was able to find some information about graph support in a few libraries.

rocBLAS: partial support
rocThrust: not supported
rocRAND: supported
rocSPARSE: partial support
hipCUB: partial support
rocPRIM: supported

Please let me know if you are looking for graph support for a particular library not mentioned above.


API: Support copy object between repositories

Currently our API support copying objects only in the context of a single repository.
/repositories/{repository}/branches/{branch}/objects/copy

Body:
{
  "src_path": "string",
  "src_ref": "string",
  "force": false
}

Historically this limitation was set because we were preforming a shallow copy.
After the changes for GC, copy operation always performs a full copy and therefore this is not longer a limitation.
Catalog already supports copy between repositories as well as the Gateway.
Suggestion
Support an optional parameter src_repo in the request body. If the parameter doesn't exist we will fallback to the destination repository.
Backwards compatibility
Since the src_repo is optional, it will not break our current API guarantees and will maintain backward compatibility

Note that clients such as #7447 probably do not even need an API to do this.  But these comments are even more relevant here: behaviour may be unexpected in painful ways.

Note that clients such as #7447 probably do not even need an API to do this. But these comments are even more relevant here: behaviour may be unexpected in painful ways.

@arielshaqed Can you please elaborate on the pain points?
We no longer support shallow copy in lakeFS


Docker container old version

*@*:~/nasher$ docker run --rm -it -v $(pwd):/nasher squattingmonk/nasher:latest -v
nasher 0.11.3

*@*:~/nasher$ docker pull squattingmonk/nasher:v0.11.5
v0.11.5: Pulling from squattingmonk/nasher
Digest: sha256:c4fb80da35c62f434b773fc1621e21087c179650efa81181f48769081dd68088
Status: Image is up to date for squattingmonk/nasher:v0.11.5
docker.io/squattingmonk/nasher:v0.11.5

*@*:~/nasher$ docker run --rm -it -v $(pwd):/nasher squattingmonk/nasher:v0.11.5 -v
nasher 0.11.3

I ran into this issue a couple versions ago. A workaround until this is resolved, is to build a local image for the time being, until the remote one is fixed.
You can do so downloading the source and then doing docker build . -t nasher-local
(You can use any other name if you wish)
You'd have the swap squattingmonk/nasher for nasher-local in your commands, at least until the remote image issue is resolved.

@zeroark I already did this before creating the issue, but thanks for advice :)

I created the nwntools/nasher repo to get around this for , but it's having the same problem and I'm not sure why. I'm refreshing everything and turning off caching to see if that will make a difference.

The docker image from both repos have been refreshed. I'm looking into how to keep this from happening again. In the meantime, I will leave this issue open.

@squattingmonk How do you build your image to publish on Docker? While doing a build for latest version today, I noticed I had to add --no-cache on my build, else it was always building the last version I built locally. Not sure if that helps you, but It's worth a try I believe.

DockerHub builds it automatically, but it had been using the cache. Turning it off worked. Near as I can figure, since the nimble install nasher command doesn't change, docker thinks the image hadn't changed, so it just uses the cached version.

Pulled latest version from DockerHub and is now returning the correct version:


Manually select font size for text in shapes

:exclamation: font size list is different than the one in the ticket. The reason for that is, that without zooming the small sizes do currently not make sense. Also we need huge font sizes.

:heavy_check_mark: Checklist

[ ] A changeset describing the change and affected packages (more info).
[ ] Added or updated documentation.
[ ] Tests for new functionality and regression tests for bug fixes.
[ ] Screenshots or videos attached (for UI changes).
[ ] All your commits have a Signed-off-by line in the message (more info).

Changeset still missing 🤔
There's a text clipping bug on PDF export but I've opened a new issue (NEO-1085), as I don't want to block this feature on it.

Ups - changeset added


prevent dataset duplication by storing the dataset as lower

I don't know if we need to rethink this work.
I think we should be going for a similar approach to what we did in the v6.0 release with the protected domains, following this pattern:

Apply the lowercase regex check directly onto the request parameter in FastAPI for all domain requests, e.g.

@datasets_router.post(
    "/{layer}/{domain}/{dataset}",
    status_code=http_status.HTTP_201_CREATED,
    dependencies=[Security(secure_dataset_endpoint, scopes=[Action.WRITE.value])],
)
def upload_data(
    layer: Layer,
    dataset: str = FastApiPath(
        default="", regex=LOWERCASE_REGEX, description=LOWERCASE_ROUTE_DESCRIPTION
    ),
    request: Request,
    response: Response,
    domain: str = FastApiPath(
        default="", regex=LOWERCASE_REGEX, description=LOWERCASE_ROUTE_DESCRIPTION
    ),
    version: Optional[int] = None,
    file: UploadFile = File(...),
):

Probably keep this pre-validation check in Pydantic but extend to all schemas with dataset and likewise extend to domain also as these will also be lowercase now.
Migration script will need to be tweaked to lowercase all datasets now

This is big change.


Add warning support to emote_timeout module

Pull request checklist:

[x] CHANGELOG.md was updated, if applicable
[x] Documentation in docs/ or install-docs/ was updated, if applicable

Awaiting merge of #1364


Improve documentation for keep environment

there are some special cases here, if the VM provision time out, the keep option doesn't work, the resource group will be deleted automatically by the backend service unless we add the delete lock before deletion happens.

there are some special cases here, if the VM provision time out, the keep option doesn't work, the resource group will be deleted automatically by the backend service unless we add the delete lock before deletion happens.

That's fine. It covers most scenarios.


The system cannot find the path specified.

Problem encountered on https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/create
Operating System: windows
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.
C:\Users\Amara Noorani\myApp>cd myApp
The system cannot find the path specified.

Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

No response in 4 days. Closing.


What is purpose of having Cloned Instance of NFS Server

[Enter feedback here]
Document have instructions for having Cloned NFS Server on Standby Node. What is the purpose of this?

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

ID: a3ab1317-c090-0830-4fcd-8fe6c9e2bdb1
Version Independent ID: 9701e355-e742-6e2c-e6a7-3b131f257228
Content: High availability for NFS on Azure VMs on SLES - Azure Virtual Machines
Content Source: articles/virtual-machines/workloads/sap/high-availability-guide-suse-nfs.md
Service: virtual-machines-sap
GitHub Login: @rdeltcheva
Microsoft Alias: radeltch

Thanks for the feedback! We are currently investigating and will update you shortly.

The purpose is to make the NFS server highly available. I believe this is mentioned in the article. If you feel there is some wording that needs to be updated please let us know and we can work with the author to make those changes.

@DerekHerman-MSFT  But as per my understanding NFS Service should be controlled by Pacemaker but not by the System Daemon. As per doc, NFS service is up and running on both nodes where it is supposed be active only on one node.


Codable extensions

Would be awesome to have extensions that return Codable publishers for the query/document observers.

On similar line CombineFirebase is made. It has publisher method for every firebase api. Its source might help.


java archive (jdk1.8.0_20)

From where can I download the jdk 1.8.0_20 file?

I am getting the following Error
$python3 poc.py

[!] CVE: CVE-2021-44228
[!] Github repo: https://github.com/kozmer/log4j-shell-poc
........
FileNotFoundError: [Errno 2] No such file or directory: '/home/kali/Log4j/log4j-shell-poc/jdk1.8.0_20/bin/java'

I am not having the jdk file inside the log4j-shell-poc folder

Read the README, you can find a link to the download page. Just look for the specific version on the website!


Adds Support for JSON Serialization/Deserialization

ADDITIONS

mixin MetadataKeys for string constants with field names of the Metadata object
instance method toJson() and static method fromJson(..)
getter Metadata.hasAllMetadata

CHANGES

rewrite from "old" abstract class API to the modern mixin API

PS: Btw., we are using this plugin in our "in development" IMAP based messenger. See: https://www.coi-dev.org

Thanks, this looks good. I will check it out and test it!

@jg-l I have to cancel this PR. Sometimes it happens that the parser rans into an unhandled exception, and currently I don't know why. Will do some investigation and open a new PR if this is fixed.


Parallel UI tests on Circle CI

Configure tests to run in parallel on CircleCI, to speed up test time, and check framework behaviour

Test time was faster by 5 seconds:
parallel run https://circleci.com/gh/TestMonkeys/koshmar/117
standard run https://circleci.com/gh/TestMonkeys/koshmar/118
The only issue is video recording as browsers and recording seems to happen on only one display


background warning

sorry for disturbing, but when use "InAppReceipt.refresh { (error) in ..."
after a while i'm got a warning from xcode
"[BackgroundTask] Background Task 1 ("SKReceiptRefreshRequest"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this."
any suggestions ?

Hi, there is nothing I can do. It comes from the system and seems that when I create SKReceiptRefreshRequest, system creates a background task. I just ignore this msg

I was getting that error as well. It seems that you may need to call the cancel() method as per the Apple Documentation:
https://developer.apple.com/documentation/storekit/skrequest
I tweaked this method in the RefreshSession Class in Extras.swift and everything seems to be working:
func requestDidFinish(_ request: SKRequest)
{
    requestDidFinish(with: nil)
    receiptRefreshRequest.cancel()
}

I also added the line of code to the error method that you have implemented so the SKReceiptRefreshRequest cancels and stops running in the background when an error is flagged.
func requestDidFinish(with error: Error?)
{
    DispatchQueue.main.async { [weak self] in
        self?.completion?(error)
    }
    receiptRefreshRequest.cancel()
}

Hopefully that helps someone and is correct. Thanks!

10x a lot bradleyandrew

@bradleyandrew thank you. I will fix it later or you can send a PR.

@dobrys, @bradleyandrew i've made a pull request and going to release a new version later today.
Thank you both.

Just merged. Thanks again!

@tikhop Awesome work, thank you!


Chrome browser extension or integration

I would like to see Outline integrated with Chrome. This would make it much easier to use Outline, as I would not have to switch between different apps to access blocked websites。
Is there any Chrome extensions that can be used to access Outline ? or Outline was integrated with Chrome directly ?
I think it would be a great way to improve Outline and make it even more user-friendly.
Thank you for your time.

+++

+++

any updates??


test_env creds are no longer working

Bug Description
The creds for fidestest the test env do not seem to work anymore.
Steps to Reproduce

Do this...
Then This...

Expected behavior
A description of what you expected to happen.
Screenshots

Environment

Version:
OS:
Python Version:
Docker Version:

Additional context
Add any other context about the problem here.

I tested and was able to login without issue. To make sure we are doing the same thing I ran nox -s test_env to bring things up. Is this the same way you started things?

This got resolved previously 👍


try to fix jenkins int14 sdk-on-analyze build error

needs to be merged before int-14-sdk-son-analyze can pull it....


enh(csharp) generic modifiers, reference paths, where keyword

Closes #2239
Closes #1947.
Closes #1714.

enh(csharp) add generic modifiers (in, out)
enh(csharp) Allow reference path in class inheritance lists
enh(csharp) Support where keyword as class constraint

Ah, ha you are totally right there!  So removing the extra set!


Describe the DSP primitives in the Artix 7

It would be good to have good descriptions of the DSPs in the Series 7 architecture.

@elmsfu Has started working on this in #58


Loosing focus after switching apps quicly

When switching a window, focus is lost.
From what you can see, it only happens that we change the window quickly. If you toggle smoothly, the focus remains, but if you do it quickly, it appears to trigger an automatic "alt" press, causing the focus to go to the toolbar.
https://github.com/sigoden/window-switcher/assets/5577637/3a3979af-5f90-4a43-ad95-e105cc1f83c4
My PC configurations is:

My file configurations is:
a# Whether to show trayicon, yes/no
trayicon = yes

[switch-windows]

# Hotkey to switch windows
hotkey = alt+`

# List of hotkey conflict apps
# e.g. game1.exe,game.exe
blacklist =

# Ignore minimal windows
ignore_minimal = no

[switch-apps]

# Whether to enable switching apps
enable = yes

# Hotkey to switch apps
hotkey = alt+tab

# Ignore minimal windows
ignore_minimal = no

There is no way to solve this issue.

This issue is certainly solvable. I got similar non-answers (#81, #82, #83), and, reading other issues, it seems to be a pattern with this developer. For a switcher without this issue, see cmdtab. I'm the author, after frankly being pissed by the responses I got here.

This problem cannot be completely solved.
If you press the key too quickly, the keystrokes at a certain moment may be detect as two keyevents:  alt+tab and  alt
The alt+tab will switch to the next app, alt will activate menu, then a bug appeared.
I closed #81 #82 #83 because I didn't think it was necessary, This issue is closed because it cannot be resolved. This is no pattern.
If other people's open source projects cannot meet the demand, start a new project. I appreciate this behavior very much. I often do this myself.

As sigoden mentioned, clicking the Alt key on Windows defaults to focusing on the Menu or Tool bar.
In fact, many people have been troubled by this and have provided some excellent solutions. Moreover, many excellent software programs allow you to modify this behavior in the preferences settings.
Please refer to the following link:

For vscode How to disable alt key to focus on File tab in VS code?

For SublimeText Disable ALT default key binding to toggle menu?

Additionally, using AutoHotkey can globally block/change this behavior.
@phcamargo23

Yeah; individually configure every app to workaround window-switcher's limitations (and just live with the ones that can't be configured this way, like Chrome), or install a different app to perpetually run a script in the background to workaround window-switcher's limitations...
Or use cmdtab which does the impossible /s and doesn't have this issue.
Yeah, now I remember why I got so pissed by these inane responses and made my own.

Your cmdtab don't have alt problem, but does have tab problem.
Using delay and discarding alt key events did not completely solve the problem. @stianhoiland

I don't know what you mean by "tab problem". Feel free to create an issue—I'm sure it can be fixed, and thus will be fixed.
And yes, the alt problem is solvable, as I've said and demonstrated. cmdtab's optional GUI delay has nothing to do with it. Correctly consuming and passing Alt key events is (and is part of a different approach to keyboard handling in cmdtab), as well as correctly using the SetForegroundWindow Alt key hack.

Repeatedly pressing alt+tab to switch windows quickly as described in the issue，window-switcher capture additional alt keyevent (focus menu), cmdtab capture additional tab keyevent (insert tab).

In cmdtab, repeatedly pressing Alt+Tab, Alt+Tab, Alt+Tab, or holding Alt and pressing Tab, Tab, Tab, does not produce any additional Tab key events (and doesn't insert any additional Tab in text fields nor selects next control).
Please create an issue, preferably with evidence and steps to reproduce, like in this current issue.

See the video.  I can see you being sloppy with pressing the keys, leading to you pressing Tab while you're not simultaneously holding Alt. To prove your bullshit I made a AutoHotkey script that spams Alt+Tab 100 times while cmdtab is running and recorded it (video size reduced by frame dedup):
https://github.com/sigoden/window-switcher/assets/2081712/4246d218-f38d-47a3-bfac-8a9b715368d1
Not a single tab inserted. And not a single additional Alt key event.
Why tf am I still here. Apparently I didn't properly learn my lesson the first time I interacted with you. Please refrain from anymore false comments about cmdtab.

Why do you still not understand this issue? If you can keep alt+tab being triggered at the same time every time, there will be no problem at all.
Use two fingers to quickly press the alt key and the tab key. When the speed becomes faster, the key presses at a certain moment may be detected as two key press events: (alt+tab+alt), ( alt+tab + tab). That's why the error occurs. @stianhoiland


run field intializers on ready time

Please provide more details

Like
public static HTMLInputElement cool = Document.GetElementById<HTMLInputElement>("input");

doesn't work because the html hasn't been loaded yet.

It is not Bridge defect, it is developer error. Field initialization occurs during first access of the class
So, you need first access in ready handler or make explicit initialization

Yes, I believe this is not working because the field is initialized too soon in the document lifecycle. The . GetElementById must happen after the document is loaded in the browser. At the point this code is executed, the input Element does not exist in the document.
One potential work-around (I haven't tested) would be loading your projects <script> .js file at the end of the page, somewhere just before the closing </body> tag. Once the browser reaches this point, the html should have been loaded and the Element should be available... if it's hardcoded in the markup.
Hope this helps.


Scanning stops while backgrounded if no filters are provided

Hi there,
I'm trying to run Kable within a LifecycleService and collect advertisements while the device screen is off (sleeping).
I have to admit I'm having a hard time understanding how to perform this, though I'm able to run a custom Flow while the device screen is off, I can't get the same success with a simple scan.
It works while the app is in background but as soon as I shut the screen off or turn in back on, advertisements stop and start again.
val scanner = Scanner {}
scanner
.advertisements
.onEach { Log.i("TAG", "Scan advertisement => $it") }
.launchIn(lifecycleScope)

Here is a sample repo as an example
And the interesting part is here
Any help would be appreciated,
Thanks!

The flow will live as long as the scope that you launch it in.
I'm not certain of when lifecycleScope cancels within an Android service, but as you described it, it sounds like it cancels when the screen is off.
Do you have another scope available to launchIn that outlives the lifecycleScope? Perhaps try launching in GlobalScope? If you do use GlobalScope, you'll have to be careful to make sure you cancel the flow when you no longer want to scan.

Ok, after some debugging I've found a resolution.
It appears that the Android BLE stack won't scan when device is sleeping if there is no services filtered.
And this happens even with a foreground service running, which seems kind of counter-intuitive to me.
It seems that additionally there is limitation applied on scans, because even with ScanSettings sets to SCAN_MODE_LOW_LATENCY there is a lot less scan results with screen off than with screen on.
I say it "seems" because unfortunately I haven't been able to find any official documentation regarding this behaviour and I'm running out of time to jump into the Android code to find out...
Anyway, thanks for your help @twyatt

Thanks @somq for following up with your findings! Really good info to know.
Sounds like the documentation should be updated to warn users of these pitfalls with Android scanning.
I'll re-open issue until someone has submitted a PR, or I've had time, to update the documentation.
Thanks again for reporting the issue and what ended up being the cause. ❤

Your welcome!
This behavior exists since Android 8.1.
You can find some refs. here, and here is the culprit.
I'm not sure how you'd like to shape this info into the docs so I'll let you do it.

I believe this has been addressed, although the fix is not yet released (currently on the main branch).
Once the issues for 0.11.0 milestone have been resolved, then that release should have this fix.

0.11.0 has been released and should include this fix.
Please re-open issue if you find it doesn't work.


Add unit test case for func State in alerting.go

Signed-off-by: Guangwen Feng<EMAIL_ADDRESS>

Thanks!


Add colours to Tailwind to allow for JIT

{/* IDK why, but tailwind cant handle dynamic custom classes if they wasnt used before */}
@r0man1337 you need to add them to tailwind config in order for them to be included

Related info (need to add colors to safelist):
https://stackoverflow.com/questions/67289894/jit-tailwindcss-using-variable-in-bg-not-rendering-color


Meta: Add test for feature screenshot

Related Issues
Closes #5361 if merged
What This PR Does
Adds a check to the verify-features script to ensure every feature has a valid screenshot.

I'm not sure if this is what you want, but this change means both:

features that do not have a screenshot, and
features that have a screenshot but the url does not match the regex given here

will be flagged as errors

I'm not sure if this is what you want, but this change means both

We should just check the screenshot URL against the regex. Some features don't have an associated screenshot because they're hard to illustrate.

Indeed, but how should we go about it? The parser returns undefined whether the URL is missing or it's not detected as an image.

I thought we could write another function that returns the raw markdown from the readme, and then check for the screenshot - but I realised we don't have a list of features that must have a screenshot - so we cannot really check if the right features have valid screenshots.
What we could do instead is create a list of not-allowed file extensions to urls and compare the urls against them - so .mov and .mp4 are not allowed, and any urls with those extensions will be flagged as errors.
What do you think?

You're right. There's effectively no difference between an unknown link and an invalid media link. In some cases (for example in hotkeys features) we do have a link, but back to the original issue/PR, not to a screenshot.
I think I found a way:

the parser returns the "image URL" that looks like a file, like /[.][^.]+$/
the checker ensures that [^.]+$ is either png or gif.

@fregante that worked, thanks!

CI will fail on two features that have .mp4 files though

Thanks again @gamemaker1!


[RELAY] IR builder stablize refactor, clean pass

This is a clean refactor PR to attempt stablize the relay python IR building API, it also contains fixes and patches to enable text format.
One of the general guidelines behind this refactor are:

Minimum abstraction when possible (simplification of IRBuilder)
Python API consistency (env.merge->env.update)
Make ir_pass style consistent

Expr is always the first argument
Not require env to be present, when necessary, pass as a second argument

List of Changes

[x]  Simplify ir_builder to scope_builder cc @jroesch

ScopeBuilder is only used to build if and let scopes.
Use relay.Function to build functions (single way to build functions)

[x] Rewrite all the test cases with the new style.
[x] Add text print test to each op, fix problems that surface due to the new testcases.
[x] Improve the BroadcastRel to handle symbolic case cc @jroesch
[x] Fix TupleWrapper cc @slyubomirsky

To make sure python unpack works, we need to throw index error when there is out of bound access
TupleWrapper cannot assume the input field is a tuple type

[x] Enable TulpleGetItem type inference with incomplete type
[x] Fix dead code elimination when type is bool cc @MarisaKirisame
[x] Fix LeakyReluAttrs  cc @siju-samuel
[x] Merge reduce tests into a more concise functioncc @siju-samuel

Will do tonight


HtmlLabelRenderer not found in UWP apps

I installed the latest build, 4.1.2, and tried to add the following lines for UWP (App.xaml.cs)
            var rendererAssemblies = new[] { typeof(HtmlLabelRenderer).GetTypeInfo().Assembly };
            Xamarin.Forms.Forms.Init(e, rendererAssemblies);
            HtmlLabelRenderer.Initialize();

However, I can't resolve the namespace for the HTMLLabelRenderer.
Thanks

Which version of UWP are you targeting?

Target Version 18362.  Min version 16299

Thank you,  I changed the min version to 17763; and things are up and running.  Thanks again for the help.   I wouldn't have thought of trying that.

My bad, I will update the README


If yes, @jeoongp the fix might be less of a logic fix..and more how we inform rstmgr that its local reset and the child reset are the same in this case.  The problem with rstmgr right now is it does not directly pluck its reset from the reset tree, but instead lets the top level dictate it.  So it doesn't know which one belongs to it without additional information.
There might be other possible fixes as well.

ah is this related to #11858 ?

Yes,

If yes, @jeoongp the fix might be less of a logic fix..and more how we inform rstmgr that its local reset and the child reset are the same in this case. The problem with rstmgr right now is it does not directly pluck its reset from the reset tree, but instead lets the top level dictate it. So it doesn't know which one belongs to it without additional information.
There might be other possible fixes as well.

@tjaychen, @jdonjdon thanks for comments. We can think two options here.

rstmgr knows u_daon_por_io_div4 is a leaf that generates rst_ni. So, we can add one bit input at rstmgr_leaf_tst to indicate it's the root that generates rst_ni and propagate it through por_io_div4. Leaf FSM needs to be updated to skip Error state when the current leaf is used as the root.

we can add another delay logic like a simple pipeline to avoid direct loopback at top_earlgrey. This delay logic is supposed to add additional delay onto the existing rst_ni (rstmgr_aon_resets.rst_por_io_div4_n). The delayed output is connected to rst_ni input to rstmgr. The delay amount will be SecMaxSyncDelay. (delayed_rst_ni | rst_ni) will be working as a glitch filter, too.

I think both options are OK. Let me know your opinion.

I and @jdonjdon removed some TB assertions on skipped leaves to resolve these errors. New PR was created in https://github.com/lowRISC/opentitan/pull/12729
Details : https://github.com/lowRISC/opentitan/issues/11858


(demo): fix demo scripts spelling mistake.

Codecov Report

Merging #483 (c21ed74) into master (19a3151) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #483   +/-   ##
=========================================
  Coverage     14.89%   14.89%
  Complexity      401      401
=========================================
  Files           181      181
  Lines          8357     8357
  Branches        700      700
=========================================
  Hits           1245     1245
  Misses         7014     7014
  Partials         98       98


Bot messages Tyops

Is your pull request related to a problem? Please describe
issue #3
Describe the solution you'd like
Typos and spacing and grammar
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Test plan
test on https://m.me/OpenSourceChatbot
Checklist

[ ✓] 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.
[✓] The title of my pull request is a short description of the requested changes.
[ ] I have added the label enhancement to my pull request.

@hoduchieu01 Sure what should I contribute next.


Proposal: Last Call mode for Envoy [AKA graceful drain for drain manager on admin endpoint]

Last Call mode
Description

In our loadbalancer, each host should execute a graceful shutdown process. The process should discourage new and hanging connections, eventually close off new connections, and prepare the process to shut down with as few hard disconnects as possible. I propose a Last Call mode, where different parts of the Envoy server can know the server is shutting down and change behavior accordingly.

Design doc
Comment on this doc or on the thread. It should be openly commentable, but let me know if there are permission issues.
Proposed steps

Read the design doc, provide feedback on the idea of an Envoy last call mode
Update the design doc if needed, then start on the feature work. Some of the sub-features may be complicated enough to warrant separate design docs.

Related issues

Graceful HTTP Connection Draining During Shutdown? #7841
Add a graceful shutdown mechanism #1990
Confusion over TCP draining #9369

@auni53 can you make the design doc world commentable? I can't open it.
Also, FYI, we already have the "drain manager" concept which already does some of this, so curious how that fits into this proposal.

Ah, had it org-commentable rather than global-commentable. Hopefully fixed.
Understanding the existing draining infrastructure has been a little confusing, different parts of the docs/code refer to draining at different parts of the system. Part of the Last Call mode would be to clarify how the API interacts with things like the drain manager, or potentially making enhancements to it. But that gets into implementation of the Last Call feature requests beyond the existence of the mode itself.

Thanks @auni53. I left some comments on the doc. Much of the proposal is already implemented either as part of hot restart or as part of /healthcheck/fail. I think we need to circle back and better clarify what is already implemented vs. what is new. Happy to discuss in a short meeting also if needed. Thank you!

Thanks Matt, yeah I didn't make that clear, but part of why I wrote the doc was just to clarify what our requirements were because I was having a hard time telling what was or wasn't currently available. Your comments with references to specific mechanisms are really helpful, I'll investigate those and circle back.

Hey there, was looking at this issue recently to understand how we should do graceful shutdowns in our org. My understanding is that there’s still one missing piece in Envoy, which is described in the doc:

Terminate idle connections that are in the header phase.
Basically, for the duration of Last Call, find idle connections that are still in the header phase and terminate them

Our situation is running Envoy as a sidecar in each Pod, for service-service communication. Services talk in plain HTTP and tend to keep TCP connections open for a while (http keep alive).
My goal is to get graceful shutdown working, while either avoiding arbitrary sleeps in the preStop hooks, or at least minimizing the amount of time we have to sleep there, as it slows down rolling deployments.
@auni53 did you find an alternative solution here for idle TCP connections? I know that Envoy now implements GOAWAY but I’m not sure if we should switch to HTTP2C for service-service comms just for clean shutdowns.
Ideally we want to be able to shutdown all idle TCP connections in the earliest phase, while letting the non-idle connections handle their in-flight HTTP requests.
@mattklein123 do you know if some of this was already implemented?


#19: Stabilize code of Users services: finish implementation and writ…

…e tests

@rultor merge

@rultor merge

@proshin-roman OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@proshin-roman Done! FYI, the full log is here (took me 2min)


Incompatible with Fabric API 0.60.x

latest.log

Kk

Uploaded on CurseForge and Modrinth, highly recommended to backup your map!


[(Dark.MMS)] Tummy Tear Viral Full Video Leaked Original Social Media X TikTok Trending Telegram

17 seconds ago L𝚎aked Video Tummy Tear Original Video Viral Video L𝚎aked on X Twitter Telegram Viral MMS Tummy Tear Leaked Video Dark Viral On Original Social Media X TikTok Trending.
Watch 🟢 ➤ ➤ ➤ 🌐 Click Here To link (Full Viral Video Link)
🔴 ➤►DOWNLOAD👉👉 (Full Viral Video Link)
Watch 🟢 ➤ ➤ ➤ 🌐 Click Here To link (Full Viral Video Link)
🔴 ➤►DOWNLOAD👉👉 (Full Viral Video Link)
Tummy Tear Original Video video took the internet by storm and amazed viewers on various social media platforms Tummy tear viral full video leaked social media twitter
Tummy Tear Original Video video took the internet by storm and amazed viewers on various social media platforms. Tummy Tear, a young and talented digital creator, recently became famous thanks to this interesting video.


Add -Wbidi-chars=any to counter Trojan Source attacks

One kind of attack is "underhanded code" - this is maliciously misleading source code. Compilers can take steps to counter some of those. For a general discussion, see https://www.ida.org/-/media/feature/publications/i/in/initial-analysis-of-underhanded-source-code/d-13166.ashx
"Trojan Source" is a specific kind of underhanded code. This abuses Unicode right-to-left and left-to-right codes so that humans see one thing, but compilers interpret it differently. See https://news.ycombinator.com/item?id=29062982 and https://arxiv.org/pdf/2111.00169 and https://en.wikipedia.org/wiki/Trojan_Source . Trojan Source has CVE identifier(s) CVE-2021-42574 and CVE-2021-42694. Typically human review is the strongest defense against malicious code, and Trojan Source subverts this defense.
GCC has a -Wbidi-chars option that can counter this, see: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
By default it's "unpaired". A stronger value is -Wbidi-chars=any, though of course that means that source code can't include direction changes. Since such characters are rare, it seems reasonable to add that as a default. This would increase the likelihood that human review will interpret the source code the same way a compiler would.
I expect this to be a little more controversial, because this can make it more challenging to insert code comments in right-to-left languages like Hebrew and Arabic. In those rare cases you could override the option with a program-specific option. However, in the vast majority of cases, the only reason these markers are used in source code is an attack vector. Note that this option does NOT interfere with creating programs that can be used in right-to-left languages; best practice is to put such strings in separate file(s) and use an internationalization (i18n) framework like gettext to retrieve them.
Thoughts?

Also, objdump has a --unicode option to escape unicode control characters, which was developed as part of the mitigation for CVE-2023-42574.  That was to look for symbol/section names with unicode control characters.

"Trojan Source" is a specific kind of underhanded code. This abuses Unicode right-to-left and left-to-right codes so that humans see one thing, but compilers interpret it differently. See https://news.ycombinator.com/item?id=29062982 and https://arxiv.org/pdf/2111.00169 and https://en.wikipedia.org/wiki/Trojan_Source . Trojan Source has CVE identifier(s) CVE-2021-42574 and https://github.com/advisories/GHSA-m3pq-m926-j2h4. Typically human review is the strongest defense against malicious code, and Trojan Source subverts this defense.

At the time we leaned more on editor/reading interfaces to provide visual cues about the presence of such chars in code.  IIRC most FOSS editors did.  The gcc, clang (the feature is in clang-tidy) and binutils features were developed as an additional layer of verification for those who might want it.

I expect this to be a little more controversial, because this can make it more challenging to insert code comments in right-to-left languages like Hebrew and Arabic. In those rare cases you could override the option with a program-specific option.

RTL comments should work just fine for -Wbidi-chars=unpaired and maybe that should be the default general recommendation. The clang-tidy option (AFAIK) looks only for mismatched control characters.

At the time we leaned more on editor/reading interfaces to provide visual cues about the presence of such chars in code. IIRC most FOSS editors did.

The problem is that people use different editors & different configurations, so it's hard to be certain that it's addressed. Having compiler flags to counter problems that slip through the editors seems like a good plan.

The gcc, clang (the feature is in clang-tidy) and binutils features were developed as an additional layer of verification for those who might want it.

Right. I think those are useful, let's turn them on :-).

RTL comments should work just fine for -Wbidi-chars=unpaired and maybe that should be the default general recommendation. The clang-tidy option (AFAIK) looks only for mismatched control characters.

That's a plausible backoff strategy. However, the vast majority of source code, even if it's internationalized to support Arabic and Hebrew, don't include RTL codes (those are the most common RTL languages). I think it's safer to prevent entirely in the majority case where it's not supposed to be there. If they are supposed to be there, then enabling unpaired seems like the safest thing to do. Details here: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Thoughts?

BTW, there are plug-ins for editors that go further: https://github.com/vim-utils/vim-troll-stopper
I think the primary countermeasure to Unicode-based attacks will be in source code, however, the problem there is that you have no idea what the developers are really using. Having some basic countermeasures in the compilation process provides a more-certain baseline of defenses.

RTL comments should work just fine for -Wbidi-chars=unpaired and maybe that should be the default general recommendation. The clang-tidy option (AFAIK) looks only for mismatched control characters.

That's a plausible backoff strategy. However, the vast majority of source code, even if it's internationalized to support Arabic and Hebrew, don't include RTL codes (those are the most common RTL languages). I think it's safer to prevent entirely in the majority case where it's not supposed to be there. If they are supposed to be there, then enabling unpaired seems like the safest thing to do. Details here: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Seems fine as long as we wordsmith it inclusively and the text doesn't sound blind to the possibility that developers may want Hebrew/Arabic comments in their code.

I agree. Clearly if you have Hebrew/Arabic source code comments then you will expect RTL Unicode directives, and backing off is appropriate. However, that's easily configured by the project. I view this as an application of least privilege: don't allow the use of RTL in the source code if there are no legitimate uses (but do allow it when it's appropriate).
Note that this does not impact i18n of software. I18n of software generally involves having separate data with the relevant strings, but since they're not embedded in the source code, they don't have the same problem at all.
In many ways it's best to have the text editors work to counter these kinds of illusions. Ideally they'd do it automatically. There are some plug-ins, e.g., https://github.com/vim-utils/vim-troll-stopper. However, since we can't guarantee that developers use editors that counter such tricks, it makes sense to let the compiler work to counter some where it can reasonably do so.

Yes, least privilege on the dont allow bidi if you dont need it, and defence in depth pairing it with editors and linters that also warn of the issue.

I believe https://github.com/ossf/wg-best-practices-os-developers/pull/317 must be merged first before considering this. Until we know the threat model, it's hard to determine if this is in-scope or not. I think it should be, but agreeing on that is the first step.


Outline highligh

Hi,
When you click on a symbol / function in the outline tab, that symbol is highlighted to indicate the position you are in (example: test_2() function).

But, if you move to another symbol from the editor (not from the outline tab) that new symbol is not highlighted on outline tab (example: test_2() function to test_3() function).

In this example, I've move from test_2() function to test_3() function, but the test_2() function is still highlighted on outline tab.
Would it be possible to "update" the highlight symbol where you are?
Thank you in advance!

This is a duplicate. Unfortunately, I don't recall the exact issue number nor its title :flushed: Anyways, searching for issues with the same labels will likely help you :point_right:
https://github.com/microsoft/vscode/issues?utf8=✓&q=is%3Aopen+label%3Aoutline


If invalid scalacOptions are specified, a clear warning should be printed or compilation should fail.

[x] I've read the CONTRIBUTING guidelines

steps
Create a build file that looks something like this:
lazy val root = (project in file(".")).settings(
  //whatever other options you need,
  scalacOptions += "Ypartial-unification" //note the missing '-'!!!
)

Do something in your Scala code that requires the partial-unification fix to be on (in our case we were using for-comprehension syntax with the Fetch library (https://github.com/47deg/fetch) ).
Then try:
sbt compile
problem
scalac (as invoked by SBT) bombs with a cryptic compile error when partial-unification is required in your code base.
Observed in SBT 0.13.15... haven't tried it in 1.x yet.
expectation
When you run scalac by hand and pass an invalid flag (like Ypartial-unification - note the missing -) it bombs right away telling you you've done something silly with command line arguments.  This is a helpful error message and you can pretty quickly figure out what you did wrong.
SBT should at minimum elicit the same error message from scalac.  Instead it appears to be silently dropping the invalid scalac option and merrily compiling without the clearly intended command-line argument (i.e. -Ypartial-unification - note the -).
Instead of silently dropping invalid compiler options SBT should fail the build or at least print a clear warning message.
It's possible I'm being silly here and such a warning was printed and I missed it (or maybe I could have turned up logging somehow to see it or something)... but I wasted 6 hours trying to track this bug down and it came down to a missing -... one of the first things I did was check for the partial-unification flag, but I missed that the - was missing!
I verified that scalac itself would have been smart enough to tell you when you make a mistake like this, so by process of elimination I'm assuming that it's probably an SBT issue (which I know can be dangerous, so feel free to tell me this isn't SBT's problem :-) ).
Arguably this could be called an improvement but this seems more like a bug to me since it appears to be contrary to the observed behavior of scalac itself.
notes
sbt version: 0.13.15
Not sure if it applies to 1.x or not.

@ALPSMAC Thanks for the report. I am tagging this "Needinfo", for looking into where the difference in the behavior is coming from.
Also, if I recall correctly, passing bogus flags into Scala compiler normally results to an error message. Otherwise, passing flags would be much easier since some flags are supported only by some Scala versions. Maybe there's something about -?

I am closing this due to inactivity.


runtime/metrics: add a way to measure runtime-internal lock contention

Go's diagnostic tools give only a minimal view into contention on runtime-internal locks. I filed #57069 and #57070 with the best data available to me now. The story in #45894 has evolved over time. I haven't kept close track of the paths others take to finding runtime-internal lock contention, but I bet it's hard for them too. (Or: please share your techniques!)
The first one, #57069, appeared in the last few weeks while changing how we operate one of our apps. Pretty quick turnaround from seeing a problem to being able to describe it as a bug.
But #57070 describes a problem I've seen for years and wasn't quite sure I understood. In that app, we saw an increase in our CPU profiles' reports of time in runtime.futex when moving from Go 1.17 to 1.18 without any associated regression in the app's performance. I took that to mean that the change was only in the reporting, that those samples arrived in bursts and so were hidden by shortcomings in setitimer-based profiles. That helped to make sense of the execution traces, but the story was still hard to prove (to myself, and to you here) without having CPU profile samples inside the execution trace data stream.
I struggled with #45894 for a while before coming to understand that a lot of that post-GC delay was related to long waits on the runtime-internal mprof lock.
Maybe Go 1.19's tools are enough to get the job done, but I wonder if we should have a more direct measurement of contention and wait time on runtime-internal locks, like an equivalent of #49881.
CC @golang/runtime and @mknyszek

Full wiring into runtime/pprof's sync.Mutex contention profile would be great. I'm anticipating that being at least a little tricky, since adding stacks to the mprof involves acquiring a lock.
With an intended end state of the data being part of that profile, I think 1/ the total wait time should be reported as part of /sync/mutex/wait/total:seconds rather than as a separate metric name, and 2/ that the wait time for runtime-internal locks should be reported in the profile with a temporary "best we could do" placeholder function name, similar to _LostSIGPROFDuringAtomic64. Maybe _LostRuntimeLockContention.
Then, as we move towards reporting the actual call stacks that led to contended runtime.lock calls, the data in /sync/mutex/wait/total:seconds will remain the same and fewer call paths will require being reported as _LostRuntimeLockContention and will instead have their real call stacks.

I'm inclined to add an atomic.Uint64 field to runtime.m to count the number of nanoseconds that this M has had to wait inside (sampled) lock2 calls where the "speculative grab" failed; I don't want to respond to contention on a runtime.lock by adding cross-M contention on a global reporting value. And then to sum those values, including a global pool for dead Ms, as we do for NumCgoCall.
It looks like I can call nanotime from within lock2.
Maybe I can also capture the call stack onto an array that is part of the runtime.m struct, but it's not clear to me when would be a good time to try adding its contribution to the mprof table. Once a stack is present in the table, we might be able to add weight to it without taking any locks (so safe to call from lock2). For getting the stack to appear there in the first place the challenge seems similar to the runtime.cpuProfile.extra mechanism, but that relies on other code executing on a regular basis in a less constrained environment. Maybe the equivalent here would be "sysmon" or "the GC", but those don't seem like great options.

Is it good to report as /sync/mutex/wait/total:seconds?
Because the docs for that metric say the Mutex profile will have more detail, is it OK to report those numbers as part of that profile with a bogus call stack (such as _LostRuntimeLockContention)?
Is it OK to make the M struct larger, by a few words (counters) or by a few dozen words (call stack buffer)?
Any feedback on my general plan, before I mail a CL that's heading towards a dead end?

@mknyszek @prattmic
Thanks!

@prattmic made a good point on https://go.dev/cl/528657 that the change includes an awkward mix of the semantics of the "mutex" and "block" profiles, by capturing the runtime.unlock call stack but using that M's own wait time as the value. To match the user-space "mutex" profile, its value should correspond to how long the other Ms were waiting for that critical section to complete. That's a more invasive change to src/runtime/lock_futex.go than we can make at this point in the Go 1.22 cycle.
@prattmic , @mknyszek and I discussed options at last week's "runtime diagnostics improvements" meeting: https://github.com/golang/go/issues/57175#issuecomment-1804230372 . The conclusion we came to is that we shouldn't ship those strange semantics as on by default for Go 1.22, but that we'd like to start getting the benefits of this from users who understand the current caveats and who understand that those semantics will soon change (improve). We're planning to do this via a GODEBUG setting that's off by default, and which will go away once the contention reports for runtime.mutex match those of sync.Mutex.
I updated https://go.dev/cl/528657 with a proposed name of GODEBUG=profileruntimelocks=1. When disabled, contention on runtime-internal locks is still reported in the /sync/mutex/wait/total:seconds metric, and is attributed to the runtime._LostContendedLock function.
If a temporary GODEBUG setting isn't appropriate here, we can disable the call stack collection in that same way for Go 1.22, attributing everything to the placeholder function so the /sync/mutex/wait/total:seconds metric and the sum of the mutex profile samples continue to match.

@rhysh FYI, I will be sending a release note CL for this. I don't want to race with you. :)
I also propose that we change the name of GODEBUG=profileruntimelocks=1 to GODEBUG=runtimecontentionstacks=1 and runtime._LostContendedLock to runtime._LostContendedRuntimeLock. I will send a CL for both.
My thought is that even with GODEBUG=profileruntimelocks=0 (the default), runtime locks are still profiled, we simply don't collect stacks. That makes the name confusing. Similarly, since users will see runtime._LostContendedLock in this case, I think runtime._LostContendedRuntimeLock is slightly more clear that this isn't one of the locks in their code.


Add JSON operator

import td "github.com/maxatome/go-testdeep"
…
td.Cmp(t, gotValue, td.JSON(
    `{"name":"$name","age":$2}`,
    td.Tag("name", td.Re(`^Bob`)),
    td.Between(40, 45),
))

Placeholders can be named ($name) or numeric ($12) and mixed:

named: they reference a td.Tag in parameters list (like "name" above)
numeric: they reference a positional parameter, from $1.

They can be enclosed in double-quotes (compatible with JSON specification) or not:
`{"name":"$name","age":"$age"}`
`{"name":$name,"age":$age}`
`{"name":"$name","age":$age}`
`{"name":"$name","age":$2}`

Signature:
JSON(json interface{}, operators ...TestDeep) TestDeep

json can be:

string

JSON string like {"name":"$name","age":"$2"}
A file name: the file contents is expected to be one JSON value

[]byte containing JSON
io.Reader stream containing JSON (is ReadAll before unmarshaling)

To be easier to use, JSON operator enables the BeLax feature during its comparison.
Note the introduction of Tag operator allowing to name an operator. At the time of writing, it is only intended to be used in JSON parameters.
Branch json implements this issue, but not fully documented yet.

Done.


Roadmap

June

https://github.com/Boshen/oxc/issues/421
Unify semantic infrastructure https://github.com/Boshen/oxc/issues/422
Finish off the minifying printer
#424

July

Formatter prototype

August

Setup an open source community and officially open and welcome for contributions - lots of documentations.

I think the documentation and the playground should use technologies that are widely used (such as React etc.) to reach to more audiences.

Nextra is a good alternative for writing documentation websites.

I think the documentation and the playground should use technologies that are widely used (such as React etc.) to reach to more audiences.

I'm inspired by how the esbuild website is built, https://github.com/esbuild/esbuild.github.io.
Maybe it's a bad idea, what I want to put some content out before spending too much time with frameworks.


Update bottom_navigation_bar_item.dart

I am closing this PR as it looks like it was opened by mistake. If not, please provide more context.

I am closing this PR as it looks like it was opened by mistake. If not, please provide more context.


FAT-2963 : edge-inn-reach : need to change the port settings for mod-…

FAT-2963 : edge-inn-reach : need to change the port settings for mod-inn-reach and edge-inn-reach kartate test cases
Purpose
So far testing was being performed by running an edge-inn-reach server locally.
Recently new vagrant version is available with the edge-inn-reach module.
version : 1.0.0-20220915.7787
Reference: https://issues.folio.org/browse/FOLIO-3546
Hence, some code tweak is required to remove the dependency of the running local edge-inn-reach server and test karate test
Approach
Code changes are done for the port to point to the new vagrant edge-inn-reach module
Pre-Merge Checklist:
Before merging this PR, please go through the following list and take appropriate actions.

Does this PR meet or exceed the expected quality standards?

[x] Code coverage on new code is 80% or greater
[x] Duplications on new code is 3% or less
[x] There are no major code smells or security issues

Does this introduce breaking changes?

[ ] Were any API paths or methods changed, added or removed?
[ ] Were there any schema changes?
[ ] Did any of the interface versions change?
[ ] Were permissions changed, added, or removed?
[ ] Are there new interface dependencies?
[x] There are no breaking changes in this PR.

If there are breaking changes, please STOP and consider the following:

What other modules will these changes impact?
Do JIRAs exist to update the impacted modules?

[ ] If not, please create them
[ ] Do they contain the appropriate level of detail?  Which endpoints/schemas changed, etc.
[ ] Do they have all the appropriate links to blocked/related issues?

Are the JIRAs under active development?

[ ] If not, contact the project's PO and make sure they're aware of the urgency.

Do PRs exist for these changes?

[ ] If so, have they been approved?

Ideally, all of the PRs involved in breaking changes would be merged on the same day to avoid breaking the folio-testing environment.  Communication is paramount if that is to be achieved, especially as the number of inter-module and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.


Install Project popup's child controls reset their layout after changing project path, but the popup's size doesn't

Godot version
v4.2.rc1.official [ad72de508]
System information
Godot v4.2.rc1 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2080 Ti (NVIDIA; <IP_ADDRESS>80) - Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 Threads)
Issue description
When installing anything with a long name from the Asset Library Projects, the Install Project popup is wider than normal to fit the name comfortably in the popup.

However, when you browse into a different folder, it resets to the 4.1.x layout while keeping the larger window size.

This results in ghosts of the wider design still being visible to the right of the actual buttons. This is only a visual glitch and does not break the functionality of the popup, and the ghosts of the buttons to the right does not react to mouse input.
Steps to reproduce

Open up Godot 4.2-rc1
Switch to Asset Library Projects
Search for "Shape Manipulation"
Click the asset "Shape Manipulation Basics - Line2D…"
Click download
Wait for download
Note the wide layout of the UI
Click Browse
Click Select Current Folder, you do not need to change folder to test this

Note that the layout is now narrower, but has the ghosts of the wider layout still showing.
The ghost elements are just a visual glitch and cannot be interacted with.
Besides the visual glitch the popup still functions as normal.
This was confirmed to not happen in version v4.1.1.stable.mono.official [bd6af8e0e], in this version the layout is never widened when picking an asset with a long name.
Minimal reproduction project
None possible, the bug is in the Project Manager

I don't seem to reproduce the issue on Linux/KDE with 4.2-rc1. It looks the same before and after using the "Browse" button.

It might depend on HiDPI stuff though, what's your monitor resolution and Godot DPI scaling factor?

No HiDPI here, 1680 x 1050(p) (59.883Hz) monitor.
Godot settings

Display Scale: 100%
Custom Display Scale: 1.0
Font Size: 14

Windows UI scaling is also at 100%
Not sure what could differ between the systems, other than the obvious Windows 10 vs Linux/KDE.
I could give you the dxdiag output, but I'm not so sure it'd help.

Can confirm this happens for me on Windows. I'm not entirely sure why the dialog changes size in the first place. Line edits preset in the form should keep their size and the overflowing text should just be cut, because line edits have natural text overflow capability.


Testing browser support

I was reading some issues about browser support which I think it is an important feature to have. So I'm considering to add support for testing natural in a browser setting. My question is whether it would make sense to run the test suite (consisting of a collection of jasmine tests) with a test sequence using Browserify (or Webpack) and PhantomJS. This way we can make sure that natural works in the browser. Also, we could require pull requests/commits to successfully run in a browser environment. Please let me know your ideas and suggestions.
Hugo

I've got brill tagging working in the browser using browserfs with webpack. The only thing I needed to do to natural for this was to pull the model files into a zip and then fetch it. browserfs has shims for all the node calls like fs.

I was a little confused at first because the signatures changed for creating a lexicon and ruleset, but after I looked at the new code it was clear. As expected, those were the only changes I needed to make for things to work.

I'm sorry for the breaking changes. Also, I still need to update the README.

No probs, thanks for all your efforts :+1:


Header Sort - Casting Attribute

What would it take to provide casting on the attribute used in a header sort?  For example, we have a predefined attribute of String type that will always have integer values.  We have two options, change the type and manage all errors and changes required or cast the value so that the following does not happen:
Values
1
2
3
6
8
10
11
23
26
27
30
33
36
40
41
45
51
52
Would be in a text sort:
1
10
11
2
23
26
27
3
30
33
36
40
41
45
51
52
6
8

Dear Keith,
What is the data type of the attribute you are try to sort, Text or number?
If it is text, I expect it hard to cast, is it might effect all other text. What about other who like to sort A 01, B 02 etc. Can you add an additional sorting attribute to your data model that is a number, and use that to sort?
Cheers, Andries


Asset serving needs to be consistent with capitalization between platforms

Let's say you have a file at wwww/js/controllers/Main.js and then you have a link to it in your index.html
<script src="js/controllers/main.js"></script>

For some reason, the asset without capitalization loads fine in the browser, and on the simulator, but fails miserably and silently on any iOS device.
After spending hours trying to find the silent culprit, I think Ionic should either incorporate better logging when assets can't be found, or require strict capitalization from the server. Seeing as the browser is my only real method of digging deep with debugging, I feel it needs to be treated exactly like my device

Greetings @bwheeler96!
My sensors indicate that you need to update your issue through our custom issue form. We are now requiring all issues to be submitted this way, to ensure that we have all of the information necessary to fix them as quickly as possible.
Click Here To Update Your Issue
I will have no choice but to close this issue if it is not resubmitted through the form. Please fill out the rest of the form, so that I may use my friendly robot powers to assist you.
Thank you!

Greetings @bwheeler96!
I've closed this issue because my sensors indicated it was old and inactive, and may have already been fixed in recent versions of Ionic. However, if you are still experiencing this issue, please feel free to reopen this issue by creating a new one, and include any examples and other necessary information, so that we can look into it further.
Thank you for allowing me to assist you.


False positives in check for applying events for the wrong aggregate in CommittedEvents

When trying to replay the state, CommittedEvents is throwing the EventBelongsToOtherEventSource exception because the check for the EventSourceId on the metadata is different from the EventSourceId on the aggregate (even though the string representations are the same).
This is using the mongo event store so I suspect the Guids are not the same even though the string versions are the same.

This is actually to do with EventSourceId, ConceptAs, equality and inheriting from EventSourceId.  We should have a chat about it. :-)

Test comment from Trello


updating nextflow.config

PR checklist

[ ] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!
[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/quantms branch on the nf-core/test-datasets repository.
[ ] Make sure your code lints (nf-core lint).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

@jpfeuffer I updated a lot of tools that were not tag as openms and then updated also the nexflow.config line.


[DG] Add Use Case for filtering

Codecov Report

Merging #598 (6c4de0b) into master (a5f1eee) will increase coverage by 1.81%.
The diff coverage is 53.29%.

@@             Coverage Diff              @@
##             master     #598      +/-   ##
============================================
+ Coverage     59.88%   61.70%   +1.81%
- Complexity      541      630      +89
============================================
  Files           100      104       +4
  Lines          2064     2256     +192
  Branches        222      263      +41
============================================
+ Hits           1236     1392     +156
- Misses          736      744       +8
- Partials         92      120      +28

Impacted Files
Coverage Δ

...n/java/seedu/programmer/commons/core/Messages.java
0.00% <ø> (ø)

...main/java/seedu/programmer/logic/LogicManager.java
38.46% <0.00%> (-8.42%)
:arrow_down:

...grammer/logic/commands/DashboardCommandResult.java
100.00% <ø> (+100.00%)
:arrow_up:

...ogrammer/logic/commands/DownloadCommandResult.java
100.00% <ø> (ø)

...u/programmer/logic/commands/ShowCommandResult.java
36.36% <ø> (+3.03%)
:arrow_up:

...programmer/logic/commands/UploadCommandResult.java
100.00% <ø> (+100.00%)
:arrow_up:

src/main/java/seedu/programmer/model/Model.java
100.00% <ø> (ø)

...n/java/seedu/programmer/model/student/ClassId.java
85.71% <ø> (+28.57%)
:arrow_up:

...ain/java/seedu/programmer/model/student/Email.java
80.00% <ø> (ø)

...ogrammer/model/student/QueryStudentDescriptor.java
85.71% <ø> (ø)

... and 64 more

Continue to review full report at Codecov.

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


Create notNotOdd.bat

Add a convenience script for calling notNotOdd on Windows platforms.

Looks Not Not Good To Me


feat(stack): add engine to stack

Description:
I don't want to start the engine in my IDE. It should be part of the stack.

Add engine to stack
Update Readme
Add env variables for tasklist to locker-docker.env

Codecov Report
Patch and project coverage have no change.

Comparison is base (f980222) 16.05% compared to head (1606b36) 16.05%.

Additional details and impacted files
@@            Coverage Diff            @@
##                dev       #1   +/-   ##
=========================================
  Coverage     16.05%   16.05%
  Complexity      531      531
=========================================
  Files           521      521
  Lines          9147     9147
  Branches        611      611
=========================================
  Hits           1469     1469
  Misses         7602     7602
  Partials         76       76

Flag
Coverage Δ

unittests
16.05% <ø> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Add reset of filter

Checklist

[ ] I have filled out the template to the best of my ability.
[ ] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
[ ] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.
No response
Describe the solution you'd like
GET /Device/reset-filter?deviceSerialNumber=
Describe alternatives you've considered
No response
Additional context
No response

Implementation is only missing tests but requires an update of ambientika_py:

implementation: feature/filter_reset_button
"bug" in ambientika_py: https://github.com/wingertge/ambientika-py/issues/2


(Docs) [Docs] Capitalize the Title of Files in Data Operation-Import

…t Category
Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


Fix broken links in RabbitMQ Doc Pages (OSS and Tanzu) that were still pointing to the REMOVED OSS exclusive feature pages

Monday's (10/10/2022) Tanzu Doc Bugzilla report included many broken links (in OSS pages pulled into Tanzu docs), these pages were stilling pointing to the REMOVED OSS exclusive feature pages.
Actions:

Update the following RabbitMQ pages which still have exclusive feature links pointing to the REMOVED OSS feature pages. Change these links to point to the latest corresponding docs in the Tanzu doc set.

https://www.rabbitmq.com/documentation.html
https://www.rabbitmq.com/definitions.html
https://www.rabbitmq.com/networking.html
https://www.rabbitmq.com/admin-guide.html

Update the pages above in the released 1.2 and 1.3 doc sets with the correct links (Tanzu Doc links) and push these updates live to production

Update the Miro (yellow postit) tracking this exclusive features renaming activity with the list of pages above, we need a list of them as these will need to be updated to point to the latest Tanzu docs every time there is a new MAJOR Tanzu RabbitMQ for Kubernetes doc release.

Update the Github release template  with a link to the Miro (yellow postit)

Done, FYI @DigitalBlasco @michaelklishin


Exporting hangs

Trying to convert my Kitsu anime list for export, and it's stuck at 55%. I've tried quitting the app and restarting the export, but it just resumes and gets stuck at the same place.

I haven't tested the export with large lists, but I will take a look at it. Since your list is large, it will take a while. I will add a cancel button once I figure out the issue.

I committed a fix and loaded your list by overriding and it seems to work. I want to make sure it works on your side. I attached a potential fix. Try this and reply back if it works or not.
Shukofukurou.app.zip

Works 👍


Testable undo redo error modal

Adds a pretty generic error message in a modal that is displayed if an undo or a redo action fails to complete.
If the action fails, its likely due to an issue with the metadata, and retrying the action is unlikely to succeed so we remove the button on failure.

Do we have any / do we want to add any acceptance tests for these new modals?

Do we have any / do we want to add any acceptance tests for these new modals?

We don't, and we probably should.  I'll add a couple. 👍


Normalized value for seek by percent so it can't fall out of valid range

When using hot keys to seek, the percent value can fall outside the valid range and cause visual defect when playhead seeks outside of progress bar bounds.

Looks great, I will merge this soon!
Thank you!

Thanks!
On Wed, Jan 20, 2016 at 3:48 PM, Raúl Jiménez<EMAIL_ADDRESS>wrote:

Looks great, I will merge this soon!
Thank you!
—
Reply to this email directly or view it on GitHub
https://github.com/videogular/videogular/pull/317#issuecomment-173387189
.

--
[ Nils Thingvall | Sr. Developer ]
[ RealEyes Media, LLC | www.realeyes.com http://www.realeyesmedia.com/ ]
[ 940 Logan Street | Denver CO, 80203 ]
[ o.<PHONE_NUMBER> ]
[ b. h http://www.iheartair.com/ttp://nils.realeyesmedia.com ]
Upcoming Unavailability:
None

@Elecash Do you have a sense of when you might merge this in? We have a deadline approaching and I need to know whether to monkey patch temporarily or wait. Thanks!

I'll try to merge it this weekend :)

Thanks!
On Tue, Jan 26, 2016 at 12:17 AM, Raúl Jiménez<EMAIL_ADDRESS>wrote:

I'll try to merge it this weekend :)
—
Reply to this email directly or view it on GitHub
https://github.com/videogular/videogular/pull/317#issuecomment-174867515
.

--
[ Nils Thingvall | Sr. Developer ]
[ RealEyes Media, LLC | www.realeyes.com http://www.realeyesmedia.com/ ]
[ 940 Logan Street | Denver CO, 80203 ]
[ o.<PHONE_NUMBER> ]
[ b. h http://www.iheartair.com/ttp://nils.realeyesmedia.com ]
Upcoming Unavailability:
None


Create new release 0.6.26

What this PR does / why we need it:
Create new release 0.6.26, this contains https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/751 to protect from confusion deputy issue.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

/ok-to-test


feat: add logger and error handling

feat: add logger and error handling
feat: new cli option --format [plain|bbcode|html|markdown]
fix: drop support for python:3.9
refactor: reorganize modules
test: add more tests
chore(deps): update ruff dev-dependency to 0.2.2

@CodiumAI-Agent /review

@CodiumAI-Agent /review

@CodiumAI-Agent /review

PR Analysis

🎯 Main theme: Adding logging and error handling features, and refactoring the codebase
📝 PR summary: This PR introduces logging and error handling to the codebase. It also includes a new CLI option for formatting, drops support for Python 3.9, reorganizes modules, adds more tests, and updates a dev-dependency. The PR also includes changes to the way images are uploaded and how links are generated and formatted.
📌 Type of PR: Enhancement
🧪 Relevant tests added: Yes
⏱ Estimated effort to review [1-5]: 4, because the PR includes a significant amount of changes across multiple files, including new features, refactoring, and tests. The changes are well-structured and clear, but due to the volume, it requires a thorough review.
🔒 Security concerns: No security concerns found

PR Feedback
💡 General suggestions: The PR is well-structured and includes meaningful changes that improve the functionality and structure of the code. The addition of logging and error handling is a significant improvement. The refactoring of the code into separate modules improves the modularity and readability of the code. The new CLI option for formatting is a useful feature. The addition of more tests is commendable as it ensures the robustness of the code. However, dropping support for Python 3.9 might limit the usability of the code for some users.
 🤖 Code feedback:relevant filesrc/images_upload_cli/cli.pysuggestion
Consider handling the case where error_handler.has_error_occurred() is true in a more user-friendly way. Instead of abruptly exiting the program with sys.exit(1), you could provide a more descriptive error message to the user. [important]
relevant lineif error_handler.has_error_occurred():relevant filesrc/images_upload_cli/util.pysuggestion
The log_on_error function currently logs an error message for all non-2xx HTTP responses. However, 1xx (Informational) and 3xx (Redirection) responses are not necessarily errors. Consider updating the function to only log error messages for 4xx (Client Error) and 5xx (Server Error) responses. [medium]
relevant linestatus_class = response.status_code // 100relevant filesrc/images_upload_cli/cli.pysuggestion
The cli function has become quite large and complex with the addition of the new features. Consider refactoring it into smaller, more manageable functions. This would improve the readability and maintainability of the code. [medium]
relevant linedef cli(relevant filesrc/images_upload_cli/util.pysuggestion
The log_on_error function logs the entire response text when an error occurs. This could potentially log sensitive information. Consider only logging the status code, reason phrase, and URL. If more information is needed for debugging, consider adding a debug mode that logs the full response text. [important]
relevant linelogger.debug(f"Response text:\n{response.text}")

 ✨ Usage guide:
Overview:
The review tool scans the PR code changes, and generates a PR review. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...

With a configuration file, use the following template:
[pr_reviewer]
some_config1=...
some_config2=...

  Utilizing extra instructions
The review tool can be configured with extra instructions, which can be used to guide the model to a feedback tailored to the needs of your project.
Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize.
Examples for extra instructions:
[pr_reviewer] # /review #
extra_instructions="""
In the code feedback section, emphasize the following:
- Does the code logic cover relevant edge cases?
- Is the code logic clear and easy to understand?
- Is the code logic efficient?
...
"""

Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

  How to enable\disable automation

When you first install PR-Agent app, the default mode for the review tool is:

pr_commands = ["/review", ...]

meaning the review tool will run automatically on every PR, with the default configuration.
Edit this field to enable/disable the tool, or to change the used configurations

  About the 'Code feedback' section
The review tool provides several type of feedbacks, one of them is code suggestions.
If you are interested only in the code suggestions, it is recommended to use the improve feature instead, since it dedicated only to code suggestions, and usually gives better results.
Use the review tool if you want to get a more comprehensive feedback, which includes code suggestions as well.

  Auto-labels
The review tool can auto-generate two specific types of labels for a PR:

a possible security issue label, that detects possible security issues (enable_review_labels_security flag)
a Review effort [1-5]: x label, where x is the estimated effort to review the PR (enable_review_labels_effort flag)

  Extra sub-tools
The review tool provides a collection of possible feedbacks about a PR.
It is recommended to review the possible options, and choose the ones relevant for your use case.
Some of the feature that are disabled by default are quite useful, and should be considered for enabling. For example:
require_score_review, require_soc2_review, enable_review_labels_effort, and more.

  More PR-Agent commands

To invoke the PR-Agent, add a comment using one of the following commands:

/review: Request a review of your Pull Request.
/describe: Update the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
/ask <QUESTION>: Ask a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.
/add_docs 💎: Generate docstring for new components introduced in the PR.
/generate_labels 💎: Generate labels for the PR based on the PR's contents.
/analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

See the tools guide for more details.
To list the possible configuration parameters, add a /config comment.

See the review usage page for a comprehensive guide on using this tool.


save media-type escaped in verifier filename, and use in verify config and status

Fixes #3704
(or at least tries to; need feedback from @eriknordmark and @OhmSpectator)
Important note: there is a need for a more comprehensive review of how state persists across reboots. This does not solve that. It just solves the need to resolve a very particular issue.
As described in #3704, if a blob from an OCI image was downloaded and either in verifying or verified, but not yet loaded into CAS, and the device reboots, the media-type gets lost. It only was retrieved using Content-Type during download, passed to BlobStatus, but that is lost on reboot. When it reconstructs BlobStatus after reboot from VerifyImageStatus, it has lost the media-type. This causes EVE to misinterpret what the blob is and be unable to use it.
This fix does the following:

Add MediaType to VerifyImageConfig and VerifyImageStatus
When creating the verifier filename (both verifier stage and verified stage), create an escaped suffix to the filename. This mostly is ignored, except when recreating a VerifyImageStatus if none exists, i.e. post-reboot.
Carry the MediaType from VerifyImageStatus to BlobStatus post-reboot, which lets it be loaded correctly.

cc @OhmSpectator @eriknordmark for detailed look.

I just realized, of course, base64 is unsafe for a filename, as it can include /. I will update it.

base64 was not right for this. I used url.PathEscape and url.PathUnescape instead.

I've fixed the compilation errors and set the tests.

Twenty-two test cycles passed successfully so far. The previous max without the fix was eight, usually less. So I would consider the fix working.

I've tried to find the unit tests that we use for the Verifier component to add several new test cases. I see a bunch of data that can be used for the tests here: https://github.com/lf-edge/eve/blob/13671615437eb604677af96c00c2daef947167f1/pkg/pillar/cmd/verifier/testdata, but I do not see how it's used.
Do you have any ideas about how we test this component? @deitch, @eriknordmark, @milan-zededa, @uncleDecart?

I would like to suggest a commit message that would be useful for future traceability of the change:

Sure, I will modify the commit message.

Updated commit message.

I've tried to find the unit tests that we use for the Verifier component to add several new test cases. I see a bunch of data that can be used for the tests here: https://github.com/lf-edge/eve/blob/13671615437eb604677af96c00c2daef947167f1/pkg/pillar/cmd/verifier/testdata, but I do not see how it's used.
Do you have any ideas about how we test this component?

Unfortunately not. It is very hard to test these things because they depend on pubsub, interfaces, and being inside EVE. It isn't strictly necessary, it just is the way it has been until now.
If you look at eve-libs, many of those things were inside various parts of pillar, and were pulled out (when we had a chance), so they could be standalone libraries, and thus testable. The goal was to do those here as well; remains a goal to this day.
There is a testdata/ dir, with some artifacts, and I remember creating them, but I do not recall where or how they are used. A quick search shows no references.

Unfortunately not. It is very hard to test these things because they depend on pubsub, interfaces, and being inside EVE.

I thought about adding several simple unit tests for how the filenames are generated and how they are parsed later. Not full-scale integration tests (that are up to ztets/eden).

If you have a simple way, go for it.

@deitch, don't you mind if I push a simple unit test to the same branch as a separate commit?

Go for it.

ok, will do now

By the way, the test fails:
INFO[0000] Containerd Init
--- FAIL: TestMediaTypeInStatus (0.00s)
    verifier_test.go:24: MediaType in status dummySha256.application/vnd.docker.distribution.manifest.v2+json does not match original application/vnd.docker.distribution.manifest.v2+json
FAIL
exit status 1
FAIL    github.com/lf-edge/eve/pkg/pillar/cmd/verifier  0.014s

I cannot figure out where I let you push to my branch. There used to be a setting on a PR for that.

I tried by sending you an invite to my fork @OhmSpectator , let us see if that works.

If you don't find how to let it, you can add a commit yourself.
The file I've shown in the previous commit and the commit message would be:
pillar: Add unit tests for media type encoding/decoding in Verifier.

This commit introduces new unit tests in verifier_test.go for the verifier
module. The tests focus on ensuring that media types, specifically
'application/vnd.docker.distribution.manifest.v2+json', are correctly encoded
into file names and then accurately decoded back into the VerifyImageStatus
structure.

I see you accepted. Try to push?

It worked!

Yeah, cool, it works! Thanks!

So, the current problem is that the SHA part of the filename is falsely parsed as a part of the media type. See comment here: https://github.com/lf-edge/eve/pull/3706#issuecomment-1896168371.
So, I have to retest it tomorrow with the fixed code. And I will also think about proving that the code was triggered during the testing and the issue is gone...

@OhmSpectator I think your test is incorrect. verifyImageStatusFromFilename() is supposed to take a verified filename, not a verifier filename.
It gets called here, which is in populateInitialStatusFromVerified() (not from verifier).
I think the test is supposed to be:
func TestMediaTypeInStatus(t *testing.T) {
	mediaType := "application/vnd.docker.distribution.manifest.v2+json"
	tmpID := "tempID"
	sha256 := "dummySha256"
	infile := "dummyFile"

	_, _, verifiedFilename := ImageVerifierFilenames(infile, sha256, tmpID, mediaType)
	print("verifiedFilename: ", verifiedFilename)

	status := verifyImageStatusFromImageFile(verifiedFilename, 12345, "dummyPath")

	if status == nil {
		t.Fatalf("Status is nil")
	}

	if status.MediaType != mediaType {
		t.Errorf("MediaType in status %v does not match original %v", status.MediaType, mediaType)
	}
}

Yep, I'll fix it. But if I'm not mistaken, I tried this option as well, and it also failed. But I may be wrong and will retest soon.

Yep, I was wrong. The test passes if the verifiedFilenam is used.
But it looks like an error-prone piece. Maybe we should add a note to the comment to the ImageVerifierFilenames function:
// ImageVerifierFilenames - Returns pendingFilename, verifierFilename, verifiedFilename
// for the image. Both verifierFilename and verifiedFilename include an extension
// of the media-type, e.g., abcdeff112.application-vnd.oci.image.manifest.v1+json.
// This inclusion is essential as we need the media-type to process the blob.
// Normally, we carry it in the status (DownloadStatus -> BlobStatus), but these
// statuses are ephemeral and lost during a reboot. To ensure persistence and
// survival through reboots, we embed the media-type in the filename, making it
// filename-safe using PathEscape.
//
// Note: The code in verifyImageStatusFromImageFile for extracting and verifying
// media type is applicable only for verifiedFilename. This specific implementation
// should not be reused for verifierFilename, as the logic and format for handling
// media types in verifierFilename might differ. If future requirements necessitate
// handling media types in verifierFilename, separate logic should be developed.

The other option - it make code of parsing suitable for the both cases.

If there is no any reason to check the media type in the verifying case, then maybe not add it to the corresponding filename?
All these notes are not critical, but I want to make the code as little confusing as possible.  Meanwhile, I'm preparing a new test run.

If there is no any reason to check the media type in the verifying case, then maybe not add it to the corresponding filename?

To be honest, I wasn't sure. I thought maybe we do pick it up from there somewhere, or might at one point. And we like these to be parallel, except for the leading tmp string (which is there because of potential conflicts IIRC). So I added it. I would like to leave it for now.

I would like to leave it for now.
I got it, no problem. In this case, I think we should explicitly warn against reusing the current parsing implementation for any future parsing of the verifying filename, to avoid confusion:

// Note: The code in verifyImageStatusFromImageFile for extracting and verifying
// media type is applicable only for verifiedFilename. This specific implementation
// should not be reused for verifierFilename, as the logic and format for handling
// media types in verifierFilename might differ. If future requirements necessitate
// handling media types in verifierFilename, separate logic should be developed.

@deitch, I'm pulling the newest version of the PR, but I do not see any changes... Hopefully, it was not overwritten when I pushed my fix for the unit test...

Hopefully, it was not overwritten when I pushed my fix for the unit test...

Looks like it was. Don't do anything until I do another push. One minute.

OK, fixed it. Pull now @OhmSpectator

You can avoid those by switching to base64.URLEncoding.EncodeToString()

base64 does not work, because it allows / in it, which would mean escaping it anyways, so I switched to URL path encoding. It works.

Is there still an issue with dots in the media type?

Nope. We switched from strings.Split(filename, ".") to string.SplitN(filename, ".", 2)

Looks like it was. Don't do anything until I do another push. One minute.
Oops, sorry. I really had fetched the latest version 10 seconds before pushing the fix. We were lucky =D

base64 does not work, because it allows / in it, which would mean escaping it anyways, so I switched to URL path encoding. It works.

FWIW URLEncoding does not use /. StdEncoding uses /.

I'll now push one more small commit with the addition of a log line.

I've added a commit with an extra log line and squashed the two commits that added the unit test.

It is strange that a very simple log message crashes the test now... Checking and fixing.

Argh... The problem is that the logger is not initialized if run in a testing environment with go test... Fixing..

I fixed the logger issue in the unit test. Also, I added a new unit test for the absent media type case.