Update of state multiple nested class data

after searching on many tutorial i can't update nested class data with this implementation, here i have a OrderStructure with a two field such as title and list of products which this product is another list named services which i defined on parent class
first of all when user click on button i save title and empty product's service
void increment(int productId, int serviceId, int serviceCost) {
  final found = state.products.indexWhere((product) => product.id == productId);
  if (found < 0) {
    final List<SelectedProductServices> _s = [];
    _s.add(SelectedProductServices(serviceId, 1, serviceCost));
    state = OrderStructure(
      state.title
      [...state.products, SelectedProducts(productId, _s)],
    );
  }

now when found is equal or bigger than 0, i should find product with passed productId and inside this search i should find service, if it saved before cost should be incrementotherwise it should insert new data inproducts`
this is my code which i can't complete that and that has error and another problem is incrementing count
state = OrderStructure(state.title, [
  ...state.products,
  for (final product in state.products)
    if (product.id == productId)
      for (final service in product.services)
        if (service.id == serviceId)
          SelectedProducts(
              /* ------------------------------------------------------------- PROBLEM :[service.count++] */
              state.products, [...service, SelectedProductServices(service.id, service.count++, service.cost)])
        else
          ...state.products
]);

data classes structure:
class OrderStructure {
  final String title;
  final List<SelectedProducts> products;

  const OrderStructure(this.title,this.products);
}

class SelectedProducts {
  final int id;
  final List<SelectedProductServices> services;

  SelectedProducts(this.id, this.services);
}

class SelectedProductServices {
  final int id;
  final int count;
  final int cost;

  const SelectedProductServices(this.id, this.count, this.cost);
}

Your count variable is final so you cannot increment it like that. I think you are trying to do service.count + 1 there.

@TimWhiting
yes, i changed that, how can i resolve this problems?

error: Spread elements in list or set literals must implement 'Iterable'
error: The argument type 'List' can't be assigned to the parameter type 'int'.

thanks in advance

You are trying to assign a list to an int, and have wrong types everywhere.
I think this is what you are trying to do.
final newState =  OrderStructure(state.title, [
  ...state.products,
  for (final product in state.products)
    if (product.id == productId)
      for (final service in product.services)
        if (service.id == serviceId)
          SelectedProducts(
             serviceId, [...product.services, SelectedProductServices(service.id, service.count+1, service.cost)])
]);
if (!newState.products.contains(productId) || !newState.products.firstWhere((p) => p.id == productId).services.contains(serviceId)){
  // Add new
  newState.products.add(SelectedProducts(serviceId, SelectedProductServices(serviceId, 1, cost)));
}
state = newState;

Something like this.

@TimWhiting
errors gone, thank you very much, in this part of code:
for (final product in state.products)
  if (product.id == productId)
    for (final service in product.services)
      if (service.id == serviceId)
        SelectedProducts(serviceId,
            [...product.services, SelectedProductServices(service.id, service.count + 1, service.cost)])

if product exists, that create another a product in list and after that i have multiple product as same id
i tried to fix that and solve problem. but i can't. could you help me please?
thanks

final newState =  OrderStructure(state.title, []);
for (final product in state.products){
  if (product.id == productId) {
    if (product.services.contains((s) => s.id == serviceId) {
        final service = product.services.firstWhere((s) => s.id == serviceId);
        newState.products.add(SelectedProducts(
             productId, [...product.services.where((s) => s.id != serviceId), SelectedProductServices(service.id, service.count+1, service.cost)]));
    } else {
      newState.products.add(SelectedProducts(
             productId, [...product.services, SelectedProductServices(serviceId, 1, cost)]));
    }
  } else {
    newState.products.add(product);
  }
}
if (!newState.products.contains(productId) || !newState.products.firstWhere((p) => p.id == productId).services.contains(serviceId)){
  // Add new
  newState.products.add(SelectedProducts(serviceId, SelectedProductServices(serviceId, 1, cost)));
}
state = newState;

This is some pretty complex update logic.I wouldn't do it using the for / if inside of collections. This is best done imperatively. In any case you should be asking these kinds of questions on StackOverflow or Discord, since it is not an issue with Riverpod.

@TimWhiting
I ask in StackOverflow with 500 bounty to find which one can help me resolve this problem
thanks

@TimWhiting i found what was problem, that was contains which it doesn't work and couldn't find in nested class data, i changed it to any
thanks so much


pouch inspect info of NetworkSettings is incomplete

Ⅰ. Issue Description
The output of pouch inspect does NOT contain the Ports info in NetworkSettings Section, unlike what docker-ce does.
Ⅱ. Describe what happened

run pouch run -dt -p 8080:80 nginx
then pouch inspect xxxx
there's no Ports in NetworkSettings

Ⅲ. Describe what you expected to happen
using docker-ce instead. Here's what we got from docker inspect
"NetworkSettings": {
            "Bridge": "",
            "SandboxID": "85d090d927a763f61763ae0f69fd7f5c5985aebdac638f72e8ddb4186724058c",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "80/tcp": [
                    {
                        "HostIp": "<IP_ADDRESS>",
                        "HostPort": "20008"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/85d090d927a7",
...

Ⅳ. How to reproduce it (as minimally and precisely as possible)

pouch run -dt -p 8080:80 nginx
pouch inspect xxxx

Ⅴ. Anything else we need to know?
Ⅵ. Environment:

pouch version (use pouch version): 1.0.0-585-g19dfa08-dirty
OS (e.g. from /etc/os-release): centos7
Kernel (e.g. uname -a): 4.9
Install tools:
Others:

Indeed, working on it.


BIC-218 # refactor router behaviour into middleware pipeline

Router#routeRequest() previously executed many steps, in a hard-coded sequence

now those steps are separate middleware functions

this should make future work easier and safer to implement, e.g. login handling, seamless navigation redirects, etc

LGTM


Remove or reduce VariationalAlgorithm

What is the expected enhancement
Remove the VariationalAlgorithm base class, since it's not used anywhere but VQE. If we realize that it's needed for typing (see in Qiskit Nature, which currently accesses VariationalAlgorithm.initial_point), reduce it to an interface and not a base-class with functionality.

@Cryoris Is this issue needed anymore - this was done by the Stateless VQE PR was it not?

Yep -- it was reduced to an interface 👍🏻


How to use directive only in browser.

I need to use ng2-dragula and it seem to have same ReferenceError: document is not defined issue.
It looks like I can add DragulaModule only for app.browser.module.ts but I still need to have [dragula]='"third-bag"' in template. and angular complains that [dragula]='"third-bag"' is not known property. Do I need to somehow create different template for serverside rendering? I tried to set ngIf so it is rendered optionally without luck. Could you please suggest what I need to do in this cases?

So in order to make things like that easier I'm going to do a little refactoring to the app.module & app.browser.module | app.server.module.
Let me look over PR #102 (which moves the directory structure around to follow a more .NET standard) and then I can add these in there.
I'll merge over these app.module changes and leave an example of this so future people can benefit from it as well!
But the jist is... (you can see in the dep injection branch here https://github.com/MarkPieszak/aspnetcore-angular2-universal/compare/dep-injection)
You can see I pulled everything -out- from the NgModule in app.module, and made them all exportable COMMON_IMPORTS | COMMON_COMPONENTS etc. Then I just add those into each app.platform module. Adding ng2-dragula Module to only App.browser.module (now it's the Root), everything works like a charm :+1: :100:


External service takes nearly 18mins to start in 1.1.0-DEV3

Rancher Version:
1.1.0-DEV3
Docker Version:
1.10.2
OS and where are the hosts located? (cloud, bare metal, etc):
RHEL 7.2 on a multi cloud.
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
Single node Rancher with an external DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:
Stop / Start stack
Results:
When booting up a stack only containing external links and service aliases, we have observed that the services take too long too boot up.
I have traced one service down in the rancher logs which took nearly 18 mins to start up.

I can trace the same in the rancher-debug logs and it shows the following:
cattle-debug.log:2016-05-31 22:40:54,757 DEBUG [004ac0c6-799f-44e3-adab-63d2e7edeaad:7737034] [service:4779] [service.activate->(ServiceUpdateActivate)] [] [torService-1985] [c.p.e.p.i.DefaultProcessInstanceImpl] Attempting to run process [serviceexposemap.create:7737049] on resource [451382]
cattle-debug.log:2016-05-31 22:40:54,765 DEBUG [004ac0c6-799f-44e3-adab-63d2e7edeaad:7737034] [service:4779->serviceExposeMap:451382] [service.activate->(ServiceUpdateActivate)->serviceexposemap.create] [] [torService-1985] [c.p.e.p.i.DefaultProcessInstanceImpl] Changing state [requested->activating] on [serviceExposeMap:451382]
cattle-debug.log:2016-05-31 22:40:54,765 DEBUG [004ac0c6-799f-44e3-adab-63d2e7edeaad:7737034] [service:4779->serviceExposeMap:451382] [service.activate->(ServiceUpdateActivate)->serviceexposemap.create] [] [torService-1985] [c.p.e.p.i.DefaultProcessInstanceImpl] Exiting with code [SCHEDULED] : SCHEDULED
cattle-debug.log:2016-05-31 22:40:54,774 DEBUG [004ac0c6-799f-44e3-adab-63d2e7edeaad:7737034] [service:4779] [service.activate->(ServiceUpdateActivate)] [] [torService-1985] [c.p.e.p.i.DefaultProcessInstanceImpl] Exiting [SCHEDULED] process [serviceexposemap.create:7737049] on resource [451382]
cattle-debug.log:2016-05-31 22:41:09,800 INFO  [:] [] [] [] [torService-1985] [i.c.p.e.e.i.ProcessEventListenerImpl] Communication timeout on process [service.activate:7737034] on [4779] : Object [serviceExposeMap:451382] failed to satisfy predicate [15000] millis
cattle-debug.log:2016-05-31 22:58:21,272 INFO  [:] [] [] [] [ecutorService-9] [i.c.p.e.e.i.ProcessEventListenerImpl] Communication timeout on process [service.activate:7737034] on [4779] : Object [serviceExposeMap:451382] failed to satisfy predicate [15000] millis
cattle-debug.log:2016-05-31 22:58:21,588 DEBUG [:] [] [] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Attempting to run process [serviceexposemap.create:7737049] on resource [451382]
cattle-debug.log:2016-05-31 22:58:21,603 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create->(ServiceExposeMapCreate)] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Running handler [ServiceExposeMapCreate]
cattle-debug.log:2016-05-31 22:58:21,603 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create->(ServiceExposeMapCreate)] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Finished handler [ServiceExposeMapCreate]
cattle-debug.log:2016-05-31 22:58:21,610 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create->(AgentInstanceApplyItems)] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Running post listener [AgentInstanceApplyItems]
cattle-debug.log:2016-05-31 22:58:21,612 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create->(AgentInstanceApplyItems)] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Finished post listener [AgentInstanceApplyItems]
cattle-debug.log:2016-05-31 22:58:21,612 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create->(ActivateByDefault)] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Running post listener [ActivateByDefault]
cattle-debug.log:2016-05-31 22:58:21,612 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create->(ActivateByDefault)] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Finished post listener [ActivateByDefault]
cattle-debug.log:2016-05-31 22:58:21,612 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create->(LoadBalancerServiceUpdateConfig)] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Running post listener [LoadBalancerServiceUpdateConfig]
cattle-debug.log:2016-05-31 22:58:21,615 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create->(LoadBalancerServiceUpdateConfig)] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Finished post listener [LoadBalancerServiceUpdateConfig]
cattle-debug.log:2016-05-31 22:58:21,619 DEBUG [dbbdfd06-23f7-4558-b558-5473d17092b6:7737049] [serviceExposeMap:451382] [serviceexposemap.create] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Changing state [activating->active] on [serviceExposeMap:451382]
cattle-debug.log:2016-05-31 22:58:21,627 DEBUG [:] [] [] [] [ecutorService-9] [c.p.e.p.i.DefaultProcessInstanceImpl] Exiting [DONE] process [serviceexposemap.create:7737049] on resource [451382] ```

**Expected:**
This seems to have started after we moved to 1.1.0-DEV2. We have eventually moved to 1.1.0-DEV3 yesterday to see if it helped but its not made much of a difference.

Can you please recommend if there is anything else we can check?

@ibrokethecloud I like the handle :)
The admin->processes in the UI is a good place to start.  That log doesn't provide much info.  The admin->process look for running task and if you click on them look for a little hazard icon.  That will have some error.

