FFMPEG wrappers: dlib::ffmpeg::decoder and dlib::ffmpeg::demuxer

I'm having another go as I'm in need of this again and would rather do it properly.
The previous PR has fallen behind and my git rebase/merge skills are pants.
In any case, it was too big.
So i've split it into 2 parts:

decoding/demuxing
encoding/muxing
This PR includes the first part.

So it looks like installing ffmpeg libraries in Github Actions is causing timeout issues with Azure. Don't know how to solve this.

So it looks like installing ffmpeg libraries in Github Actions is causing timeout issues with Azure. Don't know how to solve this.

It seems to  be happy now. Maybe it's just a matter of restarting the tests.

Ok, just need to:

test with audio files
maybe reduce the size of the test files to accelerate unit tests
maybe an example program

This is tested with ffmpeg v3, v4 and v5.  Nothing big, just something small with audio channel layout. That can be fixed in another PR. I'm not going to bother supporting ffmpeg v2. If you're stuck with that version, then just build ffmpeg from source. Way easier.
In another PR, i'll probably add building ffmpeg from source using cmake's ExternalProjectAdd

I would appreciate an initial review. Thanks

I would appreciate an initial review. Thanks

Cool.  I'll look in a bit :)

Possibly the API for the Frame object which wraps std::unique_ptr<AVFrame> needs to be a bit better as i expect users will want to use this a lot if they're not dealing with standard RGB or BGR images. For example, if you're decoding H264 encoding streams, which is mostly what MP4 files use, then frames are actually in YUV format. If you have a use-case for using untampered frames, (which I do), then converting to dlib objects isn't an option. So the interface to Frame needs to be very good. Possibly we need some more helper functions. For audio, you pretty much always want to use Frame.

Actually, I think what we need are "view" objects. So instead of having convert() functions which allocate dlib objects, we have objects like:

image_view<rgb_pixel>
image_view<bgr_pixel>
audio_view<uint8_t, /*nchannels=*/1>
audio_view<int16_t, /*nchannels=*/2>
etc
Each of them hold a pointer to a AVFrame object.
For example we could ensure image_view<rgb_pixel> satisfies dlib's pixel traits so it can be converted to a matrix or directly plotted to a window, or whatever. More to the point, we can manipulate the image and not allocate a whole new frame.

But I'll wait for an initial review before I make any more changes.

webcam_face_pose_ex no longer needs opencv. We use ffmpeg wrappers instead!

Added basic example of dlib::ffmpeg::demuxer.

@davisking Ready for another look if you can. Cheers

@arrufat I seem to remember you saying you were keen for this. If you feel like it and have the time, could you stress test this a bit? Any suggestions on API, documentation or whatever, I would be grateful. Cheers

Note to everyone, when installing ffmpeg via a package manager, you typically get the full blown installation with everything enabled and a ton of dependencies.
What I typically do in my projects is download a release of ffmpeg (v4 please as v5 is not supported yet), build it from source using ./configure --disable-everything and only enable the things I need. That really does reduce the size of your binaries and you truly only pay for what you use.
Then when building dlib, just use CMAKE_PREFIX_PATH and point to your local installation of ffmpeg for that project.

At some point I'll PR some cool examples like using demuxer for screen grab, reading microphone and RTSP client.

I will have a look soon. I've just tried the webcam example code, and it works great.
Is there a way to force a specific FPS, like cap.get(cv::CAP_PROP_FPS); in OpenCV? Other than that, I only used OpenCV for the capturing the webcam stream and saving it to a file, so relatively limited use of what you're proposing here.
Again, I will read the docs thoroughly and let you know what I think :)
Thank you so much for working on this again :)

I will have a look soon. I've just tried the webcam example code, and it works great. Is there a way to force a specific FPS, like cap.set(cv::CAP_PROP_FPS, 30) in OpenCV?

You can definitely force an FPS when creating a video but that will be for another PR.
When it comes to reading, I'll have a look through the ffmpeg docs to see if you can set a demuxer to read frames at a particular rate. At the moment it reads all frames, and therefore the default FPS of the video.

Thank you, I had already found how to query the fps. Forcing the FPS is mostly useful for Webcams, since, depending on the FPS, they will use different resolutions. I have some webcams that open a 720p stream at 10 fps, but when I force them to 30 fps, I get a 480p stream.
I think you can also go the other way around and force the resolution instead.
I use the qv4l2 test utility to check it.

Let me have a look

It will definitely be possible. Probs a good feature to add in. My goal is for this to get used so if there are any issues, hopefully they get spotted, fixed, and then it benefits me.

Just noticed dlib already has something like image_view<> just what we need for ffmpeg::frame so that we can access pixels without first copying to array2d<rgb_pixel>

@arrufat I've updated the webcam_pose_face_ex.cpp example so you can set v4l2 options such as hardware video size and framerate via the demuxer::args::format_options field. You can also set the normal demuxer::args::image_options::h and demuxer::args::image_options::w options which set the bilinear resizer inside demuxer. In an ideal world, you would reuse demuxer::args::image_options::h and demuxer::args::image_options::w to first try set the device format first, and if that isn't possible or fails, then set the bilinear resizer. But please try the example. It words for me.

Note, setting height and width in demuxer::args::format_options like the example does is a v4l2 thing not a general video file thing (like MP4). In general, if you want a different size, use demuxer::args::image_options::h and demuxer::args::image_options::w which configures a resizer.

@pfeatherstone wow, great! I've just tried the updated example, and I manage to get 30 fps by setting the size (--hw_video_size 640x480), but not by requesting the fps directly (--hw_framerate 30).
So, if I run:
webcam_face_pose_ex --hw_video_size 1280x720:

height: 720
width:  1280
fps:    10

webcam_face_pose_ex --hw_framerate 30

[video4linux2,v4l2 @ 0x55c79d556840] The driver changed the time per frame from 1/30 to 1/10

height: 720
width:  1280
fps:    10

But then, if I run:
webcam_face_pose_ex --hw_video_size 640x480

height: 480
width:  640
fps:    30

And then, from now on, even if I run without arguments, I still get 640x480@30fps. It seems like the changes are persistent across runs. Maybe that's what's supposed to happen. However, it would be great if I could just request the fps, without typing the size (just a quality of life improvement: I am used to what OpenCV does). But it's already great! Thank you!

Yeah I'll have a look at making all of this easier. I don't like how for webcam there are two sets of sizes.

Neither dlib or ffmpeg are caching any values, I imagine that's the v4l2 driver

I've changed it such that if all of the following is satisfied:

demuxer::args::image_options::h > 0
demuxer::args::image_options::w > 0
demuxer::args::format_options.find("video_size") == demuxer::args::format_options.end()

then demuxer will first attempt to set the video size using "video_size", in format options. This is only going to work for v4l2, xcbgrab and maybe others.
Otherwise, if :

demuxer::args::image_options::h > 0
demuxer::args::image_options::w > 0

then the bilinear resizer will be set (as before)

I think i might have to make this header-only because of ffmpeg versions. They tend to break APIs and don't want to be in a situation where someone is linking to ffmpeg v3 for example when dlib was built against v4. If everything is in a header then this is a non issue.
So maybe have ffmpeg_utils.h and ffmpeg_utils_impl.h where the later is included at the bottom of ffmpeg_utils.h with all the impls. Likewise for ffmpeg_demuxer.h.
Or we keep track of the version dlib was built with and static assert with the version being included by user code. I don't like this option.

Yeah either of those is fine. Whatever is most clean you think.  I would also probably lean towards the header only version.

@davisking Ready for another look if you can. Cheers

Sweet.  Will look in a bit.  Been a busy week.

I would also probably lean towards the header only version

Yeah I think that's better. I've added a whole bunch of code for storing and comparing ffmpeg versions, but header-only removes all that pain. This is a pity. And it doesn't feel like an ffmpeg problem, just a general C++ problem.

Also, with header-only approach, i don't know how i statically initialize ffmpeg once. I have a symbol dlib::ffmpeg_details::FFMPEG_INITIALIZED which is basically a static const variable which initializes all the necessary ffmpeg library bits. If that's in a header, won't it initialize in all translation units ?

@davisking I have a header-only version working. My only worry is the statement:
inline static const bool FFMPEG_INITIALIZED = ffmpeg_initialize_all();

I want to make sure that all translation units will use the same FFMPEG_INITIALIZED variable and therefore ffmpeg_initialize_all() will get called exactly once. I'm not super hot on the inline rules and how they play with static, internal linkage and external linkage.
In any case, I'll wait for another review before committing all the header-only stuff. it's basically the same

@davisking I have a header-only version working. My only worry is the statement:
inline static const bool FFMPEG_INITIALIZED = ffmpeg_initialize_all();

I want to make sure that all translation units will use the same FFMPEG_INITIALIZED variable and therefore ffmpeg_initialize_all() will get called exactly once. I'm not super hot on the inline rules and how they play with static, internal linkage and external linkage.
In any case, I'll wait for another review before committing all the header-only stuff. it's basically the same

Yeah it would be easy for someone to make something like that end up weird.  It's not like everything has to be in the header. The goal is just to make sure that user code trying to use the wrong ffmpeg doesn't compile right?  And so making all the code that calls ffmpeg directly be in a header makes that happen.  But that doesn't mean that nothing can be in a .cpp file though.  Just put the init stuff in a .cpp file and make it call an init function in a header.

