M0-1-9:  constexpr used in array size is detected as dead code

Affected rules

M0-1-9 (dead code)

Description
Integer constant expression used for the size in an array declaration produces dead-code false positive. In other words, the e.g. constexpr int is not dead code because it is used to define the array size. This is contrast with when the size is (static) const, which does not produce the alert.
Example
int main() {
    constexpr int constexpr_unused = 1;   // True Positives, these first three are indeed unused / dead code
    static const int static_const_unused = 2;
    int unused_variable = 3;

    constexpr int constexpr_size       = 7;  // dead code detection  <-- False Positive, it is used in array a

    static const int static_const_size = 8;  // True Negative,
                                             // (static) const doesn't trigger dead code

    int a[constexpr_size]    = {};  // The remaining have no dead code issue either
    int c[static_const_size] = {};  // they are used at the end

    return a[0] + c[2];
}

Fix Strategy Proposal
Add an additional case to the predicate isDeadStmt in DeadCode.qll. The approach in #660 can be reused to determine if the constant expression is used in an array size.
There could be value avoiding a bit of code duplication so that the M0-1-3 fix from that PR and this proposed fix for M0-1-9 share a predicate that returns the count.
As I am still learning CodeQL and writing my first queries, I have already been playing with the fix in c765f9375 and unit-testing it. I tried first using the pure / maybePure builtin predicates, but I didn’t manage to separate the constexpr and const cases only with them.

I think your fix sounds reasonable 👍

Thank you 😊 I have applied it in #690.


stream resets when disconnecting Bluetooth device

Disconnecting my Bluetooth buds causes the stream to reset. Stream just shows black screen and you lose the position.
I would expect that it just gets paused.

I cannot reproduce this issue on Android 13. Which device, Android version and version of Zapp are you using?

Yes, that would be helpful.

Turning them off.

reproduced and filtered by keyword "zapp". Is this enough?
logcat_11-05-2022_13-55-21.txt

The MediaSession receives a KEYCODE_MEDIA_STOP event, which may cause the stream to completely stop. This is tricky - I have to look into it. But I suspect the headphones to be the main problem here.


[QUESTION] OIDC User and Group Admin differentiation

Question
Is there a way to differentiate admins and users when using OIDC? Is it possible to assign a configuration of type: admin to an OIDC user or group? Not sure if that is implemented or not. Thank you.
@twsouthwick
Category
Authentication
Please tick the boxes

[X] You are using a supported version of Dashy (check the first two digits of the version number)
[X] You've checked that this question hasn't already been raised
[X] You've checked the docs and troubleshooting guide
[X] You agree to the code of conduct

Is there a way to get DEBUG logs to dump to the container logs? I'm trying to dump exactly what is being consumed by Dashy when an OIDC account logs in. Maybe I can try assigning a type to what Dashy sees the email, username, etc as a type: admin. Might work..

For me it always worked to intercept the URL from auth-server right before logging in into dashy, then you can decode this with I think https://jwt.io/ and you will see which data gets provided to dashy

I looked at the code and the default scope is: openid profile email roles groups. So the data is definitely there.
https://github.com/Lissy93/dashy/blob/master/src/utils/OidcAuth.js#L23


update README for revised docker compose instructions to reflect new docker container location

per #10 - v0.1.0 published
https://github.com/snicker/juicepassproxy/releases/tag/v0.1.0
@Snuffy2

I can then test to ensure it works and will then make another PR to update the Readme with revised Docker Compose instructions.

all yours!

@Snuffy2  - this is failing, likely because I do not have a token defined in the secrets of the repository

Error: buildx failed with: ERROR: failed to solve: failed to push ghcr.io/snicker/juicepassproxy:0.1.0: unexpected status from POST request to https://ghcr.io/v2/snicker/juicepassproxy/blobs/uploads/: 403 Forbidden

I tried setting up a fine grained access token for deployments, but I must be doing something wrong since GH will not allow me to include a personal access token in the repo secrets.
If you can give me some instructions on setting this part up I can implement this weekend.

Hopefully, we can fix it easily with the Repo permissions.
Go into the Repo, Settings, Actions, General.
Change the settings per below:

Then try to rerun the Action.
Go into the Repo, Actions, Click the v0.1.0 run. Then click Re-run jobs and cross your fingers.

Excellent- all working now! https://github.com/snicker/juicepassproxy/pkgs/container/juicepassproxy


Change trivor-subtitles to point to JHipster Registry

Also, change the project name to just subtitles.

Closed by #189


Update curl submodule

Closes #210

https://github.com/alexcrichton/curl/commit/fd779f3fcf5c7d6cd30e18f30359cd300cc78939 haven't added src/tool_hugehelp.c, was it generated by the build script?


Fix asan test failed

What problem does this PR solve?
Issue Number: close #6841
Problem Summary: There are some asan failure after running unit tests which was introduced by https://github.com/pingcap/tiflash/pull/6717. This is caused by unsuccessfully cleaning some objects after running unit tests.
What is changed and how it works?
Do some clean work after running unit test.
Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/run-all-tests

Should we make sure UniversalPageStorageService is shutdown when tiflash server is down?

Should we make sure UniversalPageStorageService is shutdown when tiflash server is down?

It is done in ContextShared::shutdown().

/run-sanitizer-test asan

/merge

/run-integration-test


New comment.

Dear human,
Here's a new entry for your approval. :tada:
Merge the pull request to accept it, or close it to send it away.
:heart: Your friend Staticman :muscle:

Field
Content

message
You are so awesome! I don't think I've read through anything

like that before. So great to discover somebody with a few unique thoughts on this subject.

Really.. thank you for starting this up. This web site is one

thing that is required on the web, someone with a little originality!

name
Nadine

email
04aa3bb04b1c81d6528ccb8b51f293d4

url
http://helpwritingapaper.com/write-my-essay/

hidden

date
2017-04-21T05:27:06.017Z

This is obviously a spam comment.


Add correct AllocatorAwareContainer semantics to move-assignment,copy-assignment,and copy-constructor.

