Linked to file

Minor improvement to readme - make it easier to reach the data.  A good readme is a good start for any repo!
A little more description of what the code is for is usual...

Thank you so much for the pull request! I will try to keep in mind this advise :)


Fix deprecation in PBXProj objects usage

Short description 📝
Fix deprecation warning after the recent performance PR. This is likely due to other commits that merged while the PR was under review.
Solution 📦
Migrate the access of projects to objects.projects and use getReference to get constant time read access.
Implementation 👩💻👨💻

[x] Migrate deprecated usage of projects to objects.projects
[x] Use getReference vs first for finding the project

GIF

👏


UML-829

Purpose
Create and Seed data into the lpa-codes API service.
Fixes UML-829
Approach
Create a script to produce data for lpa-codes from data in our legacy code generator service.
Create a script to push generated data into the lpa-codes DynamoDB table.
Update the api-seeding container to run put_lpa-codes script when running docker-compose.
Learning
It was necessary to enable -sharedDb mode on the lpa-codes service DynamoDB-local container. Without this, each connected client could not see the lpa-codes-local table.
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.UsageNotes.html
Checklist

[x] I have performed a self-review of my own code
[ ] I have added relevant logging with appropriate levels to my code
[x] I have updated documentation (Confluence/GitHub wiki/tech debt doc) where relevant
[ ] I have added tests to prove my work
[ ] The product team have tested these changes

Coverage remained the same at 80.501% when pulling ee48d5970348dac2ba16ac86b5f8cbf6a90a995e on UML-829 into 8cbea452308c0ff24195f460de5d55885ed05422 on master.

docker-compose successfully seeds lpa-codes

Imported cases are successfully returned with calls to the api


Add security group pods scale test in ginkgo

Description of changes:
Adding scale tests for pods using security groups in Ginkgo, also added support to create EKS cluster with Karpenter installed.
The ginkgo test suite creates a deployment with 1000 pods using security groups and the test is repeated three times. The EKS cluster is created with two nodes, and Karpenter should provision the required compute resources(EC2) to provision the pods. The expectation in each test is to have all pods in the deployment be ready within 5 mins.
Test:
ginkgo -v --timeout 30m -- --cluster-kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$AWS_REGION --aws-vpc-id=$VPC_ID
  Attempt #1 Passed.  Repeating ↺ @ 08/26/24 18:37:52.145
  Attempt #2 Passed.  Repeating ↺ @ 08/26/24 18:45:27.071

Ran 1 of 1 Specs in 1579.915 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 26m25.439391588s
Test Suite Passed

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Question regarding this PR:- How can we effectively test pod creation latency  before releasing VPC-RC release candidate? Currently, our cluster uses EKS to test pod creation latency, but this doesn't allow us to run custom version of VPC-RC. Is my understanding correct, or are there alternative methods we could employ for pre-release testing?"

Question regarding this PR:- How can we effectively test pod creation latency before releasing VPC-RC release candidate? Currently, our cluster uses EKS to test pod creation latency, but this doesn't allow us to run custom version of VPC-RC. Is my understanding correct, or are there alternative methods we could employ for pre-release testing?

Synced offline with @yash97- to test before releases, we need to create beta EKS clusters. Instructions to create EKS beta cluster and install Karpenter will be added to our internal release process documents.


Last update broke component

Hi,
After I updated to last version, component don’t works.
I’m using last version of HASSIO.

Can you share more details? Error log?

I'm seeing something similar.

Screenshot: https://tinyurl.com/yegatpht

Logger: homeassistant.config_entries
Source: custom_components/eero/__init__.py:306
First occurred: 9:40:31 PM (1 occurrences)
Last logged: 9:40:31 PM

Error setting up entry Matt Briney for eero
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/eero/__init__.py", line 306, in async_setup_entry
    if any([eero.is_eero_beacon for network in coordinator.data.networks for eero in network.eeros]):
AttributeError: 'NoneType' object has no attribute 'networks'

Logger: homeassistant.config_entries
Source: custom_components/eero/__init__.py:306
First occurred: 9:40:31 PM (1 occurrences)
Last logged: 9:40:31 PM

Error setting up entry Matt Briney for eero
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/eero/__init__.py", line 306, in async_setup_entry
    if any([eero.is_eero_beacon for network in coordinator.data.networks for eero in network.eeros]):
AttributeError: 'NoneType' object has no attribute 'networks'

Logger: aiohttp.server
Source: custom_components/eero/config_flow.py:233
First occurred: 10:01:12 PM (2 occurrences)
Last logged: 10:01:21 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 190, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 70, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 131, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 214, in _async_handle_step
    result: dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/eero/config_flow.py", line 225, in async_step_init
    return await self.async_step_networks()
  File "/config/custom_components/eero/config_flow.py", line 233, in async_step_networks
    conf_networks = [network.name_long for network in self.coordinator.data.networks if network.id in self.options.get(CONF_NETWORKS, self.data[CONF_NETWORKS])]
AttributeError: 'NoneType' object has no attribute 'networks'

@mbriney Thanks for sharing details, but I'm not sure why it's throwing errors. The latest update didn't affect any of the areas your errors are coming from, so I think it's gotta be something else. What eeroOS version are you running? 6.3.0 or something older? Also, have you tried restarting Home Assistant?

how I can help you?
first I have to enable debug logs like this?
    custom_components.eero: debug
let me know!

@pilot1981 You may not even have to modify the log settings unless you've already set them to something non-default. Just check the full log when the component "breaks" and share that please.

Hi,
I looked for eero word in /config/home-assistant.log of my HASSIO, but I don't have any entry....
any suggestion?

Solved removing and installing again it!

@pilot1981 did you have to re-setup your entities or did they all just re-add with the same IDs?  I've got dashboards all built out.  It seems like the only thing the setup would be doing is re-authenticating.  I'm wondering if there's another way to wipe out the authentication and re-login?

It maintained same ID

Everything restored itself when I upgraded to the latest version of HA.


App is blocking the UI and crashing in android 6.0 and below

App is blocking the UI and crashing in android 6.0 and below when i am doing subnet devices. this is reproducible in sample code.

@stealthcopter  any workaround possible.. ??

@stealthcopter your help is appreciated

@stealthcopter your help is appreciated

@nikhilgarg89 Use the following method to run on the Ui thread inside onFinished or in onDeviceFound
new Handler(Looper.getMainLooper()).post(new Runnable() {
        @Override
        public void run() {
            // todo UI calls
        }
    });

@lcabrales I have tried your solution by adding new Handler into my PortScan() function, however it still blocked my Progress Dialog and hang.
Is there any ways to prevent this blocking of Progress Dialog?
You may refer more details of my issues here: https://github.com/stealthcopter/AndroidNetworkTools/issues/51

@lcabrales @nikhilgarg89
Any clues on solving this issue?
Thanks.

I've just tested the sample app on android 6.0 and I'm not having any UI blocking issues. What device are you using? Try lowering the thread count in case your device is using maximum CPU and causing an  actual hang.


Disable parsing of raw HTML

Is there a way to disable parsing of raw HTML altogether? I know I can override specific tags but I'd like to automatically escape HTML characters without transforming the data stored in my database.

It would be nice to combine escaping HTML elements with a whitelist of HTML elements that are allowed to be parsed; anything else would be escaped. This would provide additional safety when displaying user-generated input.

Another feature might be a sanitization function that can be run before the attributes are passed to the parsed element. While you can always provide custom components for everything, one function could handle both things like URL sanitization for non-javascript: URLs and content filtering (curse words, etc).
Something along the lines of sanitize(node, rule, element) that would return an updated node. So an option might be:
sanitize: (node, rule, element) => (element == 'a' ? { ...node, target: customSanitizeUrl(node.target) } : node)

Or:
sanitize: (node, rule, element) => ({ ...node, content: bleepCurseWords(node.content) })

Then in the code, where it
   footnoteReference: {
      match: inlineRegex(FOOTNOTE_REFERENCE_R),
      order: PARSE_PRIORITY_HIGH,
      parse(capture /*, parse*/) {
        return {
          content: capture[1],
          target: `#${capture[1]}`,
        };
      },
      react(node, output, state) {
        const sanitizedNode = sanitize(node, 'footnoteReference', 'a');

        return (

            {sanitizedNode.content}

        );
      },
    },

This isn't the right issue for this, but it's a broader issue of how to handle user-generated content. I like this library, but I'm switching to react-markdown because it has better support for displaying user-generated content. markdown-to-jsx looks like a great library for internal content. To make it safely support user-generated content, I think you need:

Disable automatic HTML parsing
Whitelist of HTML to allow parsing for (optional)
Whitelist of allowable URLs and/or sanitization function to prevent bad links (not just JS links)

Hopefully this comment has been helpful in that.

Possibly relevant package https://github.com/cure53/DOMPurify

That lib is bigger than markdown-to-jsx itself unfortunately.
Adding some basic config to just disable the HTML parsing rules should be relatively straightforward and it would just end up in the generated markdown as plain text.

Think this issue should be closed now after #278?

First, please excuse my lack of security knowledge 🙂 .  I have a problem that optionally disabling parsing raw HTML right now will also disable my custom components.
const options = {overrides: {MyCustomComponent: MyCustomComponent}};

<MyCustomComponent/> // This no longer works if I disable parsing raw HTML.