Cool. I'll still wait for anymore review suggestions before fixing stuff. Just let me know when you're done. Though I appreciate everyone is busy, including myself

Ok, I said i would wait but I couldn't help myself. The mains things i've added are more generic convert() functions. Hopefully the docs are clear. Basically, provided your decoder or demuxer are configured with the right output pixel formats, you can convert to any dlib object that satisfy image traits.

@arrufat I've changed webcam_face_pose_ex.cpp. Check it out. You can set height, width and framerate. At the moment, if you just set framerate, you might get warning message:
[video4linux2,v4l2 @ 0x55c79d556840] The driver changed the time per frame from 1/30 to 1/10
If you set all 3 parameters, then it should go away. I haven't found a way to make it work by just setting framerate. But it's usable now I hope.

There used to be a method for querying device capabilities : avdevice_capabilities_create() but that's now been deprecated and just returns an error code. Shame. It used to be possible get information like supported fps and frame sizes for webcams and other devices. I'm still digging through the API, but can't find anything.

@pfeatherstone thank you so much for your work on this… I wish I could spend some more time trying this out. As you said, it works great once I set all with, height and fps, but not when I only set the fps. It's still a massive improvement compared to having to use OpenCV just for camera access. So, I am overall happy with this functionality.
Hopefully, I'll have some time in the coming days, since it's the Korean new year.
Again, thank you so much for the effort you're putting on this.
As a side note, I am not sure whether we should get rid of the example that uses OpenCV, since it's the only one that shows how to interact with OpenCV from dlib, should you need it.

Happy new year to you! Ok, I'll write a new example for camera access

list_input_devices() and list_output_devices() will now not only tell you which types of input/output devices you can read/write from, but also a list of actual devices currently connected to your machine with a name and description. Handy

@davisking sorry to bother, but will you have time at some point to review? Thanks

@davisking sorry to bother, but will you have time at some point to review? Thanks

Yeah sorry for being late. I think I can look later today.

Thank you so much for looking this over, particularly through the night. I'll get to it.
With regards to pixel_trait and image_trait, I was trying to be precise and consistent with the docs and its requirements.
Then the enable_if trick which uses those traits are trying to emulate c++ concepts.
In fact, I noticed one of the dlib pixel traits was missing a field using this so that was pretty nice. I get it that we might be breaking user code but I see it as "assisting users in fixing their code" :)

Also I have a tendency to add small bits in PRs and they get bigger. Sorry, I need to stop that.
In retrospect:

overloaded
void_t
pixel_trait
image_trait
Could have gone in separate PRs.

Also I have a tendency to add small bits in PRs and they get bigger. Sorry, I need to stop that. In retrospect:

overloaded
void_t
pixel_trait
image_trait
Could have gone in separate PRs.

Na no shame or anything.  It's all good.  Just saying it will get your PRs merged faster :)

I'll address the final things tomorrow, then hopefully, Monday morning I'll wake up and it will be merged.

 We got there in the end!

Also, I'm more than happy to take ownership of any potential future issues

Awesome! We got there in the end!

Yep, never had any doubts about it :)

Yep! @pfeatherstone rocks!

I forgot to add #cmakedefine DLIB_USE_FFMPEG to dlib/config.h.in
Presumably that's required for ODR stuff.

Yeah, it's needed for system installed dlib too.


My Steam Farm

 Hello my steam farm is only picking up that i have 19 games? i have 80+ games. Is it only picking up installed? can it pick up uninstalled? what can i do to fix this.
Bug report
Description

Expected behavior

Current behavior

Possible solution

Steps to reproduce

Full log.txt recorded during reproducing the problem
Paste here, in-between triple backtick tags

Ensure that your log was NOT recorded in Debug mode, as it might contain sensitive information that should not be shared publicly, as stated on the wiki.

Global ASF.json config
Paste here, in-between triple backtick tags

Ensure that config has hidden/redacted potentially-sensitive properties, such as:
- IPCPassword (recommended)
- IPCPrefixes (optionally, if exposing public IPs)
- SteamOwnerID (optionally)
- WebProxy (optionally, if exposing private details)
- WebProxyPassword (optionally, if exposing private details)
- WebProxyUsername (optionally, if exposing private details)

BotName.json config of all affected bot instances (if more than one)
Paste here, in-between triple backtick tags

Ensure that config has hidden/redacted potentially-sensitive properties, such as:
- SteamLogin (mandatory)
- SteamPassword (mandatory)
- SteamMasterClanID (optionally)
- SteamParentalPIN (optionally)
- SteamTradeToken (optionally)
- SteamUserPermissions (optionally, only SteamIDs)

Additional info

Please read wiki and the contribution guidelines.

Hey there! Thank you for contacting our development team at GitHub.
We believe that your issue does not meet our contributing guidelines referenced during issue creation.

Before you open an issue please review the contributing guidelines for this repository.
(...)
I understand that if my issue is not meeting contributing guidelines specified above, especially if it's a question or technical issue that is not related to ASF development in any way, then it will be closed and left unanswered.

Reason for closing: this is intended ASF behaviour / technical issue / not a bug.
Please check out our wiki if you need further help.
Have a nice day!
~Archi

Can i please at least be directed to the correct area if this simple question cannot be answered?

i already told you to read wiki. on the top of this page there are 4 tags... one is the wiki. go there and read


goog.graphics.CanvasElement can not listen for events.

This issue was imported from Closure Library's previous home at http://closure-library.googlecode.com
The link to the original issue is:
https://code.google.com/p/closure-library/issues/detail?id=610

goog.graphics is deprecated


Avoid Pods being placed into a single node

Parent: https://github.com/redhat-cop/rego-policies/issues/23
Suggestion: https://learnk8s.io/production-best-practices#application-development
Solved By: TODO

/assign ckavili


Fixed react ts jest

Related to https://github.com/sodatea/vite-jest/issues/12 and https://github.com/vitejs/vite/issues/1955
I changed "<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}", to "<rootDir>/src/**/*.{spec,test}.{ts,tsx}", and now the tests are running.

module.exports = {
  preset: "vite-jest",

  setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
  testMatch: [
    "<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
    "<rootDir>/src/**/*.{spec,test}.{ts,tsx}",
  ],
  testEnvironment: "jest-environment-jsdom",
  moduleNameMapper: {
    "\\.(css|sass|scss)$": "identity-obj-proxy",
  },
};

Is this still relevant? The test passes me on a fresh checkout.

Yeah can be closed. I believe there is another vite jest library under development too.


Missing columns in "Preview Changes" after "Duplicate current row"

Missing columns in "Preview Changes" insert query after "Duplicate current row".
The missing row columns are not with NULL or default value!
Postgresql 10
Windows 10 64x
DBeaver 5.1.4

Please provide a bit more information.
What columns are missing? Is there anything special about them?

Table columns example:
{primary-key-column} bigserial NOT NULL,
{some-int-column} int8 NOT NULL,
{some-str-column} varchar NOT NULL
Values example:
3, 44, 'string val'
expected "Preview Changes" insert query after "Duplicate current row":
INSERT INTO {table} ({some-int-column}, {some-str-column})
VALUES (44, 'string val')
Actual "Preview Changes" insert query after "Duplicate current row":
INSERT INTO {table} ({some-int-column}, {some-str-column})
VALUES (NULL, 44)


Add opt-out for asset browsing.

This was added in #160, but due to directories being served it is not possible to have top-level history support based routes that happen to correspond with folders in the build output.
Specifically, you cannot have an assets route in Ember + EmberCLI, because the broccoli middleware will serve a listing of the assets/ directory instead.