The previous implementation of std::hive here did not follow the correct semantics for the AllocatorAwareContainer concept.
In particular, there is a sequence of operations which depend on the allocator traits (as defined here in 'influence on containers) https://en.cppreference.com/w/cpp/named_req/Allocator
Move assignment operators and copy assignment operators of AllocatorAwareContainer are required to behave in a way consistent with those specifications in the traits.
Particularly, assignment operators are required to check if the current allocator is compatible with the source allocator and based on that and the traits values, optionally destroy, reallocate, or copy the underlying elements.
See the following references:
https://www.foonathan.net/2015/10/allocatorawarecontainer-propagation-pitfalls/
https://stackoverflow.com/questions/40801678/how-is-allocator-aware-container-assignment-implemented
This patch fixes that issue.
In order to implement this correctly, it requires that all allocators in the object are rebound or not depending on the stateful values.   It would have been possible, but much much harder and slower to conditionally load and reset the 3 child ebco objects which are caches of the parent allocator, so those ebcos were removed.
Allocator rebinding and copying is a no-op for stateless allocators and defined to be a lightweight "cheap" operation for stateful allocators.  So removing the ebcos code remains a no-op for stateless allocators and a cheap operation for the stateful operations.  It also will provide a significant space-efficiency benefit for stateful allocators.  Since this implementation did not previously support stateful allocators correctly at all, the base performance should be un-changed.
It's possible as well that a correct implementation of swap() needs to be provided.

Code updated as per last submission


fix: fix on the doc explaining setup

added necessary environment variables to run the project

Merged ✅

Merged ✅


bug: drawer not not animating in, only out

I'm not sure what's going on with this, perhaps you can help me look. I only upgraded from 0.6.5 - 0.6.7 and between these two versions, my drawers are no long sliding up, they just appear. The closing animation works just fine.
I tried replicating this in a sandbox, but I haven't had any luck in doing so. I just lifted the example off your website and ran it in my env and it doesn't animate in anymore.
Any ideas as to where I might be able to look?
https://github.com/emilkowalski/vaul/assets/6590356/cc79a82b-5126-4e8e-9dd9-f5d7fa1262ba
Here is my my two files:
// layout.tsx
export default async function RootLayout({ children, params }: {
    children: React.ReactNode;
    params: { locale: Locale };
}) {
    const locale = params.locale;

    return (
        <html
            className={ `motion-safe:!scroll-smooth ${inter.variable}` }
            dir={ locale === 'ar' ? 'rtl' : undefined }
            lang={ locale }
            suppressHydrationWarning>

                { children }

    );
}

// page.tsx
'use client';

import { Drawer } from 'vaul';

export default function HomePage() {
    return (
        <Drawer.Root shouldScaleBackground>
            <Drawer.Trigger asChild>
                <button
                    className="rounded-full bg-white px-4 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"
                    type="button">
                    Open Drawer
                </button>
            </Drawer.Trigger>
            <Drawer.Portal>
                <Drawer.Overlay className="fixed inset-0 bg-black/40" />
                <Drawer.Content className="fixed inset-x-0 bottom-0 mt-24 flex h-full max-h-[96%] flex-col rounded-t-[10px] bg-gray-100">

                            <Drawer.Title className="mb-4 font-medium">Drawer for React.</Drawer.Title>

                                This component can be used as a Dialog replacement on mobile and tablet devices.

                                It comes unstyled, has gesture-driven animations, and is made by{ ' ' }

                                    Emil Kowalski

                                .

                                It uses{ ' ' }

                                    Radix's Dialog primitive
                                { ' ' }
                                under the hood and is inspired by{ ' ' }

                                    this tweet.

                                GitHub
                                <svg
                                    aria-hidden="true"
                                    className="ml-1 h-3 w-3"
                                    fill="none"
                                    height="16"
                                    stroke="currentColor"
                                    strokeLinecap="round"
                                    strokeLinejoin="round"
                                    strokeWidth="2"
                                    viewBox="0 0 24 24"
                                    width="16">
                                    <path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" />
                                    <path d="M15 3h6v6" />
                                    <path d="M10 14L21 3" />
                                </svg>

                                Twitter
                                <svg
                                    aria-hidden="true"
                                    className="ml-1 h-3 w-3"
                                    fill="none"
                                    height="16"
                                    stroke="currentColor"
                                    strokeLinecap="round"
                                    strokeLinejoin="round"
                                    strokeWidth="2"
                                    viewBox="0 0 24 24"
                                    width="16">
                                    <path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" />
                                    <path d="M15 3h6v6" />
                                    <path d="M10 14L21 3" />
                                </svg>

                </Drawer.Content>
            </Drawer.Portal>
        </Drawer.Root>
    );
}

Looks pretty normal, maybe try removing all the attributes on the html tag and see if it does anything? If that won't help then I'd need a reproduction on codesandbox unfortunately.

So I cloned the repo locally and moved the src files into my project. Still encountered the same issue as downloading from npm. I was able to tinker with it enough to figure out what would allow it to work again. Let me know your thoughts.
In the Content I ended up having to restore the following effect:
React.useEffect(() => {
    // Trigger enter animation without using CSS animation
    setVisible(true);
}, []);

Then, in the onRelease function, I had to modify the effect to the following:
React.useEffect(() => {
    // Trigger enter animation without using CSS animation
    if (isOpen) {
        openTime.current = new Date();
        scaleBackground(true);
    }
}, [ isOpen ]);

These two changes restored the animation on mount. I have no idea as to why this started happening all of a sudden and I can't replicate it using a vanilla next app. Wonder if it has something to do with app complexity.

It makes more sense to call it in Content, I've moved it there in #123. Thanks for the long description of your issue!

@emilkowalski is this fix going to be released in v0.6.8?


Execution Timed Out (16000 ms)

The tests for the kata were successful. I click attempt and get the following error: "Execution Timed Out (16000 ms)". Happened yesterday, still happens today.
Any suggestions?
/edit: Chrome and macOs

Sounds like a Kata-specific question to me. Note that Kata-specific questions/suggestions/issues should be raised in the Discourse section of the Kata affected.
In your particular situation, your solution is probably not efficient enough to pass the Kata, even though the logic may be correct (e.g. using a naïve recursive solution to compute Fibonacci numbers instead of dynamic programming). Try coming up with a more efficient solution.

it's not about my solution, sadly

Would you mind posting the link to the Kata here (but not to the trainer page)?

here's the link to the kata

for me, from the screenshot it doesn't look like it's kata-related though. :/

for me, from the screenshot it doesn't look like it's kata-related though. :/

Why did my code time out?
Our servers are configured to only allow a certain amount of time for your code to execute ... >> Most of the time though this issue is caused by inefficient algorithms. <<

Your screenshot indicates that your solution has a loop-in-loop. For this Kata, you should be able to solve it using a single loop (or perhaps even without loops if you get clever with algebra).

alright, thanks. i'll try again.. :D

Just so you know, when there is a timeout or an exception, normally it'll show it passed all tests until that point, that doesn't mean your code has passed all the tests of the suite.

Closing as invalid. Thanks @DonaldKellett @Chrono79 for helping.


thought generation Project Styling

Title and Issue number
thought generation Project Styling
Close #3355
Checklist:

[x] I have mentioned the issue number in my Pull Request.
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have created a helpful and easy to understand README.md

@MohitGupta121 Kindly review this PR.


DatePicker brings up the keyboard on mobile if click the calendar icon

Things to check

[X] I have searched the existing issues for this bug
[X] To rule out a caching problem I made sure the bug also happens in an incognito tab

Bug type
Component
Component name
MudDatePicker
What happened?
DatePicker component with Editable="true", if I click on the calendar icon of the picker to select a date, it still brings up the keyboard on mobile devices. The edit filed of the control is activated and keyboard is up on mobile not allowing to see the calendar.
The same issue is with TimePicker
Expected behavior
If I click on the calendar icon to see the calendar control, the edit field is not activated, preventing the keyboard from opening on mobile devices
Reproduction link
https://try.mudblazor.com/snippet/cOQSbPmhHvUMWqcX
Reproduction steps

Place MudDatePicker to Dialog
Set Editable="true"
Run
On mobile click calendar icon of the MudDatePicker control

Relevant log output
No response
Version (bug)
7.14.0
Version (working)
No response
What browsers are you seeing the problem on?
Chrome
On which operating systems are you experiencing the issue?
iOS, Android
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

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

For now decided to apply the following temporal wokraround
/// <summary>
/// Added fixes to MudDatePicker
/// </summary>
public class MudMyDatePicker : MudDatePicker
{
	private bool saveEditable = false;
	protected override Task OnPickerOpenedAsync()
	{
		var res = base.OnPickerOpenedAsync();

		saveEditable = Editable;
		Editable = false;         //fixes opening keyboard on mobile

		return res;
	}

	protected override Task OnPickerClosedAsync()
	{
		Editable = saveEditable;          //restore Editable status which was disabled on picker open

		return base.OnPickerClosedAsync();
	}
}

/// <summary>
/// Added fixes to MudTimePicker
/// </summary>
public class MudMyTimePicker : MudTimePicker
{
	private bool saveEditable = false;
	protected override Task OnPickerOpenedAsync()
	{

		var res = base.OnPickerOpenedAsync();

		saveEditable = Editable;
		Editable = false;        //fixes opening keyboard on mobile

		return res;
	}

	protected override Task OnPickerClosedAsync()
	{
		Editable = saveEditable;           //restore Editable status which was disabled on picker open

		return base.OnPickerClosedAsync();
	}
}


Auto-generated query methods

In Diesel, I'd like the ability to auto-derive query methods onto my model. For example, if I have the following code:
#[derive(Insertable)]
pub struct NewUser<'a> {
    name: &'a str,
    email: &'a str,
    password_hash: &'a str,
}

I'd like to see the following method derived:
impl<'a> Insertable for NewUser<'a> {
    fn save(&self, conn: &Connection) -> QueryResult<User> {
        diesel::insert_into(users::table)
            .values(&self)
            .get_result(conn)
    }
}

Likewise for selects, a few examples:
#[derive(Identifiable)]
pub struct User {
    // fields omitted
}

Would generate something like this:
impl Identifiable for User {
    fn find_one(conn: &Connection, id: i32) -> QueryResult<Option<Self>> {
        users::dsl::users
            .find(id)
            .get_result(conn)
            .optional()
    }
}

The following:
#[derive(Queryable)]
pub struct User {
    // fields omitted
}

Would generate this:
impl Queryable for User {
    fn find_all(conn: &Connection) -> QueryResult<Vec<Self>> {
        users::dsl::users.get_results(conn)
    }
}

And this derive:
#[derive(AsChangeset)]
pub struct User {
    // fields omitted
}

would generate this:
impl AsChangeset for User {
    fn update(&self, conn: &Connection) -> QueryResult<Self> {
        update(self).set(self).get_result(conn)
    }
}

As a more advanced version of this feature, I'd like to be able to define queries with basic filters and sorts using auto-derive as I can in Hibernate. For example, something like this:
trait UserQueries {
    fn find_all_by_last_name_order_by_created_at_desc(conn: &Connection, last_name: &str) -> QueryResult<Vec<User>>;
}

#[derive(UserQueries)]
pub struct User { ... }

would generate standard Diesel DSL like this:
impl UserQueries for User {
    fn find_all_by_last_name_order_by_created_at_desc(conn: &Connection, last_name: &str) -> QueryResult<Vec<User>> {
        users::dsl::users
            .filter(users::dsl::last_name.eq(last_name))
            .order(users::dsl::created_at.desc())
            .get_results(conn)
    }
}

Each of these features would reduce the amount of DSL needed to be manually written (users would only need to resort to DSL for more complex queries) by deriving the most frequently used types of queries (CRUD) within a typical service, would help users to get up and running with Diesel more quickly with less upfront knowledge needed, and would reduce the amount of code needed to be maintained (and copy and pasted) by users. I'd be willing to help implement this as well, if this feature is accepted and API agreed upon.

I don't think that these methods would be significantly easier to use than using the query builder directly. Generally we try to keep Diesel very clear what underlying SQL is being performed. I think this would make a great candidate for a third party library, but I don't think it makes sense for Diesel at this time.

