Param setting not working with default values

For essimaging I wanted to make some arguments optional,

import sciline as sl
from typing import NewType

OptionalInt = NewType("OptionalInt", int | None)

def foo(a: OptionalInt) -> str:
    return str(a) if a is not None else "Here is your default message."

wf = sl.Pipeline([foo], params={OptionalInt: OptionalInt(None)})
wf.compute(str)

# 'Here is your default message.'

But if the argument has a default value of None, it fails.

import sciline as sl
from typing import NewType

OptionalInt = NewType("OptionalInt", int | None)

def foo(a: OptionalInt = None) -> str:
    return str(a) if a is not None else "Here is your default message."

wf = sl.Pipeline([foo], params={OptionalInt: OptionalInt(None)})
wf.compute(str)

# sciline.handler.UnsatisfiedRequirement: ('No provider found for type', typing.Optional[__main__.OptionalInt])

Is it a known limitation or a bug...?

The error message shows that something odd is going on: Why is it looking for typing.Optional[__main__.OptionalInt] and not __main__.OptionalInt?

This is because of how get_type_hints worked prior to python 3.11.

Changed in version 3.11: Previously, Optional[t] was added for function and method annotations if a default value equal to None was set. Now the annotation is returned unchanged.

I've verified that this bug is not present in 3.11.

What's best to do? Should we

bump the minimum python version of sciline to 3.11 or
try to add a special case to fix the bug for versions below 3.11 or
do nothing ;)

do nothing ;)

Just wait it out? https://scientific-python.org/specs/spec-0000/#support-window Python 3.10 could be dropped in a bit :)

Just wait it out? https://scientific-python.org/specs/spec-0000/#support-window Python 3.10 could be dropped in a bit :)

3.10 already out? Looking at that schedule makes me feel old. But yeah this could well be the best option

The proposed fix was insufficient so it was decided to do nothing instead.


Container Health Status Not Displayed Correctly in Dashboard

Before you start please confirm the following.

[X] Yes, I've searched similar issues on GitHub.
[x] Yes, I've checked whether this issue is covered in the Portainer documentation or knowledge base.

Problem Description
I have a container with a health status set to "healthy". However, this status is not correctly reflected in the Portainer dashboard.

Expected Behavior
In the dashboard, it should display 1 for "healthy":

Actual Behavior
It displays 0 for "healthy"
Steps to Reproduce

Create and start a container with a functioning health check.
Verify if the health status is accurately displayed in the Portainer dashboard.

Portainer logs or screenshots
No response
Portainer version
2.22.0
Portainer Edition
Community Edition (CE)
Platform and Version
Podman 4.9.3
OS and Architecture
Ubuntu 24.04 LTS
Browser
No response
What command did you use to deploy Portainer?
podman run -d -p 9443:9443 -p 9000:9000 --name=portainer --restart=always -v /run/user/$(id -u)/podman/podman.sock:/var/run/docker.sock:Z  -v portainer_data:/data docker.io/portainer/portainer-ce:2.22.0

Additional Information
No response

Before you start please confirm the following.
* [x]  Yes, I've searched similar issues on [GitHub](https://github.com/portainer/portainer/issues).

* [x]  Yes, I've checked whether this issue is covered in the Portainer [documentation](https://docs.portainer.io) or [knowledge base](https://portal.portainer.io/knowledge).

Problem Description
I have a container with a health status set to "healthy". However, this status is not correctly reflected in the Portainer dashboard.

Expected Behavior
In the dashboard, it should display 1 for "healthy":

Actual Behavior
It displays 0 for "healthy"
Steps to Reproduce
1. Create and start a container with a functioning health check.

2. Verify if the health status is accurately displayed in the Portainer dashboard.

Portainer logs or screenshots
No response
Portainer version
2.22.0
Portainer Edition
Community Edition (CE)
Platform and Version
Podman 4.9.3
OS and Architecture
Ubuntu 24.04 LTS
Browser
No response
What command did you use to deploy Portainer?
podman run -d -p 9443:9443 -p 9000:9000 --name=portainer --restart=always -v /run/user/$(id -u)/podman/podman.sock:/var/run/docker.sock:Z  -v portainer_data:/data docker.io/portainer/portainer-ce:2.22.0

Additional Information
No response

I'm seeing this as well in v2.22.0 in both Portainer and edge agents.

Hi.
I've encountered similar issue.
I have 2 environments: local and edge agent. Both of them are showing the correct number of healthy containers (2 in each environment) at their dashboards.
However, the home page is showing 0 for healthy counter.
I'm using portainer/portainer-ce:2.21.4-alpine and portainer/agent:2.21.4. Each environment is a VM running ubuntu-server 24.04.1.
P.s. I can create separate issue in case you guys think they are not related.

My issue is already been reported -- #10508.

I have the same issue with my setup: 2 machines, one running portainer version 2.21.4 and the second running portainer-agent:latest.

Issue also occurs on 2.24.0:

Dashboard

Containers

I just upgraded to 2.25.1 STS and the problem still persists. I see the other ticket referred to above describe a slightly different problem. Is the issue that incorrect (0) healthy containers reported still open, or must a ticket be raised ?


Uncaught TypeError: Path must be a string. Received null

Try to open a project using atom-project-viewer and you get the uncaught error directly and no files or project is opened!
Atom: 1.17.2 x64
Electron: 1.3.15
OS: Microsoft Windows 10 Enterprise
Thrown From: project-viewer package 1.1.2
Stack Trace
Uncaught TypeError: Path must be a string. Received null
At path.js:7

TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at Object.join (path.js:466:7)
    at StorageFolder.module.exports.StorageFolder.pathForKey (~/AppData/Local/atom/app-1.17.2/resources/app/src/storage-folder.js:61:1)
    at StorageFolder.module.exports.StorageFolder.load (~/AppData/Local/atom/app-1.17.2/resources/app/src/storage-folder.js:42:1)
    at /packages/project-viewer/src/project-view.js:265:45)
    at /packages/project-viewer/src/project-view.js:17:8)

Commands

Non-Core Packages
file-icons 2.1.7
file-types 0.5.5
git-plus 7.9.2
highlight-selected 0.13.1
language-cfml 0.17.0
minimap 4.28.2
minimap-bookmarks 0.4.2
package-sync 1.1.0
project-viewer 1.1.2
remote-sync 4.1.5
Sublime-Style-Column-Selection 1.7.4

sorry for the late reply. Been busy but will try to check this out soon.
thanks

I am having this issue too.  None of my projects are opening now.

please validate this issue!

Thx, for me this is working perfect now.. :)
great work
regards
Martin

@jccguimaraes  thank you so much for taking the time to work on this issue!  I am no longer having this issue with the latest release.  Thanks!!!!


Support incremental annotation processing

Gradle 4.7 provides support for incremental annotation processing.
https://docs.gradle.org/nightly/userguide/java_plugin.html#sec:incremental_annotation_processing
It would be great if the EventBus annotation processor could opt into this :)