Hm... If your Ember app has an /assets route, but the assets live at /assets/*, then it seems you'll still generally have the same problem when you deploy to production, won't you? I realize that in principle you could make it work in production, but we (ember-cli) don't control the production environment, so it seems quite error-prone...
I wonder if it might not be acceptable to just say "don't do that".

I'm still dubious whether this is actually good idea, but I'm OK with adding an option to enable/disable directory browsing (default-true maybe?).

Fixed by a0c9940.


"Save" button on event does not work!

I'm trying to update an existing event. The "pubblicare" and "salva bozza" buttons do not work.
I also tried to create a new event, with the same result.
This is a very serious problem. As a result, I had to immediately revert to eventbrite for managing tickets from my next event.

Surprising, we haven't done any major code change in a good week. Was this this week-end?
If so, we had a security audit ongoing that diturbed our services, it should work since monday. refers to this thread if it's the issue https://forums.coderdojo.com/topic/264/some-glitches-in-zen/15
If it's not, could you tell us what's your dojo name/web browser so that we look into it (a screenshot or a gif would be even better :))?

It's the Lissone dojo: https://zen.coderdojo.com/dojo/it/lissone-province-of-monza-and-brianza/lissone , chrome (also tried on mobile, nothing happens)
Do you have any kind of automated test in place? Parents are getting really annoyed by these issue!

Btw I tried less than 1 hour ago

We're in the process of rewriting those, we'll have the basing bootstrap of e2e done by this week and will continue further to the end of the year so that we reduce all those issues.
We'll have a look very shortly (either tonight or tomorrow morning), thanks for the report :)

I went through our logs and couldn't find anything in particular :(
Could you give me a couple of more details?
Which date is the one set? Did you ensure it wasn't a passed date/event?
Did you try by copying the event or was it a brand new one?
Did you ensured that there was no required fields missing (name, description, session name and session ticket) by opening/expanding every "card" (yeah, we should probably open those one if it's missing a required element cc @DanielBrierton ) ?

First I tried updating an existing event. The event was scheduled for december 3rd, but had 0 available tickets because booking was not yet "open". So yesterday I tried to change the amount of available tickets and save the event, but the save button did not work. So I canceled the event and tried to create a new one, copying a previous event, and I faced the same behaviour. I don't know if there were any fields missing: for sure, no evident popup / error message appeared

I don't know if this is relevant, but our dojo has two champions

It should be fixed, it was a dependency which haven't been locked + a build process issue.
Can you confirm?

Now the save button works, but the "cancel event" button does not! (Yesterday it was working)

Which "Cancel" event are we talking about ?
The one from "Edit event" or the one from the "Event list" ?

Edit event

I think that's the issue ;) https://github.com/CoderDojo/community-platform/issues/1108

Opened  #1110

Saving works, and cancel is another issue, closing ! :)


Conditional comments for script references

Hi Andrew,
I needed to include certain scripts only for certain versions of IE, e.g. HTML5 shim for versions of IE < 9. I copied the Condition functionality from the Stylesheet bundles to the Script bundles.
Not sure if you want this in cassette, but feel free to use it if its of any use.

Very nice, thank you!
Can you also enhance ScriptBundleManifestReader and ScriptBundleManifestWriter so the condition will be persisted in the cache manifest too? Otherwise loading from cache in production mode will lose the condition.
Do we also need this for ExternalScriptBundle?

Modified ScriptBundleManifestReader / Writer as requested.
Also, added Conditional comments for ExternalScriptBundle.
Hope this is of some use!

Excellent, thank you for all this! I'll get this merged in soon.

This has been merged into master and will be in the next release.
Thanks again for this excellent addition to Cassette.


[Feature] - Refactor and evolve schema application example

[x] Description created
[x] Reviewed by peer: @DaAnda97
[ ] Prioritised

Description
We want to implement a running schema application to reflect the current state of Miranum Platform.
Sub-Tasks

### Tasks
- [ ] Update Schema Application Example
- [ ] Make sure to update its readme accordingly

@Hafflgav Is this issue still needed?

Given that this issue has been created quite a while ago, I do not think this is required anymore.


Fix MIME unit tests

$subject
Check List

[x] Read the Contributing Guide
[ ] Required Balo version update
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

Merging #15695 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #15695      +/-   ##
============================================
+ Coverage      6.69%     6.7%   +0.01%
- Complexity     1725     1731       +6
============================================
  Files          1378     1378
  Lines         70433    70433
  Branches       9055     9055
============================================
+ Hits           4713     4724      +11
+ Misses        65245    65236       -9
+ Partials        475      473       -2

Impacted Files
Coverage Δ
Complexity Δ

...main/java/org/ballerinalang/net/http/HttpUtil.java
34.85% <0%> (+0.41%)
94% <0%> (+3%)
:arrow_up:

...ang/mime/nativeimpl/AbstractGetPayloadHandler.java
7.79% <0%> (+2.59%)
3% <0%> (+1%)
:arrow_up:

...ava/org/ballerinalang/mime/nativeimpl/GetJson.java
36.58% <0%> (+7.31%)
4% <0%> (ø)
:arrow_down:

...g/net/http/nativeimpl/request/CreateNewEntity.java
40% <0%> (+20%)
2% <0%> (+1%)
:arrow_up:

...inalang/net/http/nativeimpl/request/SetEntity.java
50% <0%> (+33.33%)
2% <0%> (+1%)
:arrow_up:

Continue to review full report at Codecov.

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


chore(master): release 1.4.17

:robot: I have created a release beep boop
1.4.17 (2023-07-10)
Miscellaneous

deps: update docker docker tag to v24.0.4 (ada05a0)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/wayofdev/docker-build-deps/releases/tag/v1.4.17 :sunflower:


Add support for X-TAXII Custom Headers

Currently, the TAXII server responses do not provide the following headers: X-TAXII-Date-Added-First and X-TAXII-Date-Added-Last.

closed via #56


Existing raindrops do not import on single-page mode

I have a number of raindrops and can add them manually in multi-page mode, but in single-page mode it says sync complete without importing any existing raindrops. If I create a new raindrop and hit sync it will import my new raindrop.

Have you tried setting the sync date to a date a few years ago (before you used Raindrop)? That should ensure everything is synced from your account.

Possible bug: maybe sync date is set in multi-page mode, without syncing anything to Logseq? Need to double-check transition from multi-page to single-page mode.

Ah - missed where it says I can clear the timestamp to reimport everything. I'll test this.

Adjusting the timestamp does work - I just missed the note on it and was expecting it to import all by default on the first import. Ideally, it would leave the field blank or have a toggle for import all vs after this timestamp date.

Yes that makes perfect sense, so I'm going to reopen & update your issue to describe that expected behaviour. You're 100% right :)


How to build the launcher without having the .sln

Hey Allar, I like the stuff you do, but right now I'm not sure how I should build the Lazyploy-Launcher when there's no sln, because I don't see it in Visual Studio then..
Thanks for this, it's awesome :+1:

Well, rebuilding the project files the second time fixes it. Strange :joy:


Unable to use pydantic validators on Relation attributes

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the SQLModel documentation, with the integrated search.
[X] I already searched in Google "How to X in SQLModel" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to SQLModel but to Pydantic.
[X] I already checked if it is not related to SQLModel but to SQLAlchemy.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
from sqlmodel import Field, Relationship, SQLModel

class Address(SQLModel, table=True):
    id: Optional[int] = Field(primary_key=True)
    country: str
    city: str
    street: str
    street_number: int

class Building(SQLModel, table=True):
    id: int = Field(primary_key=True)
    address_id: int = Field(foreign_key=f"{ADDRESSES}.id")
    address: Address = Relationship()
    age: int

    class Config:
        arbitrary_types_allowed = True

    @validator('address', pre=True)
    def validate_address(cls, v):
        return Address.parse_obj(v)

# Importing Building produces the error "pydantic.errors.ConfigError: Validators defined with incorrect fields: validate_address (use check_fields=False if you're inheriting from the model and intended this)"

Description
I want to parse a Building instance from a nested dictionary d with the Building and Address class defined in the example code.
d = {
  'address': {
     'country': 'US',
     'city': 'New York',
     'street': 'Centre St',
     'street_num': 1},
   'age': 40
}

So far I have been unavailable to successfully execute  Building.parse_obj(d). Commenting out the validator in Building solves the pydantic error bein raised but the address of the parsed building will be a dict instead of an Address instance
Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.4
Python Version
3.6.12
Additional Context
No response

Did you ever figure out a solution?


GdxPayException: onServiceDisconnected() received - on Android after pause/resume

Using GdxPay on Android, along the lines of the 'Integration example with resolvers' on the wiki.
Starts up fine, purchases work etc.
Sometimes (and only sometimes) after switching back and forth between my app and something else I get this error. It happens when switching back to my app, so presumably onResume:
com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.pay.android.googleplay.GdxPayException: Failed to bind to service
	at com.mynamespace.mygame$1.handleInstallError(NumPlusGame.java:387)
	at com.badlogic.gdx.pay.android.googleplay.AndroidGooglePlayPurchaseManager$1.disconnected(AndroidGooglePlayPurchaseManager.java:117)
	at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$BillingServiceInitializingServiceConnection.onServiceDisconnected(V3GoogleInAppBillingService.java:387)
	at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1469)
	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1483)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6119)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: com.badlogic.gdx.pay.android.googleplay.GdxPayException: Failed to bind to service
	... 11 more
Caused by: com.badlogic.gdx.pay.android.googleplay.GdxPayException: onServiceDisconnected() received.
	... 10 more

Not sure why this is happening, it only happens sometimes. Should I be doing anything specific with GdxPay when pause/resume is called?

I'm now catching that specific error in  handleInstallError() (by drilling down into getCause() and checking strings) and ignoring it, everything still seems to work fine. I think its something that happens when Android is destroying the Activity, maybe.

Had a question about this, so here is the code I used in handleInstallError() in the end. As far as I can tell, the error "Failed to bind to service" can be ignored on Android, I think it happens during destroy of the app. Other exceptions that end up in handleInstallError() do need to be handled, e.g. by disabling the shop functionality in your app.
@Override
public void handleInstallError (Throwable e) {

          // check for disconnect error on android
          if (e.getMessage().startsWith("Failed to bind to service"))
          {
              if (e.getCause() != null && e.getCause().getMessage().startsWith("onServiceDisconnected() received"))
              {
                  // ignore for now
                  Gdx.app.log("HandleInstallError", "onServiceDisconnected() received");

                  return;
              }
          }
          Gdx.app.log("ERROR", "PurchaseObserver: handleInstallError!: " + e.getMessage());
          Gdx.app.error("ERROR", "PurchaseObserver: handleInstallError!: " + e.getMessage(), e);
          // continue with shop in disabled mode

          startShopDisabled(e.getMessage());

}


Feature flag/add tests validator

Added Unit tests and Integration test for flag/add endpoint.
Issue => closes #564

Looks great. Thanks

All changes done. I think We can merge the PR now.


⚠ Mobitopup has degraded performance

In f8ede9a, Mobitopup (https://napcard.voz.tech) experienced degraded performance:

HTTP code: 200
Response time: 4021 ms

Resolved: Mobitopup performance has improved in e3dcfff.


review[vnv-3.1]: #161

Please review PR #161.

Approved review and agreed. Have ticked off checklist for my name.


Configure a different shortcut for Hot Reload on ChromeOS

Right now, the hot reload shortcut for ChromeOS is "Ctrl + Shift + R", but this is configured by default by the OS/Browser as Reload without cache. We should find a different shortcut.

Note: need to check the shortcut key for windows

We can use "Alt + Shift + R" as it does not have a pre-defined shortcut in Windows and Chrome.

Note: after #1135 - this removed the hot reload shortcut support


artifactGC ignores archived logs when no artifacts are used

Pre-requisites

[X] I have double-checked my configuration
[X] I have tested with the :latest image tag (i.e. quay.io/argoproj/workflow-controller:latest) and can confirm the issue still exists on :latest. If not, I have explained why, in detail, in my description below.
[X] I have searched existing issues and could not find a match for this bug
[ ] I'd like to contribute the fix myself (see contributing guide)

What happened? What did you expect to happen?
I have workflows, which don't use artifacts, but in case of errors, I'd like to have access to the logs (obviously). Also, to be more resources efficient I usually use podGC to delete the pod as soon an possible and I also enabled log archiving, so that I have so logs persisted. So far so good.
The problem is, that once the workflow is automatically deleted (because of the ttl setting), the logs remain in the artifact repository ... forever. Since the log files are technically artifacts (are they not?), because the workflow controller puts them in the artifact repository, I would expect that the artifactGC will clean them up as well, even if there are no other artifacts being used in that workflow. I'd like to add that once I have at least 1 artifact in the workflow, everything (artifacts AND logs) are being cleaned up as expected.
TLDR: workflow without using artifacts + artifactGC enabled + podGC enabled + archiveLogs enabled = lots of orphaned logs in the artifact repository
Version(s)
v3.5.11
Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: archive-logs-no-artifacts
  namespace: test
spec:
  entrypoint: entrypoint
  serviceAccountName: test
  artifactGC:
    serviceAccountName: test
    strategy: OnWorkflowDeletion
    forceFinalizerRemoval: true
  podGC:
    strategy: OnPodCompletion
  archiveLogs: true
  activeDeadlineSeconds: 30
  ttlStrategy:
    secondsAfterSuccess: 60
    secondsAfterFailure: 60
  templates:
    - name: entrypoint
      dag:
        tasks:
          - name: print-text
            template: print-text
            arguments:
              parameters:
                - name: MESSAGE
                  value: I'll be back
    - name: print-text
      inputs:
        parameters:
          - name: MESSAGE
      script:
        image: docker.io/busybox:1.36
        command: [sh]
        source: echo "{{inputs.parameters.MESSAGE}}"

Logs from the workflow controller
time="2024-10-18T09:13:42.666Z" level=info msg="Processing workflow" Phase= ResourceVersion=459784113 namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.682Z" level=info msg="Task-result reconciliation" namespace=test numObjs=0 workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.682Z" level=info msg="Updated phase  -> Running" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.682Z" level=warning msg="Node was nil, will be initialized as type Skipped" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.682Z" level=info msg="was unable to obtain node for , letting display name to be nodeName" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.682Z" level=info msg="DAG node archive-logs-no-artifacts-l8s42 initialized Running" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.682Z" level=warning msg="was unable to obtain the node for archive-logs-no-artifacts-l8s42-772283308, taskName print-text"
time="2024-10-18T09:13:42.682Z" level=warning msg="was unable to obtain the node for archive-logs-no-artifacts-l8s42-772283308, taskName print-text"
time="2024-10-18T09:13:42.682Z" level=info msg="All of node archive-logs-no-artifacts-l8s42.print-text dependencies [] completed" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.682Z" level=warning msg="Node was nil, will be initialized as type Skipped" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.683Z" level=info msg="Pod node archive-logs-no-artifacts-l8s42-772283308 initialized Pending" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.693Z" level=info msg="Created pod: archive-logs-no-artifacts-l8s42.print-text (archive-logs-no-artifacts-l8s42-print-text-772283308)" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.694Z" level=info msg="TaskSet Reconciliation" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.694Z" level=info msg=reconcileAgentPod namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:42.701Z" level=info msg="Workflow update successful" namespace=test phase=Running resourceVersion=459784124 workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.694Z" level=info msg="Processing workflow" Phase=Running ResourceVersion=459784124 namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="Task-result reconciliation" namespace=test numObjs=1 workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="task-result changed" namespace=test nodeID=archive-logs-no-artifacts-l8s42-772283308 workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="node changed" namespace=test new.message= new.phase=Succeeded new.progress=0/1 nodeID=archive-logs-no-artifacts-l8s42-772283308 old.message= old.phase=Pending old.progress=0/1 workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="Outbound nodes of archive-logs-no-artifacts-l8s42 set to [archive-logs-no-artifacts-l8s42-772283308]" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="node archive-logs-no-artifacts-l8s42 phase Running -> Succeeded" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="node archive-logs-no-artifacts-l8s42 finished: 2024-10-18 09:13:48.695517254 +0000 UTC" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="TaskSet Reconciliation" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg=reconcileAgentPod namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="Updated phase Running -> Succeeded" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.695Z" level=info msg="Marking workflow completed" namespace=test workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.703Z" level=info msg="Workflow update successful" namespace=test phase=Succeeded resourceVersion=459784407 workflow=archive-logs-no-artifacts-l8s42
time="2024-10-18T09:13:48.704Z" level=info msg="Queueing Succeeded workflow test/archive-logs-no-artifacts-l8s42 for delete in 1m0s due to TTL"
time="2024-10-18T09:13:53.712Z" level=info msg="cleaning up pod" action=deletePod key=test/archive-logs-no-artifacts-l8s42-print-text-772283308/deletePod
time="2024-10-18T09:14:49.000Z" level=info msg="Deleting garbage collected workflow 'test/archive-logs-no-artifacts-l8s42'"
time="2024-10-18T09:14:49.006Z" level=info msg="Successfully request 'test/archive-logs-no-artifacts-l8s42' to be deleted"

Logs from in your workflow's wait container
No resources found in [...] namespace.

Duplicate of #13421 / #13338


Use LoadingCache in CachingAuthorizer

As done in #1615 for CachingAuthenticator. Since Authorizer::authorize doesn't have a throws clause, I've only handled UncheckedExecutionExceptions.
Result when null is returned by the authorizer will differ from previously, where a NullPointerException would have been thrown by the cache's put method, whereas now a InvalidCacheLoadException will be thrown by the cache itself when the loader returns null. There might be a way to have the same result as previously, let me know if you want me to look into it (but personally I don't think it really matters as most users won't be catching those exceptions anyway, and it might even be clearer as to what happened).
EDIT: Looking at this again, Authorizer::authorize returns a boolean and not a Boolean so null returns shouldn't happen anyway.

Coverage decreased (-0.01%) to 84.949% when pulling 197f12112cfdd9fb03d0ed39d31deae06b6464c1 on FredDeschenes:caching-authorizer-loadingcache into 8dfc67c1b43275c1d5628c9c257b006786d53ff5 on dropwizard:master.

Coverage went down because this line is unreachable but needed for compilation (since Throwables.propagate is now deprecated). Not much I can do I think.

No problem, I was looking at the code for CachedAuthorizer and CachedAuthenticator and noticed the authorizer hadn't been updated.
I've push a new commit with the modification to the unit test.

Coverage decreased (-0.01%) to 84.949% when pulling 9fc9e4f5c59e4d1da4e34108512523a31856a871 on FredDeschenes:caching-authorizer-loadingcache into 8dfc67c1b43275c1d5628c9c257b006786d53ff5 on dropwizard:master.

Thanks for your contribution!


guide: absorb What is DVC? into other existing docs, et al.

Closes #425 (outdated What is DVC? docs cleanup)
Happens to start #899 and #72 (create Best Practices How To doc, and section) — hidden (in /doc/user-guide/how-to/best-practices)
Happens to start #550 (create Basic Concepts section) — in /doc/user-guide/basic-concepts
Hides the G API privacy policy from the navigation to finish https://github.com/iterative/dvc.org/issues/144#issuecomment-584441916 along the way.

The failing CI check is just this new link: https://dvc-landing-guide-what--irwkng.herokuapp.com/doc/user-guide/basic-concepts

Sorry for almost abandoning this, it fell of my radar last week. Addressed most of the feedback now, I think.

@jorgeorpinel to be honest, I lost all the context by now. It would take a while to review it again. We have too many PRs open :( Let's pick one two and focus on them?

"remote" is a DVC term, avoid using it here- focus on the essence
explanation got too complicated - separation, push, etc - all technical DVC-specific terms.
From https://github.com/iterative/dvc.org/pull/1581#commitcomment-41318288

OK. Simplified.

we go too much into implementation details

Maybe "features" is not what we're talking about here exactly then. Definitely not how we use the term in Use Cases (index) and Get Started (index). Maybe "benefits", "mechanisms", "principles" or some other term? Not a big deal though.

Hold on @shcheklein ... Haven't pushed the changes... ⌛

OK ready! Please check (hopefully ready to merge) @shcheklein

OK ready, please check @shcheklein (hopefully ready to merge).


Can't open Ubuntu after dual-booting an asus chromebook

I followed this guide "http://lifehacker.com/how-to-install-linux-on-a-chromebook-and-unlock-its-ful-509039343" and typed sudo startxfce4 to start the desktop and also tried the ctrl alt shift back etc. I also tried start-chroot but just got "Must be run as root" but nothing would happen the response from the startxfce command was
chronos@localhost / $ sudo startxfce4
Entering /mnt/stateful_partition/crouton/chroots/precise...
/usr/bin/startxfce4: Starting X server
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
X.Org X Server 1.13.0
Release Date: 2012-09-05
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.42-54-highbank armv7l Ubuntu
Current Operating System: Linux localhost 3.14.0 #1 SMP Wed Jan 6 21:59:46 PST 2016 armv7l
Kernel command line: cros_secure console= loglevel=7 init=/sbin/init cros_secure oops=panic panic=-1 root=/dev/dm-0 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="1 vroot none ro 1,0 2506752 verity payload=PARTUUID=60656b1e-553c-134a-a573-dab719e5497a/PARTNROFF=1 hashtree=PARTUUID=60656b1e-553c-134a-a573-dab719e5497a/PARTNROFF=1 hashstart=2506752 alg=sha1 root_hexdigest=7ec8aab8d0474c61188a7e77e1ac14f9a5241745 salt=3c289cf34a5047aec2ac59337f59907f12bd1946972fa345d2043c6e95cb554a" noinitrd vt.global_cursor_default=0 kern_guid=60656b1e-553c-134a-a573-dab719e5497a
Build Date: 05 November 2013  03:23:26PM
xorg-server 2:1.13.0-0ubuntu6.5~precise1 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.30.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.crouton.1.log", Time: Mon Jan 18 11:53:44 2016
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
setversion 1.4 failed
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension SECURITY
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
Loading extension GLX
Fatal server error:
no screens found
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/tmp/Xorg.crouton.1.log" for additional information.
(EE)
Server terminated with error (1). Closing log file.
/usr/bin/xinit: giving up
/usr/bin/xinit: unable to connect to X server: No such file or directory
/usr/bin/xinit: server error
Unmounting /mnt/stateful_partition/crouton/chroots/precise...
Do i have to set to root (what does that mean??)
Any help would be much appreciated
Thanks

@jwatson123,
Please let us see the output of this command from your crosh:
sudo edit-chroot -al

You seem to run crouton on ARM architectures, so today you'd better to add xiwi target to launch X11 and an extension of Chrome browser: https://chrome.google.com/webstore/detail/crouton-integration/gcpneefbbnfalgjniomfjknbcgkbijom as well...
Anyway see details in Wiki: https://github.com/dnschneid/crouton/wiki/crouton-in-a-Chromium-OS-window-(xiwi)
Regards.


Materials mined at same speed despite timewarp

Materials mined at same speed whether on 1x or 10000x timewarp

I will change that for the next update


Date field with calendar lookup

Hello
any chance to add date field with calendar lookup component?

Maybe issue #3256 helps you?


Add checkstyle in maven build

Close #2591.
The style check only checks modified files in each pr.

I ran the checkstyle which detected 744 errors, and most of them not easy to fix since it's not simple formatting issue, for example, missing docs, naming abbreviations, etc. The effort to fix them all is quite huge.

Then this PR should not go in like this.  It adds a significant burden to all future PRs, because if some PR needs to touch many files, now the burden you didn't want to perform is forced on an unrelated PR.  Like I said, we do not want any required fixes to be performed "on the fly" via unrelated PRs.  It's mixing purposes and makes those PRs harder to write and harder to read.
Can we turn on only some of the checkstyle rules for this first version and update any errant files accordingly?  We can then turn on more and more checks via foilowup PRs to make the changes manageable.

This PR needs to run checkstyle on the entire eligible codebase and update files accordingly to match the desired style. Otherwise we're going to have a parade of PRs where the change they want to make is relatively small, but the change is dwarfed by the style fixes required to pass CI. This would also help sanity check that the configured style checks are doing what we desire in this PR.

I ran the checkstyle which detected 744 errors, and most of them not easy to fix since it's not simple formatting issue, for example, missing docs, naming abbreviations, etc. The effort to fix them all is quite huge.

Can we try disabling some rules (e.g., docs) initially and fixing those critical ones only within this change?


Incorrect Syntax definition

IF[[1 | 2]];;
directive...

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

ID: 5b9bf854-46ea-9d89-e77e-53323accb9f6
Version Independent ID: b9a04083-6042-a638-1b72-1602a1373051
Content: IF2
Content Source: docs/assembler/masm/if2.md
Product: visual-cpp
Technology: cpp-masm
GitHub Login: @corob-msft
Microsoft Alias: corob

@Player1UK thanks for your feedback! Fix should appear in a day or so.


More session page tweaks

I was using the session details page and found some more simple improvements:
Description

Use tabs instead of stacking content
Display participant data as a JSON block
Display schedules in their own tab with the same formatting as on the participant data page
Update the Tag UI component to remove the 'save' button and close the widget on loss of focus
Slightly friendlier bot icon

User Impact
Better usability of the session page
Demo

Improving User Experience in Session View - Watch Video

Docs
NA

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Additional details and impacted files

:loudspeaker: Thoughts on this report? Let us know!


[AMBARI-23137] Allow users to skip backup steps on Express Upgrades to save time. (swagle)

What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)
Made changes to parameterize upgrade pack and the stack scripts.
How was this patch tested?
Ran python tests

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/953/
Test FAILed.
Test FAILured.


Determine a particular section

Hi,
Can we determine which section we are scrolling??
We have a scenario when we scroll a particular section we want to change background image. Any ideas on how we can achieve it?
Regards,
Nakash Jawahire

Hi! Without any changes to the library, could this be achieved by checking what cells are being shown by implementing - (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath; and keeping track of that?

actually we tried this

(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath;
but are not able to get the desired result...

Right, it requires some logic to get right. Let me think about this for a while and get back to you. It's probably possible to solve this via through key-value observing

Hey again. I couldn't find a clean version with KVO so I added a delegate protocol instead. Please try it out and see if it solves your problem by pointing your podfile to master and running pod install:
pod 'JEKScrollableSectionCollectionViewLayout, :git => 'https://github.com/accatyyc/JEKScrollableSectionCollectionViewLayout.git', :branch => 'master'

Then, in your view controller, instead of conforming to UICollectionViewDelegateFlowLayout, just replace that with JEKCollectionViewDelegateScrollableSectionLayout, and implement:
- (void)collectionView:(UICollectionView *)collectionView layout:(JEKScrollableSectionCollectionViewLayout *)layout sectionWillBeginDragging:(NSUInteger)section {
    // handle background change
}

Let me know if that solves your problem!

Hi,
I did solved my problem but by using
func collectionView(_ collectionView: UICollectionView!, layout: JEKScrollableSectionCollectionViewLayout!, section: UInt, didScrollToOffset horizontalOffset: CGFloat)
not
- (void)collectionView:(UICollectionView *)collectionView layout:(JEKScrollableSectionCollectionViewLayout *)layout sectionWillBeginDragging:(NSUInteger)section {     // handle background change }
and I think you should add these delegates in readme too.

Yep, will add some docs together with the next release. Thanks for testing it


Helm Chart Signature Verification

We would be interested in verifing the signature on a helm chart with a given key ring, so we can verify, that only trusted charts will be installed on our cluster (Helm client does it like that: https://helm.sh/docs/helm/helm_verify/). Do you think that feature would make sense?
I guess implementation wise it would look similar to the git signature verification (reference configmap with gpg keys and enable verify).

Yes, this is a welcome feature to be added that simply not got priority until now. What should be done, is that we also download the provenance file while getting the packaged chart.

Cosign based signature verification would be interesting for me.
Something similar to https://github.com/sigstore/policy-controller just for Helm charts.

cosign support for helm charts is already implemented. See https://fluxcd.io/flux/cheatsheets/oci-artifacts/#verify-helm-charts


Flow-text support for headers

The changes here adapt the flow-text code to include support for header text. This enables headers to scale with screen size, and prevent large headers from looking oversized in proportion to the related page text.
The changes proposed will adjust the headers whether the .flow-text class is added to the header or the header is nested within a .flow-text div.

I copied the proposed changes into a Code Pen to demonstrate the effects.
http://codepen.io/ScienceDuck/pen/XjVZPg


7 add pytest fixture to extract logs of normalize for testing

[x] Add logstash as dev dependency needed to use the nomad logger object
[x] Add fixtures (capture log and clean up)
[x] Adjust schema method to work with ClientContext when testing without a server
[x] Add todo for adding tests for generated jupyter notebook
[x] Merge the required changes to ClientContext in gitlab nomad-FAIR https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR/-/merge_requests/1711

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

21 of 26 (80.77%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-15.6%) to 84.375%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

tests/conftest.py
20
25
80.0%

Totals

Change from base Build<PHONE_NUMBER>:
-15.6%

Covered Lines:
27

Relevant Lines:
32

💛  - Coveralls

@JosePizarro3 I made some changes as we discussed during the review. Please go through them (quick glance should do) and re-approve the PR.


DepthImage flickering

reported in rerun
https://github.com/rerun-io/rerun/issues/7252

To avoid DepthImage flickering, feel free to switch back to rerun 0.17 by
cargo install<EMAIL_ADDRESS>
and change the rerun version to 0.17 in Cargo.toml

why not to use something like https://github.com/watchexec/cargo-watch ?

why not to use something like https://github.com/watchexec/cargo-watch ?

It is a bug in my codebase, it is related to depth image color mapping range in rerun.
Thank you for bring cargo-watch to my attention, I will look into it!

fixed temporarily by using my own color map, using rerun::Image instead of rerun::DepthImage


Add missing hack for /etc/hosts manipulation for private WCs

This hack was removed while consuming KubeadmControlPlane from the shared chart.

/run cluster-test-suites

/run cluster-test-suites

/run cluster-test-suites


Is there any plan to support newer models running Android 11?

Hi,
Two questions really.

Is there any plan to keep building upon this package? I'd be happy to help if I can.
Do you know if there is capability to capture the actual image taken from the barcode engine? All newer Honeywell scan engines are image-based, so it'd be cool if we could capture the image along with the decoded data.

Thank you!

Hi
0- For supporting newer models , you just have to update the DataCollection.aar deependency, check Issue 8
1- Yes, you're welcome
2- Not sure, you have to check the official honeywell sdk documentation and see if this is available somehow, then it could be included in the plugin...
General note... most of the features are available by setting the right properties, setting properties is already full supported as it is a simple Map you send to the PDA device, on the other hand, if something new is supported from the latest DataCollection.aar that allows you to retrieve something else or something different when scanning, then an update will be required to the plugin so it adds supports for retrieving whatever is new.


Metamask

Hi, we consider vague issues with no content to be spam. Please don't spam our repositories.


descending shorthand

Fixes #1458. This adds -name shorthand to the mark sort option, applying to both imputed ordinal scale domains and the basic sort transform.
There are still two more places where we could support -name shorthand: the stack transform’s order option, and the bin and group transform’s sort option. I guess I would like to support these, too, but it felt a bit burdensome to make more changes, so I’m hoping this can stand on its own.

It's very nice to use. I hope we can make the extra mile that will make it work everywhere there is sorting/ordering (tentatively #1606).

This should wait for #1607 (at the very least for better testing, but also because that PR clarifies the desired behavior).

Okay, I have merged with #1607, and also made the behavior more conservative: now the -channel shorthand only changes the default order option; it doesn’t attempt to invert the meaning of the given order if one is specified explicitly. I think this is easier to understand and simplifies the implementation slightly since we don’t need the reverseOrder wrapper.
It should be possible to extend this to the stack, group, and bin transforms. For the group and bin transforms, we’ll need some plumbing to change the ascendingDefined here to a dynamic comparator (descendingDefined or something custom):
https://github.com/observablehq/plot/blob/5c5acb7b6f92572c812ba1387441b179f774cbc1/src/transforms/group.js#L296-L305
Similarly for the stack transform we’ll need plumbing to override the ascendingDefined here:
https://github.com/observablehq/plot/blob/5c5acb7b6f92572c812ba1387441b179f774cbc1/src/transforms/stack.js#L334-L338
I feel this work is distracting from the release of 0.6.7 and tooltips, so I would ask that we do not work on extending this PR to stack, group, and bin transform today. I would like to get back to writing the documentation for 0.6.7 and determining if there is any additional blocking functionality (such as custom formats for crosshairs #1597).


 AND

In the host, you can 《use std:: sync:: atomic:: AtomicU64》; And 《use std:: sync:: atomic:: AtomicI64》;. In a guest, only 《std:: sync:: atomic:: AtomicU8》 can be used; And 《use std:: sync:: atomic:: AtomicI8》;    Does this mean that zkvm only supports 《-2 ^ 7 to 2 ^ 7-1》, and does not support 《-2 ^ 63 to 2 ^ 63-1》?

the zkVM implements riscv32im so each register can hold 32 bits. https://github.com/riscv/riscv-isa-manual/releases/download/Ratified-IMAFDQC/riscv-spec-20191213.pdf
Atomics imply that the architecture may do some sort of preemption. However, our circuit doesn't support preemption and the code is executed only on a single thread of execution. This means that all instructions are atomic in that they cannot be interrupted. Hope that helps! Let me know if you have other questions

closing, as there's nothing here to fix


MQTT values for active_route_* are not clearing

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
The active route MQTT values are not resetting after arriving to destination. I navigated to the store - it showed the values correctly. But then when I drove home without navigation - the values remained from the store.
Expected Behavior
It should clear out your values once you're parked.
Steps To Reproduce
No response
Relevant log output
None

Screenshots
No response
Additional data
No response
Type of installation
Docker
Version
1.28.4

This no doubt is because we don't publish nil values:
https://github.com/teslamate-org/teslamate/blob/master/lib/teslamate/mqtt/pubsub/vehicle_subscriber.ex#L56-L57
This easy solution would be to add this values to the @always_published.
But am uneasy doing this, because publishing a nil values tells mqtt to drop the value from the retain database. Which is probably undesirable for this data. i.e. when you subscribe you would get an instant message if there is an active route, but if there is no route you would not receive a message to say so until the value changes.

But then when I drove home without navigation

This is expected behavior as no new values got propagated if no new navigation starts.

@JakobLichterfeld While looking at this from a Home Assistant perspective, I was hoping to use that field active_route_destination to help set off some things at home.. But if that field doesnt get reset to blank or null and the car is not actively navigating anywhere, then the data for it is not useful.  The "active" prefix is not accurate then

Active navigation is directly propagated from the Tesla API. changing the original behavior within Teslamate would be bad practice as it would change the meaning and would break interoperability and interchangeably.

I think there might be a misunderstanding here. The Tesla API (most likely) does the right thing.
The problem is we are getting nil values from Tesla, which we then interpret as "unknown". We then refuse to publish these to mqtt because - why would we want to publish unknown data? But here nil doesn't mean unknown, it means there is no active route.
At least that is my general feeling. Would be good to have some evidence to back this up. If I am right, the quick fix solution is to add all of those attributes to @always_published as I mentioned above.
If I remember, will try to get the dump of the data from Tesla with and without navigation active. (something I have been wanting to do for a while actually).

The values when the car is not driving and with no route set:
        "drive_state": Object {
            "active_route_latitude": Number(lat2),
            "active_route_longitude": Number(lon2),
            "active_route_traffic_minutes_delay": Number(0.0),
            "gps_as_of": Number(1711399845),
            "heading": Number(200),
            "latitude": Number(lat),
            "longitude": Number(lon),
            "native_latitude": Number(lat),
            "native_location_supported": Number(1),
            "native_longitude": Number(lon),
            "native_type": String("wgs"),
            "power": Number(0),
            "shift_state": Null,
            "speed": Null,
            "timestamp": Number(1711399846493),
        },

I replaced the lat/long values as I don't want to publish the location of my house. But I note that the active route lat/lon is different to the other two values, my guess is that might be the last place we navigated to. Will continue.

My testing seems to show that the car always provides these attributes, even when not navigating:

active_route_latitude
active_route_longitude
active_route_traffic_minutes_delay

When not navigating, these have values from the last navigation. Wonder if this is a Tesla bug. Doesn't matter though, we have to deal with it. And we have no ability to report this to Tesla either.
This is 2016 Model S upgraded to MCU2.
My suspicion is if I reboot the MCU these values might disappear (not tested).
When navigating, we get additional values. These values only appear when the car is navigating, they don't appear (not even as nil values) when car is not navigating.

active_route_destination
active_route_energy_at_arrival
active_route_miles_to_arrival
active_route_minutes_to_arrival

While not strictly related to this issue, the question occurred previously concerning vehicle_state.media_info.a2dp_source_name. It looks like that value is currently set to a Mobile phone even though the car is not connected via bluetooth. So No, you can't use this field to detect if the driver is nearby.
Getting back to this issue, we can't clear the top 3 values, because these values are showing up in the API. But maybe something can be done about the other values.

Getting back to this issue, we can't clear the top 3 values, because these values are showing up in the API.

Even if I wish it was not, my assumption about how the Tesla API handles this was correct.

Would it make sense to also publish out the values for the other
active_route_*** to MQTT so that I can at least use values?  Or would those
be something that will not be reported cleanly ?
On Wed, Mar 27, 2024 at 1:51 AM JakobLichterfeld @.***>
wrote:

Getting back to this issue, we can't clear the top 3 values, because these
values are showing up in the API.
Even if I wish it was not, my assumption about how the Tesla API handles
this was correct.
—
Reply to this email directly, view it on GitHub
https://github.com/teslamate-org/teslamate/issues/3748#issuecomment-2022075183,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGNXO5CREAIBBCGLAZJSXZLY2JM4VAVCNFSM6AAAAABE6IDCNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRSGA3TKMJYGM
.
You are receiving this because you authored the thread.Message ID:
@.***>

See my PR, #3789.

Great - thanks for looking into it.


Back button does not work

We should make use of the history API to make the back button return a user to a previous selection state, rather than exiting the app

Ian - can we add this as a user story to the new design and close this off?

user story created and passed to the BA


[FLINK-4496] Refactor the TimeServiceProvider to take a Trigerable in…

This is a first step towards https://issues.apache.org/jira/browse/FLINK-4329
R: @aljoscha @rmetzger

I had comments about introducing an interface for the asynchronous excepts, other than that and @rmetzger's comment this looks good. I like the addition of the TimeProviderTest. 👍

R: @mxm @aljoscha @rmetzger
This is ready for review.
Thanks a lot for the comments.

+1 Looks like a sensible change. Looking forward to fixing the ContinuousFileReaderOperator.

Thanks @mxm and @aljoscha !
I already have the followup on this open here:
https://github.com/apache/flink/pull/2532


Could not find the file

app/modules/fengyunbang/styles/styles.scss15:19
LFUTF-8SCSSdev+1, -1
Error
/work/work/aipai-react-native/app/modules/fengyunbang/styles/styles.scss Could not find the file

The problem has been resolved. Download dependencies was blocked. Access https://github.com/sass/node-sass/releases. Download darwin-x64-47 binding.node file the rename as binding.node. /.atom/packages/atom-react-native-css/node_modules/node-sass/vendor/darwin-x64-47/ Placed under the directory.


Configurable metrics endpoints

I am trying to get docker-zipkin to work with some custom parameters related to metrics. Aka map /metrics to dump prometheus metrics and /springmetrics to dump normal metrics
i was hoping that adding " -Dendpoints.prometheus.id=metrics -Dendpoints.metrics.id=springmetrics" to JAVA_OPTS env vars would work, but no dice.  Any advice on how to handle this?

this probably should be on normal zipkin repo, better yet gitter
https://gitter.im/openzipkin/zipkin
but I think what you are looking for might have changed anyway.. zipkin is
now spring boot 2, so under the covers most things are under /actuator. we
re-mapped the endpoints that we explicitly documented also so that health
checks wouldn't break during the upgrade


Router /v1/chat/completions not compatible with openai spec

System Info
CUDA: 12.1
Python 3.10
Rust: 1.75.0
Information

[ ] Docker
[X] The CLI directly

Tasks

[ ] An officially supported command
[X] My own modifications

Reproduction

Run launcher in docker and mount sock to host with below cli
docker run --gpus all --shm-size 1g -v /tmp:/tmp -v /root/Project/text-generation-inference/ink-tgi/models:/data ghcr.io/huggingface/text-generation-inference:1.4 --model-id TinyLlama/TinyLlama-1.1B-Chat-v1.0
get model tokenizer_config.json and change chattemplate as below:
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n'}}{% if message['tool_calls'] %} {{''}} {% else %} {{message['content'] + eos_token}} {% endif %}\n{% elif message['role'] == 'tool' %}\n{{ '<|tool|>\n'  +message['name'] + '\n'+ message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
Run router in host with

cd router
cargo run -- --tokenizer-config-path /root/Project/text-generation-inference/ink-tgi/router/tokenizer_config.json

call function call curl as example of openai interface

curl --location 'http://localhost:3000/v1/chat/completions' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "messages": [
        {
            "role": "user",
            "content": "What'\''s the weather like in San Francisco, Tokyo, and Paris?"
        },
        {
            "role": "assistant",
            "tool_calls": [
                {
                    "id": "0",
                    "function": {
                        "arguments": {
                            "location": "San Francisco, CA",
                            "unit": "celsius"
                        },
                        "name": "get_current_weather",
                        "description": "null"
                    },
                    "type": "function"
                }
            ]
        },
        {
            "tool_call_id": "0",
            "role": "tool",
            "name": "get_current_weather",
            "content": "{\"location\": \"San Francisco\", \"temperature\": \"72\", \"unit\": \"fahrenheit\"}"
        }
    ],
    "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
    "stop": [],
    "max_tokens": 500,
    "temperature": 0.5
}'

There would be 2 error found:

struct Message in lib.rs doesn't have attribute tool_calls as Openai Spec

struct ToolCall in lib.rs have id as u32 which must be String according to Openai Spec

Expected behavior
Router must serve interface that support function calling implementation of lang chain or other LLM application frameworks.
You can test it with below python code
import openai
import json

client = openai.OpenAI(
    api_key = "", # can be anything
    base_url = "http://localhost:3000/v1" # NOTE: Replace with IP address and port of your llama-cpp-python server
)

# Example dummy function hard coded to return the same weather
# In production, this could be your backend API or an external API
def get_current_weather(location, unit="fahrenheit"):
    """Get the current weather in a given location"""
    if "tokyo" in location.lower():
        return json.dumps({"location": "Tokyo", "temperature": "10", "unit": "celsius"})
    elif "san francisco" in location.lower():
        return json.dumps({"location": "San Francisco", "temperature": "72", "unit": "fahrenheit"})
    elif "paris" in location.lower():
        return json.dumps({"location": "Paris", "temperature": "22", "unit": "celsius"})
    else:
        return json.dumps({"location": location, "temperature": "unknown"})

def run_conversation():
    # Step 1: send the conversation and available functions to the model
    messages = [{"role": "user", "content": "What's the weather like in San Francisco, Tokyo, and Paris?"}]
    tools = [
        {
            "type": "function",
            "function": {
                "name": "get_current_weather",
                "description": "Get the current weather in a given location",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "location": {
                            "type": "string",
                            "description": "The city and state, e.g. San Francisco, CA",
                        },
                        "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
                    },
                    "required": ["location"],
                },
            },
        }
    ]
    response = client.chat.completions.create(
        model="gpt-3.5-turbo-1106",
        messages=messages,
        tools=tools,
        tool_choice="auto",  # auto is default, but we'll be explicit
    )
    response_message = response.choices[0].message
    tool_calls = response_message.tool_calls
    # Step 2: check if the model wanted to call a function
    if tool_calls:
        # Step 3: call the function
        # Note: the JSON response may not always be valid; be sure to handle errors
        available_functions = {
            "get_current_weather": get_current_weather,
        }  # only one function in this example, but you can have multiple
        messages.append(response_message)  # extend conversation with assistant's reply
        # Step 4: send the info for each function call and function response to the model
        for tool_call in tool_calls:
            function_name = tool_call.function.name
            function_to_call = available_functions[function_name]
            function_args = tool_call.function.arguments
            function_response = function_to_call(
                location=function_args.get("location"),
                unit=function_args.get("unit"),
            )
            messages.append(
                {
                    "tool_call_id": tool_call.id,
                    "role": "tool",
                    "name": function_name,
                    "content": function_response,
                }
            )  # extend conversation with function response
        second_response = client.chat.completions.create(
            model="gpt-3.5-turbo-1106",
            messages=messages,
        )  # get a new response from the model where it can see the function response
        return second_response
print(run_conversation())```

i created a PR at https://github.com/huggingface/text-generation-inference/pull/1888


[11.x] Route redirect with query string

This PR changes the Illuminate/Routing/Router@redirect method to maintain the query parameters from the source url in the target url. I think it is intuitive to expect the query parameters to be kept in a redirect. Without this, the user would need to use a closure or controller and add the query parameters to the redirect.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


⚠ ClamAV has degraded performance

In e59a30b, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 181 ms

Resolved: ClamAV performance has improved in 5080b16.


Shift select is not working correctly in some cases

What is the problem?

Two cases when this is not working properly

if you shift select multiple items, and then you want to select few more with shift - the whole selection shifts one item forward
if you shift select multiple items, and then you ctrl select one item - and shift select again, the whole selection resets

Please provide the steps to reproduce and create a CodeSandbox.
https://codesandbox.io/s/viselect-vanilla-forked-mq57dz?file=/src/main.ts

I cannot reproduce neither of them, is this still an issue? If so what browser / os are you using?

Sorry, this issue had to be fixed already in some version. I've posted wrong codesandbox, it was happening on the demo where there is currently beta.7 https://codesandbox.io/s/viselectvanilla-kt332?file=/src/main.ts
You should update the demos with new versions on the README.md though

Gotchy, thanks! Will do that :)


Add array![] macro for creating a 1, 2, or 3-dimensional array

Co-authored-by: Pireax<EMAIL_ADDRESS>@pireax

Created a working version. I'm leaning towards this macro name — "array" matches the name of the type Array.

Replaced by #256 and #268


Standalone URI project with no external dependencies

Lots of moving things around, but it works and it doesn't have any external dependencies. Otherwise, it does almost everything that it did before.
Eventually, I want to put this back into cpp-netlib.

I'm just back, and have realised that this is still open.
I'd like to continue to make changes (including interface changes) in the next few days and weeks. Then merge that into cpp-netlib, eventually.

Okay, I think this is officially Too Big To Fail :wink: that I'm willing to merge it in. I'm not sure about the copied in boost sources (I presume there were bcp'ed in?) but it should be fine if we're hiding the symbols anyway.

LGTM


[$250] Dupe detect - App crashes when leaving Review duplicates page after viewing other expense

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.43-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Issue reported by: Applause - Internal Team
Action Performed:

Launch New Expensify app
Go to workspace chat
Submit two same expenses
Go to transaction thread of any expenses
Tap Review duplicates
Tap on the second expense preview
Swipe right to go back
Swipe right again

Expected Result:
App will not crash
Actual Result:
App crashes when leaving Review duplicates page after viewing one of the duplicates
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[ ] Android: mWeb Chrome
[x] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/user-attachments/assets/65590ba3-0ebb-4c30-a3b1-9e828816a362
logs (2).txt
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~021841675705747272356
Upwork Job ID:<PHONE_NUMBER>747272356
Last Price Increase: 2024-10-03

Issue OwnerCurrent Issue Owner: @jjcoffee

@RachCHopkins  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

We think that this bug might be related to #wave-control

I don't have this button in the TestFlight iOS app which is 41-2. I will just have to assume it's reproducible since we have a proposal already!

@Nodebrute Thanks for the proposal! I'm wondering why beforeRemoveReportOpenedFromSearchRHP is running at all here, since we don't have the search RHP open in this case.

In the case of error we fell in to loop of goBack and beforeRemove

I'm also not sure I understand this. What error are we talking about that's causing the loop?

@Nodebrute Thanks for clarifying! My only concern is how much we can rely on state.routes.at(-3)?.name === SCREENS.SEARCH.CENTRAL_PANE, i.e. is it guaranteed that it will always be at that position?

@Nodebrute's proposal looks good, indeed, assigning

Hey @jjcoffee, I've checked this proposal and it's fine :) shouldPopHome should verify if RHP is opened from SearchPage

Payment Summary:

Contributor: @Nodebrute to be paid $250 via Upwork
Contributor+: @jjcoffee to be paid $250 via Upwork

Upwork job here
@jjcoffee can you do the checklist above, please?

Contributors have been paid, the contracts have been completed, and the Upwork post has been closed.

The PR that introduced the bug has been identified. Link to the PR: https://github.com/Expensify/App/pull/48990
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/48990/files#r1802620716
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
Determine if we should create a regression test for this bug. Yes
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal
Mobile-only.

Go to any workspace chat
Submit two identical expenses
Go to the transaction thread of one of the expenses
Tap Review duplicates
Tap on the second expense preview
Swipe right to go back
Swipe right again

Do we agree 👍 or 👎

Thanks @jjcoffee, regression test requested! Closing.


Hello, could you please tell me how to run this code?

I run this code with "python attack_iter.py", and get the following error:
Caused by op 'save/RestoreV2', defined at:
File "attack_iter.py", line 233, in
tf.app.run()
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "attack_iter.py", line 213, in main
s1 = tf.train.Saver(slim.get_model_variables(scope='InceptionV3'))
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1284, in init
self.build()
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1296, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1333, in _build
build_save=build_save, build_restore=build_restore)
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 781, in _build_internal
restore_sequentially, reshape)
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 400, in _AddRestoreOps
restore_sequentially)
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 832, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1463, in restore_v2
shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3414, in create_op
op_def=op_def)
File "/home/dl/lijiawei/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1740, in init
self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access
NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
[[Node: save/RestoreV2/_301 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_306_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
Could you please tell me how to run this code?
Thank you very much!

I've updated the readme about how to run the code.

I've updated the readme about how to run the code.

Maybe I have to use python2.7? Can I run in python3.6?
I run this code with the command "bash run_attack.sh input_dir output_dir".
But there is still a mistake:
Traceback (most recent call last):
File "attack_iter.py", line 233, in
tf.app.run()
File "/home/jinping/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 119, in run
argv = flags.FLAGS(_sys.argv if argv is None else argv, known_only=True)
File "/home/jinping/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/platform/flags.py", line 112, in call
return self.dict['__wrapped'].call(*args, **kwargs)
File "/home/jinping/anaconda3/envs/py27/lib/python2.7/site-packages/absl/flags/_flagvalues.py", line 626, in call
unknown_flags, unparsed_args = self._parse_args(args, known_only)
File "/home/jinping/anaconda3/envs/py27/lib/python2.7/site-packages/absl/flags/_flagvalues.py", line 774, in _parse_args
flag.parse(value)
File "/home/jinping/anaconda3/envs/py27/lib/python2.7/site-packages/absl/flags/_flag.py", line 166, in parse
self.value = self._parse(argument)
File "/home/jinping/anaconda3/envs/py27/lib/python2.7/site-packages/absl/flags/_flag.py", line 184, in _parse
'flag --%s=%s: %s' % (self.name, argument, e))
absl.flags._exceptions.IllegalFlagValueError: flag --max_epsilon=: could not convert string to float:
In addition, my file structure is as follows:

The structure is correct. But the size of the models should be larger than 100M. I did not try python 3. From the log, it seems that the error comes from the type of epsilon. You may convert the type and fix the errors.

The structure is correct. But the size of the models should be larger than 100M. I did not try python 3. From the log, it seems that the error comes from the type of epsilon. You may convert the type and fix the errors.

Ok, but this new error is what I encountered on python2. I haven't done it in python3 either.

Oh, sorry. I forgot to specify the epsilon in the command. Now I update the running command.

Oh, sorry. I forgot to specify the epsilon in the command. Now I update the running command.

Thank you, I will try it.

Oh, sorry. I forgot to specify the epsilon in the command. Now I update the running command.

Is there a problem with the download link you gave to the models?
Each model file I downloaded was only 3kb in size. And reporting an error about the .ckpt file while running the program.

Maybe you can download them at the official link https://github.com/tensorflow/models/tree/master/research/slim.

Maybe you can download them at the official link https://github.com/tensorflow/models/tree/master/research/slim.

I try it in python3.6, and get the error：
Traceback (most recent call last):
File "attack_iter.py", line 233, in
tf.app.run()
File "/home/jinping/.local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 12                                                      5, in run
_sys.exit(main(argv))
File "attack_iter.py", line 225, in main
for filenames, images in load_images(FLAGS.input_dir, batch_shape):
File "attack_iter.py", line 87, in load_images
image = imread(f, mode='RGB').astype(np.float) / 255.0
File "/home/jinping/.local/lib/python3.6/site-packages/numpy/lib/utils.py", line 101, in newfunc
return func(*args, **kwds)
File "/home/jinping/anaconda3/lib/python3.6/site-packages/scipy/misc/pilutil.py", line 164, in imr                                                      ead
im = Image.open(name)
File "/home/jinping/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 2552, in open
prefix = fp.read(16)
File "/home/jinping/.local/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line                                                       132, in read
pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
File "/home/jinping/.local/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line                                                       100, in _prepare_value
return compat.as_str_any(val)
File "/home/jinping/.local/lib/python3.6/site-packages/tensorflow/python/util/compat.py", line 107                                                      , in as_str_any
return as_str(value)
File "/home/jinping/.local/lib/python3.6/site-packages/tensorflow/python/util/compat.py", line 80,                                                       in as_text
return bytes_or_text.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
So I change to use python2.7, solve it.
But there is a new problem:
Traceback (most recent call last):
File "attack_iter.py", line 233, in
tf.app.run()
File "/home/jinping/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "attack_iter.py", line 225, in main
for filenames, images in load_images(FLAGS.input_dir, batch_shape):
File "attack_iter.py", line 89, in load_images
images[idx, :, :, :] = image * 2.0 - 1.0
ValueError: could not broadcast input array from shape (600,800,3) into shape (299,299,3)
Maybe the input image must be (299,299,3)?
Is there no uniform processing of input data in your code?

Maybe you can download them at the official link https://github.com/tensorflow/models/tree/master/research/slim.

I did use the official .ckpt files. It's ok.

Yes, the image size should be (299,299,3). We'll provide a pre-processing procedure later.

Yes, the image size should be (299,299,3). We'll provide a pre-processing procedure later.

Thanks a lot!

Yes, the image size should be (299,299,3). We'll provide a pre-processing procedure later.

Perhaps you have provided a unified pre-processing procedure？

Done

I use py27 and tf1.12 but I still get the error
2019-07-24 15:02:14.354548: E tensorflow/stream_executor/cuda/cuda_driver.cc:936] failed to allocate 77.06M (80805888 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
INFO:tensorflow:Restoring parameters from inception_v3.ckpt
2019-07-24 15:02:16.977459: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open ./inception_v3.ckpt: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
2019-07-24 15:02:16.978749: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open ./inception_v3.ckpt: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
2019-07-24 15:02:16.978854: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at save_restore_tensor.cc:170 : Data loss: Unable to open table file ./inception_v3.ckpt: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
Traceback (most recent call last):
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ./inception_v3.ckpt: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "attack_iter.py", line 285, in <module>
    tf.app.run()
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
    _sys.exit(main(argv))
  File "attack_iter.py", line 271, in main
    s1.restore(sess, FLAGS.checkpoint_path_inception_v3)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1802, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ./inception_v3.ckpt: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

Caused by op 'save/RestoreV2', defined at:
  File "attack_iter.py", line 285, in <module>
    tf.app.run()
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
    _sys.exit(main(argv))
  File "attack_iter.py", line 263, in main
    s1 = tf.train.Saver(slim.get_model_variables(scope='InceptionV3'))
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1338, in __init__
    self.build()
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1347, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1384, in _build
    build_save=build_save, build_restore=build_restore)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 835, in _build_internal
    restore_sequentially, reshape)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 472, in _AddRestoreOps
    restore_sequentially)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 886, in bulk_restore
    return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1463, in restore_v2
    shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
    op_def=op_def)
  File "/home/zhangqilong/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1718, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

DataLossError (see above for traceback): Unable to open table file ./inception_v3.ckpt: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

and My struct is below