https://git.bananium.fr/enib/enibar/blob/master/application/rapi/rapi_codegen/src/model.rs#L31-56
Here's what I'm doing in a project (for now it's minimal but I intend to expand it as the migration from python to rust progresses), if there is an interest I guess I could release it as a diesel_models crate or something like that.

@Eijebong I used what you wrote as a base for building this library: https://github.com/shssoichiro/diesel-derives-extra. It's a little rough for now but I'll clean it up and probably add more methods as feedback is generated from using it. I think the main benefit of putting this into diesel itself would be that the traits could be pulled in with diesel::prelude::* and remove the need for the extra trait imports, but I don't think that's enough to push this into diesel if the maintainers don't feel it fits with the core goals of diesel.


Not seeing setting sync info message everywhere

re #96226

have two computers
both have settings sync off (at least both show "Turn on Pref Sync")
on computer A it puts me right into the what-to-sync picker
on computer B it shows a nice message
❓ I am confused. Is that because I am logged in on computer A?

This dialog is to inform user that this is a preview feature and is only shown once before user turns on sync successfully on a given VS Code instance. It was shown on machine B you are using this feature there for the very first time and not shown on machine A because you used this feature already before.


Update last failing  integration tests

Summary
After the lazy loading updates, test_provider_backend is no longer a relevant test
Details and comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 50.141%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
3014

Relevant Lines:
6011

💛  - Coveralls


Revisit Infinispan session idle and lifetime settings

Describe the bug
(Ticket might later be moved to the Keycloak main repository)
We put user session into the cache with a max lifetime and an idle time. If we retrieve them, IMHO the idle time will be reset, and they will be removed once they are either idle or expired.
At the same time we're updating the entries whenever they are refreshed. So I wonder that the idle time should always be the same as the expiration time from the perspective of Infinispan. Keycloak will then on the next refresh update the lifetime and the expiry time with a new value.
This would also help us to prevent reading entries from the cache which then turn out to be expired from Keycloak's perspective.
Version
main
Expected behavior
Session entries in Infinispan should be removed when they are not refreshed - independent of when and how many times they are read from the cache.
Actual behavior
There is an idle time set to the refresh interval, and a max lifetime setting set to the maximum lifetime of the session.
How to Reproduce?
Look at the UI entries in the external Infinispan.
Anything else?
No response

From the docs:

For maximum idle expiration with clustered caches, last access time for entries is not always the same on all nodes. To ensure that entries have the same relative access times across clusters, Infinispan sends touch commands to all owners when keys are accessed.

Maybe it would be more efficient not to use maxIdle time at all, and instead use only max lifetime, as it wouldn't need to touch all owners on get.
Looking at the behavior of the client sessions, I wonder if and where an ickle query updates the last access time of an entry.


add support to person profiles

:bulb: Motivation and Context

This PR adds support for the personProfiles configuration option in the PostHog SDK. The personProfiles option allows users to control how person profile data is processed during various events.
reference
https://github.com/PostHog/product-internal/pull/637
https://github.com/PostHog/posthog-js/blob/0b40e5af5381c7d356de31fc0458e91afbfa9a6b/src/types.ts#L206-L213

fix #159
:green_heart: How did you test it?

Manually tested by sending multiple events to the PostHog dashboard with all three personProfiles settings ("always", "never", "identified_only") to confirm that the events are processed according to the expected behavior for each setting.

Added unit tests in PostHogTest to verify the behavior of the personProfiles setting:

Ensured that all events are captured when personProfiles is set to "always".
Validated that no profile processing occurs when personProfiles is set to "never".
Checked that non-identification events do not process profiles when personProfiles is set to "identified_only".
Confirmed that identification events process profiles correctly when personProfiles is set to "identified_only".

⚠ Observations

Noticed a potential issue: when personProfiles is set to "never" or "identified_only", the flag process_person_profile is added to the "screen" event, but the event still appears on the dashboard. This behavior is unexpected, as the flag should filter out the event, preventing it from showing up on the dashboard. It seems that additional logic may be needed to properly handle "screen" events according to the personProfiles setting.

:pencil: Checklist

[x] I reviewed the submitted code.
[x] I added tests to verify the changes.
[ ] I updated the docs if needed.
[ ] No breaking change or entry added to the changelog.

Add a TODO somewhere that we need to implement createPersonProfile and setPersonProperties, which can be a separate PR, another time.

I think this check is also missing somewhere https://github.com/PostHog/posthog-js/blob/34204f4aff107162bdb259d2a7c855d67bf0260c/src/posthog-core.ts#L829 which is about setting userPropertiesSetOnce

I will fix all that you commented, soon update

I'm sorry @marandaneto, I thought the implementation of this feature was based solely on the documentation. I didn't realize there was already a reference implementation for it, which is why my code looks confusing, as I developed it from my own logic.
I now understand exactly how to do it correctly, but I still have a few questions.
In the identify_only documentation, it states that it will only process events related to identifying:
'identified_only' - we will only process persons when you call posthog.identify, posthog.alias, posthog.setPersonProperties, posthog.group, posthog.setPersonPropertiesForFlags, or posthog.setGroupPropertiesForFlags. Anonymous users won't get person profiles.
But in the actual posthog-js implementation, it seems to process any type of event, or am I mistaken?
Additionally, in this PR, is it necessary to implement the persistence mechanism, like for dataSetOnce, for example?

I'm sorry @marandaneto, I thought the implementation of this feature was based solely on the documentation. I didn't realize there was already a reference implementation for it, which is why my code looks confusing, as I developed it from my own logic.
I now understand exactly how to do it correctly, but I still have a few questions.
In the identify_only documentation, it states that it will only process events related to identifying:
'identified_only' - we will only process persons when you call posthog.identify, posthog.alias, posthog.setPersonProperties, posthog.group, posthog.setPersonPropertiesForFlags, or posthog.setGroupPropertiesForFlags. Anonymous users won't get person profiles.
But in the actual posthog-js implementation, it seems to process any type of event, or am I mistaken?
Additionally, in this PR, is it necessary to implement the persistence mechanism, like for dataSetOnce, for example?

the flag is set for any type of event, the same as the JS implementation.
the dataSetOnce bits can be done later such as https://github.com/PostHog/posthog-android/pull/171#issuecomment-2330727362, so everything but this part can be the same as the JS implementation.

@marandaneto I updated the PR with only what's necessary to make the personProfiles config feature work. Just the hasPersonProcessing function solves the problem.
However, I introduced a complete version with the dependencies that complete the personProfile feature. If possible, take a look at this version and see if it makes sense. Based on my tests in core-js and in this version's code, everything seems fine.
https://github.com/thisames/posthog-android/commit/0f0c39a37799e867c2a484b6862341595a211923
Please analyze whether it makes sense to include this in the PR or leave it for later.

About the commit https://github.com/thisames/posthog-android/commit/0f0c39a37799e867c2a484b6862341595a211923
Looks good, I'd have a few comments, lets make a new PR so we can discuss.

@thisames see my PR https://github.com/PostHog/posthog-ios/pull/187
I'd just copy what its there (and I copied what was in JS).
Also its missing the requirePersonProcessing bits, see my PR as well

@thisames I pushed a few changes to fix and improve a few things, thanks for the PR.


Update embedding field to use fixed array size

Description
This updates DuckDB and Llama-Index code to use fixed array size.
Version Bump?
Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

[x] Yes
[ ] No

Type of Change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[x] Added new unit/integration tests
[ ] Added new notebook (that tests end-to-end)
[ ] I stared at the code and made sure it makes sense

Suggested Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[ ] I have added Google Colab support for the newly added notebooks.
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] I ran make format; make lint to appease the lint gods

Somehow this change got published as v0.1.2?
https://github.com/run-llama/llama_index/issues/12542
Pretty confused. But will be reverting this

@krish-adi just bumping again

@logan-markewich apologies for not responding earlier. missed these notifications. I reverted the changes back to the original implementation.
the changes i made were to accommodate the new array type in duckdb. since the array types are fixed length, a record of the dimensions need to be mentioned earlier on, and that is why i made the embed_dim not optional. but this seems to be breaking for earlier users. i need to think of an api for making this not breaking. one way is to create the store with a list when not mentioning an array size and use the array type when mentioned. and when persisting the store, we could pick up the size after loading the store.

also added initializing with an embedding dimension and without.

Thanks for getting back to me @krish-adi sounds good 👍🏻


Add long tests against GT interaction values

Add test cases for the approximators against (pre-computed) ground truth interaction values for some ML examples games.
These tests should not run with all unit tests

closing this because the current tests cover this already.


[api-docs] chore: correct

A new commit was made into the api-docs repo. This issue was created automatically. Need to review if we made any change to the library for this commit.
https://github.com/discord/discord-api-docs/commit/fa5062609a194b97066f88d4f71891fba150e913

ncn


common names clean-up

--revised names in spreadsheet e-mailed
--Note that future additions may be needed to clarify types of brachiopods (articulate and inarticulate), and dinosaurs, or potentially add types of insects, fish or mammals for example

@LeannePyle - I think this is completed - would you please confirm the state of it on Legacy?

Do not see a picklist appearing for common name


Implement connection failure -based heuristics for peer unavailability in thaliMobile

The specification in thaliMobile contains parts like:
 * If an attempt to connect to a peer via MPCF whose presence we have previously
 * advertised via peerAvailabilityChanged should fail we MUST use our own
 * heuristics to decide if we should mark the peer as no longer available.
 * Typically we should allow several failed connection attempts before we decide
 * to mark the peer as no longer present.

Current implementation will mark peers unavailable after certain threshold, but not based on failed connection attempts.
It should be determined how often connection failure -based unavailability would be needed in real life scenarios.

I think it's fine to skip this entirely for now. E.g. we can just not implement for NewInfra. As it is thaliMobileNativeWrapper will send up a new peerAvailabilityChanged event when this occurs and that will automatically reset our timers. If we try to connect and thaliMobileNative can't make the connect work then we should get a peerAvailabilityChanged from thaliMobileNativeWrapper telling us the peer is gone.


Scripted Installer - Option to skip partitioning altogether

If the option is turned on, it would be expected (and we will verify) that the user used a BEFORE script and did the partitioning themselves and mounted everything they want on the /mnt folder.

Option already exists:  AUTO_SKIP_PARTITIONING
Currently, the user must do all the partitioning and mounting before running the script.  A later feature will allow them to do this partition in a "before" script.


Remove manage.py startup script from project directory.

Having manage.py in the project directory causes issues when the script is loaded from outside the project directory. Additionally, the script does nothing beyond calling slivka.command.manager() which can be set-up as a slivka entry point making manage.py redundant.

remove manage.py script entirely and create slivka or slivka-start entry point in its place
do not use SLIVKA_SETTINGS environment variable as the script needs to be called in the project directory where settings.yml is located anyway
allow users set SLIVKA_HOME instead where all config files are located or default to cwd. Also, remove BASE_DIR from the settings.yml as it's redundant and confusing. (BASE_DIR is always the current directory where settings.yml sits)

Issue already resolved. slivka executable is created when Slivka is installed and runs slivka.cli.main entry point. The manage.py script is still present in the project directory, but it's role is reduced to setting SLIVKA_HOME variable and running slivka.cli.main() only.


on wake up device running multiple jobs

I have implemented some scheduled job so job created on scheduled time. So when device is locked or sleep it scheduled but not preform tasks and when device wake up all scheduled jobs perform their respective tasks simultaneously.
Is there any way to perform task in device sleep mode also.
Waiting for your response.
Thank you

No, that's the intended behavior. If the device is in a doze window and you then turn on the screen, then all jobs will run. Please take a look again at how Doze works: https://developer.android.com/training/monitoring-device-state/doze-standby.html
These slides from my recent talk also could be helpful, especially the page I'm linking: https://speakerdeck.com/vrallev/scheduling-background-job-on-android-at-the-right-time-1


Error: Whoops, something went wrong

At the end of installationsprocess i'll get following error message:
Installation ist fehlgeschlagen!
Whoops, something went wrong
How can i debug this? Or where can i find additional informations for this problem?

It would be great if you could enable Pagekit debug mode and post a more detailed error report.
The installer debug mode can be enabled at app/installer/config.php.