@ibrokethecloud could you share docker-compose/rancher-compose files of your stack?

@ibuildthecloud the handle was built with the hope it will garner attention and get someone to look at issues.. last one wasn't having much luck ;)

Here is the docker-compose:
  image: rancher/external-service
mail-imap:
  image: rancher/external-service
db-outage:
  image: rancher/external-service
db-kana:
  image: rancher/external-service
service-desktop:
  image: rancher/external-service
service-esb-old:
  image: rancher/external-service
service-esb-new:
  image: rancher/external-service
service-doc-management:
  image: rancher/external-service
service-payments:
  image: rancher/external-service
service-harmony-address:
  image: rancher/external-service
service-virus-scan:
  image: rancher/external-service
service-solr:
  image: rancher/external-service
service-chat:
  image: rancher/external-service
monitoring-introscope:
  image: rancher/external-service
monitoring-logstash:
  image: rancher/external-service

Here is the rancher-compose
  hostname: mailserver
mail-imap:
  hostname: mailimap
db-outage:
  hostname: ${DB_OUTAGE}.${FQDN}
db-kana:
  hostname: ${DB_KANA}.${FQDN}
service-desktop:
  external_ips:
    - ${SERVICE_DESKTOP}
service-esb-old:
  hostname: ${SERVICE_ESB_OLD}.${FQDN}
service-esb-new:
  hostname: ${SERVICE_ESB_NEW}.${FQDN}
service-doc-management:
  hostname: ${SERVICE_DOC_MANAGEMENT}.${FQDN}
service-payments:
  hostname: ${SERVICE_PAYMENTS}.${FQDN}
service-harmony-address:
  hostname: ${SERVICE_HARMONY_ADDRESS}.${FQDN}
service-virus-scan:
  hostname: ${SERVICE_VIRUS_SCAN}.${FQDN}
service-solr:
  hostname: ${SERVICE_SOLR}.${FQDN}
service-chat:
  hostname: ${SERVICE_CHAT}.${FQDN}
monitoring-introscope:
  hostname: ${MONITORING_INTROSCOPE}.${FQDN}
monitoring-logstash:
  hostname: ${LOGSTASH}.${FQDN}

@alena1108 strange thing is when service stucks at activating state, clicking stop button on that service will actually make it be active
By the way I'm with @ibrokethecloud :)

Here we go:

io.cattle.platform.async.utils.TimeoutException: Object [serviceExposeMap:451813] failed to satisfy predicate [15000] millis
	at io.cattle.platform.object.monitor.impl.ResourceMonitorImpl.waitFor(ResourceMonitorImpl.java:92)
	at io.cattle.platform.object.monitor.impl.ResourceMonitorImpl.waitFor(ResourceMonitorImpl.java:97)
	at io.cattle.platform.object.monitor.impl.ResourceMonitorImpl.waitForNotTransitioning(ResourceMonitorImpl.java:124)
	at io.cattle.platform.servicediscovery.deployment.impl.unit.ExternalDeploymentUnitInstance.waitForNotTransitioning(ExternalDeploymentUnitInstance.java:112)
	at io.cattle.platform.servicediscovery.deployment.impl.unit.DeploymentUnit.createInstance(DeploymentUnit.java:264)
	at io.cattle.platform.servicediscovery.deployment.impl.unit.DeploymentUnit.start(DeploymentUnit.java:222)
	at io.cattle.platform.servicediscovery.deployment.ServiceDeploymentPlanner.deploy(ServiceDeploymentPlanner.java:144)
	at io.cattle.platform.servicediscovery.deployment.impl.DeploymentManagerImpl.startUnits(DeploymentManagerImpl.java:239)
	at io.cattle.platform.servicediscovery.deployment.impl.DeploymentManagerImpl.activateDeploymentUnits(DeploymentManagerImpl.java:206)
	at io.cattle.platform.servicediscovery.deployment.impl.DeploymentManagerImpl$1.doWithLock(DeploymentManagerImpl.java:131)
	at io.cattle.platform.servicediscovery.deployment.impl.DeploymentManagerImpl$1.doWithLock(DeploymentManagerImpl.java:110)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl$3.doWithLock(AbstractLockManagerImpl.java:40)
	at io.cattle.platform.lock.impl.LockManagerImpl.doLock(LockManagerImpl.java:33)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:13)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:37)
	at io.cattle.platform.servicediscovery.deployment.impl.DeploymentManagerImpl.activate(DeploymentManagerImpl.java:110)
	at io.cattle.platform.servicediscovery.deployment.impl.DeploymentManagerImpl.activate(DeploymentManagerImpl.java:93)
	at io.cattle.platform.servicediscovery.process.ServiceUpdateActivate.handle(ServiceUpdateActivate.java:78)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl.runHandler(DefaultProcessInstanceImpl.java:446)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl$4.execute(DefaultProcessInstanceImpl.java:393)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl$4.execute(DefaultProcessInstanceImpl.java:387)
	at io.cattle.platform.engine.idempotent.Idempotent.execute(Idempotent.java:42)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl.runHandlers(DefaultProcessInstanceImpl.java:387)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl.runLogic(DefaultProcessInstanceImpl.java:493)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl.runWithProcessLock(DefaultProcessInstanceImpl.java:320)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl$2.doWithLockNoResult(DefaultProcessInstanceImpl.java:260)
	at io.cattle.platform.lock.LockCallbackNoReturn.doWithLock(LockCallbackNoReturn.java:7)
	at io.cattle.platform.lock.LockCallbackNoReturn.doWithLock(LockCallbackNoReturn.java:3)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl$3.doWithLock(AbstractLockManagerImpl.java:40)
	at io.cattle.platform.lock.impl.LockManagerImpl.doLock(LockManagerImpl.java:33)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:13)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:37)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl.acquireLockAndRun(DefaultProcessInstanceImpl.java:257)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl.runDelegateLoop(DefaultProcessInstanceImpl.java:185)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl.executeWithProcessInstanceLock(DefaultProcessInstanceImpl.java:158)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl$1.doWithLock(DefaultProcessInstanceImpl.java:108)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl$1.doWithLock(DefaultProcessInstanceImpl.java:105)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl$3.doWithLock(AbstractLockManagerImpl.java:40)
	at io.cattle.platform.lock.impl.LockManagerImpl.doLock(LockManagerImpl.java:33)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:13)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:37)
	at io.cattle.platform.engine.process.impl.DefaultProcessInstanceImpl.execute(DefaultProcessInstanceImpl.java:105)
	at io.cattle.platform.engine.eventing.impl.ProcessEventListenerImpl.processExecute(ProcessEventListenerImpl.java:74)
	at io.cattle.platform.engine.eventing.impl.ProcessEventListenerImpl.processExecute(ProcessEventListenerImpl.java:56)
	at sun.reflect.GeneratedMethodAccessor595.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at io.cattle.platform.eventing.annotation.MethodInvokingListener$1.doWithLockNoResult(MethodInvokingListener.java:76)
	at io.cattle.platform.lock.LockCallbackNoReturn.doWithLock(LockCallbackNoReturn.java:7)
	at io.cattle.platform.lock.LockCallbackNoReturn.doWithLock(LockCallbackNoReturn.java:3)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl$3.doWithLock(AbstractLockManagerImpl.java:40)
	at io.cattle.platform.lock.impl.LockManagerImpl.doLock(LockManagerImpl.java:33)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:13)
	at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:37)
	at io.cattle.platform.eventing.annotation.MethodInvokingListener.onEvent(MethodInvokingListener.java:72)
	at io.cattle.platform.eventing.impl.AbstractThreadPoolingEventService$2.doRun(AbstractThreadPoolingEventService.java:135)
	at org.apache.cloudstack.managed.context.NoExceptionRunnable.runInContext(NoExceptionRunnable.java:15)
	at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:108)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
	at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

@alena1108 I just tried same compose file with Rancher v1.0.2 and there is no issue. Seems new bug got introduced in 1.1.0-dev version

Did a few more tests. There is no issue on a fresh installed Rancher v1.0.2 or v1.1.0-dev3. So seems something wrong with the Rancher db which has been upgraded a few times since v0.x version. We are checking it further, try to compare db scheme between a clean Rancher server and the heavy used Rancher server.

I did a mysqldiff and its the same (liquibase succeeded each time). I'm assuming something else is in play here; db data, state in processes, networking etc. After a check over of the external mysql db server its healthy and without error, performing well and schema matches that of what a clean v1.1.0-dev3 should be.

@JayHaoDing thank you for debugging it.

id a few more tests. There is no issue on a fresh installed Rancher v1.0.2 or v1.1.0-dev3. So seems something wrong with the Rancher db which has been upgraded a few times since v0.x version

Does the problem exist only for the stack created in one of the previous version? If you create the same stack on the upgraded setup, and stop/start it, do you still see the issue?

strange thing is when service stucks at activating state, clicking stop button on that service will actually make it be active

There is a bug in our process logic: stuck process P1 (activate) doesn't get cancelled by P2 (deactivate), and as Inactive state - final state of deactivate process - is a valid start state for activate process, the stuck activate process will be performed again.
@sangeethah as we are going to run upgrade test, could you check this use case while upgrading to dev3? Deploy the stack from compose file while being on the previous version, upgrade to dev3, stop/start the service.

I used same compose filed provided above to create the stack in the newly installed Rancher.
There are also more complex stacks in the other Rancher having same issue. It's quite random, any service may get stuck. But I haven't tried those stacks in new Rancher server as it requires other configuration/hosts.
	_____________________________