But what if I want to disable parsing raw HTML only (ie, like

@stephan-noel you can use a custom override just for script tags, for example:
const value = `Hello<div style="color: red;">World</div><script src="evil.com">Bad script</script>`

const MARKDOWN_OPTIONS = {
    overrides:
    {
        // If there is any text inside the script tag then render this, otherwise render nothing.
        script: (props: { children: string }) => props.children,
    },
}

<Markdown options={MARKDOWN_OPTIONS}>
    {value}
</Markdown>

Would just render as:

But the script tag would be missing from the resulting html.

Script tags aren't processed at all for security reasons. https://github.com/probablyup/markdown-to-jsx/blob/main/index.tsx

Hmm we should be discarding script tags entirely as they're obviously a malicious vector

Ah that's interesting.  Yes I'm running 7.1.6 and without disableParsingRawHTML: true then the script's src attribute is rendered and is requested by the page.


setting up firebase-functions with Python

For the love of anything that is holy and unholy can anyobdy explain how correctly to set up firebase-functions with Python?! 😤😭
(tested everything that I found on stackoverflow and chatGpt/gemini to set it up but one error just leads to another and I just spinning in the circles for 3 days now -.-)
At this point I abandon to build it localy and trtying to use "project idx" instead (as  my local envirment is trash at this point after all AI sugestions).
##my current steps:##

create "blank workspace"

run firebase init functions-> that create "functions" folder as it should but no "vevn" is created (and because of that no dependecies are installed)-> not case for the guy in this video :/ -> https://www.youtube.com/watch?v=mvEHYMsk_AE&t=202s

cd functions -> python3 -m venv venv -> pick "python3" in list (as sugest by gemini) -> instalation completed

adding "pkgs.python3" to dev.nix -> packeges

test runing firebase init again to install missing dependecies (now when I have venv in functions) but getting error: Requirement already satisfied: pip in ./venv/lib/python3.11/site-packages (24.0)
/bin/sh: line 1: python3.12: command not found

so bc of that I go to dev.nix and change in packages from  "pkgs.python3" to  "pkgs.python312" (keep in mind that docs says that python 3.10 and 3.11 are supported)

run firebase init again and only now all the dependecies are installed

I can now deploy functions as well
BUT let's say that I want to add numpy library to project:

when in "/functions" directory : source venv/bin/activate

pip install numpy -> python311Packages.pip

import numpy to the project, ex:

from firebase_functions import https_fn
from firebase_admin import initialize_app
import numpy as np

initialize_app()

https_fn.on_request()
def on_request_example(req: https_fn.Request) -> https_fn.Response:
    np.random.seed(42)
    return https_fn.Response("Hello world!")

run firebase deploy, now I get this error (bc I changed to python312 in packages??):

[2024-06-16 11:54:11,957] ERROR in app: Exception on /__/functions.yaml [GET]
Traceback (most recent call last):
File "/home/user/zzz/functions/venv/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/zzz/functions/venv/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/zzz/functions/venv/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/zzz/functions/venv/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/zzz/functions/venv/lib/python3.12/site-packages/firebase_functions/private/serving.py", line 122, in get_functions_yaml
functions = get_functions()
^^^^^^^^^^^^^^^
File "/home/user/zzz/functions/venv/lib/python3.12/site-packages/firebase_functions/private/serving.py", line 40, in get_functions
spec.loader.exec_module(module)
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/user/zzz/functions/main.py", line 7, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'
<IP_ADDRESS> - - [16/Jun/2024 11:54:11] "GET /__/functions.yaml HTTP/1.1" 500 -
<IP_ADDRESS> - - [16/Jun/2024 11:54:11] "GET /__/quitquitquit HTTP/1.1" 200 -
Error: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error

then I tested some things to fix that error (founded on stackoverflow and AIs but nothing helped/leaded to som eother errors)
It's just like there is no wining with this s*** 😫
(please keep in mind that I'm not a python developer and for all Python pros that is maybe a silly fix-although I ask some of my colleagues that code in python and they could not fix it for me:/ )

Hello @neo-xy. Have you followed the instructions here?

Hi @exaby73 yes, I did - and the big thing that is missing there (that I noticed just yesterday) is that one have to run pip freeze -> requirements.txt FROM /fanctions directory before firebase deploy- which is missing in documentation (at least of what can I see). at the same time so still don't understand why "firebase init" in the attached youtube video creates "venv" but when I run it it does not .... and

I see the venv folder being generated under functions/venv on running firebase init and choosing Python. I'm using version 13.11.4 of the CLI. Make sure you have your CLI updated by running npm install firebase-tools@latest


Update Apache_httpd importer from XML to JSON Advisory

Resolve https://github.com/nexB/vulnerablecode/issues/423
Tasks :

[x] Fetch data into JSON format.
[x] Differentiate impacted and resolved packages.
[x] Add severity of vulnerability.
[x] Create Test Case class for Apache_httpd importer.

Done 👍


throw PMKError.cancelled doesn't resolve promise?

PromiseKit version: 6.1
Xcode version: 9.3 beta 3

// Warns "pending promise deallocated"
Promise<Void> { _ in
    throw PMKError.cancelled
}.cauterize()

// Does not give warning
Promise<Void> { seal in
    seal.reject(PMKError.cancelled)
}.cauterize()

This may not signify anything important but:

I would expect throwing a cancellation error to resolve the promise? Am I wrong?
I'm pretty sure I didn't get warnings throwing the cancellation NSError in PromiseKit 4.

I'm happy to use seal.reject for now. The throw syntax is nicer for guard statements though.

Here's the code:
public init(resolver body: (Resolver<T>) throws -> Void) {
    box = EmptyBox()
    do {
        try body(Resolver(box))
    } catch {
        box.seal(.rejected(error))
    }
}

So it's hard to see how the behavior would be different. Do you have a minimal testcase to hand?

public extension Resolver {
    func reject(_ error: Error) {
        box.seal(.rejected(error))
    }
}

And here’s the code for Resolver.reject.

Just includes the above code in the AppDelegate:
https://github.com/samrayner/pmkerror

6.2.0 release coming up.

Excellent, thanks


More straight-forward installation

For PHP 5 and 7

I do not know whether /etc/php/7.0/mods-available/ directory and phpenmod exist outside Debian-based distributions.

Also see https://bugs.php.net/bug.php?id=73465

@Whissi Please see the wiki also https://github.com/Whissi/realpath_turbo/wiki

+1 for your work on the wiki!

@Whissi Is it Ok now?

Sorry, forgot about that PR.
Like said I only picked the make check suggestion, see commit c897717a55f1c8d5747545b063027942b2d7df1d because it is impossible to cover all platforms and I want to keep the README more general (i.e. it should be also valid for branches like develop).

Clsoed via commit c897717a55f1c8d5747545b063027942b2d7df1d

Thank you


feat: 5099 - new dev mode item to refresh all the products from the server

What

New item in dev mode: "Refresh all products from server (cf. Nutriscore v2)".
With a click, we refresh all the local product database from the server using background tasks.
Here we reuse the "change the app language" mechanism just after resetting all the local product languages.

Screenshot

Fixes bug(s)

Closes: #5099

Impacted files

dao_product.dart: new method clearAllLanguages
pubspec.lock: wtf
user_preferences_dev_mode.dart: added a "Refresh all products from server (cf. Nutriscore v2)" item

Codecov Report
Attention: Patch coverage is 0% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 9.53%. Comparing base (4d9c7fc) to head (fdcab85).
Report is 39 commits behind head on develop.

Files
Patch %
Lines

...b/pages/preferences/user_preferences_dev_mode.dart
0.00%
7 Missing :warning:

packages/smooth_app/lib/database/dao_product.dart
0.00%
2 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5100      +/-   ##
==========================================
- Coverage     9.54%   9.53%   -0.02%
==========================================
  Files          325     327       +2
  Lines        16411   16529     +118
==========================================
+ Hits          1567    1576       +9
- Misses       14844   14953     +109

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

Thank you @teolemon for your review!


Radio Stream does not resume after text played

Hello,
Describe the bug
Radio Stream does not resume after text played
To Reproduce
Steps to reproduce the behavior:

Play a radio stream on your sonos system (I have 4 speakers, main speaker called "sideboard")
Different radio streams play on the 4 speakers
Play a text on all speakers at once (when I receive a phone call it tells me the callers name)
Radio streams get not resumed

Radio stream was resumed on the main speaker "sideboard" but that does not happen anymore.
Expected behavior
Radio streams should resume on all speakers
Screenshots

TTS-Ultimate Version

1.0.44

Are you running node-red behind homematic, docker or anything similar?
Node Red v 2.1.3 on a Raspberry Pi

Hi
Does the radio stream resume on the main speaker at least?

Yes, I just tried. It resumes on the main speaker.

I do not care about a delay. It would be fine if it resumes all speakers on which a text was played.
Thank you for thinking about adding it to an upcoming version.

Have you starred my node? :-)

Of course :)

Ok, i'll wrote here as soon as the new version is out.

<EMAIL_ADDRESS>is out.
Please test it. It should work.

Thank you, will test it. Node-Red is not offering it in the web-interface yet.

Works! Great italian job!

Ok, I have a little bit more experience with the new feature now. It's resuming the last streams on all sonos speakers which is perfect. Thank you. But if I press play in the Sonos app it's not showing the last stream but a stream I listened a long time ago. If I press play in the Sonos app it is playing the old stream. The stream which was resumed is not showing in the app.

Hi
Yes. This is a known limitation. Controlling streams from the sonos API is very difficult. The API are undocumented and it’s hard to have a more accurate control over the so many stream types. I cannot do anything for that, sorry!


Random test failures with SIGBUS: bus error on macos-arm64

We are encountering some random test failures, as shown in the following examples:

Test Failure 1
Test Failure 2
Test Failure 3
Test Failure 4

These issues seem to have been introduced by PR #570. Additional tests are needed to identify the root cause.

There is an existing issue regarding the SIGBUS: bus error in the bytedance/mockey library. We can track that issue as well for any relevant updates.

Hi @qdongxu, I noticed from the PR history that you have a Mac with an M1 chip. Could you help us test the bus error issue using your device?


fix(template) add notification for delete custom template EE-2151

/azp run

close due to branch name wrong, will correct typo of branch name and trigger another PR


fixed issue #1903 and added associated testcases