Ok... i did this. After reinstalling pagekit there are no more detailed informations about the error... :-(

Can you open the console of your browser (make sure that logging of XMLHttpRequests is enabled) and post the contents of the last response before the error occurs?
You could also send me a link to your Pagekit installation.


Python: update BlockState and TransactionState enums

The numbers don't work for deserialization from the responses, so we need a str, but do we still need a way to convert the numbers to the variants?
Pending = 'pending' instead of Pending = 0 seems to work fine for the API response test

Closed by https://github.com/iotaledger/iota-sdk/pull/2067


Not not triggered with empty body

If the PR body is empty then the bot does not handle that correctly and create a release

@Kd-Here go for it! This doesn't actually use GitHub Actions, it runs a Lambda in AWS when the PR is merged that tags it, creates the release in GH and posts in Discord. This repo contains the code for it so have a dig through!


Propose some place for discussion and help

Usually the open source project will propose some places for help and discussion such as stackexchange (with a tag), slack group or discord group, etc, and recommend them in the documentation.
However I can't find any in flatcar documentation, and I also can't find any tags in stackexchange. I am not sure Github issues is a good place or not, thus I ask this question here for some clue.
Also an FAQ is very good for beginners.

Thanks for the suggestions, yes, would be good to have such information and FAQ in the docs (maybe even from reviewing the frequently asked questions on IRC and GitHub issues).
There is a short paragraph on the website (search for Getting help), with links to the mailing lists (Google Groups) and the IRC channel.

I find the google groups is a good place. Thanks!


Feature Request - Custom-link to Password Change

Having the password info for the user in the app is really nice 👍🏼
We need the user to open Enterprise Connect to change the password, so it would be nice to have the option to select the service to use as you have done with the custom buttons.
Forwarding the user to the application or a URL with the password change information

Hi @AndersTao wouldn't a regular button work for you with a custom URL? I don't expect the app to show the password expiry for accounts linked with EC or does it? If so I agree with you and we should provide a custom URL

@jordywitteman it does, guess it reads from the Kerberos ticket like NoMAD, so making the link custom be really nice.
The same schema as used for custom rows would work for what I would like to do (app/URL) ether open EC or forward to the website with info on how to change

@AndersTao Okay that's awesome! No local passcode policy in place?

I don't have access to this part in the company, so I can not confirm at 100%
We run with local accounts with EC, so I guess AD password settings is set by this tool on local acount

You could check the Profiles section in System Preferences and look for a profile including Password Policies and the value Max Age set to something. I'll try to reproduce here as well when I have time using the Kerberos SSO Extension (basically the successor of EC).

Yep, you are right.. password policies are pushed

@jordywitteman @AndersTao : where did this end up?  Enterprise Connect is sunsetting and we're supposed to switch to Kerberos SSO.  Did you get this to work?

@bradtchapman we have moved to passwordless since, so did not investigate any further
Sorry


local weights not used keeps downloading

I have downloaded the weights from https://github.com/serengil/deepface_models/releases and placed them in /home/usrprj/.deepface/weights/ but it keeps downloading them where is the correct location ?

Your directory seems correct. For instance, my weights are stored in ~/.deepface/weights
If you have DEEPFACE_HOME environment variable, then it would use that instead of home directory as coded here.
When it attempts to download, what is the location?

I have set the DEEPFACE_HOME environment variable and the weights are download is displayed can this be suppressed ?

no, gdown will display progress for downloading by default


WIP: frame cropping

This is just a proof-of-concept implemented for the combination of mask job on a raw dataset. Observation: works well for really small masks, for large masks it is slower than without cropping. Needs to be profiled etc.
Should have larger impact with k2is data or other large frames

Don't think this is still useful, needs to be re-done after #195 is merged anyways.


API Key

How can you set up an API Key?
Thank you

Hi @danrc ,
Can you elaborate a bit? I don't really understand what you are trying to do.

Closing since there is no response and I don't understand the request.


Add equality comparison for Programs

This is a really cumbersome way of checking the ~equality~ equivalence of two programs --- furthermore, it doesn't take into account programs with the same DAG but different temporal operations list.
A useful feature would be to overload the Program.__eq__(self, other) special method, in order to perform the nx.is_isomorphic check (similarly to that done in CircuitSpecs.compile, but also taking into account parameter values).
That would allow us to simply do assert prog1 == prog2 in the tests.
It would also help provide useful tracebacks, by indicating which gates and/or parameters differ
Originally posted by @josh146 in https://github.com/XanaduAI/strawberryfields/pull/127

This has now been coded up in tests/frontend/test_circuitspecs_chip0.py (see below). The next steps are to:

Move this function over to program_utils and write tests

Write an additional function, program_equality, which is stricter, and returns True if and only if both programs contain the identical commands in the identical order (by looping through cmd1, cmd2 in zip(prog1.circuit, prog2.circuit)).

def program_equivalence(prog1, prog2, compare_params=True, atol=1e-6, rtol=0):
    r"""Checks if two programs are equivalent.
    This function converts the program lists into directed acyclic graphs,
    and runs the NetworkX `is_isomorphic` graph function in order
    to determine if the two programs are equivalent.
    Note: when checking for parameter equality between two parameters
    :math:`a` and :math:`b`, we use the following formula:
    .. math:: |a - b| \leq (\texttt{atol} + \texttt{rtol}\times|b|)

    Args:
        prog1 (strawberryfields.program.Program): quantum program
        prog2 (strawberryfields.program.Program): quantum program
        compare_params (bool): Set to ``False`` to turn of comparing
            program parameters; equivalency will only take into
            account the operation order.
        atol (float): the absolute tolerance parameter for checking
            quantum operation parameter equality
        rtol (float): the relative tolerance parameter for checking
            quantum operation parameter equality

    Returns:
        bool: returns ``True`` if two quantum programs are equivalent
    """
    DAG1 = list_to_DAG(prog1.circuit)
    DAG2 = list_to_DAG(prog2.circuit)

    circuit = []
    for G in [DAG1, DAG2]:
        # relabel the DAG nodes to integers
        circuit.append(nx.convert_node_labels_to_integers(G))

        # add node attributes to store the operation name and parameters
        name_mapping = {i: n.op.__class__.__name__ for i, n in enumerate(G.nodes())}
        parameter_mapping = {i: [j.x for j in n.op.p] for i, n in enumerate(G.nodes())}

        # CXgate and BSgate are not symmetric wrt to permuting the order of the two
        # modes it acts on; i.e., the order of the wires matter
        wire_mapping = {}
        for i, n in enumerate(G.nodes()):
            if n.op.__class__.__name__ == "CXgate":
                if np.allclose(n.op.p[0], 0):
                    # if the CXgate parameter is 0, wire order doesn't matter
                    wire_mapping[i] = 0
                else:
                    # if the CXgate parameter is not 0, order matters
                    wire_mapping[i] = [j.ind for j in n.reg]

            elif n.op.__class__.__name__ == "BSgate":
                if np.allclose([j.x % np.pi for j in n.op.p], [np.pi/4, np.pi/2]):
                    # if the beamsplitter is *symmetric*, then the order of the
                    # wires does not matter.
                    wire_mapping[i] = 0
                else:
                    # beamsplitter is not symmetric, order matters
                    wire_mapping[i] = [j.ind for j in n.reg]

            else:
                # not a CXgate or a BSgate, order of wires doesn't matter
                wire_mapping[i] = 0

        # TODO: at the moment, we do not check for whether an empty
        # wire will match an operation with trivial parameters.
        # Maybe we can do this in future, but this is a subgraph
        # isomorphism problem and much harder.

        nx.set_node_attributes(circuit[-1], name_mapping, name="name")
        nx.set_node_attributes(circuit[-1], parameter_mapping, name="p")
        nx.set_node_attributes(circuit[-1], wire_mapping, name="w")

    def node_match(n1, n2):
        """Returns True if both nodes have the same name and
        same parameters, within a certain tolerance"""
        name_match = n1["name"] == n2["name"]
        p_match = np.allclose(n1["p"], n2["p"], atol=atol, rtol=rtol)
        wire_match = n1["w"] == n2["w"]

        if compare_params:
            return name_match and p_match and wire_match

        return name_match and wire_match

    # check if circuits are equivalent
    return nx.is_isomorphic(circuit[0], circuit[1], node_match)


crashing if some process started (maybe)

Brief description of your issue
just crash, idk reasons
dump:
SystemInformer_DumpFile_WOUHCBAGTXYDOWT.dmp
Steps to reproduce (optional)
No response
Expected behavior (optional)
No response
Actual behavior (optional)
No response
Environment (optional)
latest commit, compiled

v3.1.24363 and week before

No symbols for a stack trace.


ABC iView JSONDecodeError

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm reporting that a supported site is broken
[X] I've verified that I'm running yt-dlp version 2023.03.04 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
Australia
Provide a description that is worded well enough to be understood
Receiving Failed to parse JSON caused by JSONDecodeError error message
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
./yt-dlp https://iview.abc.net.au/show/ready-steady-wiggle -s -vU
[debug] Command-line config: ['https://iview.abc.net.au/show/ready-steady-wiggle', '-s', '-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (zip)
[debug] Python 3.9.16 (CPython x86_64 64bit) -<EMAIL_ADDRESS>(OpenSSL 1.1.1s  1 Nov 2022, glibc 2.36)
[debug] exe versions: none
[debug] Optional libraries: no_Cryptodome-None, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 91cad9f121c1f6f0a81b747415c46ecba0ff331ed38cc6433040b4ac7b6e15ca
yt-dlp is up to date<EMAIL_ADDRESS>[debug] Using fake IP <IP_ADDRESS> (AU) as X-Forwarded-For
[abc.net.au:iview:showseries] Extracting URL: https://iview.abc.net.au/show/ready-steady-wiggle
[abc.net.au:iview:showseries] ready-steady-wiggle: Downloading webpage
ERROR: [abc.net.au:iview:showseries] ready-steady-wiggle: ready-steady-wiggle: Failed to parse JSON (caused by JSONDecodeError('Unterminated string starting at in \'cription":"Captain F\': line 1 column 43732 (char 43731)')); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/mnt/user/downloads/youtube-dl/./yt-dlp/yt_dlp/extractor/common.py", line 694, in extract
    ie_result = self._real_extract(url)
  File "/mnt/user/downloads/youtube-dl/./yt-dlp/yt_dlp/extractor/abc.py", line 294, in _real_extract
    video_data = self._parse_json(
  File "/mnt/user/downloads/youtube-dl/./yt-dlp/yt_dlp/extractor/common.py", line 995, in _parse_json
    self.__print_error('Failed to parse JSON' if errnote is None else errnote, fatal, video_id, ve)
  File "/mnt/user/downloads/youtube-dl/./yt-dlp/yt_dlp/extractor/common.py", line 978, in __print_error
    raise ExtractorError(f'{video_id}: {errnote}', cause=err)

  File "/mnt/user/downloads/youtube-dl/./yt-dlp/yt_dlp/utils.py", line 623, in decode
    return super().decode(s)
  File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.9/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 43732 (char 43731)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/user/downloads/youtube-dl/./yt-dlp/yt_dlp/extractor/common.py", line 992, in _parse_json
    return json.loads(
  File "/usr/lib64/python3.9/json/__init__.py", line 359, in loads
    return cls(**kw).decode(s)
  File "/mnt/user/downloads/youtube-dl/./yt-dlp/yt_dlp/utils.py", line 631, in decode
    raise type(e)(f'{e.msg} in {s[e.pos-10:e.pos+10]!r}', s, e.pos)
json.decoder.JSONDecodeError: Unterminated string starting at in 'cription":"Captain F': line 1 column 43732 (char 43731)

Bump :)


Remove version: Freeplane.Freeplane version 1.12.6

[Automated] It returns code over 400 in all urls
Microsoft Reviewers: Open in CodeFlow

URL: https://sourceforge.net/projects/freeplane/files/freeplane stable/Freeplane-Setup-with-Java-1.12.6.exe/download
OK
(Automated message - build 923)

Close with reason: Package still available.;


Add license badge

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
22 unchanged lines in 2 files lost coverage.
Overall coverage remained the same at 79.276%

Files with Coverage Reduction
New Missed Lines
%

pkg/server/server.go
4
71.77%

pkg/tc/types/filter.go
18
80.39%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1840

Relevant Lines:
2321

💛  - Coveralls


Video starts playing late

What version of WebTorrent?
v0.98.16
What operating system and Node.js version?
CentOS 6.8 - node 6.10
What browser and version? (if using WebTorrent in the browser)
Chrome 57 - Firefox 52
What did you expect to happen?
Video starts playing as soon as first frame is downloaded
What actually happened?
The video size is 500MB, 2 webseeds are being used and are fetched from torrent file (urlList parameter), the chunk size is 512KB.
The video starts playing after downloading about 15MB which is kind of late compared to classic streaming.
Where should I be looking in order to make the video start playing sooner?

Which file format is the video?

MP4 for sure

MP4 videos are handled by this library: https://github.com/jhiesey/videostream
@jhiesey has 100x my experience in the subject, he might be able to help with this issue.

Mp4 is good but you need to encode the video with some flags at the begining in order to be able to stream it.
Try a basic player with a webseed to see if it is webtorrent related.
The flags are called moov if you need reference.

@yciabaud  We tried the -movflags faststart ffmpeg option but no luck, their is still the same delay before the player starts the video.
Any more idea about it?
Thanks

Can you provide the torrent with the webseeds in order to have a look?

http://<IP_ADDRESS>/sintel.html
As you can see, the video starts playing only after downloading about >10MB,
knowing that for users who have a medium-speed connection, 10MB means a few minutes of patience to see the first frame...

Loads for me after 2 seconds at 4 MB downloaded

On Apr 13, 2017, at 5:56AM, davidupx<EMAIL_ADDRESS>wrote:
http://<IP_ADDRESS>/sintel.html http://<IP_ADDRESS>/sintel.html
As you can see, the video starts playing only after downloading about >10MB,
knowing that for users who have a medium-speed connection, 10MB means a few minutes of patience to see the first frame...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/feross/webtorrent/issues/1097#issuecomment-293858000, or mute the thread https://github.com/notifications/unsubscribe-auth/AB6fN4kE4T3_BzzPsUOr7jxdfDGNOB38ks5rvf9ZgaJpZM4M4L8M.

Loads for me at 7MB.
Multiple pieces are being downloaded concurrently but a piece can't be used until it's completely downloaded, so some of those extra MBs are probably devoted to future pieces that aren't needed to play the first frame. But if there are enough peers available in the network, we'll try to connect and get data from them anyway. Maybe this can be improved but then we'd need to have an idea of how much bandwidth is available to the client... This all sounds really hard and I haven't taken a close look at the download strategy code in a long time.
I'm -1 on changing anything to address this.

I'm a bit late to this issue, but I'll take a look this weekend to see if there's anything that can be improved on the videostream side.
@yciabaud @davidupx I'm not surprised the faststart option doesn't make much difference. In either case videostream will request the beginning of the file first and then almost immediately seek to the correct moov offset (either still near the beginning with the option passed or near the end without it). Different chunks would be downloaded but not much else changes.

@jhiesey Thanks for your reply, I hope you can improve the situation.
I look forward to hearing from you, if there is a solution or suggestions.

Alright, didn't get to it this weekend. Hopefully early this week.


Fix ginkgo for kubernetes controller development

setup-envtest does not provide builds for all k8s versions, so stop considering patch versions
ginkgos -coverprofile behaves differently than gotests
remove ginkgos -p flag

coverage: 4.626% (-0.03%) from 4.658%
when pulling 8927fafb513fa1c3c9ed2328ce6314877188fb5d on fix-ginkgo-k8s
into 6bbaca0a08261449e405f36f6bb31a865ad4b728 on main.


registerForegroundService promisse not being triggered

Hello!
I am testing Notifee in my React Native application.
I was able to use the notifications as expected, but I could not make the foreground service work.
Even a in a simple test like below, I can see nothing happen. Those are the exactly the first lines from my application (app.js).
As far I could understand, by registering the service is enough to make it run.
I am missing something?
import notifee from '@notifee/react-native';

notifee.registerForegroundService(() => {
    return new Promise(() => {
        console.log("Hello");
    });
 });

Thanks

I could solve the puzzle. I was missing something very clear.
In order to trigger the foreground service, we must call a notification like this:
notifee.displayNotification({
      title: "Foreground service",
      body: "This notification will exist for the lifetime of the service runner",
      android: {
          channelId: "blang",
          asForegroundService: true,
          color: "red",
          colorized: true,
      },
  });

In this case I was missing the parameter:  asForegroundService: true


Automatically build

Would it be possible to add the feature to automatically build the apk. It is very annoying that I have to go into the console to build and the run the app.

VSCode supports the creation of custom build tasks - you could always create one to run the command to build your app.

You can achieve this easily by creating a build task and assigning it as a pre-launch action.
Create a .vscode/tasks.json with the following content:
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "${workspaceFolder}/gradlew assembleDebug",
            "problemMatcher": {
                "fileLocation": ["absolute"],
                "owner": "gradle",
                "pattern": {
                    "regexp": "^([we]): ([^:]+): \\((\\d+),\\s*(\\d+)\\):\\s+(.+)",
                    "file": 2,
                    "line": 3,
                    "column": 4,
                    "severity": 1,
                    "message": 5
                }
            }
        }
    ]
}