From: Alena Prokharchyk<EMAIL_ADDRESS>Sent: Thursday, June 2, 2016 03:29
Subject: Re: [rancher/rancher] External service takes nearly 18mins to start in 1.1.0-DEV3 (#4971)
To: rancher/rancher<EMAIL_ADDRESS>Cc: Jay (Hao) Ding<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>@JayHaoDing thank you for debugging it.
id a few more tests. There is no issue on a fresh installed Rancher v1.0.2 or v1.1.0-dev3. So seems something wrong with the Rancher db which has been upgraded a few times since v0.x version
Does the problem exist only for the stack created in one of the previous version? If you create the same stack on the upgraded setup, and stop/start it, do you still see the issue?
strange thing is when service stucks at activating state, clicking stop button on that service will actually make it be active
There is a bug in our process logic: stuck process P1 (activate) doesn't get cancelled by P2 (deactivate), and as Inactive state - final state of deactivate process - is a valid start state for activate process, the stuck activate process will be performed again.
@sangeethah as we are going to run upgrade test, could you check this use case while upgrading to dev3? Deploy the stack from compose file while being on the previous version, upgrade to dev3, stop/start the service.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@alena1108 not sure if there is a issue for this bug?

There is a bug in our process logic: stuck process P1 (activate) doesn't get cancelled by P2 (deactivate), and as Inactive state - final state of deactivate process - is a valid start state for activate process, the stuck activate process will be performed again.

@ibrokethecloud : From what version did you upgrade to 1.1.0-dev3 ?

@soumyalj from 1.1.0-dev2 and actually this issue was seen in 1.1.0-dev2 already.
But we are not sure now from what version we upgraded to 1.1.0-dev2 because the rancher release label latest has been changed to indicate latest dev rather than stable version, so we probably accidentally upgraded from a stable version to dev version.

From memory, its been upgraded many times from even pre v1. It may of been from 1.0.0 to 1.0.1 to 1.0.2 to 1.1.0-dev2 to 1.1.0-dev3. We are basically wanting to avoid wiping the DB. A diff on the schema of the existing DB and a fresh one of 1.1.0-dev3 shows the schema structure is the same.

Now for this production rancher, we do plan on only using the stable tag per @JayHaoDing.

Just tried 1.1.0-dev4, this issue still exists. Hopefully it can be fixed in 1.1.0

I also tried Rancher v1.0.2 with same mysql database and the behaviour is different:

InRancher v1.0.2 the service status seems also stuck but the stack status can become active quickly
In Rancher v1.1.0-dev1+, both service/stack status may get stuck even the container status seems be fine

Used the above docker-compose and rancher-compose as an example. Upgraded from 1.1.0-dev2 to 1.1.0-dev4. After stopping and starting the stack, all the external services start immediately. Not able to reproduce the issue.

@JayHaoDing

In Rancher v1.1.0-dev1+, both service/stack status may get stuck even the container status seems be fine

In the initial commit, you've mentioned the external service use case - so is reflected in your stack compose file. Are you seeing the issue for regular service as well? Is health check configured for the containers?
We couldn't reproduce the issue in house. Is it possible to share following information once you hit the issue on your side:

result of the db queries below

select id, name, state, health_state from environment where id =<stack id of the stack that is stuck in activating state"
select id, name, state, health_state from service where environment_id=<stack id>
select id, name, state, health_state from instance where id in (select instance_id from service_expose_map where service_id in (select id from service where environment_id=<id of your stack>))

cattle-debug.log taken from your rancher server

Service health state is comprised of combined health states of the service's instances health state. In case when all instance are running, but health state of at least one of them is unhealthy/initializing, the state of the service will say "unhealthy/initializing". Similar with the stack health state - it reflects health states of the services belonging to it. The request for db queries is to figure out if the failing health state causing the stack to be stuck.
cattle-debug log is to see if there is anything else failing.

@soumyalj  thanks for your feedback. I'm pretty this issue is related to something inside our db because I have tried to setup a new Rancher server with 1.1.0-dev3 and there is no issue with the compose files provided above.
@alena1108 In our production Rancher, such problem happens for regular services too. I need confirm later if health check has been configured and I will provide more logs tomorrow.

@alena1108 I tried above compose file again on v1.1.0-dev4 and here are outputs.
The URL of the stack is /env/1a14/apps/stacks/1e641 so 641 is the stack id in database. Seems there isn't any result from the 3rd db query
mysql> select id, name, state, health_state from cattle.environment where id = "641";
+-----+-------------+------------+--------------+
| id  | name        | state      | health_state |
+-----+-------------+------------+--------------+
| 641 | egress-test | activating | healthy      |
+-----+-------------+------------+--------------+
1 row in set (0.00 sec)

mysql> select id, name, state, health_state from cattle.service where environment_id="641";
+------+-------------------------+------------+--------------+
| id   | name                    | state      | health_state |
+------+-------------------------+------------+--------------+
| 2573 | service-chat            | activating | healthy      |
| 2574 | monitoring-XXX          | active     | healthy      |
| 2575 | service-XXX             | active     | healthy      |
| 2576 | service-XXX             | active     | healthy      |
| 2577 | monitoring-XXX          | active     | healthy      |
| 2578 | mail-imap               | active     | healthy      |
| 2579 | db-XXX                  | active     | healthy      |
| 2580 | db-XXX                  | active     | healthy      |
| 2581 | service-XXX             | active     | healthy      |
| 2582 | mail-smtp               | active     | healthy      |
| 2583 | service-XXX             | active     | healthy      |
| 2584 | service-XXX             | active     | healthy      |
| 2585 | service-XXX             | active     | healthy      |
| 2586 | service-XXX             | active     | healthy      |
| 2587 | service-XXXX            | active     | healthy      |
+------+-------------------------+------------+--------------+
15 rows in set (0.00 sec)

mysql> select id, name, state, health_state from cattle.instance where id in (select instance_id from cattle.service_expose_map where service_id in (select id from cattle.service where environment_id="641"));
Empty set (2.75 sec)

So I used the id 2573 from previous query but result was still empy
mysql> select id, name, state, health_state from cattle.instance where id in (select instance_id from cattle.service_expose_map where service_id="2573");
Empty set (2.42 sec)

I checked the cattle.service_expose_map table directly and looks the service_id is kind of 2 or 3 digits number. After selected 50000 items I could not see any item with 4 digits. So just for a try I did following query but it wasn't related at all.
mysql> select id, name, state, health_state from cattle.instance where id in (select instance_id from cattle.service_expose_map where instance_id="2573");
+------+----------------------+--------+--------------+
| id   | name                 | state  | health_state |
+------+----------------------+--------+--------------+
| 2573 | splunk_XXX           | purged | NULL         |
+------+----------------------+--------+--------------+
1 row in set (2.06 sec)

Then in the service page, I saw this string on top right so I did query based on 212745
 Activating (Waiting for [serviceExposeMap:1sem212745]. ServiceExposeMap status: null)
cattle-debug.log shows as below. There is no log related to 212745 in cattle-error.log
# grep -i serviceexposemap * | grep 212745 cattle-debug.log
2016-06-14 00:16:37,680 DEBUG [4a846198-2dcb-492b-8b9a-213d55bfd48c:2844900] [service:2573] [service.activate->(ServiceUpdateActivate)] [] [cutorService-22] [c.p.e.p.i.DefaultProcessInstanceImpl] Attempting to run process [serviceexposemap.create:2844922] on resource [212745]
2016-06-14 00:16:37,714 DEBUG [4a846198-2dcb-492b-8b9a-213d55bfd48c:2844900] [service:2573->serviceExposeMap:212745] [service.activate->(ServiceUpdateActivate)->serviceexposemap.create] [] [cutorService-22] [c.p.e.p.i.DefaultProcessInstanceImpl] Changing state [requested->activating] on [serviceExposeMap:212745]
2016-06-14 00:16:37,714 DEBUG [4a846198-2dcb-492b-8b9a-213d55bfd48c:2844900] [service:2573->serviceExposeMap:212745] [service.activate->(ServiceUpdateActivate)->serviceexposemap.create] [] [cutorService-22] [c.p.e.p.i.DefaultProcessInstanceImpl] Exiting with code [SCHEDULED] : SCHEDULED
2016-06-14 00:16:37,725 DEBUG [4a846198-2dcb-492b-8b9a-213d55bfd48c:2844900] [service:2573] [service.activate->(ServiceUpdateActivate)] [] [cutorService-22] [c.p.e.p.i.DefaultProcessInstanceImpl] Exiting [SCHEDULED] process [serviceexposemap.create:2844922] on resource [212745]
2016-06-14 00:16:52,751 INFO  [:] [] [] [] [cutorService-22] [i.c.p.e.e.i.ProcessEventListenerImpl] Communication timeout on process [service.activate:2844900] on [2573] : Object [serviceExposeMap:212745] failed to satisfy predicate [15000] millis
2016-06-14 00:31:47,323 INFO  [:] [] [] [] [ecutorService-8] [i.c.p.e.e.i.ProcessEventListenerImpl] Communication timeout on process [service.activate:2844900] on [2573] : Object [serviceExposeMap:212745] failed to satisfy predicate [15000] millis

@alena1108 how about the other bug you mentioned? Will it be fixed in v1.1.0?

There is a bug in our process logic: stuck process P1 (activate) doesn't get cancelled by P2 (deactivate), and as Inactive state - final state of deactivate process - is a valid start state for activate process, the stuck activate process will be performed again.

@JayHaoDing most likely it will be fixed in the follow up dev release.

Any idea if this is related to #5129? We see services which are stuck are looping in service_expose_map table there are huge number of removed items in our database.

Here is the query for one such service which was stuck:

Not sure if its even related but figured it was worth mentioning.

@alena1108 rooted this to be a case where hosts weren't present in the host table, but had agent reconnect processes chewing up resources. Processes were removed, agent state was marked as removed. That free'd up the process execution workers to do useful work. Closing issue.


Fix build with GCC

GCC is used on FreeBSD on e.g. powerpc64.

Scope of changes

Known Limitations

Looks good; macOS builds are failing Travis because the Travis build environment changed.

Thank you! :bow:


Slight improvement

I removed the code to create blank assets/bundle for a while.

Small changes to improve the API of AssetsTools.NET.

Small changes to improve the API of AssetsTools.NET.


B2C Store Creation Buyer Email error

When creating a buyer user email from current os's user name and adding buyer email from command, the replace function only replaces the first instance only and not all of them.
So when
Os's username is<EMAIL_ADDRESS>and buyer user email from command is<EMAIL_ADDRESS>the final email becomes abcATxyz.com+buyyer<EMAIL_ADDRESS>and gives the error that invalid email address

@tarcang created the hotfix to main: #281


Dataloader about BraTS2020

I noticed that the file form in the readme is inside the subfolder as t1.nii.gz, but in the default command run, the required file form is brats_train_001_XXX_123_w.nii.gz instead of XXX.nii.gz (XXX is the the name of the modality, e.g. t1, seg, etc.), and I'm sure I'm not the only one who hasn't read . /guided_diffusion/bratsloader.py  for the code, resulting in wasted time in naming processing and debugging the data. Hopefully the author will make changes to the readme.

updated, pls help to check if it is correct right know. thanks for your suggestion

Yeah,It's correct I run a new to check it. Kind of you.


Imports from . no longer working after upgrading >= 0.13.0

Discovered in https://github.com/pre-commit/pre-commit.github.io/pull/113
Here's a simple test case:
$ tail -n999 scss/*
==> scss/main.scss <==
@import 'scss/variables';

==> scss/_variables.scss <==

Before:
$ ~/workspace/pre-commit.github.io/venv/bin/sassc --version
sassc 0.12.3 (sass/libsass 3.4.3)
$ ~/workspace/pre-commit.github.io/venv/bin/sassc scss/main.scss out/out.css
$ echo $?
0

After:
$ ~/workspace/pre-commit.github.io/venv/bin/sassc --version
sassc 0.13.0 (sass/libsass 3.4.4)
$ ~/workspace/pre-commit.github.io/venv/bin/sassc scss/main.scss out/out.css
sassc: error: Error: File to import not found or unreadable: scss/variables.
       Parent style sheet: /tmp/foo/scss/main.scss
        on line 1 of scss/main.scss
>> @import 'scss/variables';
   ^

I'm manually bisecting, my first guesses at what changed / broke this were incorrect... I may resort to actual bisection :)

Bumping the submodule back to 3.4.3 fixes it, so it seems to be some behaviour changed between 3.4.3 and 3.4.4
The changelog doesn't seem to indicate anything interesting: https://github.com/sass/libsass/releases/tag/3.4.4

For now, resolved via #209

The fix for this is in 0.13.2


⚠ Spryr has degraded performance

In 16588c7, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 6228 ms

Resolved: Spryr performance has improved in 45058f9 after 35 minutes.


To use m2transformer

The m2transformer in this repo will get worse results than the transformer implemented in this repo, and also worse than what's in the m2transformer paper.
In short, the difference is caused by the framework, not the model architecture. That is to say, if you port my transformer into their codebase, you can also better results than m2transformer. If you are curious, please checkout (https://github.com/ruotianluo/meshed-memory-transformer/tree/mytransformer), and look at the description of the commit.
I have been trying to rule out what part of their codebase leads to higher performance. It has been narrowed down to the dataloader and cider computation they use. (So, not learning rate, not beam search self-critical, not gradient clipping, etc). I have been able to port their dataloader and cider computation into my codebase, and I can fairly say I am able to reproduce the results given by m2transformer.
I am keeping digging deeper to see what specific is changing the game. Will update here.
I still appreciate their codebase. The design is much more modern than mine.

Hi @ruotianluo. Thanks for your investigation. December last year I implemented the meshed part on your codebase, by changing the DecoderLayer to:
class DecoderLayer(nn.Module):
    def __init__(self, size, self_attn, src_attn, feed_forward, dropout):
        super(DecoderLayer, self).__init__()
        self.size = size
        self.self_attn = self_attn
        self.src_attn = src_attn
        self.feed_forward = feed_forward
        self.sublayer = clones(SublayerConnection(size, dropout), 3)
        self.fc_alpha1 = nn.Linear(d_model * 2, d_model)
        self.fc_alpha2 = nn.Linear(d_model * 2, d_model)
        self.fc_alpha3 = nn.Linear(d_model * 2, d_model)

    def forward(self, x, memory, src_mask, tgt_mask):
        # memory of shape:  (batch_size, num_layers, num_boxes, d_model)
        query = self.sublayer[0](x, lambda x: self.self_attn(x, x, x, tgt_mask))
        enc_att1 = self.src_attn(query, memory[:, 0], memory[:, 0], src_mask)
        enc_att2 = self.src_attn(query, memory[:, 1], memory[:, 1], src_mask)
        enc_att3 = self.src_attn(query, memory[:, 2], memory[:, 2], src_mask)
        alpha1 = torch.sigmoid(self.fc_alpha1(torch.cat([query, enc_att1], -1)))
        alpha2 = torch.sigmoid(self.fc_alpha2(torch.cat([query, enc_att2], -1)))
        alpha3 = torch.sigmoid(self.fc_alpha3(torch.cat([query, enc_att3], -1)))
        sum_src_attn = (enc_att1 * alpha1 + enc_att2 * alpha2 + enc_att3 * alpha3) / np.sqrt(3)
        out_sum = self.sublayer[1](sum_src_attn, None)
        return self.sublayer[2](out_sum, self.feed_forward)

The original transformer with 3 layers can actually get better scores than 6 layers (achieves 1.122 xe on your codebase, higher than 1.113 reported). But the meshed decoder part with 3 layers achieves worse than 1.122. So even if your transformer is ported, the results are still not good.

Thanks. The performance I mentioned is after using self critical. My finding is 3 layer is not as good as 6 layers. (I only looked at greedy decoding result on val set.)

I download m2transformer pretrained model and test it on karpathy test set. Nearly 1/3 (1718/5000) sentences have bad enddings like
'a woman eating a cupcake with lit candles on a',
'a street sign in front of a building with a'.

I test this model using their code and get
{'BLEU': [0.8076084272899184,
  0.65337618312199,
  0.5093125587687117,
  0.3909357911782391],
 'METEOR': 0.2918900660095916,
 'ROUGE': 0.5863539878042495,
 'CIDEr': 1.3119740267338893}

After removing these bad enddings, I get
{'BLEU': [0.8053965764171623,
  0.6566697409874372,
  0.516585609264117,
  0.39901320646984684],
 'METEOR': 0.2896812927767685,
 'ROUGE': 0.5889955346514036,
 'CIDEr': 1.290116122320751}

The way of cider computation they use seems encourage caption with bad enddings. I am not sure whether it is because CIDEr is 'gamed' by RL algorithm or something else.

I didn’t realize it’s that high. The reason of bad ending is because they didn’t add eos token while doing self critical. The cider score doesn’t punish on these bad endings.

Yes, I have tried to add eos and trained a model. There are no such sentences. But Cider also decreases. So it seems the only difference between two frameworks?

Yes it will decrease.
There are other differences, including the vocab, the way to compute cider(they compute on raw text), the way they compute the tfidf in cider.

Hi, I've been working on the diversity evaluation on different frameworks, and I wonder if it is possible to evaluate m2 model with multiple samples? I've checked the repository branch you have provided, and haven't found the multiple sampling implementation in it. I guess it is not that simple to change the model file in the self-critical branch to solve this problem, the vocab and other framework changes, I mean. If there exists an easy way to integrate them, please inform me. Thanks a lot!


Don't start the helm watcher as part of core

This was making gitops crash completely when you a install flux that
has the wrong API version of source.toolkit.fluxcd.io (spoiler: the
version just changed, see #1967).
This isn't a core feature anyway, so we can just disable it.
This doesn't make gitops work, it'll just start and find nothing.

(this doesn't remove the helm chart RBAC permissions, because those can only be removed after this has been released)


Add support for clocks

just a draft pull request, a huge chunk of the functionality is yet to be added

Hi @DS3a, sorry for being late to comment. I did take a look a while ago, but didn't finish writing this comment until now.
First, thanks for your enthusiasm and for starting the work on this. However, I think that implementing clocks was a too complex feature to choose for someone relatively new to ROS internals (and maybe Rust as well) such as you. How about you work on adding domain_id to the node/context init options instead? If that one does not interest you, maybe https://github.com/ros2-rust/ros2_rust/issues/132 or some other smaller issue?
The reason I'm recommending this is that it seems like you're not very familiar with ROS & Rust idioms yet. For instance, you're creating a Default instance for rcl_allocator_t containing null function pointers, but such an allocator is invalid, so it doesn't make much sense. It gives the impression that your goal here was simply to make things compile, but as a contributor, you should aim to be familiar with the types and functions you're using, how they're used inside rclrs, and why.
On the Rust side, things like the DurationFrom type are clunky and do not fit with established style of the Rust community – you'd probably implement From on the Time type instead. You also implement Clone manually, which is not usually done either, etc. On the lower level, I see lots of code smells that we try to avoid or at least justify as well, like as and unwrap(). There's more, but I think it's not needed to go into detail.
So, to make sure you're able to contribute independently to rclrs, here is what I recommend:

Try reading articles/books/talks on Rust best practices, for instance from this list, to get more familiar with idiomatic Rust.
Read through the rclrs code base, or at least parts of it, and try to understand why things are done that way.
Choose a (smaller) feature to work on.
Get really familiar with that feature.

Know what problem it solves. Some features have design docs, which would be good to read.
How is it implemented in rclcpp, and maybe also rclpy. How has it evolved? Is there some
Know the relevant functions and types in rcl, and make sure to read their documentation.
…

Think a while about how you'd implement it, start coding, get feedback if needed, and when it's ready open a PR.

I hope this sounds reasonable to you. Please don't be too discouraged, we value every contributor and want to help you find a path to be productive in our code base! We are all learning as we go, it just requires a bit of patience.

Got it... I did feel like I took a bite larger than I could chew. I shall start working on the simpler issues while getting more familiar with the rust idioms and the internals of ROS, and slowly work my way up.
Thank you for the valuable feedback, and for taking the time to comb through my code. I did catch myself trying to trick the compiler many times. Although I did go back and fixed what I thought was wrong, I should have stuck to the standard procedures from the very beginning itself, as I lost track. I have started reading the embedded rust book and some others to get more familiar with rust.
Now, I couldn't find domain_id in any of the issues mentioned, however there is an rcl_node_get_domain_id in the rcl bindings that have been generated. could point me to the right issue? or open one to explain what exactly is required?
So far, I have understood that you want to be able to specify the domain_id that you want the node to be joining while initiating it. Is that right? or do you want to be able to change domain_ids during the runtime? and this should happen in line 293 of builder.rs where it should be setting the domain_id instead of calling rcl_node_get_default_options()? can you please point the issue out to me? or start a new one with an explanation so that I can start from there?

Perfect, thanks @DS3a. You're right that there was no issue for it, but I've now created https://github.com/ros2-rust/ros2_rust/issues/206. Let me know if it's not detailed enough.

Perfect, thanks @DS3a! You're right that there was no issue for it, but I've now created https://github.com/ros2-rust/ros2_rust/issues/206. Let me know if it's not detailed enough.

Thanks... I've started looking in into it... I shall let you know if there's any queries

@DS3a can this be closed then?

@DS3a can this be closed then?

Yes, sure... sorry for the late reply; I'm busy with work... I shall start putting in more time as soon as the load decreases.


Storybook publishing

I am trying to deploy my Storybook build to share with coworkers. I assumed running "build-storybook" would bundle everything up nicely into static HTML that I could then deploy. That doesn't appear to be the case though as Storybook still seems to need the Drupal backend. On the CLserver module page it says not to enable it in production so I am curious what the recommended way to publish is.

Did you follow the instructions here?
https://git.drupalcode.org/project/cl_server/-/blob/1.x/docs/storybook.md
If you did, have you checked the web console?

I forgot to update the url for the new environment. Everything is working fine locally. I am also able to get things working if I enable the cl server on the production machine. I'm fine using that approach but its specifically stated that it is a security risk. Appreciatte all the great work you are doing. I'll keep plugging away at it and see if I can find a work around.

Thanks @cluke009. Let us know if you have any more updates.

@e0ipso Why does the storybook-build output still require the Drupal backend? Shouldn't that build process take a snapshot from Drupal at the time and generate static files that can be loaded in place of the Drupal output? That seems to be the whole point of running the build script in the first place.


Photo Editing Web Application in Javascript

I would like to add a project (Photo Editing Web Application ) in JavaScript under GSSOC 2021.

Please assign me this issue @ridsuteri @991rajat @Vishal-raj-1 @harshgupta20

@neha07kumari Add the image for the refence please. TO check whether this project already exist or not.


python27Packages.uamqp: 1.2.5 -> 1.2.6

Semi-automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python2.7-uamqp/versions.
meta.description for python27Packages.uamqp is: "An AMQP 1.0 client library for Python"
meta.homepage for python27Packages.uamqp is: "https://github.com/Azure/azure-uamqp-python"
Updates performed:

Version update
Quoted meta.homepage for RFC 45

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 1.2.6 with grep in /nix/store/28vgrkhaqbp2yxr9cfpzgf2szg90j476-python2.7-uamqp-1.2.6

directory tree listing: https://gist.github.com/197a95cf604536485cd2321273a66d3f

du listing: https://gist.github.com/4b17d82a8384538d69797b66a7e3cee6

Rebuild report (if merged into master) (click to expand)

20 total rebuild path(s)
5 package rebuild(s)
5 x86_64-linux rebuild(s)
5 i686-linux rebuild(s)
5 x86_64-darwin rebuild(s)
5 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
python27Packages.azure-servicebus
python27Packages.uamqp
python37Packages.azure-servicebus
python37Packages.uamqp
python38Packages.uamqp

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/28vgrkhaqbp2yxr9cfpzgf2szg90j476-python2.7-uamqp-1.2.6 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python27Packages.uamqp https://github.com/r-ryantm/nixpkgs/archive/9cadac7abd3a02259aa5ea222c73b10333ce5f4c.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/28vgrkhaqbp2yxr9cfpzgf2szg90j476-python2.7-uamqp-1.2.6
ls -la /nix/store/28vgrkhaqbp2yxr9cfpzgf2szg90j476-python2.7-uamqp-1.2.6/bin

cc @mwilsoninsight for testing.

@GrahamcOfBorg python27Packages.azure-servicebus python27Packages.uamqp python37Packages.azure-servicebus python37Packages.uamqp python38Packages.uamqp

@GrahamcOfBorg build python27Packages.azure-servicebus python27Packages.uamqp python37Packages.azure-servicebus python37Packages.uamqp python38Packages.uamqp


[Bug] InternVL2-1B can not used Flash Attention 2.0 with Qwen2ForCausalLM is torch.float32

Checklist

[X] 1. I have searched related issues but cannot get the expected help.
[X] 2. The bug has not been fixed in the latest version.
[X] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug
tried to used the lastet lmdeploy from github, could not slove this problem
Reproduction
import nest_asyncio
nest_asyncio.apply()
from lmdeploy import pipeline, TurbomindEngineConfig
from lmdeploy.vl import load_image
import torch
model = "~/InternVL2-1B"
pipe = pipeline(model, backend_config=TurbomindEngineConfig(session_len=8192,dtype='float16') )
Environment
sys.platform: linux
Python: 3.10.14 (main, May  6 2024, 19:42:50) [GCC 11.2.0]
CUDA available: True
MUSA available: False
numpy_random_seed:<PHONE_NUMBER>
GPU 0: NVIDIA RTX A5000
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 11.8, V11.8.89
GCC: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
PyTorch: 2.3.1+cu121
PyTorch compiling details: PyTorch built with:
  - GCC 9.3
  - C++ Version: 201703
  - Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v3.3.6 (Git Hash 86e6af5974177e513fd3fee58425e1063e7f1361)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: NO AVX
  - CUDA Runtime 12.1
  - NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90
  - CuDNN 8.9.2
  - Magma 2.6.1
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=8.9.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.3.1, USE_CUDA=ON, USE_CUDNN=ON, USE_CUSPARSELT=1, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF,

TorchVision: 0.18.1+cu121
LMDeploy: 0.6.0+
transformers: 4.44.2
gradio: Not Found
fastapi: 0.112.0
pydantic: 2.8.2
triton: 2.3.1
NVIDIA Topology:
        GPU0    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      0-15    0               N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

Error traceback
Flash Attention 2.0 only supports torch.float16 and torch.bfloat16 dtypes, but the current dype in Qwen2ForCausalLM is torch.float32. You should run training or inference using Automatic Mixed-Precision via the `with torch.autocast(device_type='torch_device'):` decorator, or load the model with the `torch_dtype` argument. Example: `model = AutoModel.from_pretrained("openai/whisper-tiny", attn_implementation="flash_attention_2", torch_dtype=torch.float16)`
Flash Attention 2.0 only supports torch.float16 and torch.bfloat16 dtypes, but the current dype in Qwen2Model is torch.float32. You should run training or inference using Automatic Mixed-Precision via the `with torch.autocast(device_type='torch_device'):` decorator, or load the model with the `torch_dtype` argument. Example: `model = AutoModel.from_pretrained("openai/whisper-tiny", attn_implementation="flash_attention_2", torch_dtype=torch.float16)`

Turbomidn backend doesn't support InternVL2-1B model and it will fallback to pytorch backend.
We reuse transformers code to load and inference the vision model and won't use flash-attn in llm model, you can just ignore the warning message.

Turbomidn backend doesn't support InternVL2-1B model and it will fallback to pytorch backend.
We reuse transformers code to load and inference the vision model and won't use flash-attn in llm model, you can just ignore the warning message.

Actually, I tried to modify the code of pytorch backend, but the warning message still , I just want to know if I had performed the operations that achieved the best (practically possible) inference performance.

As I said, the llm part won't use flash-attn package and instead we use our own implemented.
For vision part, the inference dtype is half. So if you installed flash-attn, it will use that package. And for vision part, I think the performance impact is not significant if you don't use flash-attn.


Exchange happy-path prints with a debug print in Renesas PKCS PAL

Happy-path prints are overwhelming the print queue and causing occasional
failure to print test results.  Modifying happy-path print statements to
be controlled through a debug print statement so that they may be turned
off for testing.  Disabling this print by default.
Tests w/ debug printf enabled: https://amazon-freertos-ci.corp.amazon.com/job/master/job/custom/job/renesas/job/rx65n-rsk-ide/6/
Tests w/ debug printf commented out: https://amazon-freertos-ci.corp.amazon.com/job/master/job/custom/job/renesas/job/rx65n-rsk-ide/10/console
Resolves TS-9109
Checklist:

[ ] I have tested my changes. No regression in existing tests.
[ ] My code is Linted.

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

do you want to merge this to release-candidate?


Archive several gpte repos

The following GPTE repos can be achieved:

operationalizing-openshift-lab
dark-tower
openshift-4-alpha-enablement

CC @fridim

Review request:
cc: @redhat-cop/container-cop-core

done


refactor(infra): re-introduce users stack (closes #619)

This change is also renaming user roles.

Closes #619

Reference
Code review checklist

@l0b0 , I can't find where the problem is. I can't see any parameter coming as constructor ID.


Adjusting the CSS

Is there a way to customize or adjust the CSS? Some sites are really jarring.

Defining custom CSS is not a goal for this project. You could try Stylish.


Update default icon path to reflect readme

The readme says it's defaulted to Icon.png but it's actually set to IconTemplate.png.
:cat2:

I think the readme should be updated instead, as the default icon is actually named IconTemplate.png
https://github.com/maxogden/menubar/pull/16

@jenslind the default(fallback) icon is set on the next line: https://github.com/muan/menubar/blob/patch-1/index.js#L33

Ah :+1:
:dog:

published as 2.0.16


chore: add project CODEOWNERS

This PR adds CODEOWNERS to designate those responsible for maintaining this project to outside users/contributors. Currently, the default/only assignment points to @imgix/imgix-sdk-team.

:tada: This PR is included in version 0.3.0-beta.1 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Compilation error using nvc++ compilation flow

Hi @illuhad,
I'm getting an error, use of undefined value, when compiling this:
#include <SYCL/sycl.hpp>

template <typename L>
void ParallelFor (L&& f) noexcept
{
    sycl::queue q;
    q.submit([&] (sycl::handler& h) {
        h.parallel_for(sycl::nd_range<1>(sycl::range<1>(266240), sycl::range<1>(256)),
        [=] (sycl::nd_item<1> item) { f(); });
    });
}

void carrots()
{
    ParallelFor([=] __attribute__((device)) () noexcept {});
}

with syclcc --hipsycl-targets=cuda-nvcxx -c carrots.cpp.
Is it me, nvc++ or hipSYCL?

Thank you, it works for me if I remove the __device__ attribute. I believe this is probably because in SYCL, your kernels will in general always be compiled for CPU as well. The spec requires that there always must be at least some device available. So, in order to guarantee this even if you don't have a GPU in your system, we have to compile the kernel at least for sequential CPU execution as fallback.
This doesn't work if some of your code is explicitly device-only. You can have such code constructs if you guard them as backend-specific, and indeed the following compiles:
#include <SYCL/sycl.hpp>

template <typename L>
void ParallelFor (L&& f) noexcept
{
    sycl::queue q;
    q.submit([&] (sycl::handler& h) {
        h.parallel_for(sycl::nd_range<1>(sycl::range<1>(266240), sycl::range<1>(256)),
        [=] (sycl::nd_item<1> item) { __hipsycl_if_target_cuda(f();) });
    });
}

void carrots()
{
    ParallelFor([=] __attribute__((device)) () noexcept {});
}

Note that outside of the nvc++ world, you need to be careful with this, as it can lead to to f only being captured in the device compilation pass (because it's unused on the host) which can then lead to a mismatch of the data layout of the kernel lambda between host and device, when the kernel is invoked.

Thank you, that does make sense. Could you just please clarify your ending note, in particular the data layout mismatch?

Firstly, it is important to realize that nvc++ is different from the other hipSYCL compilation flows (or indeed, any other SYCL implementation, or clang-based heterogeneous models) in that it only parses the code once, and then separates the device code from the host code at the IR level. So, there's only a single invocation of the compiler and everything happens in that one compiler invocation. In the SYCL terminology, we call this compilation model "single-source, single compilation pass" (SSCP).
Outside of the nvc++ world, everybody uses the SMCP model (single-source, multiple compilation passes). In the SMCP model, you have:

Invoke device compiler, which parses code, detects and extracts kernels and generated device binary
Invoke host compiler, which parses code again, compiles as regular host application and embeds the previously compiled device binary.

In SMCP, the way to specialize code for host or device is through macros, since each of the compiler invocations will generally have some macros defined to detect in which compilation pass you are. For example, in SYCL implementations following the SMCP model __SYCL_DEVICE_ONLY__ is defined only during the invocation of the device compiler, and can hence be used to guard code for device/host and create specialized code paths.
Now, since nvc++ parses the code only once, it is not possible to have any macros to detect if you are targeting host or device, because macros would alter the code before the C++ parser even sees it.
Instead, nvc++ has the if target() mechanism, which allows code specialization inside control flow by using magic in the compiler code generation backend.
The __hipsycl_if_target_*() statements are built to generalize both to our SMCP compilation flows, in which they use macros such as __SYCL_DEVICE_ONLY__ under the hood, as well as to the nvc++ SSCP case.
Now consider the following pesudo code:
int var = 0;
int* device_ptr = sycl::malloc_device(...);

q.parallel_for(myrange, [=](auto idx){
__hipsycl_if_target_device(
  device_ptr[idx] += var;
);
});

If you compile this with one of our SMCP compilation flows, you would effectively get something like this:
int var = 0;
int* device_ptr = sycl::malloc_device(...);

q.parallel_for(myrange, [=](auto idx){
#ifdef __SYCL_DEVICE_ONLY__
  device_ptr[idx] += var;
#endif
});

But now there's a problem: The SMCP device compiler would see the kernel invocation:
q.parallel_for(myrange, [=](auto idx){
  device_ptr[idx] += var;
});

while the host compiler would see:
q.parallel_for(myrange, [=](auto idx){});

Because the lambda as seen by the host compiler does not actually use any data, the automatic capture-by-value clause would lead to the compiler deducing that nothing needs to be captured -- even though the device side compiler expects that device_ptr and var are captured, but the host compiler cannot know that.
Now when the host tries to invoke the kernel, it would not pass in any arguments, because it thinks that the lambda does not capture any data. You have a mismatch between the expected data layout of the lambda between the host and device compiler.
In the nvc++ world, all of this is not an issue, because the SSCP approach guarantees a unified data layout by design since code is only parsed once. (This can also be a disadvantage, e.g. because you cannot do any device-specific storage optimizations for classes used both by the host and device).
The exact same issue would also trigger with your example.
So, the bottom line is:
If you want to be portable to SMCP compilation flows, always make sure to explicitly capture data in kernel lambdas that are not used at all on some targets due to usage of macros like __SYCL_DEVICE_ONLY__ of __hipsycl_if_target_*() statements.
This will then ensure that your kernel lambdas have the same data layout everywhere :-)


MountainCar encoder file doesn't exist

python Main.py train -c Configurations/ModelConfigs/MuzeroMC.json  --game gym_MountainCar-v0 --gpu 1

The following command for me doesn't find the model files in MuZero/MuNeuralNet.py on line 242. On my machine the files are of the form /root/muzero/out/mc_out/latent_4/r_temp.pth.tar.data-00000-of-00001. Since you are using the encoder to load & save the file, perhaps use a try except block when loading the files to check for errors instead. This also doesn't break the encoder API... since it can save the file in whatever format it likes.
"it’s easier to ask for forgiveness than permission" - https://stackoverflow.com/questions/11360858/what-is-the-eafp-principle-in-python

The problem you're experiencing is due to the newer versions of tensorflow and keras, in the newer versions they split up the model files into multiple smaller files. You can fix this by downgrading to the version explicitly stated in the README or update the IO interface.

Would you be amenable to a pull request to adjust the logic to be within a try ... except block, instead of preemptively checking? This would future proof it quite a bit.

Thank you for the PR, I'll merge the changes after I unify this style for the other algorithms.

Final comment, I changed the except blocks with except FileNotFoundError.

Thank you! This is helpful to me, and anyone else like me that wants to use colab or other cloud tools to help me develop when I don't have a local GPU.


Edit mode does not resize properly when shrinking window after growing it

Describe the bug
If you enlarge the composer window the edit area will grow to fill the space, but when the composer window is resized smaller the edit window stays the same size. If word wrap is enabled it remains stuck at the larger size and you cannot see / edit text that ends up off screen.
In addition Restart Bot / Test In emulator buttons stay off screen and it is impossible to scroll to them.  You have to leave edit mode for the UI to realign properly to make all controls / text visible again.
Version
Bot Framework Composer
            Version:  1.0.2
            Electron: 8.2.4
            Chrome: 80.0.3987.165
            NodeJS: 12.13.0
            V8: 8.0.426.27-electron.0

Browser

[X] Electron distribution
[ ] Chrome
[ ] Safari
[ ] Firefox
[ ] Edge

OS

[X] macOS
[X] Windows
[ ] Ubuntu

To Reproduce
Steps to reproduce the behavior:

Go to Bot Responses
Select Edit mode
Enlarge window
Shrink window
Notice controls are clipped and text edit area is off screen / not resized

Expected behavior
Expect UI elements to resize when composer window is shrunk to remain visible
Screenshots

Additional context

@zhixzhan - My new splitter control should fix this bug, so assigning to myself.

@GeoffCoxMSFT Awesome, thanks!


Unhandled Exception trying to run it on UNRAID

Thanks for this tool!
I'm trying to run this on UNRAID and execution seems to work to the point that it prompts for token or runs when I feed it proper params on execution, but then it crashes with:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.    at Program.<Main>$(String[] args) Aborted

@johnkiddjr the currently released prod latest for UNRAID: version 6.9.2
Also PlexPass enabled server - Version <IP_ADDRESS>73 via the official Plex docker container.
Do you have to be in the actual library path to execute this or does it generate the .plexmatch file through the Plex server itself?

@jedimstr The tool uses the path returned by the Plex server to find your media files, so for *nix servers you'd have to have a share mounted in the same way on the server running the application as your plex server.
For instance, my plex server has the files mounted at /mnt/mediastore so all the filepaths come back as /mnt/mediastore/Library/Show, so if I were running that on a computer other than the Plex server itself, I'd just have to mount my media to /mnt/mediastore and it will run fine.

@johnkiddjr aaah that would explain the issue then.  I'm trying to run it on the host server's shell, but the docker container for the Plex server has mapped paths for the media libraries passed to it, so internally in the container the path looks different than what it looks like on the host.  Maybe I can try running it on the shell from within the container but that may be limited.
Anyone who runs Plex via a Docker Container (pretty common) will see this issue then.

@jedimstr It likely won't work inside the container, they tend to leave out any normal linux stuff that is needed to run software other than their own.
You could make a symbolic link from where the media is on the host OS to a folder named the same thing as it is in the Plex container:
So if plex sees the media at /media but it's mounted at /mnt/media you could use this command to create the link:
ln -s  /mnt/media /media

I created a symbolic link and verified I'm able to access all the Libraries using the symbolic link that matches with the internal container path in Plex's settings, but now I get:
-bash: ./PlexMatchGenerator-Linux-x64: No such file or directory

Getting same error now after making a symbolic link.  Verified that the Soft Link shows the libraries matching the path in the Plex container.

@jedimstr
I created a new release based on your issues.
It adds better console logging and error handling, the ability to write the log to disk, and an optional parameter to modify the root path for when paths don't match.
Use: -l /path/for/logfile to specify the path to save the log file to
Use: -r /path/on/host:/path/on/plex to specify differences in root path
Let me know if this fixes all your issues, or at least gives us a better error to work with now

I added better null checking and better error messages to v0.2.2. From what I can see it appears the server was sending back either no response or a bad response so I added messaging to indicate where and what that is.
Do you get this immediately after running, or is there a delay of roughly 30-60 seconds first?

@johnkiddjr
Re-ran with v0.2.2 and get this now:
14:38:24 INF] Logger attached. Startup complete. Running file generator...
[14:38:25 ERR] No data or malformed data received from server when querying for libraries
plexmatch.log
I do specify that SSL is required... hmmm

I think that was it... SSL.  I had used http:// in the -u param instead of https:// and my Plex server is set to only allow secure connections.  It's currently successfully writing .plexmatch files (still going).

Great, let me know if it completes successfully.
Thanks!

Completed successfully but took a bit, I've got large libraries.
Surprised by the minimal data in each .plexmatch file. Just titles and GUID's for the most part?


Divide by zero in Grafana "Projected Range" dashboards (revisited)

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
A "db query error: pq: division by zero" is displayed at two Grafana "Projected Range" dashboads. This bug is related with #2063 bug that was already fixed for "Projected Range" graph. Problem persists at "Battery Level" and "Outdoor Temperature" graphs.
It happens when car battery level is UNDER ZERO. @
Expected Behavior
Error should not appear and query should be executed properly.
Steps To Reproduce

Drive your car under 0% battery range. You must enter into negative values (buffer zone).
Let stats be pushed to Teslamate.
Access Projected Range dashboards.

Relevant log output
Problematic query for "Battery Level":
SELECT
	floor(extract(epoch from date)/21600)*21600 AS time,
	convert_km(sum(ideal_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, 'km') AS "Projected Range (using usable_battery_level) [km]",
	convert_km(sum(ideal_battery_range_km) / sum(battery_level) * 100, 'km') AS "Projected Range (using battery_level)[km]"
FROM
	(
    select battery_level, usable_battery_level, date,
      rated_battery_range_km, ideal_battery_range_km, outside_temp
    from positions
    where
      car_id = '2' and date BETWEEN '2022-07-27T19:55:26.671Z' AND '2023-01-27T20:55:26.671Z' and ideal_battery_range_km is not null
    union all
    select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,
      rated_battery_range_km, ideal_battery_range_km, outside_temp
    from charges c
    join
      charging_processes p ON p.id = c.charging_process_id
    where
      date BETWEEN '2022-07-27T19:55:26.671Z' AND '2023-01-27T20:55:26.671Z' and p.car_id = '2'
    ) as data

GROUP BY
	1
ORDER BY
	1,2  DESC

Problematic query for Outdoor Temp:
SELECT
	floor(extract(epoch from date)/21600)*21600 AS time,
	convert_km(sum(ideal_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, 'km') AS "Projected Range (using usable_battery_level) [km]",
	convert_km(sum(ideal_battery_range_km) / sum(battery_level) * 100, 'km') AS "Projected Range (using battery_level) [km]"
FROM
	(
    select battery_level, usable_battery_level, date,
      rated_battery_range_km, ideal_battery_range_km, outside_temp
    from positions
    where
      car_id = '2' and date BETWEEN '2022-07-27T19:55:27.497Z' AND '2023-01-27T20:55:27.497Z' and ideal_battery_range_km is not null
    union all
    select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,
      rated_battery_range_km, ideal_battery_range_km, outside_temp
    from charges c
    join
      charging_processes p ON p.id = c.charging_process_id
    where
      date BETWEEN '2022-07-27T19:55:27.497Z' AND '2023-01-27T20:55:27.497Z' and p.car_id = '2'
    ) as data

GROUP BY
	1
ORDER BY
	1,2  DESC

Screenshots

Additional data
A mechanism applied to avoid query error as in bug  #2063 should be applied to remaining queries.
Type of installation
Docker
Version
v1.27.2

I fixed a similar problem by using a platform-specific version of postgresql of my nas

Fixed https://github.com/teslamate-org/teslamate/commit/fbfe8e22242f444caec21964cc0a68d242cc9939


[BUG] clouddrive dependant on az cli default output set to tsv

To Reproduce
setup your az cli default output to json with az config set core.output=json
Commands you ran
azureuser@Azure:~/clouddrive$ clouddrive mount -s "LAB-SAND01" -g "rg-secured-cloud-shell" -n "csrootlabnet02" -f "afs-cs-root-lab-net-02"
Observed Behavior
INFO: Setting subscription (LAB-SAND01)
INFO: Subscription ID: 45ac8dd3-39b7-43d3-b423-63997a23959d
INFO: User Principal Name<EMAIL_ADDRESS>INFO: Getting storage account (csrootlabnet02) in resource group (rg-secured-cloud-shell)
WARN: After attaching to a new file share, all your terminals will be reconnected. Please save your work before continue.
Do you want to continue?(y/n)y
Include error output here
/usr/bin/clouddrive: line 360: "1": syntax error: operand expected (error token is ""1"")
Expected behavior
clouddrive mount should provide without error and should not have any dependancy on default az cli output format setup by the user
Is this specific to Cloud Shell?
Please verify if the same issue can be reproduced by running the same tool outside Cloud Shell - for example,
by installing it on your own computer. If so, it is likely to be a bug in that tool or in the Azure service it communicates with,
not in Cloud Shell. Please file the issue with the appropriate project.
Don't know for sure but expect same behavior
Interface information
How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
If a browser, which Operating System and browser are you using? (ex. Edge on Windows 10)
Edge on Windows 11
Additional context
Add any other context about the problem here.
I suspect that line 358 should be replaced by
USED_SIZE=$(az storage share stats -n "$FILE_SHARE" --account-name "$STORAGE_ACCOUNT" --account-key "$KEY" -o tsv)
I am doing some more test to see if there are other similar issue and will submit PR

This issue will be addressed in our upcoming release that will be out next week. Please take a look at the release notes here: https://github.com/Azure/CloudShell/releases/tag/1.0.20220803.1.base.master.585b6c60


Updated GoPro Desktop homepage.

Changes to a cask
Editing an existing cask

[x] Commit message includes cask’s name (and new version, if applicable).
[x] brew cask audit --download gopro is error-free.
[x] brew cask style --fix gopro left no offenses.

Current page works fine.