fixed issue #1903 and added associated testcases
1.FieldInfo.java:136行，兼容没有属性有Get方法，fieldTransient通过method来计算
2.JavaBeanSerializer.java:256行，判断是否为有Transient注解，直接查看fieldInfo中计算的值
3.JavaBeanSerializer.java:759~771给 JSON.toJSON接口增加Transient处理，

Codecov Report

Merging #2668 into master will decrease coverage by 0.02%.
The diff coverage is 75%.

@@             Coverage Diff              @@
##             master    #2668      +/-   ##
============================================
- Coverage     81.26%   81.24%   -0.03%
+ Complexity     7032     7030       -2
============================================
  Files           143      143
  Lines         26249    26255       +6
  Branches       6275     6276       +1
============================================
- Hits          21331    21330       -1
- Misses         3104     3107       +3
- Partials       1814     1818       +4

Impacted Files
Coverage Δ
Complexity Δ

...main/java/com/alibaba/fastjson/util/FieldInfo.java
86.94% <100%> (ø)
79 <0> (ø)
:arrow_down:

...libaba/fastjson/serializer/JavaBeanSerializer.java
82.9% <71.42%> (-0.23%)
182 <0> (ø)

...ava/com/alibaba/fastjson/serializer/DateCodec.java
87.58% <0%> (-1.97%)
37% <0%> (-1%)

...com/alibaba/fastjson/parser/JSONReaderScanner.java
72.61% <0%> (-1.28%)
44% <0%> (-1%)

Continue to review full report at Codecov.

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


(v1.7.0) GlyphLayout.setText.197 - IndexOutOfBoundsException

Hi,
I'm having random crashes caused by the GlyphLayout class.
java.lang.IndexOutOfBoundsException: index can't be >= size: 2 >= 0
    at com.badlogic.gdx.utils.Array.get(Array.java:127)
    at com.badlogic.gdx.graphics.g2d.GlyphLayout.setText(GlyphLayout.java:197)
    at com.badlogic.gdx.graphics.g2d.BitmapFontCache.addText(BitmapFontCache.java:494)
    at com.badlogic.gdx.graphics.g2d.BitmapFontCache.addText(BitmapFontCache.java:482)
    at com.badlogic.gdx.graphics.g2d.BitmapFont.draw(BitmapFont.java:208)

So, let me be clear from the start: Yes, this issue is most likely related to multi-threading. Now, I understand that libgdx is not thread-safe, but is this a reason to make it so much thread unfriendly?
The issue I'm experiencing here as been described a lot of time now, in #3388, #3369, #3172, etc...
Everytime you close it because "it's just a multithread problem". But wouldn't it be worth looking into the code of GlyphLayout to reduce the occurrence of bugs like this?
GlyphLayout use a static private final Array<Color> colorStack and then clears it like this:
for (int i = 1, n = colorStack.size; i < n; i++)
    colorPool.free(colorStack.get(i));
colorStack.clear();

This seems the most thread unfriendly way of doing that. I know libgdx is not thread safe, but given the number of people who have bugs like this, it could be really great to change this colorStack into maybe a member instead of a static or something like that.
Thanks

There is a good reason why is libGDX not thread-safe - adding thread safety would also add a considerable overhead and complexity, which would in most cases just slow the code down for no benefit. When developing an application with multiple threads, it is assumed that you know what you are doing and can workaround these problems. Anyway, libGDX provides a way to interface with it from other threads via Gdx.app.postRunnable(). Anything more advanced/complex requires a good knowledge of libGDX and threading (threads are powerful tools and it is easy to shoot yourself in a foot with them).
As a note on the colorStack: Yes it is the most thread unfriendly way, but it is also the most memory friendly way, which is in something like libGDX far more important. (Only a handful of people use threads but everybody uses memory)

@Osaris31 since the issue here is due to the threaded, unsynchronized use of static colorStack in setText method, just either
a) synchronize the calls to this method,
b) override this method with custom-tailored copy-paste version that uses a local color stack field instead of shared static one,
c) send a PR that would allow calling setText with Array<Color> colorStack as parameter,
e.g. change the current setText method to accept it, and make old signature do
/** docs here */
public void setText (BitmapFont font, CharSequence str, int start, int end, Color color, float targetWidth, int halign, boolean wrap, String truncate, Array<Color> currentColorStack) {
   // old code requires changing to use the param instead of the static one
}

/** docs here */
public void setText (BitmapFont font, CharSequence str, int start, int end, Color color, float targetWidth, int halign,
		boolean wrap, String truncate) {
    setText( font, str, start, end, color, targetWidth, halign, wrap, truncate, GlyphLayout.colorStack );
}

as to solution c), it gives little benefit to API (the only thing it allows is decreased dependence on static fields), but has no real drawback as is (no functional changes, no speed changes etc.).
If at least one libGDX dev gives a thumb up about it, I can send the PR myself.
Still, IMO you should just synchronize your threads properly.

Hi,
Thank you for your feedback.
I think the issue here is that most devs wouldn't expect a method as simple as "setText()", to need to be called in a synchronized way:  "setText()" refers to an individual BitmapFontCache object, doesn't draw anything or do anything that you would expect to need synchronizing.
Therefore, having to create a Gdx.app.postRunnable for such a simple operation seems strange and does add a considerable overhead and complexity.
Solution a) cannot work because the "setText()" is also called internally a lot of time by UI elements such as Label. Solution b) and c) implie to override a lot of things, not only GlyphLayout but also BitmapFontCache which calls it.
It's too bad because every multiplayer games will face that, but I guess it's just that libGDX is not designed for multiplayer games and we'll have to live with it :p

In multiplayer games I usually receive and parse/preprocess all network data on the off thread and then act on it on the main thread. It is not slower than doing all that work in singleplayer game (main thread does not deal with any IO, only processing) and it is way easier than synchronizing everything, where you would have to also make sure that you are not causing race conditions with your own game logic. But discussion is more suited to the IRC or forums.
On the suggested solutions: nothing except a) (synchronizing the call) will work properly in all cases. They will prevent this exact problem, but setText modifies local state and therefore if two threads call setText on the same object in the same time, it will most likely break again. c) will allow two concurrent calls of setText on different GlyphLayouts, but I wonder if it is even worth the hassle for such niche use case. If somebody decides to implement it, make sure to document that it does not provide full thread safety.

You're right, I'm going to close the issue and go for solution d) (rewrite BitmapFontCache so that setText() only really set a String and do nothing else, and then the draw() method will prepare the Glyphs if the String was changed since last draw)

Back from vacation!
colorStack is working memory for a GlyphLayout. It uses a static to avoid allocating an Array per GlyphLayout, but this isn't a huge savings since you will try to avoid allocating GlyphLayout on the fly anyway. I'm fine with colorStack being non-static.

Note that makes it more likely that different GlyphLayout instances can be used from different threads, but it looks like Pools is used which may have race conditions (eg if a map is resized while being accessed).

Often-breaking thread safety is IMO better than sometimes-maybe-breaking thread safety.

Yep. At least now multithreading will work just fine, until it doesn't. :)

I was just considering moving it back to static and vaguely remembered this thread. @Darkyenus I realize now you were saying you prefer it static, so it is a more obvious problem. 4.5 years late, but I finally got it. :D

@NathanSweet Looking at this whole issue five years later: Maybe we could get rid of using the Color pool altogether, by turning the colorStack into an IntArray (or FloatArray), and storing the color as packed into a primitive.
(This has nothing to do with thread safety, colorStack could stay happily static, but the code would get shorter, I think.)

Hmm, that's interesting. Looks like this. I like not needing a color pool. In the (common) case of markupEnabled == false, we convert the color to an int, then every run uses Color set(int).  That's probably OK, though I'd like the non-markup case to not be affected by markup as much as possible. Not sure if it could be done better.


Security issue: public access

if Redmine is configured to allow access to specific projects publicly (i.e. "Requires authentication" is not active) then access to /mentions/ is allowed for everybody and shows mentions from all projects!

There is no /mentions/ route whatsoever in this plugin


icon/button click event handling

Hi, i noticed that the undo button seems not to trigger for me, and realized that if I click on the icon it doesn't trigger, but if I carefully click inside the button but outside the icon, it does.