Add the following entry to your launch.json Android debug configuration:
"preLaunchTask": "build"


menuinst Exception: Nothing to do: traceback when installing Spyder 6.0.0a4 on Windows

Problem Description
I was trying to setup a new conda env with Spyder 6.0.0a4 on Windows and got a traceback related with menuinst. Spyder is still able to launch from the anaconda prompt but I think no shortcut was created 🤔
What steps reproduce the problem?

Run the following to create an env:

conda create -n spyder6_test -c conda-forge python=3.11
conda activate spyder6_test
conda install -c conda-forge/label/spyder_dev -c conda-forge/label/spyder_kernels_rc -c conda-forge spyder=6.0.0a4

What is the expected output? What do you see instead?
No traceback error and shortcut creation to launch Spyder from the env created. Instead I got a traceback related with menuinst after conda installed Spyder
Paste Traceback/Error Below (if applicable)

Executing transaction: \ menuinst Exception
Traceback (most recent call last):
  File "C:\Users\dalth\anaconda3\lib\site-packages\conda\gateways\disk\create.py", line 267, in make_menu
    menuinst.install(join(prefix, win_path_ok(file_path)), remove, prefix)
  File "C:\Users\dalth\anaconda3\lib\site-packages\menuinst\__init__.py", line 75, in install
    _install(path, remove, prefix, mode='user', root_prefix=root_prefix)
  File "C:\Users\dalth\anaconda3\lib\site-packages\menuinst\__init__.py", line 48, in _install
    ShortCut(m, sc).create()
  File "C:\Users\dalth\anaconda3\lib\site-packages\menuinst\win32.py", line 318, in create
    raise Exception("Nothing to do: %r" % self.shortcut)