Wow. I'm using EventBus for a long time, but I didn't know that it has some annotation processor. It is not mentioned in the documentation at all :-(

Any update on this?

Thanks for pointing that out.
Note: the annotation processor is only used if you are using the subscriber index http://greenrobot.org/eventbus/documentation/subscriber-index/
-ut

any plans for adding support?

Any update?


change square size in testapp

          if we just want to change the square size, we can in theory use https://github.com/celestiaorg/celestia-app/blob/3ea0ca5bd589d7212dbd429eaca8365ff2f35dc9/test/util/genesis/modifier.go#L24-L32

however testapp doesn't support this yet. I'm okay with opening an issue to fix tmrw or the day after
Originally posted by @evan-forbes in https://github.com/celestiaorg/celestia-app/pull/3942#discussion_r1799967225

also this https://github.com/celestiaorg/celestia-app/pull/3942#discussion_r1799972342


[Cypress] Failing E2E tests in User Preference.

Current Behavior
Currently, E2E tests for User Preferences are failing - https://github.com/meshery/meshery/actions/runs/4822176767/jobs/8589252885?pr=7621#step:16:241

Expected Behavior
All the tests should pass, logs can be checked from any failing PR.
Screenshots/Logs

Environment

Host OS: Mac Linux Windows
Platform: Docker or Kubernetes
Meshery Server Version: stable-v
Meshery Client Version: stable-v

Contributor Guides and Handbook

🛠 Meshery Build & Release Strategy
📚 Instructions for contributing to documentation

Meshery documentation site and source

🎨 Wireframes and designs for Meshery UI in Figma
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

@Chadha93 I will check that out


fix: session key plugin deps were in the wrong order

Pull Request Checklist

[ ] Did you add new tests and confirm existing tests pass? (yarn test)
[ ] Did you update relevant docs? (docs are found in the site folder, and guidelines for updating/adding docs can be found in the contribution guide)
[ ] Do your commits follow the Conventional Commits standard?
[ ] Does your PR title also follow the Conventional Commits standard?
[ ] If you have a breaking change, is it correctly reflected in your commit message? (e.g. feat!: breaking change)
[ ] Did you run lint (yarn lint:check) and fix any issues? (yarn lint:write)
[ ] Did you follow the contribution guidelines?

PR-Codex overview
Focus of the PR:
This PR focuses on changing the functionId values in the config.ts and plugin.ts files.
Detailed summary:

In config.ts:

The functionId value is changed from "0x0" to "0x1".
The functionId value is changed from "0x1" to "0x0".

In plugin.ts:

The functionId value is changed from "0x1" to "0x0".

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

making the change in the contract instead


[Bug] Series-line is clipped incorrectly at the rightmost position

Version
5.4.3
Link to Minimal Reproduction
https://codepen.io/rexskz/pen/WNLweyw
Steps to Reproduce

Open the codepen link.
Look at the rightmost position of the line.

Current Behavior
It's clipped incorrectly, but the leftmost position of the line is okay.

Expected Behavior
The rightmost position should not be clipped, just like the leftmost one.
Environment
- OS: macOS Ventura
- Browser: Chrome 116.0.5845.110
- Framework: /

Any additional comments?
The root cause is that ECharts uses Math.round in createClipPathFromCoordSys.ts:
const rect = cartesian.getArea();
let width = rect.width;
width = Math.round(width);

The width here can be a float with the decimal part less than 0.5:

Finally, it results in the incorrect clipPath, just 1px smaller than expected:

This issue can only be reproduced in a container with a specific width (503px in the codepen link).
This issue might be related to #11369; considering it meant to extend the clipPath and use Math.floor on x, I think it's okay to use Math.ceil on width to ensure the clipPath is large enough to contain the whole line (with cap).

It seems that using Math.ceil is not enough, the devicePixelRatio should be considered. The full code might be:
  const _lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;

+ // I don't know where to find the dpr from `echarts.init`, so I
+ // use `window.devicePixelRatio` as example
+ const lineWidth = _lineWidth * window.devicePixelRatio;

  // Expand the clip path a bit to avoid the border is clipped and looks thinner
  x -= lineWidth / 2;
  y -= lineWidth / 2;
  width += lineWidth;
  height += lineWidth;

  // fix: https://github.com/apache/incubator-echarts/issues/11369
  x = Math.floor(x);
- width = Math.round(width);
+ width = Math.ceil(width);

I just found that DPR can be retrieved from zrender instance:
const zr = cartesian.model.ecModel.scheduler.ecInstance.getZr();
const dpr = zr.painter instanceof CanvasPainter
    ? zr.painter.dpr
    : window.devicePixelRatio; /* global window */

const _lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;
const lineWidth = _lineWidth * (dpr || 1);

And after multiplying DPR, there are no such numbers as x.333, only x.00009 or x.99996, which are the round-off error. Keeping Math.round should be fine.
PR is on the way...

It seems that using Math.ceil is not enough, the devicePixelRatio should be considered. The full code might be:
- const lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;
+ const _lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;

+ // I don't know where to find the dpr from `echarts.init`, so I
+ // use `window.devicePixelRatio` as example
+ const lineWidth = _lineWidth * window.devicePixelRatio;

  // Expand the clip path a bit to avoid the border is clipped and looks thinner
  x -= lineWidth / 2;
  y -= lineWidth / 2;
  width += lineWidth;
  height += lineWidth;

  // fix: https://github.com/apache/incubator-echarts/issues/11369
  x = Math.floor(x);
- width = Math.round(width);
+ width = Math.ceil(width);

It's ok to use only Math.ceil, but the width should add an extra 1px if x is floored.


fix bug when no editions yet

Frontend crashed when there were no editions, which isn't ideal.
Also, now hides the students dropdown, as you can't go anywhere anyways.

Codecov Report

Merging #537 (3abfe2a) into develop (fcfce12) will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop        #537   +/-   ##
=============================================
  Coverage   96.61813%   96.61813%
=============================================
  Files             86          86
  Lines           2129        2129
=============================================
  Hits            2057        2057
  Misses            72          72


UPnPError 401 (Invalid Action)

I am facing the problem, that the following metric seems not to be able to get collected.
time="2024-03-25T19:36:04+01:00" level=warning msg="can not collect metrics: GetTotalPacketsReceived: Unauthorized (401)"
time="2024-03-25T19:36:04+01:00" level=warning msg="can not collect metrics: GetTotalPacketsSent: SAOPFault: UPnPError 401 (invalid action)"
time="2024-03-25T19:36:05+01:00" level=warning msg="can not collect metrics: GetCommonLinkProperties: SAOPFault: UPnPError 401 (invalid action)"
2
time="2024-03-25T19:36:06+01:00" level=warning msg="can not collect metrics: GetCommonLinkProperties: SAOPFault: UPnPError 401 (invalid action)"
time="2024-03-25T19:36:08+01:00" level=warning msg="can not collect metrics: GetInfo: SAOPFault: UPnPError 401 (invalid action)"
2
time="2024-03-25T19:36:09+01:00" level=warning msg="can not collect metrics: GetInfo: SAOPFault: UPnPError 401 (invalid action)"
time="2024-03-25T19:36:10+01:00" level=warning msg="can not collect metrics: GetInfo: SAOPFault: UPnPError 401 (invalid action)"
time="2024-03-25T19:36:11+01:00" level=warning msg="can not collect metrics: GetTotalAssociations: SAOPFault: UPnPError 401 (invalid action)"
time="2024-03-25T19:36:12+01:00" level=warning msg="can not collect metrics: GetTotalAssociations: SAOPFault: UPnPError 401 (invalid action)"
2
time="2024-03-25T19:36:13+01:00" level=warning msg="can not collect metrics: GetInfo: SAOPFault: UPnPError 401 (invalid action)"
2
time="2024-03-25T19:36:14+01:00" level=warning msg="can not collect metrics: GetInfo: SAOPFault: UPnPError 401 (invalid action)"
time="2024-03-25T19:36:15+01:00" level=warning msg="can not collect metrics: GetStatistics: SAOPFault: UPnPError 401 (invalid action)"
time="2024-03-25T19:36:16+01:00" level=warning msg="can not collect metrics: GetStatistics: SAOPFault: UPnPError 401 (invalid action)"
time="2024-03-25T19:36:17+01:00" level=warning msg="Error getting provider action GetNumberOfDectEntries result for urn:dslforum-org:service:X_AVM-DE_Dect:1.GetGenericDectEntry: GetNumberOfDectEntries: SAOPFault: UPnPError 401 (invalid action)"

Some of the metrics can be collected without an issue
Did someone else face the same? I am not sure if my FritzBox does not support it, or whats the exact issue.
Fritzbox: 6660 cable

A Fritzbox Cable doesn't have a PPP device, it uses DHCP on it's WAN interface. Please make sure to use the correct metrics file.

Wait: did you edit the log above? My notification email contains hints to PPP, the log above doesn't do so anymore.

Yes, edit was:
The errors are happening at the following services:

{
"service": "urn:dslforum-org:service:WANPPPConnection:1",
"action": "GetInfo",
"result": "ConnectionStatus",
...}
{
"service": "urn:dslforum-org:service:WANPPPConnection:1",
"action": "GetInfo",
"result": "Uptime",
...}
{
"service": "urn:dslforum-org:service:WANPPPConnection:1",
"action": "GetInfo",
"result": "UpstreamMaxBitRate",
...}
{
"service": "urn:dslforum-org:service:WANPPPConnection:1",
"action": "GetInfo",
"result": "DownstreamMaxBitRate",
...}

Then I switched it to the error log output.


Populate client list on mount and depopulate on unmount

A shared volume could be running anywhere on the swarm cluster. If a user tries to delete this volume and repeatedly gets the message "The volume is in use", it will be frustrating to keep looking for containers on every host.
Volume metadata already has a place to store the name of host VMs where the volume is mounted. This list should be populated during mount and unpopulated during unmount.

correctness issue for vFile


Need to filter out (QC fail) locus-specific spots when centroid of spot is within 1 standard deviation of any border of the ROI

This should be added as a new column in the enriched traces file, and it should contribute to the (conjunctive) QC pass/fail column (qcPass). This will also be a potential reason to be visualised in #259

This is already being done, in LabelAndFilterTracesQC, we just need test coverage.


turkish chracter issue

hi, I want to report a minor bug.
When you click pass to server button on Admin application, the app creating "ınterface.dat" not the "interface.dat" in the C:\SCADA\BaseDAT directory. I think this is a lower case issue in Admin application on  "Tables" class's file name property.
public string FileName
{
get
{
return Name.ToLower() + ".dat";
}
}

Thanks! Could you give additional information:

Is the symbol 'ı' a letter of Turkish alphabet?
How this issue affects work of the software?

I have fixed this issue in develop branch. Tell me, please, if it affects normal work, and I'll merge it to the distributive.

yes "ı" is letter.
when you click pass to server button in basedat folder "ınterface.dat"  and "ıncnl.dat".
Changes on Admin app doesn't apply to server.

i tried your fix and working good. thanks.
But i think you have to merge it to the distributive immediately.

Done.


Remove prometheus operator from Kubespray

Kubespray should not install any helm charts. This is a task
that a user should do on his/her own through ansible or another
tool. It opens the door to wrapping installation of any helm
chart.

Needs to be removed from roles/kubernetes-apps/metrics/defaults/main.yml too

@woopstar that file is removed. Did you mean something else?

@mattymo btw, is there any discussion about using helm charts or not in Kubespray? just want to know more details about it.


Features for getting submission details

SubmissionDetails struct
GetSubmission function
Refactoring
Fixes according to the comments

New pull request @emilva


Implement 24-bit color, as specified by ISO-8613-3

This implements the feature request in issue #9, including documentation and
tests.

Coverage decreased (-7.02%) to 84.502% when pulling 6e41262b4077c5f3327370d2ea6e7d8759dd3f4c on joshtriplett:24-bit-color into 10dbe8e434d9446adc1089fa9d0f722f606e255f on ogham:master.

Looking carefully at the coveralls results, the coverage change seems entirely spurious; all the lines it mentions losing coverage on have nothing to do with this change.

Re-pushed the branch to fix a bug: the new sample code in README.md needed to use a code block.

Coverage decreased (-7.02%) to 84.502% when pulling 34cbc8f8105869699258692ea7003d16938abdc3 on joshtriplett:24-bit-color into 10dbe8e434d9446adc1089fa9d0f722f606e255f on ogham:master.


mbed_sdk_init called twice on IAR without RTOS.

1-mbed_sdk_init is called after __iar_data_init3 (zero initilaized and sdata recopy from flash)
2 mbed_sdk_init is called in __iar_argc_argv : this call can be removed

It's first called in the cmain.S file: https://github.com/mbedmicro/mbed/blob/03d8ea8e96051c0fa2d0a081f9f84b9c86d9ffb2/hal/targets/cmsis/TOOLCHAIN_IAR/cmain.S#L53
Second time: https://github.com/mbedmicro/mbed/blob/8e8f389d3a10724626ce0eec4c14c9ff6cde79e0/hal/common/retarget.cpp#L548
I would remove it from cmain.S, as in retarget most of toolchains have it there (mbed sdk init call), not to bring confusion that we missed sdk_init call. However, looking at the PR https://github.com/mbedmicro/mbed/pull/780 and the code in cmain.s, there's an intention why mbed sdk init is called.
Please send a fix.
cc @c1728p9

__iar_dynamic_initialization  (  initialize C++ global object) is just called after this 1st call to mbed_sdk_init..
if we remove this 1st call to mbed_sdk_init, and the initiliazed C++ needs access to hardware IP which  relies on SysCoreClock value for a correct hardware init, it will not work. that's why I propose to remove the call from  ___iar_argc_argv.
On the other if we look at the other toolchain  init (except gcc_arm :in which the zero initialized and recopy of sdata is done at start up, before SystemInit which set SystemCoreClock correctly for ever without the need to call SystemCoreClockupdate in mbed_sdk_init ) :ARM , uARM call mbed_sdk_init tool late (after C++ initialization : _cpp_initialize__aeabi)

On the other if we look at the other toolchain init (except gcc_arm :in which the zero initialized and recopy of sdata is done at start up, before SystemInit which set SystemCoreClock correctly for ever without the need to call SystemCoreClockupdate in mbed_sdk_init ) :ARM , uARM call mbed_sdk_init tool late (after C++ initialization : _cpp_initialize__aeabi)

this shall be another issue, where we can continue with how to unify startup.
This was resolved via https://github.com/mbedmicro/mbed/pull/2129


[Bug] Resource Images are acting as a Link

Description
For the resources that does not contain a video, the resource images are acting as Link and is occupying the entire screen width. This makes the even the blank area acting as a clickable link.
The reason behind this is that anchor tag encloses the background image tag which has a margin: auto property, making it occupying the entire screen width.

Reproduction

Go to https://resources.creativecommons.org/get-cc-savvy/
Hover the pointer on resource image
Hover the pointer on left and right side of this image (this blank area should not be clickable)
See error.

Expectation
There can be two resolutions for this bug:

Either remove the margin: auto property and center the image using a flex box or any other method.
Or Removing the href link from resource image since we already have a visit button below which directs to the same link.

Screenshots

Resolution

[x] I would be interested in resolving this bug.

I think removing the link entirely is a better solution since the link is already present. So long as there's not unforeseen side effects that's likely the better option.

@SamarthShukla17 feel free to

@possumbilities can you help me with the file that is needed to be worked with in order to solve this issue. (I cannot find the code in the repo).

intall Docker

I am running the command: docker compose up
(I have docker installed)

and on clicking http://<IP_ADDRESS>:4000, I am getting this page:

Can anybody help me eith this?

@SamarthShukla17 localhost should be <IP_ADDRESS> not <IP_ADDRESS> (which is essentially a wildcard). You're on Windows it looks like.
Since this is off-topic: I'd suggest moving this to a new Issue, unless there's one already created for it (look first).

Your docker is running successfully but use http://localhost:4000/
On Mon, 11 Mar, 2024, 8:29 pm possumbilities, @.***>
wrote:

@SamarthShukla17 https://github.com/SamarthShukla17 localhost should be
<IP_ADDRESS> not <IP_ADDRESS> (which is essentially a wildcard). You're on Windows
it looks like.
Since this is off-topic: I'd suggest moving this to a new Issue, unless
there's one already created for it (look first).
—
Reply to this email directly, view it on GitHub
https://github.com/creativecommons/cc-resource-archive/issues/197#issuecomment-1988646385,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASXTTT45BNAX5AU44EMUMMTYXXIHXAVCNFSM6AAAAABEHNSVU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBYGY2DMMZYGU
.
You are receiving this because you commented.Message ID:
@.***>

@possumbilities I have raised a PR which fixes this issue. Please review my PR, and provide feedback (if any).
Thanks

Thanks @possumbilities , @TimidRobot and @Artemis6161 for the clarification, it helped me a lot.

@possumbilities I have successfully resolved the bug by removing the link from the resource image and have created a PR [#214] for the same. Kindly review it and provide me your valuable feedback. Thanks.

possumbilities Thank you for clarifying my droughts.it was so helpful.


Added notebook for advanced nav usage, increased test coverage, fixed linting warnings

Finally created a notebook for the advanced nav usage. Do not know if it is fine to directly use stuff from my repo?
I also went through the test coverage report and added a couple more tests/cases that were easy to implement.
Lastly i changed some things that pylint complained about (type -> isinstance,  in dict.keys() -> in dict)

The newest set of commits contains two things.

Another increase of the test coverage.


When switching conversations scroll is lost

If you scroll up to review a conversation, then switch to another user and come back, the scroll position in not remembered.
OS: Ubuntu 22.04
Zulip app version: 5.10.4

Transferred this to the correct project for an issue that would be shared with the web app. @simseb @Andy1828 can you post a more detailed description of exactly what you're attempting?
How specifically are you navigating? We do preserve scroll position when using the "Back" button, for example.

I use the app, not the web version, i don't see any back button.
When switching between users on Zulip, the scroll position in the message history is lost. For instance, imagine you're having a discussion with someone about a specific topic that you previously discussed with someone else a week ago. You switch to the other person, scroll back one week, and need to copy 2-3 messages to share with them. You copy one message and send it to the person. Then, when you switch back to the previous conversation to copy another message, you have to scroll again because the scroll position was lost. The same issue arises when you need to reread certain messages from the history and share them with someone else. Each time you copy a message, you have to scroll again because the scroll position resets.

The desktop app has a "back" button in the lower left, which will take you to the position you were at.
Otherwise, if you just navigate somewhere by clicking on the view, the app takes you to your oldest unread message. This behavior is intended, as that is the most commonly desired behavior, and the app has no way to know that you're trying to do something else.


btrfs migration with raid (usb drive) does not work

Migration from raspiblitz 1.6 to 1.6.1 with btrfs and raid (32 GB usbstick) enabled, did not work.
Problem is that the drive letters of the drive and the USB drive are switched in blitz.datadrive.sh status.

Should be fixed ... will be tested as part of #1676. Closing this isue.


Using simple_fields_for with nested_attributes_for and strong parameters

Hello,
Regarding the documentation on https://github.com/plataformatec/simple_form/wiki/Nested-Models
I found that in order to get this to work with strong parameters, I had to do the following instead
<%= simple_form_for @machine do |m| %>
  <% @machine.parts.each do |part| %>
    <%= field_set_tag 'Part' do %>
      <%= f.simple_fields_for "parts_attributes[]", p do |pf| %>
        <%= pf.input :name %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

and in the controller
def machine_params
  params.require(:machine).permit(:parts_attributes => [:name])
end

Note that I had to change the name of the simple_fields_for to parts_attributes[] to match the strong parameters specification.

The wiki is maintained by the community. So if there aren't any up to date instructions, we recommend you to explore the solution yourself and hopefully contribute your findings back!


Battery level should be 'green' through to 100% for LFP battery Model 3s

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
The Battery Level gauge on Overview, as well as Charging Stats and Charge Level screens have 80% as the optimum maximum charge.
Expected Behavior
On Tesla Model 3 late 2021> cars, the recommendation from Tesla is to charge to 100%, so the charge should be considered 'Green' through to 100%.
Steps To Reproduce
View Overview, Charging Stats and Charge Level dashboards which all have green thresholds for charge level at max 80%.
Relevant log output
N/A

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

+1
Maybe we can have per-car battery levels in the settings ?

Do you know if there is any way to identify a LFP battery in the owners API response?

VIN Decoder is claiming that digit 7 of the VIN identifies the battery type:
Digit 7: Type of drive train
E = Lithium Ion Battery – Electric (NMC)
F = Lithium Iron Phosphate Battery (LFP)
H = Lithium Ion Battery- High Capacity (NMC)
S = Lithium Ion Battery – Standard (NMC)
V = Lithium Ion Battery – Ultra High Capacity (NMC)

Would that help ?

My 2022 Model 3 has F as the 7th digit, so that seems to work.

I cannot agree with this one - mine (2021 M3 SR+) also has 7th letter as 'F', but OS clearly shows Daily & Trip charging ranges.

A manual setting would be fine for this for now I suggest - if there is a definitive way of finding this via the API in future then it could be changed to trigger from that.


Added support for url-loader.

This adds support for loading external assets, eg. for when requiring external stylesheets using images or fonts (think bootstrap for example).
Credit: https://github.com/webpack/css-loader/issues/38#issuecomment-72287584

Thanks! This is included in 0.6.9


Fix broken links to Node.js & Yarn

I made some fixes to docs/development.rst

Codecov Report

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

@@            Coverage Diff            @@
##           master   #1039      +/-   ##
=========================================
- Coverage   64.31%   64.3%   -0.02%
=========================================
  Files         105     105
  Lines        5919    5919
  Branches      743     743
=========================================
- Hits         3807    3806       -1
  Misses       1965    1965
- Partials      147     148       +1

Impacted Files
Coverage Δ

saleor/core/utils/random_data.py
83.59% <0%> (-0.4%)
:arrow_down:

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 ac8e8ec...a87759f. Read the comment docs.


fixed issue where completions would interpret tag as $(tag) and cal…

When generating completions (at least for zsh), the phrase tag would be interpolated and would attempted to be called, resulting in an error on screen. Replacing the backtick with a single quote seemed to fix the issue.

Thanks for the fix!


compileAsync race condition

If a schema has a $ref and compileAsync is called on it while another compileAsync is running on it then ajv randomly throws. Here is an example:
var Ajv = require('ajv');

var schemas =  {
  "http://example.com/parent.json": {
    "id": "http://example.com/parent.json",
    "required": [
      "a"
    ],
    "properties": {
      "a": { "$ref": "child.json" }
    }
  },
  "http://example.com/child.json": {
    "id": "http://example.com/child.json",
    "required": [
      "b"
    ],
    "properties": {
      "b": { "type": "string" }
    }
  }
};

var ajv = Ajv({
  loadSchema: function(uri, callback) {
    setTimeout(function() {
      callback(null, schemas[uri]);
    });
  }
});

ajv.compileAsync(schemas["http://example.com/parent.json"], function(err, validate) {
  console.log(validate({a: { b: "test"} }));
});

ajv.compileAsync(schemas["http://example.com/parent.json"], function(err, validate) {
  console.log(validate({a: { b: "test"} }));
});

Which typically results in the exception:
Error: schema with key or id "http://example.com/child.json" already exists

Interesting. I guess there is no protection from it. Those calls should be queued and while the one is running another should not start. And by the time the first one finishes, the schema will already be compiled so that the second will return immediately. The solution is to queue inside ajv, the workaround is to queue outside.

I've improved it. It doesn't queue calls, but it makes sure that each schema is only loaded once even if it is requested multiple times because of concurrent calls to compileAsync.


Persistent notification to update

Description of the new feature / enhancement
Hi,
PowerToys displays a notification to update to the latest version every single day. I'm on version 0.69.0, and when version 0.69.1 was released, I decided to skip it, but PowerToys keeps asking me over and over again.
I couldn't find an option on Settings to disable update notifications. I could disable all notifications via Windows Settings, but I do want to receive notifications. My problem is that I keep receiving the same notification for the same update.
Could you add a "Skip this version" option?
Thanks.
Scenario when this would be used?
When you want to skip an update.
Supporting information
No response

/dup #25717


docs/dev server: link to mobile development doc

Something that could improve the first-time setup process for using a dev server for mobile development is a link from the dev server setup docs back to here: https://github.com/zulip/zulip-mobile/blob/master/docs/howto/dev-server.md.
I found that page first, and it sent me to https://zulip.readthedocs.io/en/latest/development/overview.html which sent me to https://zulip.readthedocs.io/en/latest/development/using.html. But by the time I'd read those and completed their steps, I'd momentarily forgotten about the mobile doc, which contains some crucial setup steps. So I'd like to link back to it (from the latter page probably makes the most sense) just to close the loop.
This is an issue instead of a PR because https://zulip.readthedocs.io/en/latest/development/using.html (the page I propose to edit) contains some important server-specific development info that mobile developers may want to be aware of. But this info is commingled with info on the web app, which mobile developers may skim past, especially if they see an inviting link back to the mobile docs. The concern is that a reader might also disregard the server-specific info because it's mixed up with the web app stuff.
Would it be effective to restructure that page (https://zulip.readthedocs.io/en/latest/development/using.html) in something like this way, so people can get where they're going more quickly, but also not accidentally skip past important info:

Server info/development (live reloading, Django/Tornado processes, possible need to restart the server and how, etc.)
Web app development (CSS changes, hot module replacement, etc.)
Mobile app development (just a link back to https://github.com/zulip/zulip-mobile/blob/master/docs/howto/dev-server.md)

Or might simply appending a link at the bottom be enough?

I like the idea of adjusting using.html to have headings for server/web/mobile; that organization would likely make it better for the webapp use case as well as simplifying the mobile setup.  Feel free to make a PR doing that sort of reorganization.


LIVE-3170 Decrease Stellar API limit param to avoid HTTP 503 "object too large" in responses

📝 Description
Since infra moved from Fastly instead of Cloudflare as antiddos+loadbalancer for Stellar, we are getting Error 503 Response object too large on some large accounts.
Decreasing the limit path param of the http requests helps avoiding the issue while discussions are ongoing with Fastly.
❓ Context

Impacted projects: ledger-live-common
Linked resource(s): https://ledgerhq.atlassian.net/browse/LIVE-3170

✅ Checklist

[x] Test coverage
[x] Atomic delivery
[x] No breaking changes

📸 Demo

🚀 Expectations to reach
Please make sure you follow these Important Steps.
Pull Requests must pass the CI and be internally validated in order to be merged.

Bridge integration tests run : https://github.com/LedgerHQ/ledger-live/actions/runs/2780509908


Restore previous BUNDLE_GEMFILE in bundler/inline

Without spacing changes
Closes #7159

Hi @fatkodima!
Any chance we can write a spec for #7159? Also, could you rebase?

@deivid-rodriguez Updated.

@bundlerbot merge


Replacing results in metriq throws HttpClientError

Replacing results in metriq.info via metriq-client API results in Unauthorized error when making the request client.http.delete(f"/result/{result_id}/")
See log from automated failed job:
Deleting qiskit version 0.44.1 result from submission 595...
Traceback (most recent call last):
  File "/home/runner/work/submit-metriq/submit-metriq/src/run_experiment_steps.py", line 30, in <module>
    delete_submission_results(submission_id, r_version)
  File "/home/runner/work/submit-metriq/submit-metriq/src/preprocessing.py", line 69, in delete_submission_results
    client.http.delete(f"/result/{result_id}/")
  File "/home/runner/work/submit-metriq/submit-metriq/.tox/py38/lib/python3.8/site-packages/tea_client/http.py", line 306, in delete
    return self.request(
  File "/home/runner/work/submit-metriq/submit-metriq/.tox/py38/lib/python3.8/site-packages/tea_client/http.py", line 179, in request
    raise errors.HttpClientError(message, response=self.response)
tea_client.errors.HttpClientError: HttpClientError([40](https://github.com/karlaspuldaro/submit-metriq/actions/runs/6714275264/job/18247252560#step:5:41)1: Unauthorized)

For some reason, sometimes we need to refresh the API token in between endpoint calls.
In this case, I was able to recreate the Unauthorized HttpClientError reaching the same line as shown in the log above. Running export METRIQ_TOKEN={token_value} before the execution fixed the issue upon delete.

This would be a bug, firstly, if this is specifically a token generated in the user profile settings. However, front end session tokens, like through username/password login, have a timed expiration.
It's possible that a timed expiration is accidentally being applied to tokens generated through the user profile settings. I'll be able to look into this tomorrow, (I promise, and I haven't forgotten about the box plot, with which I have procrastinated extremely, apologies. I prioritized other development work, but we haven't forgotten, and I'm sorry again!)

@WrathfulSpatula thanks a lot! In this specific case our client instance makes a GET request for all results from a submission, then finds the one to be updated, then calls delete on a result item. That's when we get the unauthorized error (sometimes). Refreshing the token fixed the issue when it happened.

@karlaspuldaro Firstly, the gist is that I don't think the problem is a bug that sets an expiration time on the metriq-client token, if you generate a token in the user profile settings view of the front end. I'll try to decode an actual token, with debugger tools, to further confirm this. Please let me know, if you're getting a token from somewhere besides the user profile settings view in the front end. (It's theoretically possible that someone could do so, like by using a web front end token, which actually can be retrieved with a browser debugger or the wrong API route to our back end.)
The technical details might not be important for me to explain, to fix your issue, but, for sake of the issue ticket as a reference, I'll explain the code path. Below, I'll explain the logical flow, from the point of the method called on clicking the UI button in the user profile front end view, which makes a request to the back end.
handleGenerateOnClick() at line 41 of the Token.js view makes a request to the route /api/token, in the back end. (Pardon, GitHub just went partially down, as of a couple of minutes ago, and this is actually the last permalink I tried to add to this issue ticket comment, so I temporarily can't link it.)
That front end method, makes a public GET request for a metriq-client token mapped to a controller method, here:
https://github.com/unitaryfund/metriq-api/blob/1514212e633698f07d67c58950bfec27af7eebfc/metriq-api/api-routes.js#L35
That's basically the entry point to our back end code. Because it's mapped to the controller method, the back end enters that method:
https://github.com/unitaryfund/metriq-api/blob/1514212e633698f07d67c58950bfec27af7eebfc/metriq-api/controller/accountController.js#L100
As you can see in that controller method, we enter a service method, in userService.js:
https://github.com/unitaryfund/metriq-api/blob/1514212e633698f07d67c58950bfec27af7eebfc/metriq-api/service/userService.js#L201
Notice (at least when GitHub is back up and fully functioning,) that generateWebJwt() has a true argument in third position, and generateClientJwt() has a false argument in third position. Immediately below, in that same service file, generateJwt() sets an expiration if the argument is true, and doesn't add an expiration to the token if false. The two arguments appear to be correct, for respective cases of metriq-client token vs. front end session token.
If I can decode token fields with debugging tools, we can basically further prove this is the correct stack trace, above.

Also, it's worth pointing out: if you hold an existing metriq-client token, and then you generate a new one in the user profile settings view of the front end, then all previously generated metriq-client tokens for your account are invalidated, as the text in the front end indicates.
So, if you have a token that's valid, which you're immediately using with client code itself, and then you generate any new metriq-client token in the user profile view, then you must replace all old textual code references to any old tokens, with the single latest token. (Sorry that this is jargony, but I can break it down more simply, if necessary.)

@WrathfulSpatula thank you so much for the detailed explanation of the token flow, this is very helpful.
The token we use locally and in CI is one created through the UI 5 months ago, so I can confirm the last scenario does not apply.
Another theory, and I think this is very likely, this is in an environmental variable issue in our CI, and how the tox environment we create accesses the token from the system. If the token variable is empty, the API stills allows creating a client instance and, I assume, also allows making GET some public requests, like submissions. Although on delete is when we get the 401 error, and I think this is because we have an empty token in the system environment variable.

I'm not personally familiar with tox, but that makes quite a bit of sense, as you explain your own "user code" base. I'm keeping an eye on the issue ticket, and I'll take another look at this on Monday, from the Metriq side, if not sooner. If you have updates on your end, I'm all ears.

@WrathfulSpatula it might be hard to debug CI but I will investigate this on a draft PR soon

@WrathfulSpatula it was a CI problem indeed, the API token was not being read at some point.
Btw, when you have a chance could you please review our submissions - 661 and 662 , they're been submitted a few months ago.


invalid memory address or nil pointer dereference on an empty config file

Thank you for the effort! I am getting error though:
Installed with
go install github.com/ewen-lbh/hyprls/cmd/hyprls@latest
verified that it starts by running it from the console
❯ hyprls
2024-04-28T14:52:39.174+0200    DEBUG   hyprls/main.go:25       going to start server
2024-04-28T14:52:39.175+0200    DEBUG   hyprls@v0.1.0/main.go:18        starting server
created an empty hyprland.conf file and ran
vim.lsp.start { name = "hyprlang", cmd = {"hyprls"}, root_dir = vim.fn.getcwd(), }
but as soon as I insert the first character, I get an error,
Client hyprlang quit with exit code 2 and signal 0. Check log for errors
checking with LspLog gives
[ERROR][2024-04-28 14:52:22] .../vim/lsp/rpc.lua:770	"rpc"	"hyprls"	"stderr"	"panic: runtime error: invalid memory address or nil pointer dereference\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0x709695]\n\ngoroutine 10 [running]:\n"

yeah I never tested it with an empty file :sweat_smile:
seems like some map somwhere is initialized too late? i'll look into it

You can upgrade to v0.1.1, it (should be) fixed


[api-docs] Document slash command option type NUMBER (10)

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

Done


Adding spanish translation

Added a comment above. So, feel free to change yourself as the author of this translation, if you wish to :)

Merged! Thank you :) 👍


Support serialization of strings to literal and folded scalars

Apologies if this feature already exists, but I didn't see it in the documentation.
Info
the literal scalar | can be used in YAML to break up a string to multiple lines, treating the line breaks literally.
the folded scalar > also can be used to break up a string into multiple lines, but it treats line breaks as spaces.
Request
When serializing a value containing a multiline string, it seems to always serialize that string to a single line with line breaks represented as \n (reproduction)
I think that there should be some way to specify how you want your string to be serialized (single line, folded scalar, literal scalar).
Scalar Examples
Literal: |
Input
key: |
  line 1
  line 2

Output (JSON)
{ "key": "line 1\nline 2\n" }

Folded: >
Input
key: >
  word1
  word2

Output (JSON)
{ "key": "word1 word2" }

I'm also interested in this feature, and several others, but this would have to be implemented by the underlying library used by serde-yaml.
Currently, that is yaml-rust, which is not really maintained. There are three unanswered pull requests for yaml-rust to add the feature:

https://github.com/chyh1990/yaml-rust/pull/137
https://github.com/chyh1990/yaml-rust/pull/136
https://github.com/chyh1990/yaml-rust/pull/132

There isn't much that can be done from serde-yaml I'm afraid.

I see... I was worried that that was the case 😞
Hopefully when those PRs are addressed or a fork is created, this issue can be addressed.
Thanks for your answer!

@dtolnay Is this something that you would want in this library? Or should I use my own fork(s) if I want this? The main problem does lay at https://github.com/chyh1990/yaml-rust I guess?

To the extent that this issue is asking to expose choice over the string representation at the granularity of individual fields, that is not something I would accept in this library.
If it is asking just for prettier defaults, such as serializing to literal scalar if a string value contains newlines, I am open to that but this crate is not where that code lives.

@dtolnay yaml-rust doesn't seem so active. Where do you stand on using an on-crates-published-fork (like https://github.com/davvid/yaml-rust)  which implements these prettier defaults? (it basically equals yaml-rust but with https://github.com/chyh1990/yaml-rust/pull/137 merged and working CI)

I wouldn't do that. It would be good to drop the dependency on yaml-rust entirely though, in favor of the backend style described in https://github.com/dtolnay/request-for-implementation/issues/9.

If it is asking just for prettier defaults, such as serializing to literal scalar if a string value contains newlines

That is actually what I initially wanted, but was worried that it was too opinionated :laughing:

this crate is not where that code lives.

If/when possible, could this issue be transferred to the relevant repo?


NoSuchMethodError from package:build_runner_core/src/package_graph/package_graph.dart 74:15   PackageGraph.forPath

We're seeing this failure on the DevTools bots:
NoSuchMethodError from package:build_runner_core/src/package_graph/package_graph.dart 74:15   PackageGraph.forPath
With the possible root cause being in package:package_config?
https://travis-ci.org/github/flutter/devtools/jobs/684021378#L591
You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues
NoSuchMethodError: Closure call with mismatched arguments: function 'MutablePackageTree.allPackages'
Receiver: Closure: (_SyncIterator<Package>) => bool
Tried calling: MutablePackageTree.allPackages()
Found: MutablePackageTree.allPackages(_SyncIterator<Package>) => bool
dart:core                                                              _SyncIterable.iterator
package:package_config/src/package_config_impl.dart 26:36              new SimplePackageConfig
package:package_config/src/package_config_json.dart 213:10             parsePackageConfigJson
package:package_config/src/package_config_json.dart 45:10              parsePackageConfigBytes
package:package_config/src/package_config_io.dart 117:10               readPackageConfigJsonFile
package:package_config/src/discovery.dart 109:18                       findPackagConfigInDirectory
package:package_config/src/discovery.dart 44:31                        findPackageConfig
package:package_config/package_config.dart 114:5                       findPackageConfig
package:build_runner_core/src/package_graph/package_graph.dart 74:15   PackageGraph.forPath
package:build_runner_core/src/package_graph/package_graph.dart 110:20  PackageGraph.forThisPackage
package:build_runner/src/entrypoint/run.dart 22:64                     run
.dart_tool/build/entrypoint/build.dart 96:22                           main

Moved to dart-lang/sdk. If we continue to see this we should investigate.
It sounds like we may need to:

ensure that kernel version needs to be rev'd when there are breaking changes?
embedding SDK version strings into Kernel files to prevent version skew from happening?
ensure we throw an IsolateSpawnException when trying to run a kernel file with an out-of-date snapshot?

We see this on the stagehand CI as well: https://travis-ci.org/github/dart-lang/stagehand/jobs/687544226

@johnniwinther suggested this may be a VM issue, w.r.t. the version skew of package_config.

@devoncarew do you have reproduction instructions for the above? the link you have doesn't seem to show any errors.

No repro instructions, but we have seen this on three separate CIs now. The link in the 1st comment does still show the issue.

The first link shows the  "Closure call with mismatched arguments" error which @cskau-g says was expected because of mismatched kernel files being used.
The final comment from @srawlins indicates this is a VM issue in response to your comment about stagehand CI, I am trying to understand what is the VM issue and how to reproduce it.

@jakemac53 @natebosch Does package:build_runner_core or any other package involved in running tests cache kernel / .dill files?
@sigurdm @jonasfj Does pub cache kernel / .dill files?

We see this on the stagehand CI as well: https://travis-ci.org/github/dart-lang/stagehand/jobs/687544226

That link points to a green build.

It sounds like we may need to:
ensure that kernel version needs to be rev'd when there are breaking changes?
embedding SDK version strings into Kernel files to prevent version skew from happening?
ensure we throw an IsolateSpawnException when trying to run a kernel file with an out-of-date
snapshot?.

See https://github.com/dart-lang/sdk/issues/41802 . @cskau-g is drafting a design for this atm.
We maintain currently no compatibility between SDK versions. The kernel binary version is just a version for the AST encoding. Though the VM does requires stronger guarantees than to just be able to parse the files, it also expects e.g. certain transformers to be run, etc.

pub run ... creates source snapshots, but we don't track which SDK version created. We just rebuild the snapshot if using it fails.

pub run ... creates source snapshots, but we don't track which SDK version created. We just rebuild the snapshot if using it fails.

This is exactly what build_runner does as well. We rely on the IsolateSpawnException.

This is exactly what build_runner does as well. We rely on the IsolateSpawnException.

That is unsafe atm. If we do lock-step changes to VM and kernel transformers they have to match. This is not validated at runtime until https://github.com/dart-lang/sdk/issues/41802 is addressed.
(/cc @mraleph Proofs the point we should really embed the SDK hash in the kernel files.)

If running a snapshot from a different sdk version has potentially undefined semantics then I would argue that it should detect this itself and throw before attempting to run? This has been the behavior for many years, and existing tools do rely on it.

The title of the bug does not match the issue being reported, looks like this issue is a duplicate of
https://github.com/dart-lang/sdk/issues/38969 and
https://github.com/dart-lang/sdk/issues/41802
Marking as such.

I think we should bump the priorities of those other issues, given that we've seen more problems related to this recently. Sounds like those two issues are the best way to make progress here; I'll bump them to P1s.


fix(watcher): use correct file sha in url query string

Use the most recently computed file sha present on the served file
when setting the file sha in the scripts tags added to the context.html.
This fixes an issue where the sha query arg would always be the sha of
the file when karma initially started and would not take into account
changes to the file when the watcher is running.
Closes #2317, #2264

I think this fixes both issues linked above. From what I could tell from my debugging, the sha on the file object in the served files array gets updated each time the file changes and the preprocessors run, but the sha on the included files does not. However for cache busting in the file URL path the sha from included was always used so the browser would end up requesting the original version of the file and it would be served by the browser cache.
I can add a test for this, but I wanted to get an idea of if this was an acceptable solution.

Is there something I can do to work towards getting this merged? The travis CI build seems to be failing because of a lint error in the master branch.

Thank you, could you rebase onto master so CI is happy please?

@chriscasola can you reproduce this problem in the test?
I think it will be great if we catch it in tests.
Thanks

@chriscasola are you sure that this PR fix problem  https://github.com/karma-runner/karma/issues/2317?
Because as I see there a problem with "nocache"
Setting nocache to false it does : application.spec.js?a1b2c3d4f5g6
Setting nocache to true it does : application.spec.js?undefined <-----

https://github.com/karma-runner/karma/issues/2317#issuecomment-240161662

Also, I don't sure that this PR fixes the issue https://github.com/karma-runner/karma/issues/2264
because there a problem with preprocessing files when user set nocache

@maksimr -- I will work on adding a test to replicate the issue and I'll take another look at the issues I referenced.
The info in #2317 seems to indicate that in watch mode karma is not picking up changes to files, which is exactly the issue I was having that this PR fixes. I don't think what is described there is actually related to the "nocache" option but I will confirm.
As far as #2264 I think you're right that it is unrelated, I'll remove that reference from the commit message.
Thanks for your feedback!

@chriscasola first of all thank you for your help.
About issue #2317 files with property doNotCache  shouldn't  have a sha(hash) at all. (IMHO)

@maksimr I'm not really sure what noCache should do in that case. According to this documentation it simply means karma should not cache the file contents in memory, and instead read from disk each time it is requested. I think that is separate from whether karma should prevent the browser from caching it or not.
I think the person who originally filed that issue was trying to use the noCache option because they noticed the same bug I did, which was that karma was rerunning tests on save, but not with the latest version of the test files.

@chriscasola Well, Let's fix the problem and wait for the feedback
Thanks!

@maksimr -- I added a test and rebased

@chriscasola thanks
I had a look and I think that the current solution fixes the circumstances not the source of the problem.
We have a FileList class which managed files.
It contains property files. Each time when we try take a value of this property we call getter method. Getter always return new object.
Returned object contains two property served and included.
Served means that file should be served by the karma web server.
Included means that file should be included on the page by tag script.
Also, FileList has a method changeFile this method called by watcher when file changed.
Inside this method, we find a file by path passed from watcher after that we run preprocessors on the changed file.
Inside Preprocessor we set sha to the file after all preprocessors.
Ok, FileList waiting while preprocessor works when preprocessor finish work FileList trigger event file_list_modified and pass FileList.files as first argument.
Karma server and WebServer listen event file_list_modified.
Karma server on file_list_modifie emit event by socket to the browser and say browser restart tests.
WebServer on file_list_modifie event save link on files inside filesPromise.
After that browser mad request to the server for getting files. Here we go to karma middleware
which handles the request. It takes filePromise and get files from it.
For included fiels it generate scripts for served files it generate map which also passed to the client.
As you can see in karma middleware we have another request which uses included files for example '/context.json'.
So first, I didn't see where we can loose the sha and get the current problem.
Second I think if sha wrong it should be fixed in another place for example in FileList becase we have code in different places which rely on sha from included file.

@maksimr I dug into this more and I think I see what is happening now.
In my project that is using karma but seeing the issue with changes not being picked up by the watch, we have the files property of our config set to something like:
[
  'src/**/*.js',
  'src/**/*.spec.js',
]

Obviously, it seems the second matcher there is redundant and can be removed to fix our issue, but because both of the matchers match files ending in .spec.js our test files end up appearing in the FileList under multiple patterns.
In changeFile the version of the file matched by the second matcher is found and preprocessed. Later on when the files getter is called, the second occurrence of the file, the one that was preprocessed, is put in the served list but the included list ends up pulling the first occurrence, which has the wrong sha and old file contents.
So in summary, I think the real bug here, is that if a file is matched by more than one file matcher from the karma config, changes are not picked up during the watch.
What would you recommend for a solution here? Ideas that come to mind are:

Show a warning if the file matchers match more than one file. This doesn't seem ideal since I don't think it makes sense to force people to write matchers that don't overlap.
Always use the file matched by the first matcher
Always use the file matched by the last matcher

@chriscasola Thanks! This is very valuable information/research because now it sounds familiar.
I think we already had such issue and maybe still have.
https://github.com/karma-runner/karma/issues/1499

What would you recommend for a solution here?
For me, we should have only one file which can be presented in several patterns/buckets.
I will look at the code.

And yeah, thanks again. Great job. 👍
P.S.
Could you create a repo which reproduces the problem If it's not a hassle?

@maksimr -- I think I see where the issue is and have a solution that ensures we always use the file from the first match. Just writing up a quick test and then I'll update this PR.

Different things that maybe related to this problem:
https://github.com/raspo/karma/commit/353b9cf7e1c9a15e4d5263b4ba47fca37209fb29

@maksimr I just pushed what I think fixes the root of the problem, let me know what you think.

@maksimr @dignifiedquire can this be merged?

thank you :octocat:

This is a huge regression. There should be an option to disable it
All projects that have a configuration similar to below are broken after this change
files: [
  { pattern: 'src/**/*', included: false, served: true },
  { pattern: 'src/**/*.spec', included: true } // 232 tests
]

> Error 0 of 0 tests executed

and worse, projects with the following configuration are not even broken. It's just that most of their tests are not being run anymore
files: [
  { pattern: 'src/**/*', included: false, served: true },
  { pattern: 'src/**/*.spec', included: true }, // 232 tests
  { pattern: 'src2/**/*.spec', included: true } // 81 tests
]

> 81 of 81 tests executed

And this breaks plugins that append adapters to the end of the files list
files: [
  { pattern: 'src/**/*', included: false, served: true },
  { pattern: 'tests/**/*.spec', included: true },
  { pattern: 'node_modules/**/*', included: false, served: true }
  // <<< Plugin appends an adapter here. It is loaded from within node_modules
]


Add readme

Change-type: patch
Signed-off-by: Gergely Imreh<EMAIL_ADDRESS>

Realized that Playground has no CI set up, so the PR is not very necessary, and cannot setup Versionbot anyways. Merged.


Unclear navigation

Today is a good example of how I was confused by our nav structure. Wanted to link to the new rendering perf content.

"Look, here's the soup-to-nuts rendering perf overview. This'll be the canonical starting point going forward.".

(In a less Paul Irish-driven usecase, we do need an answer for someone asking "tell me what i need to know to improve the runtime of my webapp".)
but so... how do we recommend linking to this content?
issue: no highlevel nav
There's this (very tall) box:

But it turns out the header is actually a link to the overview, which I only attempted because I knew there was one more page I was missing. I wouldn't have tried clicking it if I didn't know.
So this #anchor'd content didnt work for me to link to.
However linking to https://developers.google.com/web/fundamentals/performance/rendering/ doesnt work either because it's page 1 out of 7, which isn't clear until you get to the bottom of the page and start to read that.
issue. unclear "continue reading" action.
As I finish reading the intro article I get down to these two big blocks.

I want to continue reading so "Next" feels like the right choice. But these actually make me exit the current content and change into a new topic.
Meanwhile the "guides" is essentially my pagination of this content. But the term "Guides" doesn't make any sense at the bottom of the page.

Hopefully that makes sense and you can understand how I get lost as a user reading the content.  I could propose some solutions, but I imagine everyone else has already come up with better ideas than mine.

I'm going to close this for now as we're working on a complete site refresh using material design lite which should fix this issue.

sgtm
thx!


Case sensitive usernames

Correct me if I'm wrong but I don't remember usernames being case-sensitive previously, but they definitely are with 3.2.0-85-gdb4898d

This is happening on the server side.
While the website gets case-insensitive logins via the /browse API, which it is supposed to use, we recently switched away from the browse API, to free it up for implementation of cross-site request forgery (XSRF) prevention.. Apparently the direct object-server API does not support case-insensitivity.
@merickson, does this sound correct? Is there documentation for either API that includes details about this behavior?
@merickson, @devgeeks, if this is, indeed, the problem, we need to figure out what to change:

the direct object server API, to support case-insensitivity
the app to go back to /browse but with some way around XSRF inhibition
the requirement for for case-insensitivity
or something else?

Fixed by #669.


Remove comments from BibTex file

The loaded comments should be removed as they would be difficult to re-position.

Done in 3aa0809d8fa89f1649e1a14034f148a7185e77db


how to enable RSS?

Noob question - How do I enable RSS in Hugo / Academic?
I see traces of it in the theme, but it does not seem to get created by default.  I see there is a sitemap.xml created.
Is it something to configure in config.toml, or would it require a custom widget?
I have a lot of posts, I want to give site visitors a way to (re-)find posts that are now on page "20".. RSS would perhaps already be one way. A page with tags would be another. Search a third. Turning of paginator for posts would be another option.
I'm currently going with adding this to config.toml
paginate = "large number"
Thx in advance

RSS is enabled by default. All major RSS readers should automatically recognise the available feeds when you point the reader to your URLs.
For example:
All content: https://gcushen.github.io/hugo-academic-demo/index.xml
Post feed: https://gcushen.github.io/hugo-academic-demo/post/index.xml
Publication feed: https://gcushen.github.io/hugo-academic-demo/publication/index.xml
etc...

THank you @gcushen
blushes. How silly of me.


support nested routes, and a base prop to start from if necessary

This is awesome @sskoopa! Only thought I had was maybe use props.base directly and skip persisting it into state.baseUrl. Think that'd work?

I was just going on the fact that base is a calculated field, and props are supposed to be immutable in react-like codebases, no?

Updated to use props.base, tests still pass

Ack! Sorry, I hadn't meant to mutate this.props heh.  I figured something like:
class Router extends Component {
	constructor(props, context) {
		super(props);
		let base = props.base || '';
		if (props.history) {
			customHistory = props.history;
		}
		if (context && context[CONTEXT_KEY]) {
			base = context[CONTEXT_KEY] + base;
		}

		this.state = {
			url: this.props.url || getCurrentUrl()
		};
	}

	getChildContext() {
		let base = this.props.base || '';
		if (context && context[CONTEXT_KEY]) {
			base = context[CONTEXT_KEY] + base;
		}
		return { [CONTEXT_KEY]: base };
	}
}

Once base is calculated, where do you store it to use in getMatchingChildren?

Could just leave it as this.base - the reason to skip passing it into state was to avoid a re-render.

I'll work that direction then

s/this.base/this.baseUrl works, of course this.base is already a preact variable :)

Ahhh haha I completely missed that

ok, I now:

have a  component that can pass context deeper if needed
Router works with path attribute now, so will work just inside a Router
updated DOM tests to check nested support for default, path, and
updated README example

Let me know if you think anything else should be there.

+1

this is high on my todo list, we're using workarounds right now and it's ugly.

Anything I can help with?  Do you want to see something else changed?  I am willing to help.

Nah it's more just me wrapping my head around things.  I just need to play around with the nesting - you already have good test coverage here, that's what I usually ask people to do and you already did it :)

+1. Once to switch our app to preact-router once nested routes are in.

Yes - sorry for dropping this on the floor, we're super keen to get this merged too since our apps are using a workaround right now.

@developit I updated the PR to remove conflicts, ready to merge

Awesome, thanks a bunch! Hopefully we can merge this, right now we are hacking around it haha.

I tried and failed to resolve conflicts, didn't want to botch it.

@developit, I merged everything the way I think it should, but one of the tests I wrote for Match is failing:
FAILED TESTS:
  dom
    Router
      ✖ should support nested routers with Match
        Chrome 57.0.2987 (Mac OS X 10.12.4)
      TypeError: props.children[0] is not a function
          at Match.render (test/dom.js:1608:49)
          at renderComponent (test/dom.js:978:39)
          at renderComponent (test/dom.js:990:26)
          at Router.forceUpdate (test/dom.js:1100:14)
          at Router.routeTo (test/dom.js:1337:9)
          at routeTo (test/dom.js:1204:19)
          at route (test/dom.js:1189:10)
          at Context.<anonymous> (test/dom.js:458:20)

I left the console.log of children in Match.render as the child is a vNode, and usually the Router did a cloneElement on match.  Do we need cloneElement on Match.render()?  If so, do we need more or other tests on Match itself?

OK, Match components are merged and tests pass.  I think more people will use the simple Match, but the power is there.  gzip size 2050 (2K+2).  I could shorten the CONTEXT_KEY constant name :)

This would be super-useful to avoid workarounds, anything missing for approval?

Any update on this? My boss want to use sub directory according to this article https://fly.io/articles/one-hostname-to-rule-them-all/

Hi, anything I could help with this? Would be nice to have it.

@sskoopa @developit Any news on this? Really don't want the extra size of React Router as this does everything I need. Thanks

If anyone wants to take a stab at resolving the conflicts that'd help. We all want it merged :)

When I go to review the PR i'm not seeing any conflicts, is there a certain view I should be looking at?
I'm also very interested in adding the ability for nested routes, how can i help?

Hi quickly updated - https://github.com/developit/preact-router/pull/293

This would be so nice to see it merged. Big thumbs up to @sskoopa.
@developit Is there any change to see this merged? Can i do something like local merge and manual testing maybe?

@hbroer Agree the PR is really great and in my opinion there is not much standing in the way of a merge. The PR needs to be updated against the latest changes in master for Preact X, but that seems to be all that's left to do 🎉

What happened to this feature? I can't seam to find that it was solved and merged in another issue. Is this still being considered or have it been discarded?

@Haugen it's still being considered, just hasn't been prioritized. There are so many great routers available that work with Preact, but the drawback is that it's hard to justify spending time on new features for preact-router. FWIW I would really like to get this functionality integrated, I just can't take that time away from current projects.

@developit what is missing for that to be merged? I could help investing time on it. I understand there are many routers that work with Preact, but since I'm working with preact for performance reasons, I would like to have this base prop to handle my requests on a subdir (it's not about the nested requests, it's about the base prop)


[Disco] Integrate NCCL with CUDAGraph

This PR integrates NCCL with CUDAGraph by using the default stream that CUDAGraph uses for NCCL communication.

CC: @vinx13 @jinhongyii


Errors for piechart unique count should be dynamic

Description
When using uniqueCount queries in pie charts within nerdpack application, this warning is automatically added and there’s
no easy way to remove it: “This pie chart uses uniqueCount, which may result in the facet sum exceeding 100%. Learn more in our documentation.”
Steps to reproduce

Build a pie chart in a nerdlet
Use unique Count in the query

query='SELECT uniqueCount() FROM `Synthetics` SINCE 1 DAY AGO TIMESERIES AUTO FACET jobType'

See default error message.

Expected behavior
A developer can have control of what error message is displayed.
Additional info
this may require an update the NR Core so the SDK bundler is accurate.

@jpvajda Is this something that is happening on the component page? I'd like to better understand what we are looking for here.

@jerelmiller it's when a user actually uses the component within in application. There is default message that users would like controls over.

@jpvajda sounds like maybe thats something for the one core team? I'm not sure thats something we are able to handle on the dev site since we don't own the SDK.

@jerelmiller for sure, I captured that in the additional info section. I though as we build a bridge to that team, we can just make this code change on behalf of our 3rd developers and ensure it get done.

@jpvajda will file this with the NR1 core team, it's out of scope for DevEx to do this change.

closing as this isn't an issue the devex team can actually resolve. the feedback has been shared with the NR1 Core Team

closing as this isn't an issue the devex team can actually resolve. the feedback has been shared with the NR1 Core Team


Dynamic template data for multiple recipients

Actual Behaviour
Right now, I can only send dynamic template data for one recipient at a time. Example of my code:
{
"personalizations": [
{
"to": [
{
"email"<EMAIL_ADDRESS>"name": "John Doe"
}
],
"dynamic_template_data": {
"firstName": "John",
"lastName": "Doe"
},
"subject": "Hello, World!"
}
],
"from": {
"email"<EMAIL_ADDRESS>"name": "John Doe"
},
"reply_to": {
"email"<EMAIL_ADDRESS>"name": "John Doe"
},
"template_id": "<<YOUR_TEMPLATE_ID>>"
}
Expected Behaviour
I want to send dynamic template data for each recipient, but I don't know how. The idea is to send personalized e-mails for multiple recipients one at a time, instead of sending emails one by one. I tried to search for an example but I couldn't find it. Do you have any?

Yes, you can send one mail to multiple recipient. I have faced same problem but I have solved the issue. Just use separate personalizations.
Example Json:
{
  "personalizations": [
    {
      "to": [
        {
          "email"<EMAIL_ADDRESS>          "name": "John Doe"
        }
      ],
      "dynamic_template_data": {
        "firstName": "John",
        "lastName": "Doe"
      },
      "subject": "Hello, World!"
    },
    {
      "to": [
        {
          "email"<EMAIL_ADDRESS>          "name": "John Doe"
        }
      ],
      "dynamic_template_data": {
        "firstName": "John",
        "lastName": "Doe"
      },
      "subject": "Hello, World!"
    }
  ],
  "from": {
    "email"<EMAIL_ADDRESS>    "name": "John Doe"
  },
  "reply_to": {
    "email"<EMAIL_ADDRESS>    "name": "John Doe"
  },
  "template_id": "<<YOUR_TEMPLATE_ID>>"
}

Since this issue hasn't been closed, how do I inject my dynamic template data into the model when using the SendGridMessage object in C#?
var mail = new SendGridMessage
{
    Attachments = new List<Attachment>(),
    From = new EmailAddress()
    {
        Email = emailConfig.FromAddress,
        Name = emailConfig.FromName
    },
    TemplateId = EmailConstants.ConfirmationEmailTemplateId,
    Subject = subject
};

mail.Personalizations = new List<Personalization>() {
    TemplateData = ???
};

@logany-hi
For you reference:-
public virtual async Task SendEmailPersonalized(Dictionary<string, string> to, string templateId, Dictionary<string, TValue> templateData, string? fromName = null, string? fromEmail = null)
{
var msg = new SendGridMessage();
msg.SetFrom(new EmailAddress(fromEmail ?? sendGridOptions.FromEmail, fromName ?? sendGridOptions.FromName));
msg.SetTemplateId(templateId);
    msg.Personalizations = new List<Personalization>();

    foreach (var r in to)
    {
        msg.Personalizations.Add(new Personalization()
        {
            Tos = new List<EmailAddress>() { new EmailAddress(r.Key, r.Value) },
            TemplateData = templateData[r.Key]
        });
    }

    var response = await sendGridClient.SendEmailAsync(msg);
    if (response.StatusCode >= System.Net.HttpStatusCode.OK && response.StatusCode <= System.Net.HttpStatusCode.IMUsed)
    {
        return true;
    }

    logger.LogWarning("SendEmail returned a negative status. Response: {@response} for {@to} address. TemplateId: {@templateId}", response, to, templateId);
    return false;
}

Caller of above function
foreach (var t in alertsList)
{
await _emailService.SendEmailPersonalized(
t.AlertRecipient.ToDictionary(a => a.Email??Notifications.CommonData.Empty_UserEmail_Replacement, a => a.Name??Notifications.CommonData.Empty_UserName_Replacement)
,alertType.TemplateId!
,t.AlertRecipient.ToDictionary(a => a.Email?? Notifications.CommonData.Empty_UserEmail_Replacement, a => new CampaignGoalAchieved
{
DonorName = a.Name??Notifications.CommonData.Empty_UserName_Replacement,
CampaignName = "Test Campaign Name",
CampaignLink = "http://sample.com",
GoalAchieved = "25"
})
, alertType.Sender
, alertType.SenderEmail
);
        t.Status = Notifications.AlertStatus.Processed;
        await UpdateAlertAsync(_Mapper.Map<Alert, AlertDto>(t));
    }

I also had issues with it.
The docs are pretty disappointing :(
What worked for me -
create a separate object for each email. Not using the personalization key.
example:
const yourArrayOfEmails = [{someData: 1, email<EMAIL_ADDRESS>{someData: 2, email<EMAIL_ADDRESS>
yourArrayOfEmails.map(emailDetails => {
  return {
    from: {
        email: EMAIL_FROM,
        name: EMAIL_NAME,
    },
    templateId: EMAIL_TEMPLATE_ID,

    // dynamic
    to: emailDetails.email,
    dynamicTemplateData: {
        someData: emailDetails.someData,
    },
  }
})


fix download url to be compatible with goreleaser

related pr: https://github.com/KusionStack/kusion/pull/210

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
118

Relevant Lines:
157

💛  - Coveralls


Fix CSS problems

Describe your changes
I have eliminated the excess pages, since applying the future login logic we don't need to have duplicity between user/admin.
Also, I have added new logics to correct some CSS issues. As well as other general modifications.
Issue ticket number and link
closes #66
Checklist before requesting a review

[x] I have performed a self-review of my code.
[x] I have reviewed my code and used the established color palette for the project.
[x] I have reviewed my code and used the established font for the project.

Has eliminado todo lo de admin...?

Yes, we were duplicating two identical pages when the logic of differentiating between admin and user is going to be implemented inside the component we call.


StyleBox: Document correct methods to draw with a RID

Object.get_instance_id returns an int, and it's not clear how this can be used to obtain an RID. The get_canvas_item method is the simplest way of obtaining a valid RID in this context.

Did you mean to close this?

Oops, pulled the trigger a bit too quickly on this. :(

I force pushed an update to squash the commits and tweak the commit message for clarity.

Thanks! And congrats for your first merged Godot contribution :tada:


Dynamics 365 Business Central: Could not validate the client concurrency token required by the service.

Version: 5.9.1
Framework: .NET Standard 2.0, .NET Core, Xamarin
OData Version: V4.0
Problem Description:
I'm trying to update a record in Dynamics 365 Business Central using OData.  I'm using the following code:
dynamic x = ODataDynamic.Expression;
await _client.For(x.Company)
        .Key(company);
        .NavigateTo(x.Article)
        .Key(article.ItemNo)
        .Set(
                 x.Description = article.Description,
                 x.Unit_Price = article.UnitPrice
         )
        .UpdateEntryAsync();

However I get the following error from Business Central:
{
   "error":{
      "code":"BadRequest_InvalidToken",
      "message":"Could not validate the client concurrency token required by the service. Please provide a valid token in the client request.  CorrelationId:  2c074c12-1644-4f2c-befb-efd681f5a595."
   }
}

I found out that this error means I'm missing the ETAG in the update request from this question in the Dynamics 365 community:
https://community.dynamics.com/business/f/dynamics-365-business-central-forum/291240/put-patch-operation-failed-for-odata-web-api-in-d365-bc
Is there a way to get the ETAG and set it using the simple OData client? Or is there something else I'm missing?

I managed to solve this issue by manually getting the ETag like follows:
dynamic x = ODataDynamic.Expression;
dynamic articleToUpdate = await GetCompanyQuery()
                   .NavigateTo(x.Article)
                   .Key(article.ItemNo)
                   .FindEntryAsync();

_currentETag = articleToUpdate.__annotations.ETag;

And then adding the following to the BeforeResponse segment in the client settings:
if (((message.Method.Method == "PATCH") ||
     (message.Method == HttpMethod.Delete) ||
     (message.Method == HttpMethod.Put)) &&
    (_currentETag != null))
{
    message.Headers.Add("If-Match", _currentETag);
}

This way I could make sure that the ETag is always correctly set for all Patch, Put and Delete requests.
Make sure that IncludeAnnotationsInResults is set to true in the client settings.

I ran into this issue as well.  Everything works, but would you elaborate on your implementation of the _currentEtag property, and also the way you assigned the BeforeRequest delegate in client settings?   (note, you said BeforeResponse, but I assume you meant BeforeRequest?)

This is a great workaround. However, there is a chance that this might run into concurrency issues if this were to be used multi-threaded application (you might get the wrong etag in BeforeResponse).
It would be better if there were a mechanism in the UpdateEntryAsync() methods to permit the specification of an ETag if it is needed for the If-Match header.

Thanks @Luukjn, checking the item's current etag and then putting it into the If-Match header worked beautifully!

I think I have the same issue?
https://github.com/simple-odata-client/Simple.OData.Client/issues/865
Unable to do the InsertEntryAsync. Other calls work, but unable to post a new item.


1.9.4 Removing a mod that uses OreSpawn will cause OreSpawn to crash when it attempts to load the config.

Need to catch when the mod that generated the config is not present so it will not crash.

Will do.