Love this app, thanks, hope this helps! Chrome on ChromeOS:
Google Chrome | 81.0.4044.103 (Official Build) (32-bit)
-- | --
Revision | 2a35e9a3c64174c5e9070e73d1ca3992d07ac578-refs/branch-heads/4044@{#917}
Platform | 12871.76.0 (Official Build) stable-channel hana
Firmware Version | Google_Hana.8438.184.0
Customization ID | OEM1-MAPLE
ARC | 6369516
JavaScript | V8 8.1.307.28
Flash | <IP_ADDRESS>3 /opt/google/chrome/pepper/libpepflashplayer.so
User Agent | Mozilla/5.0 (X11; CrOS aarch64 12871.76.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.103 Safari/537.36

@jywarren I am unable to reproduce this, but I also don't have a ChromeOS machine to test with. Clicking the button through the icon seems to work fine on Chrome 81 on Windows, though.
Was this consistent behavior across all buttons, or just undo / redo?


⚠ ClamAV has degraded performance

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

HTTP code: 200
Response time: 73 ms

Resolved: ClamAV performance has improved in 4f8a049 after 5 minutes.


Typo

under the "Cloud Apps" Heading
"Select spps to target specific services by your policy." should be "Select apps to target specific services by your policy."

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

ID: 625bb1b2-81fd-9804-c0b5-3cd2904decd9
Version Independent ID: e4468b05-200e-24ae-75e9-29fb2b3a6ddc
Content: What are conditions in Azure Active Directory conditional access?
Content Source: articles/active-directory/conditional-access/conditions.md
Service: active-directory
GitHub Login: @MarkusVi
Microsoft Alias: markvi

@grayjeremy Thanks for catching this. We are investigating and will resolve shortly.
@MarileeTurscak-MSFT  - FYI this typo appears to have been fixed in the private repo so I assume all that's needed is to merge the PR and push this to the public doc.

Thanks @grayjeremy and @femsulu !
Yes, the fix is already there in the private repository. The changes generally go live in 24 hours.


Sizes of tensors must match except in dimension 1. Expected size 26 but got size 25 for tensor number 1 in the list.

When loading a model from torch.hub I am getting the following error: Sizes of tensors must match except in dimension 1. Expected size 26 but got size 25 for tensor number 1 in the list
Minimal working example:
import torch
from rfa_toolbox import create_graph_from_pytorch_model, visualize_architecture

model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
graph = create_graph_from_pytorch_model(model)

Please see for more info: issues/6455

This is caused by some contraflow within the forward-pass of YoloV5. RFA-Toolbox uses the JIT-Compiler to extract the graph of a model, which only evaluated the parts of the control flow touched by the forward-pass during the trace.
For some reason this requires any YoloV5-model to be in train-mode in order to be traceable by the JIT-Compiler of PyTorch.
If you put the model in train mode it works.
Here is some example code, that fixed the issue:

import torch
from rfa_toolbox import create_graph_from_pytorch_model, visualize_architecture

# Model
model_name = "YoloV5s"
model = torch.hub.load('ultralytics/yolov5', f'{model_name.lower()}')  # or yolov5m, yolov5l, yolov5x, custom
#model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5s.onnx')  # or yolov5m, yolov5l, yolov5x, custom
model.train()
graph = create_graph_from_pytorch_model(model.cpu(), (4, 3, 640, 640))
visualize_architecture(graph, model_name=f"{model_name}", input_res=10000).render(f"{model_name}")

@MLRichter this does not solve the problem for me, it results in the same error again, please have a look at the log:
Using cache found in /root/.cache/torch/hub/ultralytics_yolov5_master
YOLOv5 🚀 2022-1-31 torch 1.10.1+cu113 CUDA:0 (NVIDIA GeForce RTX 3090, 24268MiB)

Fusing layers...
Model Summary: 213 layers, 7225885 parameters, 0 gradients
Adding AutoShape...
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_3645/3417301980.py in <module>
      7 #model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5s.onnx')  # or yolov5m, yolov5l, yolov5x, custom
      8 model.train()
----> 9 graph = create_graph_from_pytorch_model(model.cpu(), (4, 3, 640, 640))
     10 visualize_architecture(graph, model_name=f"{model_name}", input_res=10000).render(f"{model_name}")

/opt/conda/lib/python3.8/site-packages/rfa_toolbox/encodings/pytorch/ingest_architecture.py in create_graph_from_model(model, filter_rf, input_res, custom_layers)
    411         else KNOWN_FILTER_MAPPING[filter_rf]
    412     )
--> 413     tm = torch.jit.trace(model, (torch.randn(*input_res),))
    414     return make_graph(
    415         tm, filter_rf=filter_func, ref_mod=model, classes_to_not_visit=custom_layers

/opt/conda/lib/python3.8/site-packages/torch/jit/_trace.py in trace(func, example_inputs, optimize, check_trace, check_inputs, check_tolerance, strict, _force_outplace, _module_class, _compilation_unit)
    739
    740     if isinstance(func, torch.nn.Module):
--> 741         return trace_module(
    742             func,
    743             {"forward": example_inputs},

/opt/conda/lib/python3.8/site-packages/torch/jit/_trace.py in trace_module(mod, inputs, optimize, check_trace, check_inputs, check_tolerance, strict, _force_outplace, _module_class, _compilation_unit)
    956             example_inputs = make_tuple(example_inputs)
    957
--> 958             module._c._create_method_from_trace(
    959                 method_name,
    960                 func,

/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1100         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1101                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1102             return forward_call(*input, **kwargs)
   1103         # Do not call functions when jit is used
   1104         full_backward_hooks, non_full_backward_hooks = [], []

/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py in _slow_forward(self, *input, **kwargs)
   1088                 recording_scopes = False
   1089         try:
-> 1090             result = self.forward(*input, **kwargs)
   1091         finally:
   1092             if recording_scopes:

/opt/conda/lib/python3.8/site-packages/torch/autograd/grad_mode.py in decorate_context(*args, **kwargs)
     26         def decorate_context(*args, **kwargs):
     27             with self.__class__():
---> 28                 return func(*args, **kwargs)
     29         return cast(F, decorate_context)
     30

~/.cache/torch/hub/ultralytics_yolov5_master/models/common.py in forward(self, imgs, size, augment, profile)
    508         if isinstance(imgs, torch.Tensor):  # torch
    509             with amp.autocast(enabled=autocast):
--> 510                 return self.model(imgs.to(p.device).type_as(p), augment, profile)  # inference
    511
    512         # Pre-process

/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1100         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1101                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1102             return forward_call(*input, **kwargs)
   1103         # Do not call functions when jit is used
   1104         full_backward_hooks, non_full_backward_hooks = [], []

/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py in _slow_forward(self, *input, **kwargs)
   1088                 recording_scopes = False
   1089         try:
-> 1090             result = self.forward(*input, **kwargs)
   1091         finally:
   1092             if recording_scopes:

~/.cache/torch/hub/ultralytics_yolov5_master/models/common.py in forward(self, im, augment, visualize, val)
    397         b, ch, h, w = im.shape  # batch, channel, height, width
    398         if self.pt or self.jit:  # PyTorch
--> 399             y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize)
    400             return y if val else y[0]
    401         elif self.dnn:  # ONNX OpenCV DNN

/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1100         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1101                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1102             return forward_call(*input, **kwargs)
   1103         # Do not call functions when jit is used
   1104         full_backward_hooks, non_full_backward_hooks = [], []

/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py in _slow_forward(self, *input, **kwargs)
   1088                 recording_scopes = False
   1089         try:
-> 1090             result = self.forward(*input, **kwargs)
   1091         finally:
   1092             if recording_scopes:

~/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py in forward(self, x, augment, profile, visualize)
    124         if augment:
    125             return self._forward_augment(x)  # augmented inference, None
--> 126         return self._forward_once(x, profile, visualize)  # single-scale inference, train
    127
    128     def _forward_augment(self, x):

~/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py in _forward_once(self, x, profile, visualize)
    147             if profile:
    148                 self._profile_one_layer(m, x, dt)
--> 149             x = m(x)  # run
    150             y.append(x if m.i in self.save else None)  # save output
    151             if visualize:

/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1100         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1101                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1102             return forward_call(*input, **kwargs)
   1103         # Do not call functions when jit is used
   1104         full_backward_hooks, non_full_backward_hooks = [], []

/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py in _slow_forward(self, *input, **kwargs)
   1088                 recording_scopes = False
   1089         try:
-> 1090             result = self.forward(*input, **kwargs)
   1091         finally:
   1092             if recording_scopes:

~/.cache/torch/hub/ultralytics_yolov5_master/models/common.py in forward(self, x)
    273
    274     def forward(self, x):
--> 275         return torch.cat(x, self.d)
    276
    277

RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 26 but got size 25 for tensor number 1 in the list.

I was able to reproduce the error and fix the bug in your code.
import torch
from rfa_toolbox import create_graph_from_pytorch_model, visualize_architecture

def main():
    model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
    model.train()
    model.cpu()
    graph = create_graph_from_pytorch_model(model, input_res=(4, 3, 640, 640))
    visualize_architecture(graph, "model").view()

if __name__ == "__main__":
    main()

I will elaborate on the changes to the code:
First, the model was not deployed on the CPU, while the input tensor used for tracing was, which would cause a raise.
I should probably add some logic that detects the device automatically, though, since this is a trap that probably many will fall in to.
Second, YoloV5 has a bit exotic input size requirements, when you compare it to classifiers, which requires an input resolution of 640x640 pixel standard. The shape of the tensor used for tracing (obtaining the graph shape) is by default 399x399 pixels, which is enough for most classifiers, but too small for YoloV5.
The tuple that was provided in my code provides this larger tracing tensor. However, since the posting of this code version 1.4.2 has released, which slightly changed the interface bumping this specific argument to the third place, this is the reason the code of this post provides it as a keyword-argument.
Third, the model needs to be in train mode, since otherwise controll-flow is enabled during the forward pass which is directly dependent on the input of the model. Behavior like this is not supported by the JIT-compiler of PyTorch, which we rely on to extract the compute-graph, and will therefore raise and error in the process.


While Julius does not need introduction, it's still good to have this

Signed-off-by: Richard Hartmann<EMAIL_ADDRESS>

:+1:

Haha, I forgot myself :laughing:

:+1:


Expose number of a block from which context.block_header originates

This is needed for the historic access to be reliable.
Look for #3564 in the codebase to find where it's causing issues.

With #3937 this should be easily addressed. While we might not want to expose it directly as block_number as we could for public, (since it will be super easy to mess up between public and private) we can expose it with a different name.


Release v0.1.0

This PR will update dependency versions to crates.io versions in preparation for a full crates.io release, and integrates the first version of Songbird's changelog.
Currently, this is blocked on the release of serenity v0.10.0, serenity-voice-model v0.10.0, and twilight v0.3.0. The new serenity versions are needed as a bare minimum, and since these are poised to make the swap over to tokio v1.0 we also need to wait on the next twilight version.
After this is merged, the project will strictly adhere to semver: breaking changes will be merged to next, while patches and new features which do not break API compatibility will be merged to current.

Serenity 0.10 has been released, so now we only need to wait on twilight

Serenity 0.10 has been released, so now we only need to wait on twilight


Rename project

As a user I want to rename a project.

We decided to go with option 1. Renaming Projects will only be possible on the Page Overview (#176 )

Closed due to our upcoming change to .alva files. You can rename them by yourself then in Finder/Explorer.


fix: remove rbac Secrets from app rules

Be able to watch flux resources in UI without having rights to read secrets in k8s.

@DanielAntos90 what is the reason for this change?
looking forward to understanding your objectives with the change

@DanielAntos90 Drop me a PM to connect up on this.


Can not generate api docs for AutoParameter when business function argument is pointer

Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
Can not generate api docs for AutoParameter when bussiness function argument is pointer
What you expected to happen:
Can generate api docs for AutoParameter when bussiness function argument is pointer
How to reproduce it (as minimally and precisely as possible):
Define auto parameter as pointer in business function argument, example:
type MessageOption struct {
	// Example is test auto option.
	Example string `source:"Query,example"`
}

func GetMessage(ctx context.Context, id int, option *MessageOption) (*Message, error) {
    ...
}

Anything else we need to know?:
Nothing

are you interested in fixing this problem? If not, I'll fix this issue later.

/assign @wutzx


I keep getting the 'The Flutter Daemon has terminated.' message every time I try to connect to my emulator.

Here is the error log:
log-b46b.txt

@DanTup

It looks like the process is failing to start:
[12:18:25 AM] [FlutterDaemon] [Info] Spawning /Users/mc/Documents/flutter/bin/flutter with args ["daemon"]
[12:18:25 AM] [FlutterDaemon] [Info] ..  in /Users/mc/Documents/flutter
[12:18:25 AM] [FlutterDaemon] [Info] ..  with {"toolEnv":{"FLUTTER_HOST":"VSCode","PUB_ENVIRONMENT":"vscode.dart-code"}}
[12:18:25 AM] [FlutterDaemon] [Info]     PID: 47912
[12:18:25 AM] [FlutterDaemon] [Info] ==> [{"id":"1","method":"emulator.getEmulators"}]
[12:18:25 AM] [FlutterDaemon] [Error] env: bash: No such file or directory

Further up the log when searching for the SDK, it has:
[12:18:25 AM] [General] [Info]         /Users/mc/Desktop/Flutter Projects/newprojecttest/$PATH
[12:18:25 AM] [General] [Info]         /Users/mc/Desktop/Flutter Projects/newprojecttest/$PATH/bin
[12:18:25 AM] [General] [Info]         /Users/mc/Documents/flutter/bin

The presence of $PATH in there looks broken. My guess is that the way you've set your PATH variable is incorrect, and you've ended up with the literal string $PATH in the search path rather than the previous contents of the variable $PATH. This means bash is not found (but is required, since Dart-Code spawns all processes using shell-execute).
So I would review how/where you've updated your PATH environment variable, it seems like something might be incorrect.

@khadija-hotreload
Seems to be an issue how you have setup $PATH.
Please check above comment and possible solution and see if it helps to resolve your issue.

This is how I've set the PATH. The issue appears to be something else since my flutter application is running through the terminal. It's just that flutter daemon that terminates and doesn't connect my IDE (vscode) to the emulator (if that makes any sense).

@khadija-hotreload
It seems the issue is related to your setup and not an issue within the framework. Please see https://flutter.dev/community for resources and may ask this in StackOverflow to get help on it.
Closing from here. If you disagree, write in comments and I'll reopen it.
Thanks.

@khadija-hotreload VS Code spawns the process a little differently to how it'll run in your terminal. It has to spawn a shell to execute the process and by default that's bash, but because the PATH is not correct bash can't be found.
The log file you posted shows that your PATH contains the literal string $PATH which means all the usual system paths have been removed.
If you type echo $PATH in your terminal, you may find that it includes the string $PATH but it should not. I'm not sure what's causing it, perhaps it's the quotes " around it - they don't look like standard quotes so maybe they're preventing the variable from being interpolated (this happens with single quotes, for example.. you should use standard double quotes ").
After fixing this, you may need to reboot to get the original PATH back, as it's been overwritten for the session with that string. You should be able to tell when it's fixed as echo $PATH in your terminal should print something that does not include the string $PATH but many system paths (for example /usr/local/bin, /usr/bin etc).


how can i reference a image on my .scss file?

Hello, I changed my rails application 6 to work with cssbundling instead webpacker. This is working perfectly on dev, but on prod, the link for images on style.scss is broken.
footer {
  background-image: url('ruby.png');
}

this works on dev, but in prod, I'm getting a 404 error. O noticed that the file is created in the /public/assets/ but for some reason the link returned is not the same. I mean without the hash in the name ruby-123a82sc347274ds63746a1wdhj32-png just https://mysite.com/assets/ruby.png

Duplicate of https://github.com/rails/cssbundling-rails/issues/22.


Refactored python function to create command line arguments

This commit is for issue #338

This change is

This LGTM; please squash these commits together (you can use the commit message from the first commit).

:pushpin: Commit 04a0052 has been approved by aneeshusa

Thank you for the PR!
@bors-servo r+

:hourglass: Testing commit 04a0052 with merge dcb93ca...

:sunny: Test successful - travis


Missing git tag for 1.13.0 release

It would be nice to keep PyPI releases and git tags in sync :)

I forgot to push the tags, thanks for the reminder. They're up now :+1: :soccer: :top:


typo: Double word "the"

Docs Build status updates of commit a0aa379:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/antipatterns/busy-front-end/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Support modules when targeting ES6 and an ES6 ModuleKind

#4806 and a part of #4389 refer to this change - people have been wanting to be able to disable emitting es6 module syntax when targeting es6 for awhile, and this allows them to do just that. While this could wait until we re-architect our emit for even more granular emit, even with our current emitter this wasn't a bad change to make.
Feelings about it?

@mhegazy anything else that I would need to look into for this? I looked through the diagnostic messages to see if we had any other features which were marked as ES6 dependent but were really ES6 module dependent, such as import foo = and export = and swapped them to depend on the module kind.

:+1:

can you refresh.

@mhegazy refreshed & retested.

Ping @mhegazy: do we want to merge this?

@rbuckton said he was looking for this, so I'm interpreting your :+1: as an lgtm now.

:+1:

@weswigham -- Thanks for this work. This unblocks a much better integration story between TypeScript and Ember-CLI :+1:

very good job.


update metrics related to the 2299 curated instances dataset

The table contains the metrics related to the newer dataset

Great work!  :rocket:


Bug with number + maxLength

Bug
If I create field with input limit and input type they do not work together correcly
When I open survey assessment on the window I can input only numbers and have no input limitations
Must be input limit, which I selected
I have that type of field:
{"type":"text","name":"Zip Code4","title":"Zip Code","maxLength":5,"inputType":"number"}

Specify your

browser: Chrome
surveyjs platform jquery
surveyjs version: 1.0.44

@NafanyaVictorovna We can add two string properties: min and max. It will work as in this example.
Will it work for you?
Thank you,
Andrew

@andrewtelnov Yes, it will be fine, thanx!

@NafanyaVictorovna as an alternative you can use regexp validator, please check:
{
 pages: [
  {
   name: "page1",
   elements: [
    {
     type: "text",
     name: "question2",
     validators: [
      {
       type: "regex",
       text: "Please type exactly 5 digits",
       regex: "^\\d{5}$"
      }
     ]
    }
   ]
  }
 ]
}

@dmitrykurmanov I want check my fields immediately and prevent input more than it should be, for example no more then 6 digits for zip field

@dmitrykurmanov @tsv2013 Lets add min and max properties into QuestionText.
Thank you,
Andrew

@andrewtelnov min+max don't fit @NafanyaVictorovna requirements. These settings allow to enter more than min/max number and validation works on form submit only.
I think this task can be solved via the input mask custom widget

@andrewtelnov We've tested these attributes with @dmitrykurmanov and the result didn't look ok for us.

@tsv2013 ok, Please, can you give me some example with input mask, if it will require to show hint - it will be fantastic!

@tsv2013 ok, I see. Thank you!

@tsv2013 Yes, I'd checked. It is good alternative for me - Thank you much.


Created tutorial for running Ollama on NVIDIA Jetson devices

This pull request provides guidance for people interested in enabling NVIDIA's AI edge computing devices to run Ollama at full power (i.e. on the integrated GPU). Several people (myself included) have expressed interest in this capability (please see issue #1071).
@BruceMacD mentioned via Discord that the CLI will soon support passing num_gpu as a parameter when running ollama serve. I will update the tutorial when that becomes available.
Thanks!

@bnodnarb is this method expected to work on the original Jetson Nano? It's stuck at using CUDA 10..

@bnodnarb It does not seem to work on AGX orin with latest ollama.


Page + Navigation problem

I'm having problems with page navigation:
<button data-navigation="page-name">Go to page</button>

Not working.
<button data-navigation="$previous-page">Back</button>

Not working.
Go to page

Working fine.
Am I missing something?

Your HTML looks like correct to me... but I don`t remember if is necessary add the btn class param to create action to button.
$previous-page works only after visit a page.
Try and return here...

I thinking, if happaning a JavaScript error buttons not working, because the actions from him are put with JavaScript.

@John-Henrique :+1:
$previous-page does not work in the default page.
Please, reopen the issue if you used this in another page.


Add code highlighting for install script

This makes the readme just a little bit more accessible for users using a screenreader or something similar.

Thank you soooo much :)


[dtls] notify kDisconnectedLocalClosed when disconnect locally

The PR #10608 added ConnectEvent to notify the coap secure session connection status. It missed to set the event to kDisconnectedLocalClosed when the Disconnect() is called outside Process().

Hi @sunytt ! Thanks for the PR! I think it may be related to the failures in https://github.com/openthread/openthread/pull/10655

Hi @sunytt ! Thanks for the PR! I think it may be related to the failures in #10655

Thanks for adding the test 👍 , it could pass with the change in this PR.


add linkage with hdf5 and hdf5_hl

I found that the shared object for bindings-hdf5 is not linked with libhdf5.so and libhdf5_hl.so. This can cause problems in GHCi, like so:
$ stack repl
*Bindings.HDF5.Types Bindings.HDF5 Bindings.HDF5.HighLevelAPI Bindings.HDF5.LowLevelAPI Bindings.HDF5.Types> Bindings.HDF5.c'H5open
ghc: ^^ Could not load 'H5check_version', dependency unresolved. See top entry above.

ByteCodeLink: can't find label
During interactive linking, GHCi couldn't find the following symbol:
  H5check_version
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
<EMAIL_ADDRESS>
*Bindings.HDF5.Types Bindings.HDF5 Bindings.HDF5.HighLevelAPI Bindings.HDF5.LowLevelAPI Bindings.HDF5.Types>

This seems due to the fact that the shared object which is built by stack build is not linked with libhdf5.so and libhdf5_hl.so:
$ ldd libHSbindings-hdf5-0.1.2-KfKwXj5IPLyKhFzrLF6QxQ-ghc8.6.5.so
	linux-vdso.so.1 =>  (0x00007ffe5a936000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f19260ae000)
	libHSbindings-DSL-1.0.25-2kwolusgL8L5V1adlcppFi-ghc8.6.5.so => /redacted/.stack/snapshots/x86_64-linux/af106f1d68e31ad0380a86551f69303929efb450012401048941c855503533ad/8.6.5/lib/x86_64-linux-ghc-8.6.5/libHSbindings-DSL-1.0.25-2kwolusgL8L5V1adlcppFi-ghc8.6.5.so (0x00007f1926406000)
	libHSbase-<IP_ADDRESS>-ghc8.6.5.so => /redacted/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/base-<IP_ADDRESS>/libHSbase-<IP_ADDRESS>-ghc8.6.5.so (0x00007f1925720000)
	libHSinteger-gmp-<IP_ADDRESS>-ghc8.6.5.so => /redacted/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/integer-gmp-<IP_ADDRESS>/libHSinteger-gmp-<IP_ADDRESS>-ghc8.6.5.so (0x00007f19256e1000)
	libHSghc-prim-0.5.3-ghc8.6.5.so => /redacted/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so (0x00007f1925252000)
	libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f1924fd2000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1924c08000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f19263b7000)

I propose to add extra-libraries in the cabal file to make the shared object linked with the HDF5 libraries. With this change I get
$ ldd libHSbindings-hdf5-0.1.2-At2Qy1W89KKGUfq74sZoZl-ghc8.6.5.so
	linux-vdso.so.1 =>  (0x00007ffcb93e1000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f10d7601000)
	libhdf5.so.10 => /opt/hdf5-1.8/lib/libhdf5.so.10 (0x00007f10d710b000)
	libhdf5_hl.so.10 => /opt/hdf5-1.8/lib/libhdf5_hl.so.10 (0x00007f10d6ee8000)
	libHSbindings-DSL-1.0.25-2kwolusgL8L5V1adlcppFi-ghc8.6.5.so => /redacted/.stack/snapshots/x86_64-linux/af106f1d68e31ad0380a86551f69303929efb450012401048941c855503533ad/8.6.5/lib/x86_64-linux-ghc-8.6.5/libHSbindings-DSL-1.0.25-2kwolusgL8L5V1adlcppFi-ghc8.6.5.so (0x00007f10d7957000)
	libHSbase-<IP_ADDRESS>-ghc8.6.5.so => /redacted/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/base-<IP_ADDRESS>/libHSbase-<IP_ADDRESS>-ghc8.6.5.so (0x00007f10d655a000)
	libHSinteger-gmp-<IP_ADDRESS>-ghc8.6.5.so => /redacted/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/integer-gmp-<IP_ADDRESS>/libHSinteger-gmp-<IP_ADDRESS>-ghc8.6.5.so (0x00007f10d651b000)
	libHSghc-prim-0.5.3-ghc8.6.5.so => /redacted/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/ghc-prim-0.5.3/libHSghc-prim-0.5.3-ghc8.6.5.so (0x00007f10d608c000)
	libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f10d5e0c000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f10d5a42000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f10d790a000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f10d5828000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f10d5624000)

which works fine in stack repl.

Sorry for the noise in this PR - this was my first time to use Travis and Nix and it took me a while to figure out how to make the build green.
The GHC versions which were used in the build seem not to be available anymore in Nix, so I updated them. The default.nix files were regenerated using cabal2nix  --shell ./. > default.nix.
Since I'm a newbie in this stack I appreciate any feedback, especially if something's not right. If the amount of changes is too big I'm happy to try and reduce it further.


StorageDriver GCS: improve test suite clean-up and add retrying to all GCS api calls

This PR is a followup on #1366. While #1366 solves issues where the results of the List call after a Delete operation is inconsistently reporting that some files still exist, it does not handle the case where the Delete operation itself does not delete files that were just created (due to "eventual consistency").
In addition this PR changes the test suite to report errors occurring during cleanup instead of silently continuing and panicking with a generic message later. This makes it much easier to figure out why a file was not deleted.
In fact sometimes files were not deleted due the the Google API returning 5XX status codes. In such cases the operation can simply be retried and usually succeeds the next time.  To solve this, this PR automatically retries all storage API requests.
@RichardScothern

@aibaars Looks like there is a go fmt issue

@aaronlehmann Sorry about that, should be fixed now.

Current coverage is 53.69%

Merging #1372 into master will decrease coverage by -4.39% as of fd2f568

@@            master   #1372   diff @@
======================================
  Files          123     123
  Stmts        11108   11134    +26
  Branches       777     706    -71
  Methods          0       0
======================================
- Hit           6452    5978   -474
+ Partial        777     706    -71
- Missed        3879    4450   +571

Review entire Coverage Diff as of fd2f568

Uncovered Suggestions

+0.28% via ...ge/driver/gcs/gcs.go#182...213
+0.24% via ...ge/driver/gcs/gcs.go#85...111
+0.21% via ...ge/driver/gcs/gcs.go#471...494
See 7 more...

Powered by Codecov. Updated on successful CI builds.

LGTM

LGTM


Redundant ToArray() call in GetBlobsAsyncCollection class

Library name
Azure.Storage.Blobs
In the GetBlobsAsyncCollection class, there is an unnecessary call to ToArray() in the following code snippet:
GetBlobsAsyncCollection.cs
            return Page<BlobItem>.FromValues(
                response.Value.Segment.BlobItems.ToBlobItems().ToArray(),
                response.Value.NextMarker,
                response.GetRawResponse());

The ToArray() method call is redundant because the ToBlobItems() method already returns an array.

This issue has been resolved from this PR: https://github.com/Azure/azure-sdk-for-net/pull/45654


When statsig server initialization fails(maybe connect timeout), the exception is not thrown

in java
    private void init() {         try {             Future initFuture = Statsig.initializeAsync("");             initFuture.get();         } catch (Exception e) {             throw new IllegalStateException(e);         }     }
When connect timeout due to network,statsig server just print a log and not throw any error,i cant know if it was init successfully.
The core code is in class StatsigServerImpl#setup(), can throw an exception here?

Hey Hikkovo!
This is a design decision on our end, we prefer to not throw exceptions in production. It might be useful for you to use our InitializationDetails object to check how things resolved: https://github.com/statsig-io/java-server-sdk/blob/2469701f5f6d3e80468cf413b49ab0b0fae53006/src/main/kotlin/com/statsig/sdk/InitializationDetails.kt#L13
Let me know any other questions, I'll plan to close this.

OK,thanks!!!!!!!!!!


Stop showing exported environment variables in deploy script output

I think we should remove this, so that export commands below to cause secrets to be logged.
https://github.com/silinternational/serverless-mfa-api-go/blob/d9aa85f5cd2970f6ebde5da04ad076f610b9dd2f/lambda/deploy.sh#L6-L7

@briskt @forevermatt Has this been addressed as well?

@briskt @forevermatt Has this been addressed as well?

The builds are still outputting those steps, though it looks like the GitHub Action is redacting the sensitive ones. I don't know how reliable it is to depend on them to hide sensitive values, but for now it's working. 🤷♂
We probably could remove that set -x line, to avoid this risk, unless @briskt sees a reason not to do that.

@briskt @forevermatt Has this been addressed as well?

The builds are still outputting those steps, though it looks like the GitHub Action is redacting the sensitive ones. I don't know how reliable it is to depend on them to hide sensitive values, but for now it's working. 🤷♂
We probably could remove that set -x line, to avoid this risk, unless @briskt sees a reason not to do that.

The redaction happens, so it seems, because the sensitive data is defined in a GitHub Secret. As for the set -x in the script, it is already reversed with a set +x before the line that would output the secret.


[image_picker] Pick image from ImageSource.camera freezes app for a few seconds

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
reproduced on an iPhone 13 mini with the ImagePicker example provided by the flutter team (https://github.com/flutter/packages/blob/main/packages/image_picker/image_picker/example/lib/main.dart)

start the app with a new build
trigger the ImagePicker function pickImage with ImageSource.camera
wait until camera has opened and is usable

other notes:

if you retry, it works fast
works also fast for e.g. ImageSource.gallery for fresh builds

Expected results
camera opens right away, without a noticable delay between clicking the camera button and the camera being opened
Actual results
between triggering function and camera opened, there is a significant delay of about 3-4 seconds, where app freezes.
Code sample
Code sample
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// ignore_for_file: public_member_api_docs

import 'dart:async';
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import 'package:video_player/video_player.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Image Picker Demo',
      home: MyHomePage(title: 'Image Picker Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, this.title});

  final String? title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  List<XFile>? _imageFileList;

  void _setImageFileListFromFile(XFile? value) {
    _imageFileList = value == null ? null : <XFile>[value];
  }

  dynamic _pickImageError;
  bool isVideo = false;

  VideoPlayerController? _controller;
  VideoPlayerController? _toBeDisposed;
  String? _retrieveDataError;

  final ImagePicker _picker = ImagePicker();
  final TextEditingController maxWidthController = TextEditingController();
  final TextEditingController maxHeightController = TextEditingController();
  final TextEditingController qualityController = TextEditingController();

  Future<void> _playVideo(XFile? file) async {
    if (file != null && mounted) {
      await _disposeVideoController();
      late VideoPlayerController controller;
      if (kIsWeb) {
        controller = VideoPlayerController.network(file.path);
      } else {
        controller = VideoPlayerController.file(File(file.path));
      }
      _controller = controller;
      // In web, most browsers won't honor a programmatic call to .play
      // if the video has a sound track (and is not muted).
      // Mute the video so it auto-plays in web!
      // This is not needed if the call to .play is the result of user
      // interaction (clicking on a "play" button, for example).
      const double volume = kIsWeb ? 0.0 : 1.0;
      await controller.setVolume(volume);
      await controller.initialize();
      await controller.setLooping(true);
      await controller.play();
      setState(() {});
    }
  }

  Future<void> _onImageButtonPressed(ImageSource source,
      {BuildContext? context, bool isMultiImage = false}) async {
    if (_controller != null) {
      await _controller!.setVolume(0.0);
    }
    if (isVideo) {
      final XFile? file = await _picker.pickVideo(
          source: source, maxDuration: const Duration(seconds: 10));
      await _playVideo(file);
    } else if (isMultiImage) {
      await _displayPickImageDialog(context!,
          (double? maxWidth, double? maxHeight, int? quality) async {
        try {
          final List<XFile> pickedFileList = await _picker.pickMultiImage(
            maxWidth: maxWidth,
            maxHeight: maxHeight,
            imageQuality: quality,
          );
          setState(() {
            _imageFileList = pickedFileList;
          });
        } catch (e) {
          setState(() {
            _pickImageError = e;
          });
        }
      });
    } else {
      await _displayPickImageDialog(context!,
          (double? maxWidth, double? maxHeight, int? quality) async {
        try {
          final XFile? pickedFile = await _picker.pickImage(
            source: source,
            maxWidth: maxWidth,
            maxHeight: maxHeight,
            imageQuality: quality,
          );
          setState(() {
            _setImageFileListFromFile(pickedFile);
          });
        } catch (e) {
          setState(() {
            _pickImageError = e;
          });
        }
      });
    }
  }

  @override
  void deactivate() {
    if (_controller != null) {
      _controller!.setVolume(0.0);
      _controller!.pause();
    }
    super.deactivate();
  }

  @override
  void dispose() {
    _disposeVideoController();
    maxWidthController.dispose();
    maxHeightController.dispose();
    qualityController.dispose();
    super.dispose();
  }

  Future<void> _disposeVideoController() async {
    if (_toBeDisposed != null) {
      await _toBeDisposed!.dispose();
    }
    _toBeDisposed = _controller;
    _controller = null;
  }

  Widget _previewVideo() {
    final Text? retrieveError = _getRetrieveErrorWidget();
    if (retrieveError != null) {
      return retrieveError;
    }
    if (_controller == null) {
      return const Text(
        'You have not yet picked a video',
        textAlign: TextAlign.center,
      );
    }
    return Padding(
      padding: const EdgeInsets.all(10.0),
      child: AspectRatioVideo(_controller),
    );
  }

  Widget _previewImages() {
    final Text? retrieveError = _getRetrieveErrorWidget();
    if (retrieveError != null) {
      return retrieveError;
    }
    if (_imageFileList != null) {
      return Semantics(
        label: 'image_picker_example_picked_images',
        child: ListView.builder(
          key: UniqueKey(),
          itemBuilder: (BuildContext context, int index) {
            // Why network for web?
            // See https://pub.dev/packages/image_picker_for_web#limitations-on-the-web-platform
            return Semantics(
              label: 'image_picker_example_picked_image',
              child: kIsWeb
                  ? Image.network(_imageFileList![index].path)
                  : Image.file(
                      File(_imageFileList![index].path),
                      errorBuilder: (BuildContext context, Object error,
                              StackTrace? stackTrace) =>
                          const Center(
                              child: Text('This image type is not supported')),
                    ),
            );
          },
          itemCount: _imageFileList!.length,
        ),
      );
    } else if (_pickImageError != null) {
      return Text(
        'Pick image error: $_pickImageError',
        textAlign: TextAlign.center,
      );
    } else {
      return const Text(
        'You have not yet picked an image.',
        textAlign: TextAlign.center,
      );
    }
  }

  Widget _handlePreview() {
    if (isVideo) {
      return _previewVideo();
    } else {
      return _previewImages();
    }
  }

  Future<void> retrieveLostData() async {
    final LostDataResponse response = await _picker.retrieveLostData();
    if (response.isEmpty) {
      return;
    }
    if (response.file != null) {
      if (response.type == RetrieveType.video) {
        isVideo = true;
        await _playVideo(response.file);
      } else {
        isVideo = false;
        setState(() {
          if (response.files == null) {
            _setImageFileListFromFile(response.file);
          } else {
            _imageFileList = response.files;
          }
        });
      }
    } else {
      _retrieveDataError = response.exception!.code;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title!),
      ),
      body: Center(
        child: !kIsWeb && defaultTargetPlatform == TargetPlatform.android
            ? FutureBuilder<void>(
                future: retrieveLostData(),
                builder: (BuildContext context, AsyncSnapshot<void> snapshot) {
                  switch (snapshot.connectionState) {
                    case ConnectionState.none:
                    case ConnectionState.waiting:
                      return const Text(
                        'You have not yet picked an image.',
                        textAlign: TextAlign.center,
                      );
                    case ConnectionState.done:
                      return _handlePreview();
                    case ConnectionState.active:
                      if (snapshot.hasError) {
                        return Text(
                          'Pick image/video error: ${snapshot.error}}',
                          textAlign: TextAlign.center,
                        );
                      } else {
                        return const Text(
                          'You have not yet picked an image.',
                          textAlign: TextAlign.center,
                        );
                      }
                  }
                },
              )
            : _handlePreview(),
      ),
      floatingActionButton: Column(
        mainAxisAlignment: MainAxisAlignment.end,
        children: <Widget>[
          Semantics(
            label: 'image_picker_example_from_gallery',
            child: FloatingActionButton(
              onPressed: () {
                isVideo = false;
                _onImageButtonPressed(ImageSource.gallery, context: context);
              },
              heroTag: 'image0',
              tooltip: 'Pick Image from gallery',
              child: const Icon(Icons.photo),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              onPressed: () {
                isVideo = false;
                _onImageButtonPressed(
                  ImageSource.gallery,
                  context: context,
                  isMultiImage: true,
                );
              },
              heroTag: 'image1',
              tooltip: 'Pick Multiple Image from gallery',
              child: const Icon(Icons.photo_library),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              onPressed: () {
                isVideo = false;
                _onImageButtonPressed(ImageSource.camera, context: context);
              },
              heroTag: 'image2',
              tooltip: 'Take a Photo',
              child: const Icon(Icons.camera_alt),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              backgroundColor: Colors.red,
              onPressed: () {
                isVideo = true;
                _onImageButtonPressed(ImageSource.gallery);
              },
              heroTag: 'video0',
              tooltip: 'Pick Video from gallery',
              child: const Icon(Icons.video_library),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              backgroundColor: Colors.red,
              onPressed: () {
                isVideo = true;
                _onImageButtonPressed(ImageSource.camera);
              },
              heroTag: 'video1',
              tooltip: 'Take a Video',
              child: const Icon(Icons.videocam),
            ),
          ),
        ],
      ),
    );
  }

  Text? _getRetrieveErrorWidget() {
    if (_retrieveDataError != null) {
      final Text result = Text(_retrieveDataError!);
      _retrieveDataError = null;
      return result;
    }
    return null;
  }

  Future<void> _displayPickImageDialog(
      BuildContext context, OnPickImageCallback onPick) async {
    return showDialog(
        context: context,
        builder: (BuildContext context) {
          return AlertDialog(
            title: const Text('Add optional parameters'),
            content: Column(
              children: <Widget>[
                TextField(
                  controller: maxWidthController,
                  keyboardType:
                      const TextInputType.numberWithOptions(decimal: true),
                  decoration: const InputDecoration(
                      hintText: 'Enter maxWidth if desired'),
                ),
                TextField(
                  controller: maxHeightController,
                  keyboardType:
                      const TextInputType.numberWithOptions(decimal: true),
                  decoration: const InputDecoration(
                      hintText: 'Enter maxHeight if desired'),
                ),
                TextField(
                  controller: qualityController,
                  keyboardType: TextInputType.number,
                  decoration: const InputDecoration(
                      hintText: 'Enter quality if desired'),
                ),
              ],
            ),
            actions: <Widget>[
              TextButton(
                child: const Text('CANCEL'),
                onPressed: () {
                  Navigator.of(context).pop();
                },
              ),
              TextButton(
                  child: const Text('PICK'),
                  onPressed: () {
                    final double? width = maxWidthController.text.isNotEmpty
                        ? double.parse(maxWidthController.text)
                        : null;
                    final double? height = maxHeightController.text.isNotEmpty
                        ? double.parse(maxHeightController.text)
                        : null;
                    final int? quality = qualityController.text.isNotEmpty
                        ? int.parse(qualityController.text)
                        : null;
                    onPick(width, height, quality);
                    Navigator.of(context).pop();
                  }),
            ],
          );
        });
  }
}

typedef OnPickImageCallback = void Function(
    double? maxWidth, double? maxHeight, int? quality);

class AspectRatioVideo extends StatefulWidget {
  const AspectRatioVideo(this.controller, {super.key});

  final VideoPlayerController? controller;

  @override
  AspectRatioVideoState createState() => AspectRatioVideoState();
}

class AspectRatioVideoState extends State<AspectRatioVideo> {
  VideoPlayerController? get controller => widget.controller;
  bool initialized = false;

  void _onVideoControllerUpdate() {
    if (!mounted) {
      return;
    }
    if (initialized != controller!.value.isInitialized) {
      initialized = controller!.value.isInitialized;
      setState(() {});
    }
  }

  @override
  void initState() {
    super.initState();
    controller!.addListener(_onVideoControllerUpdate);
  }

  @override
  void dispose() {
    controller!.removeListener(_onVideoControllerUpdate);
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    if (initialized) {
      return Center(
        child: AspectRatio(
          aspectRatio: controller!.value.aspectRatio,
          child: VideoPlayer(controller!),
        ),
      );
    } else {
      return Container();
    }
  }
}

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[✓] Flutter (Channel beta, 3.10.0-1.3.pre, on macOS 13.2.1 22D68 darwin-x64, locale de-AT)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.78.0)
[✓] Connected device (3 available)
    ! Error: Apple Watch von Benedikt has not finished loading development services. Please select a different device, or wait for the device to load development services
      and try again. (code 8)
[✓] Network resources

Hi @babyMilo37
I checked this on iPhone 7, iOS 15.7.2 but can't see the delay as mentioned above:

Demo
https://github.com/flutter/flutter/assets/104349824/e006b1b4-8e54-44d7-9918-b5fb4d3bfe88

Did you notice that this issue only occurs on your device? (Maybe a device/OS specific issue)
And can you please provide a recorded video for the issue?

Hi @huycozy,
thanks for your answer. I'll attach a screen recording of an iPhone 13 mini, iOS 16.2. Please note that little blue splash circle in the button at second 4. That was the moment it was pressed. As described above, it works well from the second time onwards (see also in the video).
https://github.com/flutter/flutter/assets/23049860/c0e3a77f-86d1-4c1c-8be1-5241009c7780
I unfortunately do not have other iOS devices with me. I could not reproduce it on my Android though, there it worked fine. So might indeed be related to my device.

Thanks for the recorded video. I can see slow start camera on your video. Can you also check this on device's camera? Is it faster?
Also, please try running the sample code on profile/release mode to see if the issue still appears or not as well. Thank you!

Hi, yes it did also appear in profile and release mode. I could also reproduce it on iPhone 12; with iOS 15.6.1. Thanks

Hi. This is somewhat similar to #49780, can you take a look and check if you can reproduce the issue similar to the case in that issue?

Hey @huycozy I am also facing this exact same issue. My device is iPhone 14 with iOS 16.2. Should I create a new issue or can this be reopened and investigated further?

@muezz Can you take a look at https://github.com/flutter/flutter/issues/49780 and check if it's similar to your case?

@huycozy it seems that that issue happens when the user tries to click on the image capture button more than once and then the app freezes. In this issue, the app freezes only the first time when you try to open the camera (exactly how this issue specifies).
It might be that the internal causes are similar in both cases but the issues don't seem similar from outside.

@muezz It's worth leaving a comment there with your case instead of a file a separate issue will help to centralize on that one. My recent comment also pointed out that it freezes a bit and improved with the original report. You can also react an upvote to the original comment will help to raise the issue. Thank you!


Blog newsletter redesign

Task: https://openforge.teamwork.com/#tasks/14052671

Getting an error while trying to run the branch  see Travis error for more details

Add links to Twitter/FB/Linkedin icons
unable to click into the email field to provide an email address
Blog Nav bar should be sticky (the bar with blog categories)
The search field for blogs should be aligned to the right with the "news & updates"
Tablet view: expand the blog margins to be further to the right so the text isn't so slim on tablet (Rachel approved)
Odd breakpoint: fix the browser breakpoint below. once the "news & update" disappears the blog should stretch back to cover the whole window. ( Let me know if you want a video with this)

The following are the items I'm still seeing:

The search field for blogs should be aligned to the right with the "news & updates"
- The search Blog bar is still not aligned, looking at the way we have it this might not be feasible though if that's the case let me know.
The base "iPad" emulator in chrome is zoomed in and you have to scroll side to side (Not sure If this is new or I missed this before)


How to configure usemin to only replace the files with the revved version of the filerev task

I don't want concatenation or uglification or to replace all the blocks in the html, I only want the usemin to replace the files with the revved version create by filerev task.
However I still want to have the blocks defined in the html for full dist version (with uglify+concat etc...)
How is that possible?
Thanks

I confirm the #487 should probably cover your need and but not a duplicate of #487.
I add the docs tag as we should add your use case in documentation.


peg mapzen house styles to major version

point at major versions of Mapzen house styles (not unversioned latest) in basemapStyles.js
use Tangram v0.9 in tangram.js and in test.html

I think this is ready to go. I've verified all the new URLs do fetch content, but I haven't verified in a living mapzen.js build.
@hanbyul-here @migurski Github is being fussy and not allowing a merge via the website, but via CL should work fine.

Ah, @hanbyul-here just merged in https://github.com/mapzen/mapzen.js/pull/234/files. I'll take ref to those files out of my PR.

Yeah, it's the Tangram version conflicts. Thanks for recommending a set of scene versions that will work!

Github's happy now :) All your's @hanbyul-here!

Does this also close https://github.com/mapzen/mapzen.js/issues/164 ? @nvkelso


gramps cli support for multiple data sources

Proposing allowing data sources to pull in additional data sources when running in standalone mode by accepting a comma delimited string of data source directories as input.  The use case is referencing types from one data source from within another. Such usage works as expected in production mode currently, and these changes allow the same configuration to be available in standalone.
Original behavior remains unchanged. Implementation just creates a parent .tmp and fills it with numbered child directories containing data sources.

@jlengstorf Should we be submitting PRs against https://github.com/gramps-graphql/gramps-cli instead? It looks like gramps-express is being split into gramps and gramps-cli soon

@Piefayth @timrs2998 Hey — sorry for the late response here. Holidays wrecked my inbox and I completely lost track of this PR.
The roadmap is to move the CLI to @gramps/cli, yes. However, the API is still in flux. If you want to add your opinions to this issue, it could help us build consensus about how it should look when it's finished: https://github.com/gramps-graphql/gramps-cli/issues/9
The goal is definitely to support multiple data sources, so we should be able to use this in the 1.0 version of the CLI.

@Piefayth The CLI is in beta and pretty close to a stable release. It supports multiple data sources now — I pulled in your code to make that happen. Thanks!
You can install it with @gramps/cli@beta, and review the code in https://github.com/gramps-graphql/gramps-cli/pull/17
Please let me know if this works for you. Feedback on that PR would be much appreciated.
Thanks!


MB-13462 kpi based dates added to Violations Form

Jira ticket for this change
Summary
This PR adds:
A. Given a QAE selecting violations in an evaluation report in MilMove
When the user selects a claims settlement violation
Then the user has the option of adding an observed claim response date
When the user selects a pickup violation
and the user has not already entered an observed pickup date
Then the user is prompted to add an observed pickup date
When the user selects a scheduling violation
Then the user is prompted to add an observed pickup spread start date
And then the user is prompted to add an observed pickup spread end date
When the user selects a scheduling requirements violation
Then the user is prompted to add an observed pickup spread start date
And then the user is prompted to add an observed pickup spread end date
The scheduling and scheduling requirement selections share the start and end dates fields, so either or both selected generate.
B. Since there's an optional indicator in Figma, design thought it beneficial for an ability to add 'optional' display as a prop (for this page as well as for any date picker in the future).
Setup to Run Your Code

💻 You will need to use three separate terminals to test this locally.
Terminal 1
Start the Storybook locally.
make storybook

Terminal 2
Start the UI locally.
make client_run

Terminal 3
Start the Go server locally.
make server_run

Additional steps

Access the
Login as a

Verification Steps for Author
These are to be checked by the author.

[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

Verification Steps for Reviewers
These are to be checked by a reviewer.

Frontend

[ ] User facing changes have been reviewed by design.
[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] There are no new console errors in the browser devtools
[ ] There are no new console errors in the test output
[ ] If this PR adds a new component to Storybook, it ensures the component is fully responsive, OR if it is intentionally not, a wrapping div using the officeApp class or custom min-width styling is used to hide any states the would not be visible to the user.

Backend

[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.

Database
Any new migrations/schema changes:

[ ] Follows our guidelines for Zero-Downtime Deploys
[ ] Have been communicated to #g-database
[ ] Secure migrations have been tested following the instructions in our docs

Screenshots

Warnings

:warning:
Please add the JIRA issue key to the PR title (e.g. MB-123)

  Generated by :no_entry_sign: dangerJS against 43b62c8df499ca510c3209005b2a388b3e0d9e36

This width was the only way I could get it aligned right and not affect
other date pickers (container width settings messed up other pickers in the
app).
On Thu, Sep 8, 2022 at 1:11 PM PDickeyTruss @.***>
wrote:

@.**** commented on this pull request.
In src/components/form/fields/DatePickerInput.module.scss
https://github.com/transcom/mymove/pull/9165#discussion_r966216178:

@@ -2,3 +2,12 @@
margin-top: 6px !important;
max-width: 360px;
}
+.optionalLabel {

color: #71767A;
float: right;
text-align: right;
font-size: 13px;
font-weight: 400;
line-height: 16px;
width: 156px;

Possible suggestion: I suspect (though am not certain) this width is no
longer needed with the alignment that you added .
—
Reply to this email directly, view it on GitHub
https://github.com/transcom/mymove/pull/9165#pullrequestreview-1101110942,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZ2XNVV4JUYGC7KL3RDFMHTV5IM33ANCNFSM6AAAAAAQGEA6AI
.
You are receiving this because you authored the thread.Message ID:
@.***>