Exception: Nothing to do: {'name': 'Spyder 6 ({{ ENV_NAME }})', 'description': 'Scientific PYthon Development EnviRonment', 'icon': '{{ MENU_DIR }}/spyder.{{

Seems like I have conda 23.7.4 and menuinst 1.4.19:

Seems like I have conda 23.7.4 and menuinst 1.4.19:

That would explain it, then. Updating to menusint >= 2.0 and conda >= 23.11 in the base environment will resolve the issue.

Oh I see, then is there some way we could alert this to users when installing? Maybe we need to explain that constraints regarding the base conda env in the Spyder 6.0.0a4 GitHub release installation instructions?

Oh I see, then is there some way we could alert this to users when installing? Maybe we need to explain that constraints regarding the base conda env in the Spyder 6.0.0a4 GitHub release installation instructions?

I'm not sure. @jaimergp, do you know if a menu yaml can constrain the menuinst version? How can updates to menu yaml for menuinst >= 2.0 enforce this constraint in the base environment since menuinst is not necessarily in the install environment?

This really serious because users with old menuinst versions won't have menu entries on Windows in Spyder 6 due to this.
Perhaps we could try to detect if they have menuinst < 2.0 in their base env in our recipe to use the old menu.json file? Could that be possible @mrclary?

I think there's a __conda virtual package you might be able to leverage in the package shipping the JSON.

Without __conda available, there is no way to prevent Spyder 6 from being installed conditioned on the conda version. Doing anything in the post-link script can only affect what we do with the shortcut.
Options if menuinst < 2.0 is discovered by the post-link script:

Remove spyder-menu.json. Spyder would still install, but the shortcut would not be created. This is the easiest thing to do. We can try to print a warning message that advises users to update conda or menuinst, but I don't know if conda will relay stdout from the post-link script or suppress it.
Include a copy of the old menu.json file in the feedstock and rename or remove the unnecessary file conditioned on the version of menuinst.

I prefer option 2. because it's hard to expect that people will read a single message among a lot of other (not so informative) output. Besides, they can install Spyder through Navigator, which won't allow them to see a message like that.

According to the docs, post-link scripts should:

Not depend on any installed or to-be-installed conda packages.
Depend only on simple system tools such as rm, cp, mv, and ln.

The scripts should not write to stdout or stderr unless an error occurs, but they may write to $PREFIX/.messages.txt, which is shown after conda completes all actions.

In order to detect menuinst version, I'll have to assume the base environment python executable is available 🤞🏼

Fixed by https://github.com/conda-forge/spyder-feedstock/pull/161.


Can we monitor system resource usage for metadata?

https://docs.python.org/3/library/resource.html


Add Goreleaser templating logic for more distributions (i.e. otelcol-k8s, otelcol-otlp)

currently, only the otelcol and otelcol-contrib goreleaser files are generated via template.
There are some differences between these and the k8s and otlp distros; specifically having to do with fewer versions and/or different default files included.
Given that our goreleaser templates are run in cmd/goreleaser, there should be some logic to enable generating the k8s and otlp distributions (and any future distributions) with this template.
I'm happy to take this on, as it may be necessary to split up goreleaser further to enable buildmode=pie for security in accordance with https://github.com/open-telemetry/opentelemetry-collector-releases/issues/618 and https://github.com/open-telemetry/opentelemetry-collector-releases/issues/693

Sounds reasonable to me

@jackgopack4 i guess this can be closed since the PR is merged?


Upgrade to cyclops 6.2.3 due to issue in POM.XML

This issue : https://github.com/aol/cyclops/issues/85

fixed in 0.79.1


Prefer using declarations instead of typedefs

typedef declarations are commonly declared backwards and are hard to read and remember which is the correct order to declare the "new definition" vs the "old definition". Using declarations were added: using new_name = old_name; to prevent these mistakes. They are more clear and describe the intent better and as a bonus can be used with templates and be declared inline unlike typedefs.

I would very much welcome this. There are a number of typedefs I'm itching to change to using aliases. In particular, the Delegate and Signal code has lots of them, and many are quite hard to read. But, I'm waiting until the parameter pack changes are tested and stabilized first. There would be too many merge conflicts otherwise.
Also, we are using C++17 now, and the project has become dependent on that. There is no reason not to use using in place of typedef now.

Adding a ref to examples and "standardize" for type aliasing using using.
https://en.cppreference.com/w/cpp/language/type_alias

I see I'm late to the party, but yes, agreed. typedef's were used before alias's were a thing. Now that they're a thing, that's very much the preferred method.


chore: SKR Looper configurable concurrency

Description
Changes proposed in this pull request:

added skrLooper concurrency config filed
added CyclicQueue to better control SKR looping
refactored SkrLooper to use CyclicQueue

Related issue(s)

/retest


Total amount mismatch with external tax providers

We have a US-shop, that needs to use an external tax provider service (in this case Avalara) because of the crazy complex tax rules in the US. There is a problem with Mollie and this external tax provider, but I think this is not only scoped to this specific provider, but more general.
We have for example this case: for the shipping costs, the external tax provider returns this:
taxAmount: 0.0
taxRate: 6.25

This may seem strange on the first look, but is totally valid, because there are tax exemption limits that can come into play. So the general taxRate in this case is 6.25, but because of the tax exemption limit the amount is 0.0.
This is now where the trouble with the Mollie plugin starts, because the plugin calculates the taxAmount for every lineItem again (would be nice to know, why this is necessary in the first place).
See: https://github.com/mollie/Shopware6/blob/7127b7f50e00f69cf992482bcd3de863723c17d7/src/Service/MollieApi/Builder/MollieShippingLineItemBuilder.php#L52
and: https://github.com/mollie/Shopware6/blob/7127b7f50e00f69cf992482bcd3de863723c17d7/src/Service/MollieApi/PriceCalculator.php#L27
Because Mollie calculates the taxAmount again based on the taxRate, of course there is a mismatch which results in the following error during order creation:
[2023-08-22T09:28:11.603351+00:00] Mollie.ERROR: Error when starting Mollie payment: Could not create Mollie order (Session: ...) {"function":"order-prepare","exception":"[object] (RuntimeException(code: 422): Could not create Mollie order at www/vendor/store.shopware.com/molliepayments/src/Service/MollieApi/Order.php:184)\n[previous exception] [object] (Mollie\\Api\\Exceptions\\ApiException(code: 422): [2023-08-22T09:28:11+0000] Error executing API call (422: Unprocessable Entity): Order line 2 is invalid. Total amount is off. Expected total amount to be $37.13 (1 × $37.13), got $34.95. Documentation: https://docs.mollie.com/overview/handling-errors. Field: lines.2.totalAmount at www/vendor/store.shopware.com/molliepayments/src/Service/MollieApi/Client/MollieHttpClient.php:151)","session":"","processors":{"uid":{"uid":"4a686af"},"web":{"url":"....","ip":"...","http_method":"GET","server":"...","referrer":"..."},"introspection":{"file":null,"line":null,"class":"Kiener\\MolliePayments\\Handler\\PaymentHandler","callType":"->","function":"pay"}}} []

Now the question is, how to solve this. Personally, I think the recalculation of the taxAmount in the Mollie plugin is not right, why not use the taxAmount present in the CalculatedTax-Object? But there may of course be good reasons unknown to me why this is necessary.
Nevertheless this will be a problem in the future for such cases, especially in the US and with external tax providers.

Hmm, IIRC the exact reason why we recalculate the tax amounts is to prevent this type of thing from happening. But as you explained (and thanks for that!) there are edge cases we didn't take into account (like 6.25% tax rate for anything above amount USD n).
Maybe it's best to wrap that calculation into a toggle and explain the scenarios in which a merchant would be using it or absolutely should turn it off?

Maybe this would be an option yes, but maybe also worth investigating why the calculated tax amount from shopware is not used in the first place.
I understand that it's for sure a tricky topic to satisfy all edge cases. But I think this can pop up more often in the future, if there are more and more international shops that use an external tax provider.

I think there are multiple edge cases tied into this, from net price consumer groups, vouchers/discounts etc.
https://github.com/mollie/Shopware6/blame/7127b7f50e00f69cf992482bcd3de863723c17d7/src/Service/MollieApi/PriceCalculator.php#L27 points to two particular cases - one with a classic rounding problem using vertical tax calculation, and one with promotions with mixed tax rates where we need to recalculate a fictional tax rate and amount.
@boxblinkracer will have all the details I'm sure, and probably has an idea as well on how to proceed here.

@niklaswolf
so i talked internally with @boxblinkracer the answer for the question why we do an extra calculation:

In Shopware we can setup vertical and horizontal tax rates. Mollie Order API Supports only one way, so we have to adjust it
voucher/discounts may have different taxes while one line item in mollie supports only one tax. so we calculate the taxes there as well
we could use separat mollie line items but then we have to change many things in the refund manager in order to refund items with voucher etc.

now back to the problem.
i think it is not that hard if we just check the total amount and if it is set to 0.0 we can exclude the item from calculation. how ever this check also protects us that orders are not created with invalid data.
is there a reliable way to find out that the case is valid if the tax rate is set but not the amount? i just need a way to verify somehow that the amount is valid because of tax exemption limits vs someone inserted wrong data into order.
can you help me out there?

@BlackScorp unfortunately I don't think that there is a reliable way to verify this. At least with the external tax provider we're using, they do not use the official TaxProvider-Interface (https://developer.shopware.com/docs/guides/plugins/plugins/checkout/cart/tax-provider.html) yet, but modify the tax using event subscribers. I don't know if by using the newish interface there would be a way to determine from the cart/order if the taxes were set externally. If it was, it would at least be clear, that 0.0 is valid in this case. If I were you, I'd rather research in this direction, because it's the fault of the Tax-Plugin if it is not using the official interface.
But if there is also no way to determine validity using the interface, then I don't know either what to do without further looking into this. Maybe go with the suggestion from @fjbender and make the check configurable and turned on by default.

@niklaswolf thanks iam going to checkout. but disabling the calculation is not an option, we have then add vouchers as own items and modify the refund manger. it is sadly no only a problem of disable/enable


runtime: TestMemStats fails after running tests and benchmarks for some time

go version devel +79dbc1cc7b Sun Nov 12 13:25:35 2017 +0000 linux/amd64

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mvdan/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mvdan/go/land:/home/mvdan/go"
GORACE=""
GOROOT="/home/mvdan/tip"
GOTMPDIR=""
GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build917956427=/tmp/go-build -gno-record-gcc-switches"

$ go test -bench=Mem -count 10 runtime
--- FAIL: TestMemStats (0.00s)
        malloc_test.go:75: TotalAlloc =<PHONE_NUMBER>24: insanely high value (overflow?); want <= 1e+11
^Csignal: interrupt
FAIL    runtime 496.137s

Note that the test succeeds fine on its own, even when it's run thousands of times.
Also note that it took my laptop over 5 minutes to reach this point. Might be reached faster on a more powerful machine.

The upper threshold seems to be applied in the test code, so labelling as a testing bug.

CC @aclements @dvyukov

Hmm. It's not really clear what we can do about this.  We could loosen the thresholds, but then it's not as useful in the normal case.
Maybe it should keep track of how many times it's run and start skipping after some N?
/cc @RLH


⚠ Fox Sports has degraded performance

In bb3a66e, Fox Sports (https://foxsports.com) experienced degraded performance:

HTTP code: 200
Response time: 1708 ms

Resolved: Fox Sports performance has improved in a7f3dbc.


Add a new rule: _range

I'd like to propose a new rule, _range, which accepts a number property with a value within given range (accepts or ignores, that is synonymous in this context). This is needed for validating properties that we want to let fluctuate, such as performance metrics or similarity values.
In the code, I wanted to remove the json property targeted by the _range key but I couldn't find a way of doing that. Instead, it is transformed into true/false depending if it's within the range or not. The effect should be same, since the expected json and actual json are both transformed before comparison.
If there's a preferred way of implementing this, please let me know and I'll adjust the code accordingly.

Thank you!


Warning not error: This call to matplotlib.use() has no effect because the backend has already been chosen?

When I executed following code
import re
from snorkel.lf_helpers import (
    get_left_tokens, get_right_tokens, get_between_tokens,
    get_text_between, get_tagged_text,
)

the code will throw this

warning: /usr/local/lib/python2.7/dist-packages/matplotlib/init.py:1401: UserWarning:  This call to matplotlib.use() has no effect because the backend has already been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot, or matplotlib.backends is imported for the first time.    warnings.warn(_use_error_msg)

Hi @hiber-niu that's just a harmless warning, you can completely ignore it!
That being said, this is annoying, so we can leave this open and we'll fix soon- thanks for pointing out

Not able to recreate this error on new_intro branch.
Running
import matplotlib.pyplot as plt
plt.hist([1, 2, 3, 4], bins=20)
plt.show()

import re
from snorkel.lf_helpers import (
    get_left_tokens, get_right_tokens, get_between_tokens,
    get_text_between, get_tagged_text,
)

doesn't produce the warning. The imports in lf_helpers haven't changed, but it's possible something deeper in the import DAG did.
Closing for now. If someone sees it again, we need to identify what's calling matplotlib.use().


Updated min hugo version required on theme configuration

Updated theme.toml to match with the latest minimum hugo version requirement.

Thank you @Nirzak. Somehow missed that.

No problem bhai.


Simplify "Columns" block markup

As seen in https://www.zeiss.de/semiconductor-manufacturing-technology/news-und-events/smt-pressemeldung/europaeischer-erfinderpreis-2018.html

The markup for the columns block needs to be simplified. Currently it is defined here:
https://github.com/hlxsites/zeiss/blob/b61a426d949efe128cb53fc54522df7a8a1568cc/blocks/columns/columns.js#L5-L85

Cross referencing #81 here as it does something similar. I think we should aim to unify the columns and the columns-new block as both are essentially columns.
cc @jindaliiita

@alinarublea , can we mark this as closed? As I understand, you take care of this in https://github.com/hlxsites/zeiss/commit/25fe786b9e306ea30b88feef165958316edc7611

Implemented in https://github.com/hlxsites/zeiss/pull/198 and


chore: traffic-server forward script

Changes

#909  👈
main

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

Join @NathanFlurry and the rest of your teammates on  Graphite


safaribooksonline.com code examples

Hi,
I'm reading the online version of "Cloud Native DevOps with Kubernetes" at safaribooksonline.com and seems like the code examples do not correspond with the same code in this repo. For example, in Chapter 12 the service definition name is {{ .Values.container.name }}-service-{{ .Values.environment }} but in this repo is name: {{ .Values.container.name }}-service and the latter will fail when feeding the staging values yml file.

Hi @deanmaniatis! Thanks for reporting this! I'm not quite sure how this code got out of sync with what's in the book, but I suspect a few small differences are inevitable over the length of the production process.
When you say:

the latter will fail when feeding the staging values yml file

What do you mean exactly? Can you share the command you're running and the error message that you're getting?

# Inside demo/hello-helm
$ helm install --name demo-staging --values=./k8s/demo/staging-values.yaml ./k8s/demo/ ...
Error: This command needs 1 argument: chart name

# This will succeed
$ helm install --name demo-staging --values=./k8s/demo/staging-values.yaml ./k8s/demo/

# But this will fail as k8s/demo/templates/service.yaml is missing a trailing {{ .Values.environment }}
$ helm install --name demo ./k8s/demo/

But this will fail as k8s/demo/templates/service.yaml is missing a trailing {{ .Values.environment }}
$ helm install --name demo ./k8s/demo/

That works for me; when you say 'this will fail', what error do you get?

Error: release demo failed: services "demo-service" already exists and i guess that's because both Helm releases (one with default and one with staging values) have the same service name.

@deanmaniatis that is correct. Helm does not allow you to have two releases in the same cluster with the same name. Also, Kubernetes does not allow two services in the same namespace to have the same name. You could either append/prepend the environment and use separate namespaces to to make the names unique, or for the demo you can do helm delete demo --purge to remove and clean up the demo resources before doing a new example.

Sorry for the delay checking back in but were you able to get the example working @deanmaniatis? If so I'll go ahead and close this issue.

Closing to clean up old issues, but reply back if you think this is unresolved and want to continue discussing.


Adding has-success on successful validation

I'm just playing with this very promising library to see how easy it would be to port some Bootstrap/jQuery forms over.
One of the things I'd like to do is adding the has-success style on successful field validation.
What would be the recommended way of extending tcomb-form and/or the bootstrap templates to accomplish this?
Thanks for any pointers!

Hi @simonpure,
I think that the easiest way to add support for has-success class would be cloning the default templates:
import React from 'react'
import t from 'tcomb-form'

// clone the default templates and add support for has-success class
// this example overrides the default textbox template
const originalRenderFormGroup = t.form.Form.templates.textbox.renderFormGroup
t.form.Form.templates.textbox = t.form.Form.templates.textbox.clone({
  // overrides how the default template renders the form-group container
  renderFormGroup: function renderFormGroup(children, locals) {
    return (

        {originalRenderFormGroup(children, locals)}

    )
  }
})

const Type = t.struct({
  name: t.String,
  surname: t.String
})

const App = React.createClass({

  getInitialState() {
    return {}
  },

  onSubmit(evt) {
    evt.preventDefault()
    const v = this.refs.form.getValue()
    if (v) {
      console.log(v)
    }
  },

  onChange(value, path) {
    // validate on each changes
    this.refs.form.getComponent(path).validate()
  },

  render() {
    return (
      <form onSubmit={this.onSubmit}>
        <t.form.Form
          ref="form"
          type={Type}
          value={this.state.value}
          onChange={this.onChange}
        />

          <button type="submit" className="btn btn-primary">Save</button>

      </form>
    )
  }

})

The problem I encountered is how to tell the template to not render has-success on first rendering.

Thanks for the quick response and the sample code @gcanti!
The way it's currently implemented is to trigger validation on keydown and blur individually for each field.
I don't think the same behavior can be achieved without introducing an additional state besides hasError. The way I'm thinking about it is to mark a field as dirty once it has focus and conditionally apply the has-success class (open to alternative suggestions).
Follow up question -
What's the best way to add an additional state to a component?
Thanks!

I don't think the same behavior can be achieved without introducing an additional state besides hasError

I agree. Yesterday I released v0.8.2 in which, among other things, I added a isPristine boolean (default true) that is turned to false after the first change, so now you can write:
const originalRenderFormGroup = t.form.Form.templates.textbox.renderFormGroup
t.form.Form.templates.textbox = t.form.Form.templates.textbox.clone({
  renderFormGroup: function renderFormGroup(children, locals) {
    const hasSuccess = !locals.isPristine && !locals.hasError
    return (

        {originalRenderFormGroup(children, locals)}

    )
  }
})

Awesome! Just tried it out and it works as expected.
Thanks for the quick addition - much appreciated.
I'm going to close this issue.


Update Composer dependencies (2021-04-28-00-09)

Visual regression test passed!
View the visual regression test report


fix enum wrong default value

assuming we always want to return ordinal 0 for default value of enum properties unless otherwise specified, then
this should return forordinal(0) instead of values[0] since the values are not necessarily installed in the correct order
fixes issue encountered where values[0] for paymentstatus is ordinal 6 when i built locally without setting default value explicitly but is ordinal 0 on ci's build, similar issue also happens for invoicestatus

If you change the code in Enum.js line 227 to:
      if ( def.ordinal ) {
        next = Math.max(def.ordinal + 1, next);
      } else {
        def.ordinal = next++;
      }

Does that fix the problem?

If you change the code in Enum.js line 227 to:
      if ( def.ordinal ) {
        next = Math.max(def.ordinal + 1, next);
      } else {
        def.ordinal = next++;
      }

Does that fix the problem?

Fixed by
commit d28f4fad7783eda74d631a95e0ce1229fc2b0c64
Author: Kevin Greer<EMAIL_ADDRESS>Date:   Tue Jan 26 13:33:58 2021 -0500
Fix Enum ordinals not getting output correctly and set priority based on ordinal.

Fixed by
commit d28f4fad7783eda74d631a95e0ce1229fc2b0c64
Author: Kevin Greer<EMAIL_ADDRESS>Date:   Tue Jan 26 13:33:58 2021 -0500
Fix Enum ordinals not getting output correctly and set priority based on ordinal.


Step doesn't respect ${{ env.GITHUB_RUN_NUMBER }}

I'm using this action to deploy my built image and ${{ env.GITHUB_RUN_NUMBER }} to set the image tag, but it doesn't doesn't appear to work:
Here's the code (link):
    - name: 'Deploy to Azure Web App for Container'
      uses: azure/webapps-deploy@v2
      with:
        app-name: ${{ env.AZURE_WEBAPP_NAME }}
        images: ${{ env.CONTAINER_REGISTRY }}/gh/duckiehunt:${{ env.GITHUB_RUN_NUMBER }}

Here's the action output (link)
Run azure/webapps-deploy@v2
  with:
    app-name: ***
    images: ***/gh/***:
    slot-name: production
    package: .

As you can see the image does not have the tag in the full image name.  When I go to the Azure Portal, it has the correct image, but then the tag is blank (and then the WebApp is broken)
Expected result:  I expect it to deploy with the GITHUB_RUN_NUMBER tag (in this case, 5).
NOTE:  If I use ${{ github.sha }} then that works; however, that's not the setting I'm trying to use.

@lastcoolnameleft Looking at the code below, in the last line we can change it to GITHUB_RUN_NUMBER, remove env.
code with typo:
 images: ${{ env.CONTAINER_REGISTRY }}/gh/duckiehunt:${{ env.GITHUB_RUN_NUMBER }}/
code with fix:
images: ${{ env.CONTAINER_REGISTRY }}/gh/duckiehunt:${{ GITHUB_RUN_NUMBER }}/


Add Cartograph CF Font

Adding Cartograph here. It's not open source so I didn't include a font with it. Everything else should be good to go.

ugh I gotta fix that Netlify build preivew to work with images

Thank you!

ugh I gotta fix that Netlify build preivew to work with images

Just saw it too, #64 should do the trick.


Does the number of connections measure count the number of base-load profiles?

Or is it based on the 'units' that are specified for an end-point in the topology?
Looking at https://github.com/quintel/etmoses/issues/363 I would think the first right?

It counts the number of base_load, base_load_edsn, and base_load_buildings technologies.

Thanks!


Marshal methods and multiple fragments using the same structure

Marshal methods have problems with multiple fragments using (partially) the same structure
Apollo 2.5.9
Combining fragments as a workaround of the lack of inheritance :
// just using partial media structure in Light object
fragment ProductLightFragment on Product {
    id,
    name,
    media { images }
}

// using the rest of media structure on complete product
fragment ProductCompleteFragment on Product {
   ...ProductLightFragment,
   media { videos }
}

This is just a small example, my real Product structure is really big and I really want to use fragments combination.
No problem with this as a client, the parsing works and you can reach the images via the "light" fragment and videos via the "complete" fragment in return of the query.
But using the marshal methods in my embedded mock server leads to a merge problem in the final json :
    val writer = SimpleResponseWriter(ScalarTypeAdapters(customAdapters))
    data.marshaller().marshal(writer)
     val json = writer.toJson(null)
     response.setBody(json)

Only one of the partial media structure of the two fragments is serialized, here the light version (only the images are returned in the media node of the final json). Then the client fails to parse media for the "complete" fragment.
Probably one of those 2 situations :

one marshaller overwrites the "media" node of the other
one marshaller cannot write in "media" node because the other already did it

Hi 👋 !
Thanks for sending this. This problem happens when using merged fields. This is unfortunately a limitation in the 2.x version and pretty hard to fix without breaking the API.
The good news is that significant work was made in 3.x to address this issue, as well as giving more typed models using fragments as interfaces.
The default operationBased models will correctly merge the merged fields in the output json. Additionally, you can look into responseBased models (doc) to model fragments as interfaces.
Any chance you can try the just released 3.0.0-rc01 and let us know what you think?

I think I faced exactly the same issue in 3.0.0-rc02. Repro test: https://github.com/mateuszkwiecinski/apollo-playground/blob/979d9f9d7070aaf584a6899b360445b550b25885/src/test/kotlin/com/example/Test.kt#L87
(nested response test passes on 2.x but fails on 3.0.0-rc02 with Object 'viewerId.nested({"limit":1}).0.books.0' has no field named 'id'
and it seems like there is a behavior change between 2.x and 3.x and 3.x 🤔  2.x seems to pick first fragment, 3.x picks last fragment (which in my case results id being dropped which breaks caching heavily.

Apollo 2.x
Apollo 3.x

Feel free to ignore my comment from above. It seem like I stumbled upon yet another issue where superflous field in json response was written into the cache, which seems to be fixed 3.x.
Here's proper repro on 3.0.0-rc02 for both this issue and #2818: https://github.com/mateuszkwiecinski/apollo-playground/blob/7c5ae7530511bb872a7b04694a0a9423b8757555/src/test/kotlin/com/example/Test.kt#L15
3.0.0-rc02 tries to read all requested field and throws CacheMiss in runtime.
2.5.11 seems to drop additional fragment data since the very beginning, so at least it's easy to spot something's wrong by looking at generated models, but the app remains stable
3.0.0-rc02 doesn't fix merged fragments issue and it seems it introduces regression to how they behave in 2.5.11

Thanks a lot for the reproducer, that helps a ton 💙 !
Turns out there was a bug in BufferedSinkJsonWriter that did not correctly merge nested objects. This should work now with https://github.com/apollographql/apollo-android/pull/3691. I took the liberty of adding your test case to the test suite (here) so we don't have this happening again, let me know if it's ok with you.
As a side note, if you have a lot of merged fields like book here, you might also be interested in responseBased codegen (doc here). It's a codegen that "flattens" the fragments and generates models matching 1:1 with the json response (instead of matching the GraphQL query). While it usually generates more code, it also generates models that don't have to rewind at all so the parsing is usually faster. Which one to use is a tradeoff so that why we included both but sounds like it could help for this specific use case.

🎉
It's great to hear all of that! That's the kind of new one wants to read in the morning 🚀

let me know if it's ok with you.

Sure! I probably could have adding tests in this project in the first place to make it even easier. Thanks!

As a side note, if you have a lot of merged fields like book here, you might also be interested in responseBased codegen

Nice, didn't know that 👍  I don't think I have that many merged fields in my default project (I only aimed to try all types of them in the repro), but I'll definitelly try that out and see if there's any profit, thanks again!

This is fixed in 3.0.0-rc03. Closing this issue.

@martinbonnin 👋 I think I found another edge case where rc-03 doesn't work if the nested fragment references a list of objects 👀
Here's updated repro: https://github.com/mateuszkwiecinski/apollo-playground/tree/fragments_with_lists
The test fails with Object 'library-1.books.0' has no field named 'id' despite the referenced book has an id and if I'm not mistaken it should be properly picked by CacheKeyGenerator
When looking at the cache content, I expected to see a book id in following places:

I tried to modify the functional test you've added, but I'm having trouble to set-up the project on Java17 :/ (btw I think I made a mistake previously when declaring CacheResolver I should have used the one migration guide suggests (it doesn't affect the previous repro, but it seems to be important now, so I updated it's definition))

Fixed in 3.0.0, hopefully for good 🤞

I'm not 100% done migrating to 3.0.0 (rc3) but for my initial problem it's ok

Hello 👋 It's me again 😬
I think I found one more edge case which seems to be a behavior change when compared with 2.x: https://github.com/mateuszkwiecinski/apollo-playground/tree/cross_cache_typename - (this specific branch)
The only test there throws:

Object 'book-id' has no field named '__typename'

And if I'm not mistaken the repro is to have 2 queries, first writes data into cache, the other one tries to fetch part of the previous object, but it uses fragments as a part of its definition.
If I inline the bookData fragment the test passes which makes me think that might be an unwanted behavior.

Hi @mateuszkwiecinski and apologies for huge Holidays delay. Wish you and everyone in this thread all the best for 2022 🎄  :)
This issue is somewhat different because the underlying cause is the algorithm used to add __typename.
In a nutshell, the 3.x code adds __typename when there are fragment (because this is how you do polymorphism in GraphQL and when we need __typename to parse to the correct concrete type).
This is more restrictive than 2.x that added it on all composite fields by default.
Overall, we're trying to remove the unneeded added __typename because it's less bytes on the network, less work to parse and overall leaner models (see also this issue). So I don't think we want to rollback to 2.x behaviour there.
What we can do is add an optimization that doesn't add typename if we know by construction that the fragment type condition is always true (i.e. the field is monomorphic). This will not fix all issues. For an example, someone could do this:
interface Product
type Book implements Product

# read from network
query Query1 {
  book {
    id # "1001"
    title
  }
}

# read from cache

query Query2 {
  product(id: "1001")  {
    ... on Book {
      id
      title
    }
  }
}

__typename is not needed to parse Query1 but it is for Query2 so we'd have to store the mapping of id <-> __typename somewhere in the cache. That's doable but not easy.
All in all:

quick workaround: add __typename to GetAuthor.viewer.author.topBook so that the cache can find it
mid-term: optimize and do not add __typename for monomorphic fields
long-term: store the id <-> __typename mapping in the cache

It's great to have this optimization, always fetching __typenames was a bit of a waste 🎉
I just wanted to point out that the current behavior makes it pretty easy to shoot yourself in the foot, because intuitively fragment extraction like from this:
query Foo {
  foo {
    bar
    baz
  }
}

to this:
query Foo {
  foo {
    ...fooData
  }
}

fragment fooData on Foo {
  bar
  baz
}

shouldn't be a functional change. It's really easy to not realize that Apollo will fetch different data in both cases and thus cause potential case misses. Perhaps it'd be worth documenting this somehow?

@lwasyl indeed. One more argument to remove the __typename in these cases. Let's follow up in #3774


Unable to import OHHTTPStubsSwift from swift package manager dependency

New Issue Checklist

[X] I have tried with the latest version of OHHTTPStubs
[X] I have read the README
[X] I have read the Using the right Swift Version of OHHTTPStubs for your project section
[X] I have searched in the existing issues
[X] I have read the OHHTTPStubs wiki to see if there wasn't a detailed page talking about my issue

Environment

version of OHHTTPStubs: [9.0.0]
integration method you are using:

[ ] Cocoapods
[ ] Carthage
[ ] submodule
[x] other

version of the tool you use: [Xcode12 beta3]

Issue Description
I'm trying to add OHHTTPStubs ad my pakcage dependency in my Swift package, I can import OHHTTPStubs but not OHHTTPStubsSwift into my project, i have added dependency like this
.package(url: "https://github.com/AliSoftware/OHHTTPStubs.git", .upToNextMajor(from: "9.0.0")),
.testTarget(
            name: "MyFrameworkTests",
            dependencies: [
                "MyFramework",
                "OHHTTPStubs",
                "OHHTTPStubsSwift" // <= Error here, i tried removing it also but it remains same
            ],
            resources: [
                .process("TestData")
            ]
        ),

NOTE: There is someone posted similar problem here https://stackoverflow.com/questions/61069763/swift-package-manifest-for-multiple-library-products
Complete output when you encounter the issue (if any)
xxxx/Package.swift: dependency 'OHHTTPStubsSwift' in target 'MyFrameworkTests' requires explicit declaration; reference the package in the target dependency with '.product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")'

That error tells you how to fix this.
xxxx/Package.swift: dependency 'OHHTTPStubsSwift' in target 'MyFrameworkTests' requires explicit declaration; reference the package in the target dependency with '.product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")'
In the test target dependencies use this .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")

Change your .testTarget to:
.testTarget(
    name: "MyFrameworkTests",
    dependencies: [
        "MyFramework",
        .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")
    ]
)

It also appears you can now do the following, which I have opted for:
.testTarget(
    name: "MyFrameworkTests",
    dependencies: [
        .target(name: "MyFramework"),
        .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")
    ]
)


FROST Trusted Dealer

This PR implements a BIP-340 compatible threshold signature system based on FROST (Flexible Round-Optimized Schnorr Threshold Signatures) with a trusted dealer. This PR does not implement distributed key generation (DKG).
FROST Paper
This PR is based upon the FROST paper by Chelsea Komlo and Ian Goldberg and the draft RFC.
Prior Work
This PR is patterned on the APIs, and in many instances duplicates code, from the MuSig implementation due to their similarities in nonce generation and signing.

In general, I think it would be nice to get this rebase this. (Should be mostly trivial.) Also, CMake support is missing because we have this now for all other -zkp modules (https://github.com/BlockstreamResearch/secp256k1-zkp/pull/288 ), but that's currently not essential.