Attachment uploading

I have the bandwidth to support a bot that can reupload everything a user uploads on the server over to a Matrix server (or another service if need be).
The obvious hurdle is messages becoming desynced due to waiting on uploads, as well as messages not being able to be attached directly to attachments like in Discord. Additionally, files above 10MB pose a problem.
The most obvious solution would probably be to either rely on a third-party service for uploads or having a matrix channel designated for uploads and editing the message with the new URL once the upload is complete. If a matrix channel is used, files above 10MB could either be discarded, or, alternatively, handled by said third-party service.
Or, perhaps the bot just waits until the upload is complete before continuing to forward messages to the matrix server. This would probably be the easiest to implement, but any complications in uploading could lead to a wide variety of unpredictable errors.
You could even limit this to images only, discarding images beyond 10MB.
It might be asking too much, but please do consider it. It's well beyond my own ability, unfortunately.

There are some more issues with this in addition to what you mentioned regarding the uploads being too large. The bridge doesn't keep any track of message IDs / event IDs in a database (Only in RAM for figuring out who replied to what) so, say that you upload an image and the bot stores it into another matrix room or whatever, and then the bot is down for 30 mins or so and the original image was deleted in those 30 mins. So when the bot comes online again it wouldn't know whether the image was deleted or not and everyone would have access to the deleted image.

I have made code so it uploads from discord to matrix instead of sending image url. Send me a message if you want it, I need to cleanup the code first since it is very spaghetti at the moment. (I have no idea how to push git)

You can just post the output of git diff here, in code blocks

Ok so I may have missunderstood what git commit is or does. I git commited and now I cannot git diff.
Anyhow, here is a short description of the changes I have successfully made:
There is some documentation in the code
missing which I plan to add later.
Changes in no particular order:
        There is now an option to disable text messages. Reason was that
I personally needed to disable messages but instead added it as an option.
In the config.json file there is now a textenabled variable. If set to either
"True" or "true" it sets the variable textenabled to True (boolean), and vice versa.
It is not by room/bridge, if you disable text then it will be disabled for all room and channel bridges.

Image, video, and audio files are now sent to matrix as attachments
instead of links.

All attachements in matrix are now sent to discord as attachements. No limits.

Example: A PDF sent to matrix will be sent as an attachment to discord.
However, a pdf file sent to discord will not be sent to matrix.

I have also commented out the embedding of images on discord since I
personally think it looks bad and looks much better when pic is sent as
attachment instead of embed

If you commited then you can do git diff HEAD^ to get all the changes made by the commit.

Okay so here it comes, it is a bit spaghetti and I have to fix some parts here and there. I will write the line number and what issues they cause. I will fix all of them in a day or two since I am a bit busy.
One thing to note is that if your ping is too high (above 200) it will spit out errors because the that block of code including exception handling thing was written for another software. If your ping is steady bellow 200 no issues in that aspect should occur (search for the line "if resp.status != 200:" and the line bellow will throw out errors).
I need to fix some comments and remove old comments that no longer apply or move to correct space
I think lines 9 and 10 are not needed. (+from PIL import Image
+from tempfile import gettempdir).
diff --git a/bridge/bridge.py b/bridge/bridge.py
index c77565d..135bdab 100644
--- a/bridge/bridge.py
+++ b/bridge/bridge.py
@@ -5,7 +5,11 @@ import os
 import re
 import sys
 import uuid
+from PIL import Image
+from tempfile import gettempdir

+import io
+import magic
 import aiofiles
 import aiofiles.os
 import aiohttp
@@ -21,6 +25,7 @@ def config_gen(config_file):
         "password": "my-secret-password",
         "token": "my-secret-token",
         "discord_cmd_prefix": "my-command-prefix",
+        "textenabled": "true",
         "bridge": {"channel_id": "room_id"},
     }

@@ -38,7 +43,16 @@ def config_gen(config_file):

 config = config_gen("config.json")
 message_store = {}
+textenabled = config.get('textenabled')
+if textenabled == "true":
+    textenabled = True
+elif textenabled == "True":
+    textenabled = True

+elif textenabled == "false":
+    textenabled = False
+elif textenabled == "False":
+    textenabled = False

 class MatrixClient(nio.AsyncClient):
     def __init__(self, *args, **kwargs):
@@ -152,13 +166,60 @@ height=\"32\" src=\"{emote_}\" data-mx-emoticon />""",
         self, message, channel_id, emotes, reply_id=None, edit_id=None
     ):
         room_id = config["bridge"][str(channel_id)]
+        content = None
+        # Parse message for file
+        try:
+            parmes = message.split("http")[-1]
+            tess = message.split("http")[0]
+            parmes = f"http{parmes}"
+        except:
+            parmes = message
+            tess = message
+
+        message = f"""{message.split("]", 1)[0]}]
+{message.split("]", 1)[1]}"""
+
+        if textenabled:
+            content = {
+                "body": message,
+                "format": "org.matrix.custom.html",
+                # "formatted_body": await self.get_fmt_body(message, emotes),
+                "msgtype": "m.text",
+            }
+
+        try:
+            async with aiohttp.ClientSession() as session:
+                async with session.get(parmes) as resp:
+                    if resp.status != 200:
+                        return await ctx.send('Could not download file...')
+                    data = io.BytesIO(await resp.read())
+            # im = Image.open(data)
+            # (width, height) = im.size
+            temporarylocation = f"{parmes.split('/')[-1]}"
+            with open(temporarylocation, 'wb') as out:  ## Open temporary file as bytes
+                out.write(data.read())  ## Read bytes into file
+
+            ## Do stuff with module/file

-        content = {
-            "body": message,
-            "format": "org.matrix.custom.html",
-            "formatted_body": await self.get_fmt_body(message, emotes),
-            "msgtype": "m.text",
-        }
+
+            # im.save(f"tempfile.{parmes.split('.')[-1]}")
+            mime_type = magic.from_file(temporarylocation, mime=True)
+            file_stat = await aiofiles.os.stat(temporarylocation)
+            filenamef = parmes.split("/")[-1]
+
+        except:
+            filenamef = parmes
+            mime_type = None
+
+        try:
+            async with aiofiles.open(temporarylocation, "r+b") as f:
+                resp, maybe_keys = await self.upload(
+                    f,
+                    content_type=mime_type,  # image/jpeg
+                    filename=filenamef,
+                    filesize=file_stat.st_size)
+        except:
+            pass

         if reply_id:
             reply_event = await self.room_get_event(room_id, reply_id)
@@ -181,12 +242,59 @@ height=\"32\" src=\"{emote_}\" data-mx-emoticon />""",
                 "m.relates_to": {"event_id": edit_id, "rel_type": "m.replace"},
                 "m.new_content": {**content},
             }
+
+        if mime_type and mime_type[:5] == "image":
+            content = {
+                "body": parmes,  # descriptive title
+                "info": {
+                    "size": file_stat.st_size,
+                    "mimetype": mime_type,
+                    "thumbnail_info": None,  # TODO
+                    # "w": width,  # width in pixel
+                    # "h": height,  # height in pixel
+                    "thumbnail_url": None,  # TODO
+                },
+                "msgtype": "m.image",
+                "url": resp.content_uri,
+            }
+
+        elif mime_type and mime_type[:5] == "video":
+            content = {
+                "body": parmes,  # descriptive title
+                "info": {
+                    "size": file_stat.st_size,
+                    "mimetype": mime_type,
+                    "thumbnail_info": None,  # TODO
+                    # "w": width,  # width in pixel
+                    # "h": height,  # height in pixel
+                    "thumbnail_url": None,  # TODO
+                },
+                "msgtype": "m.video",
+                "url": resp.content_uri,
+            }
+
+        elif mime_type and mime_type[:5] == "audio":
+            content = {
+                "body": parmes,  # descriptive title
+                "info": {
+                    "size": file_stat.st_size,
+                    "mimetype": mime_type,
+                    "thumbnail_info": None,  # TODO
+                    # "w": width,  # width in pixel
+                    # "h": height,  # height in pixel
+                    "thumbnail_url": None,  # TODO
+                },
+                "msgtype": "m.audio",
+                "url": resp.content_uri,
+            }
+
+        if content:
+            message = await self.room_send(
+                room_id=room_id, message_type="m.room.message", content=content
+            )

-        message = await self.room_send(
-            room_id=room_id, message_type="m.room.message", content=content
-        )

-        return message.event_id
+            return message.event_id

     async def message_redact(self, message, channel_id):
         await self.room_redact(
@@ -194,7 +302,7 @@ height=\"32\" src=\"{emote_}\" data-mx-emoticon />""",
         )

     async def webhook_send(
-        self, author, avatar, message, event_id, channel_id, embed=None
+        self, author, avatar, message, event_id, channel_id, embed=None, file=None
     ):
         channel = self.discord_client.channel_store[channel_id]

@@ -219,6 +327,7 @@ height=\"32\" src=\"{emote_}\" data-mx-emoticon />""",
                 avatar_url=avatar,
                 content=message,
                 embed=embed,
+                file=file,
                 wait=True,
             )

@@ -227,6 +336,8 @@ height=\"32\" src=\"{emote_}\" data-mx-emoticon />""",
         except discord.errors.HTTPException as e:
             self.logger.warning(f"Failed to send message {event_id}: {e}")

+        os.remove(temporarylocation)  ## Delete file when done
+

 class DiscordClient(discord.ext.commands.Bot):
     def __init__(self, matrix_client, *args, **kwargs):
@@ -441,21 +552,29 @@ class Callbacks(object):
         message = await self.process_message(message, channel_id)

         embed = None
-
+        data = None
         # Get attachments.
         try:
             attachment = event.url.split("/")[-1]
             # TODO: Fix URL for attachments forwarded from other rooms.
             attachment = f"{url}/{homeserver}/{attachment}"

-            embed = discord.Embed(colour=discord.Colour.blue(), title=message)
-            embed.set_image(url=attachment)
+            # embed = discord.Embed(colour=discord.Colour.blue(), title=message)
+            # embed.set_image(url=attachment)

             # Send attachment URL in message along with embed,
             # Just in-case the attachment is not an image.
-            message = attachment
-        except AttributeError:
+            async with aiohttp.ClientSession() as session:
+                async with session.get(attachment) as resp:
+                    if resp.status != 200:
+                        return await ctx.send('Could not download file...')
+                    data = io.BytesIO(await resp.read())
+        except:
             pass
+        # with open(data.read(), 'wb') as f:
+        #    f.write(data.read())
+        # attach = random.choice(attachment)
+        # message = discord.File(data, data)

         # Get avatar.
         for user in room.users.values():
@@ -464,10 +583,17 @@ class Callbacks(object):
                     avatar = user.avatar_url.split("/")[-1]
                     avatar = f"{url}/{homeserver}/{avatar}"
                     break
+        filename = message
+        if data:
+            message = None
+            await self.matrix_client.webhook_send(
+                author, avatar, message, event.event_id, channel_id, embed=embed, file=discord.File(data, filename)
+                )
+        if textenabled and not data:
+            await self.matrix_client.webhook_send(
+                author, avatar, message, event.event_id, channel_id, embed=embed
+                )

-        await self.matrix_client.webhook_send(
-            author, avatar, message, event.event_id, channel_id, embed=embed
-        )

     async def redaction_callback(self, room, event):
         if await self.to_return(room, event):

I forgot to mention that there is no upload limit filter, so if matrix server allows for big files over 8mb then there will be exception when bot tries to upload image to discord servers without boosts since discord has an 8mb limit

Ok if anyone read my comment with the git diff I corrected it since I brainfarted. There is no ping issue

I improved it and removed the unnecessary imports. Here.
mygit1.txt

Ok I undid git commit and here is the end file that is fixed diff from your branch.
mygit.txt

I found one mistake and that was I missed to remove one unecessary import (from tempfile import gettempdir) but I think it is in the default python library.


[WIP] Blog post for custom resource encryption

Signed-off-by: Rita Zhang<EMAIL_ADDRESS>
Blog post for custom resource encryption feature

Hello, Comms Shadow for v.126 here. This enhancement was opted-in for a Feature Blog, but the enhancement was removed from milestone (https://github.com/kubernetes/enhancements/issues/3299), so we aren't tracking it for publication. If it is included in a future release then a new PR can be created during the feature opt-in tracking process of that release.
Thank you.

Thanks @harshitasao! I'm going to close this for now.


Import 3rd Party Library (Socket.io)

angular-cli: 0.0.39
node: 6.2.2
os: win32 x64

I tried to import socket.io-client into an angular2 app generated with the angular-cli but i can't get it to work.
Error and stacktrace
Error: Typescript found the following errors:
  C:/Users/Christian/Desktop/prototypes/chat-client/tmp/broccoli_type_script_compiler-input_base_path-5WNagLgm.tmp/0/src/app/chat.component.ts (4, 21): Cannot find module 'socket.io-client'.
    at BroccoliTypeScriptCompiler._doIncrementalBuild (C:\Users\Christian\Desktop\prototypes\chat-client\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:115:19)
    at BroccoliTypeScriptCompiler.build (C:\Users\Christian\Desktop\prototypes\chat-client\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:43:10)
    at C:\Users\Christian\Desktop\prototypes\chat-client\node_modules\angular-cli\node_modules\broccoli-caching-writer\index.js:152:21
    at lib$rsvp$$internal$$tryCatch (C:\Users\Christian\Desktop\prototypes\chat-client\node_modules\angular-cli\node_modules\broccoli-caching-writer\node_modules\rsvp\dist\rsvp.js:1036:16)
    at lib$rsvp$$internal$$invokeCallback (C:\Users\Christian\Desktop\prototypes\chat-client\node_modules\angular-cli\node_modules\broccoli-caching-writer\node_modules\rsvp\dist\rsvp.js:1048:17)
    at lib$rsvp$$internal$$publish (C:\Users\Christian\Desktop\prototypes\chat-client\node_modules\angular-cli\node_modules\broccoli-caching-writer\node_modules\rsvp\dist\rsvp.js:1019:11)
    at lib$rsvp$asap$$flush (C:\Users\Christian\Desktop\prototypes\chat-client\node_modules\angular-cli\node_modules\broccoli-caching-writer\node_modules\rsvp\dist\rsvp.js:1198:9)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

chat.component.ts
import * as io from "socket.io-client";

@Component({
  ...
})
export class ChatAppComponent {
  ...
}

system-config.ts
/** Map relative paths to URLs. */
const map: any = {
    "socket.io-client": "vendor/socket.io-client/socket.io.js"
};

/** User packages configuration. */
const packages: any = {
    "socket.io-client": {"defaultExtension": "js"}
};

angular-cli-build.js
var Angular2App = require('angular-cli/lib/broccoli/angular2-app');

module.exports = function(defaults) {
  return new Angular2App(defaults, {
    vendorNpmFiles: [
      'systemjs/dist/system-polyfills.js',
      'systemjs/dist/system.src.js',
      'zone.js/dist/*.js',
      'es6-shim/es6-shim.js',
      'reflect-metadata/*.js',
      'rxjs/**/*.js',
<EMAIL_ADDRESS>      'socket.io-client/socket.io.js'
    ]
  });
};

package.json
{
      "dependencies": {
        ...
        "socket.io-client": "^1.4.8",
        "systemjs": "0.19.26"
      },
      "devDependencies": {
        ...
        "typescript": "^1.8.10",
        "typings": "
      }
}

typings.json
{
  "ambientDevDependencies": {
    "angular-protractor": "registry:dt/angular-protractor#1.5.0+20160425143459",
    "jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
    "selenium-webdriver": "registry:dt/selenium-webdriver#2.44.0+20160317120654"
  },
  "ambientDependencies": {
    "es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654",
  },
  "globalDependencies": {
    "socket.io-client": "registry:dt/socket.io-client#1.4.4+20160317120654"
  }
}

DUP of #1157

There is a workaround to get this to compile.
In your src folder there is a typings.d.ts file that declares the module var. In that file browser.d.ts is installed.
I added the following to that file.
/// <reference path="../typings/index.d.ts" />
After the typings install runs there should be a index.d.ts in your typings folder that references socket io in the globals folder.
Perhaps this should be managed automatically after running typings install, but this should at least let you use socket.io-client

I can confirm that adding  /// <reference path="../typings/index.d.ts" /> to typings.d.ts works, thank u :+1:

Still getting, сannot find module 'socket.io-client'. Does anyone has found solution to this issue ?

Closed as this issue was made obsolete by https://github.com/angular/angular-cli/pull/1455.

@filipesilva Can you explain a little bit on how it was obselete or how we can go about doing this now since I've no previous knowledge of Webpack. Thanks :smiley:

In the webpack update SystemJS is not used anymore, thus does not need to be configured. You won't need any kind of webpack knowledge - just import stuff in TS and it should work.

I have tried to install typings for socket.io-client but had issues and got it working with
sudo typings install dt~socket.io-client --global --save

@amarewgs That worked for me! Thanks!

This helped for me: npm install @types/socket.io-client --save

@marcusreese  Looks like you responded just in time to this thread. Thanks your solution worked for me

Any success with the latest angular 2.0 @rengineerpc

?

Yes that's what I'm using @jspenc72

@marcusreese Thank you! That worked for me!


Environment variables in codeship-services.yml are not being set in container

Hi,
There seems to be an issue in the way jet handles environment variables passed via codeship-services.yml. Given the following service config:
js-test:
  build:
    dockerfile: ./dockerfiles/js-test/Dockerfile
  environment:
    CI: 1

I expect there to be an environmental variable CI whose value is 1 in the container. But I find that the value of CI is undefined. I can only set a new env var from the Dockerfile, but not from the yml file. I've also tried using the array format, but nothing worked:
  environment:
    - CI=1

Can anyone help?

What version of Jet are you using? (https://documentation.codeship.com/pro/builds-and-configuration/cli/#installing-jet) Also what version of docker? Is "CI" listed as blank amongst your container environment with printenv?

I think I figured it out. Correct me if I'm wrong, but I think the ENV in the yml is only available at run time, and not at build time, right? That would explain why it comes up undefined for my build script. I do see the correct value when I run jet steps and run printenv.

Thats right. Jet also sets some standard env vars for you in CI (CLI args can set those locally) but I dont know if those also get set as build args.
You can always just set build args manually as per https://documentation.codeship.com/pro/builds-and-configuration/environment-variables/

I guess I was thinking that jet run is similar to docker run and it actually runs the container, which led to my confusion. Of course I was not looking at a container but an image. The build arguments look super useful. Thanks!


Add a debounced window scroll event

What is this PR trying to achieve?
Just throttling means the nav can end up at the wrong size if a user has scrolled quickly. A debounce that will always fire after scrolling finishes fixes this.
What does it look like?

Debouncing seems like the wrong type of tool.
Unless I misunderstand, if someone scrolls, waits 400ms, scrolls again, waits 367ms, scrolls again... the event won't fire.
Throttle means that it will fire at most once in 100ms.
I know this might fix it, but it's adding a bit of voodoo...

Voodoo's a bit strong! I'd say it's a necessary consequence of adding throttling to the scroll event, but still wanting to ensure that calculations are correct precisely at the point scrolling ends.

Yeah, I can't see any other way of ensuring it always fires at the end of the scroll.


NonLinear SMV

Hi ,
you are using formulas given below to calculate your accuracy.
prediction_output = tf.matmul(tf.mul(tf.transpose(y_target),b), pred_kernel)
prediction = tf.sign(prediction_output-tf.reduce_mean(prediction_output))
accuracy = tf.reduce_mean(tf.cast(tf.equal(tf.squeeze(prediction), tf.squeeze(y_target)), tf.float32))
you are using directly y_target (ground truth) to make a prediction and then comparing the prediction with y_target.
Firstly I dont understand what is going on there. I mean "predicting by using target value" sounds meaningless a little bit. Probably I am missing something, but I couldnt find what it is.
At the end of the day, if I want to predict output when test input data are applied without knowing output how can I predict my outputs ?
By the way, there is a line in the code
model_output = tf.matmul(b, my_kernel)
But you dont use model_output anywhere in your code.
Thanks.

Hi @ozgurgundogan, thanks for bringing this to my attention.  There was some extra code lines in there from when I was exploring how to write this code.  I cleaned up the code a bit.  But I also added my best quick explanation in an Jupyter notebook here: https://github.com/nfmcclure/tensorflow_cookbook/blob/master/04_Support_Vector_Machines/05_Implementing_Nonlinear_SVMs/05_nonlinear_svm.ipynb
For better explanations, I would recommend reading these links:
http://cs229.stanford.edu/notes/cs229-notes3.pdf
http://www.robots.ox.ac.uk/~az/lectures/ml/lect3.pdf
As a note, there needs to be the x and y points in any prediction you do because it's the x and y points that create the SVM margins.  If you do some exploring with pred_kernel and my_kernel variable outputs, you'll see which non-zero values in the arrays indicate which data points are the support vectors.
I'll leave this issue open for a while if you want more clarification, otherwise I'll close it in about 48 hours.  Thanks!

Thanks for your response. Actually I got my answer from your notebook. Thanks a lot again :) You can close the issue.


Add link to http-messaging swagger doc

HTTP messaging APIs swagger doc was moved to a separate page, added a link to it.

@CaroMac Could you take a look at this pull request?


Fly execute strange behaviour with tar since 1.3.0

Hi,
Since 1.3.0 when I run execute command I got a lot of garbage output.
I am using MacOsx and bsdtar is install on my Laptop.
Not sure which tar concourse is using.
Thanks.
executing build 2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0tar: Ignoring unknown extended header keyword 'LIBARCHIVE.creationtime'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.creationtime'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: ./.git: time stamp 2016-06-16 01:43:53 is 1.583667369 s in the future
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.creationtime'

Can you confirm that this worked fine on 1.2? That looks more related to the data you're uploading.

I saw this today. New use case so cannot confirm that it worked on older versions of fly/concourse. Am running 1.3.1.

Seems since 1.3.1 we use the local tar on the host (laptop).
Since tar install in Mac is not the gnu tar we go this kind of error.
Workaround is to install gnu tar on Mac and make it a default tar.

Looks like this is actually related to changing the archive resource to use GNU tar. The client side (fly) should be doing the same thing it was doing before.
We should pass the flag --warning=no-unknown-keyword as described here to suppress the warning. The change would be around here: https://github.com/concourse/archive-resource/blob/master/in/main.go#L43

I could make a PR if that ok for you

yea that'd be great
On Wed, Jul 6, 2016, 5:48 PM Etourneau Gwenn<EMAIL_ADDRESS>wrote:

I could make a PR if that ok for you
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/concourse/fly/issues/91#issuecomment-230949514, or mute
the thread
https://github.com/notifications/unsubscribe/AAAHWBWpIVhw9TB-72eYtQNOCa_iphBUks5qTEzBgaJpZM4I29Fd
.

Ok

PR made https://github.com/concourse/archive-resource/pull/5

merged


Add ioDelay as attribute of host

Hi,
I would like to keep an eye on the iodelay of my proxmox host. Is it possible to add it to the values of the adapter?
Best
Martin

Info: it is only included in node status: /api2/json/nodes/pm1/status:
{"data":{"rootfs":{"total":21003583488,"used":6877716480,"avail":13035347968,"free":14125867008},"uptime":1433562,"loadavg":["0.51","0.47","0.62"],"cpu":0.0817551469590837,"idle":0,"wait":0,"cpuinfo":{"cpus":4,"cores":4,"mhz":"2221.795","sockets":1,"model":"Intel(R) Pentium(R) CPU  N3700  @ 1.60GHz","hvm":"1","user_hz":100,"flags":"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch epb pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm ida arat"},"pveversion":"pve-manager/6.2-10/a20769ed","ksm":{"shared":0},"swap":{"free":7388524544,"total":7516188672,"used":127664128},"memory":{"free":2775670784,"total":8269389824,"used":5493719040},"kversion":"Linux 5.4.44-2-pve #1 SMP PVE 5.4.44-2 (Wed, 01 Jul 2020 16:37:57 +0200)"}}

as ... "wait"


[BUG] ReferenceError: user is not defined at eval

System info

Playwright Version: [v1.23]
Operating System: Windows 10
Browser: Chromium

Source code
getting following error intermittently from playwright dotnet
Caller = <GetHtmlAttributeAsync>d__86.MoveNext, L0, Details = Microsoft.Playwright.PlaywrightException: ReferenceError: user is not defined at eval (eval at evaluate (:178:30), <anonymous>:1:15) at UtilityScript.evaluate (<anonymous>:185:19) at UtilityScript.<anonymous> (<anonymous>:1:44) at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](String guid, String method, Object args) in /_/src/Playwright/Transport/Connection.cs:line 167 at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal) in /_/src/Playwright/Transport/Connection.cs:line 489 at Microsoft.Playwright.Core.Frame.EvalOnSelectorAsync[T](String selector, String expression, Object arg, FrameEvalOnSelectorOptions options) in /_/src/Playwright/Core/Frame.cs:line 523 at Turanga.SessionManager.Providers.PlaywrightElement.GetHtmlAttributeAsync(String attribute)
Although, the xpath and attribute exists on the page

Code where error is being thrown
Frame.cs line:523
522        public async Task<T> EvalOnSelectorAsync<T>(string selector, string expression, object arg = null, FrameEvalOnSelectorOptions options = null)
523            => ScriptsHelper.ParseEvaluateResult<T>(await _channel.EvalOnSelectorAsync(
524                selector: selector,
525                expression,
526                arg: ScriptsHelper.SerializedArgument(arg),
527                strict: options?.Strict).ConfigureAwait(false));

Calling code
var elementLocator= /* get locator for xpath = "//*[@id='testHook']"      */
var jsonElement = await elementLocator.EvaluateAsync($"el => el.{attribute}");  /*  where attribute = "data-user"   */

Can you please help me understand when is this error thrown?

Can you share a reproducible? Most likely the website you are testing overrides some globals which end up in that error constellation.

Sure, we are upgrading the playwright version at our end. Will get back if the issue persists.

Closing for now then, please re-file if you still experience issues.


VR Support

Awesome work! It opens a lot of possibilities. Just tried to run it in VR. It works with default unity pipeline and have a good frame rate on a cloud but have a weird stereoscopic distortion. Is there any chance to adapt it for VR?

Thank you for your attention.
I am sorry I have never tried to run in VR.
Maybe I have bugs in the shader code. Could you attach screenshots for the bug?

There is a one sample cloud and objects intersecting with it just to see that cloud have a very different view for the left and right eye. You can notice this in editor when you rotate view if there is an object intersecting with volume some pieces might disappear.

This is very interesting and it is understood that I have to fix my shader for multiple cameras.
I will check this article and fix my raymarching algorithm.

Holy crap! Experience of raymarching toolkit in VR is something. Looking forward to your implementation! Thanks!

Is there any news on this fix to use it in VR?


Migration DMP Tool MUG version 4

Description
Migration DMP Tool MUG version 4
What does this PR do?

Breaking changes

Code review focus

Dependencies

Checks

[ ] Summary updated
[ ] Version view updated
[ ] Documentation added
[ ] Tests added
[ ] E2e tests created
[ ] Successfully ran e2e tests before merge

closes GH-

In section 3, the button text is not visible
There seems to be an issue with the dropdown of pre-defined answers. For instance, in TU Graz instance we get a dropdown like this:
This does not work properly with this PR:

So the drop-down is out, because this is how MUG required in there sheet and we already had an discussion for this part before. This was already in the last release. In relation with button color i will fix that.
Here an screenshot that we agreed on the decisions:

Ah right, missed that. Thank you for pointing it out


Remove unecessary passing around of suffix: &str in pruning.rs's RequiredColumns

It seems like duplicate information that couples the implementation to columns with specific suffixes in the statistics table.

@jayzhan211 had to run formatting, please approve again (or consider changing the setting so workflows don't require approval for repeat contributors).


Refactor BRFLD

Renames layer arguments to sublayer
Adds argument to select layer
Renames some methods to reflect this
Makes argument naming convention consistent

also, maybe the layer name should be kwarg-only? as-is the order of the args is kinda confusing. could also just swap em and break all the signatures I suppose

I'm not sure about this. In my head it makes the most logical sense to have the actor layer argument first, but most of the time you're going to be working with the entities layer specifically, so you'll only be using sublayer. If sublayer is positional and actor layer is keyword, is there really a point in making it keyword only? Or did you mean make both sublayer and actor layer kwarg only?
I honestly think it's fine as is. It's a bit funky but it should make sense when you're actually using the functions. And in practice it'll be easiest to work with, with the bonus of not breaking all the signatures.

I added a new method for adding an actor to actor groups that doesn't assume the prefix eg_, since other actor layers use a different prefix (ssg_ for rSoundsLayer and lg_ for rLightsLayer). For now I made the existing add_actor_to_entity_groups use the old signature and had it just call the new add_actor_to_actor_groups with the prefix added, but if we're okay with breaking things, I'd rather have only the new method, personally.

Ah except for the part where the tests are failing.

Yeah, I just saw that there's a test failing. I'll fix it soon and see if I can get on some of those other improvements.

I added a new method for adding an actor to actor groups that doesn't assume the prefix eg_, since other actor layers use a different prefix (ssg_ for rSoundsLayer and lg_ for rLightsLayer). For now I made the existing add_actor_to_entity_groups use the old signature and had it just call the new add_actor_to_actor_groups with the prefix added, but if we're okay with breaking things, I'd rather have only the new method, personally.

You could add a value to the enum for cc_prefix (make the value ENTITIES = "rEntitiesLayer", "eg_", and override with this in ActorLayer:
@classmethod
def __new__(cls, value: str, prefix: str):
    member = super.__new__(cls, value)
    member.cc_prefix = prefix
    return member

(might wanna cc @henriquegemignani / @duncathan to check if that should be new or init, i'm not sure if it's "pythonic" or whatever lmao)

I added a new method for adding an actor to actor groups that doesn't assume the prefix eg_, since other actor layers use a different prefix (ssg_ for rSoundsLayer and lg_ for rLightsLayer). For now I made the existing add_actor_to_entity_groups use the old signature and had it just call the new add_actor_to_actor_groups with the prefix added, but if we're okay with breaking things, I'd rather have only the new method, personally.

You could add a value to the enum for cc_prefix (make the value ENTITIES = "rEntitiesLayer", "eg_", and override with this in ActorLayer

Honestly, you should probably just be using the prefix when you call the method anyways. Assuming it is really only marginally more readable, while removing some of the library's power. If those 3-4 characters are really too much for someone utilizing this library, they should just subclass or write their own function to do it IMO.


[YUNIKORN-2014] update /ws/v1/config response

What is this PR for?
Update /ws/v1/config response.
What type of PR is it?

[X] - Documentation

What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-2014

looks good.
My understanding is, apache/yunikorn-core#652 changes won't break any existing REST API consumers on parsing the response. Can you confirm this?

Yeah, there is a bug. Created a PR https://github.com/apache/yunikorn-core/pull/672 to fix it.

looks good.
My understanding is, apache/yunikorn-core#652 changes won't break any existing REST API consumers on parsing the response. Can you confirm this?

Yeah, there is a bug. Created a PR apache/yunikorn-core#672 to fix it.

I don't think so. Otherwise, below assertions should have failed
https://github.com/apache/yunikorn-core/blob/master/pkg/webservice/handlers_test.go#L510 https://github.com/apache/yunikorn-core/blob/master/pkg/webservice/handlers_test.go#L542
in the first place. go embedded field is implicitly inlined (you can refer this ) . Even now, https://github.com/apache/yunikorn-core/pull/672/files has taken care only for yaml, not for json. Hence, let's leave as is.

I think the test case can work is because we use the same struct. For main branch version, both don't have inline tag. For PR branch version, both have inline tag.
May you check following issues and go playground, so we can see the different part.

https://github.com/go-yaml/yaml/issues/99
https://github.com/go-yaml/yaml/issues/63
https://go.dev/play/p/0Qa5Wcb94q9

It seems unmarshal behaviour is different for yaml and json. To be defensive, let's keep the inline tag.

For main branch version, both don't have inline tag. For PR branch version, both have inline tag.

I can see only for yaml, not for json. Should we do something like this?
*configs.SchedulerConfig json:",inline" yaml:",inline"``

I can see only for yaml, not for json. Should we do something like this?
*configs.SchedulerConfig json:",inline" yaml:",inline"``

Add json inline tag in https://go.dev/play/p/pwH25J2iuOc and the result is same as previous one https://go.dev/play/p/0Qa5Wcb94q9.
I think we probably don't need to add inline tag for json.

@FrankYang0529 Will approve the pr and merge the code. Just for our better understanding, It would be great if you can try hitting the url in your local setup after yk installation and share your observations.

Sounds good. Thank you. I will leave a comment in both Jira ticket and this PR for better tracking.

YAML response without inline tag.
schedulerconfig:
    partitions:
        - name: default
          queues:
              - name: root
                parent: true
                submitacl: "*"
          placementrules:
              - name: tag
                create: true
                value: namespace
    checksum: FD5D3726DF0F02416E02F3919D78F61B15D14425A34142D93B24C137ED056946
extra:
    event.trackingEnabled: "false"
    log.core.scheduler.level: info
    log.core.security.level: info
    log.level: debug

YAML response with inline tag.
partitions:
    - name: default
        queues:
            - name: root
            parent: true
            submitacl: "*"
        placementrules:
            - name: tag
            create: true
            value: namespace
checksum: FD5D3726DF0F02416E02F3919D78F61B15D14425A34142D93B24C137ED056946
extra:
    event.trackingEnabled: "false"
    log.core.scheduler.level: info
    log.core.security.level: info
    log.level: debug


[CoPol][TerritorialCouncil] Add additionally elected

Execute this query to update adherent_mandate and to check that there is no more additionally_elected quality.
UPDATE adherent_mandate am
INNER JOIN voting_platform_candidate c ON c.adherent_id = am.adherent_id AND am.`type` = 'territorial_council'
INNER JOIN voting_platform_candidate_group cg ON cg.id = c.candidate_group_id
INNER JOIN voting_platform_election_pool ep ON cg.election_pool_id = ep.id
INNER JOIN voting_platform_election_entity ent ON ent.election_id = ep.election_id and ent.territorial_council_id = am.territorial_council_id
SET am.quality = ep.code, am.is_additionally_elected = 1
WHERE am.quality = 'additionally_elected'
;

SELECT * FROM adherent_mandate am
WHERE am.quality = 'additionally_elected'
;

[ch12406]


experiments/dcp.py: t600x support

Works currently via vUART under HV with dcp tracing. On bare metal dcp crashes immediately after rtkit start.This matches the behavior seen with the Linux driver although they fail with different messages in crashlog.
bare metal dcp.py: Message 1: MMU out of tables: 200,200,0
Linux: Message (id=1): IOMFB int_handler_gated: failure: axi_wr_err [0x80000400]

The bare metal crash happens only if m1n1 was chainloaded. It works without issues when the same m1n1 binary is loaded by iboot.
The crash when started by Linux is a different problem.


Memory Leak and OCR Improvment in Android

Environment
I'm currently using tess-two version 8.0.0
Current Behavior:
I've tested my app at several images. Actually some of them worked very nice. But the issues starts when i take a picture from water metering which contains of numbers. The tesseract doesn't recognize it and instead of returning it as numbers, it gave me random words. Also, when i've done with the recognition, the memory didn't release. So, here's my question:

How can i release the memory after the recognition, and
How can i improve the reading when the text is coming from the water metering?

Expected Behavior:

The memory will be released (so i can save up to 30 MB)
The OCR works on Water metering (at least up to 75%)

Please read & follow instruction for posting issue.


feat(anta.cli): Check catalog functionality

Description

Add anta check catalog -c <CATALOG>
Add AntaCatalog class to manipulate test catalog

tests property can be used to get and set tests to the catalog.
get_tests_by_tags to filter tests by tag
get_tests_by_device to filter tests by device

Add AntaCatalogFile pydantic model to provide validation for test catalog YAML filecatalog = AntaCatalog(filename='/mnt/lab/my_anta_catalog.yaml')
catalog.check()

Add AntaTestDefinition pydantic model to provide validation mainly for programmatic AntaCatalog instantiation.AntaCatalog(tests=[(AntaTest, AntaTest.Input())])

Fixes #408
Fixes #407
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have run pre-commit for code linting and typing (pre-commit run)
[ ] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes (tox -e testenv)

I think the WARNING log should be in DEBUG
➜  anta git:(issue/408) anta nrfu table
Catalog /home/cbaillar/git_projects/ansible-avd-examples/multidomain-evpn/anta_catalog.yaml is valid
╭────────────────────── Settings ──────────────────────╮
│ Running ANTA tests:                                  │
│ - ANTA Inventory contains 1 devices (AsyncEOSDevice) │
│ - Tests catalog contains 99 tests                    │
╰──────────────────────────────────────────────────────╯

[09:41:15] WARNING  Overriding AntaCatalog data from file /home/cbaillar/git_projects/ansible-avd-examples/multidomain-evpn/anta_catalog.yaml

I think it should probably be warning - the more interesting question is why you are seeing this as self._tests should be empty in your case

Investigate the option of having a single ANTA_CATALOG env for both anta nrfu and anta check.
Also ANTA_CHECK_CATALOG_CATALOG is weird.
➜  anta git:(issue/408) anta check catalog --help
Usage: anta check catalog [OPTIONS]

  Check that the catalog is valid

Options:
  -c, --catalog FILE  Path to the tests catalog YAML file  [env var:
                      ANTA_CHECK_CATALOG_CATALOG; required]
  --help              Show this message and exit.

Fixed in 2c39acd


fix: Set BatchMode for ssh-copy-id

ssh-copy-id can hang indefinitely at the SSH password prompt if Server is configured to allow KeyboardAuthentication and PubKeyAuth fails.
SSH BatchMode instructs the ssh client to disable all interactive user prompts like password and host key confirmation.
Using the terraform module without BatchMode can result in a terraform apply run hanging "forever" at the password prompt.  With BatchMode enabled the terraform apply run fails correctly.

Digging through the code a bit more I suspect this could happen during all steps of nixos-anywhere that use SSH.
I guess the question is if running nixos-anywhere from the CLI should support the use-case of entering the password and this issue would be better fixed by the terraform module setting BatchMode=yes via the --ssh-option parameter?
Please advice.


Controller command

Implemented commands from issue 51 for file and adam locations. The '<name>' is not implemented -- used single EVE instance from EDEN's config. For 'edge-node update' implemented only --config=<key:value> options.
Fixed issue53.

Btw @sadov -- now that I'm merging it -- let me know how do you want to track refactoring that I suggested. Filing GH issues or something else?


Upgrade babel and add babel runtime

In this diff I upgraded to babel 7, enabled class properties loose mode
and added babel runtime which allows to reuse helpers between all
packages.
For CJS bundles I still use inlined helpers.

Thanks, @TrySound! I didn't realize that we could use export { default as Router } from './Router.js' w/out babel-plugin-transform-export-extensions. Is that a Babel 7 thing?

Nope. It's es2015 thing. It always existed.


Get the order of elements on a board

I want to save the order state of elements on the board in the backend db. I know we can listen for call back dragendEl or dragEl in order to detect the item reordering inside a board, how can I get the new order when an item is reordered,
I also want to store the order of the Board as well when I enable dragBoards , your help is kindly appreciated

Hello @akramwahid , you will have to get the elements and iterate over it. Like:
dropEl: function(el, target, source, sibling) {
  	var _target = $(target.parentElement);
    var sorted = [];
    var nodes = jkanban.getBoardElements(_target.data("id"));
    var currentOrder = 0;
    nodes.forEach(function(value, index, array) {
      sorted.push({
        "id": $(value).data("eid"),
        "order": currentOrder++
      })
    });
    $("#working_sort_order").val(JSON.stringify(sorted));
  },

https://jsfiddle.net/marcosrocha85/Lk9t483r/

thanks for this, can you please tell me how to do similarly to get the new order of boards when boards are moved arround

thanks for this, this solved my problem


Error message when running demand script on HQ/baseline

I suspect this has to do with not running the data helper first, but of course we should fix this!
Executing: DemandTool C:\reference-case\reference-case-hq\baseline Zurich
Start Time: Tue Sep 13 11:30:07 2016
Running script DemandTool...
Using python: C:\Python27\ArcGIS10.4\python.exe
Path to demand script: C:\Users\darthoma\Documents\GitHub\CEAforArcGIS\cea\demand\demand_main.py
Adding path to PYTHONPATH: C:\Users\darthoma\Documents\GitHub\CEAforArcGIS
Running demand calculation for scenario C:\reference-case\reference-case-hq\baseline
Running demand calculation with weather file C:\Users\darthoma\Documents\GitHub\CEAforArcGIS\cea\databases\CH\Weather\Zurich.epw
reading input files

Traceback (most recent call last):
  File "C:\Users\darthoma\Documents\GitHub\CEAforArcGIS\cea\GUI\toolbox.py", line 192, in execute
    gv.log(stderr)
  File "C:\Users\darthoma\Documents\GitHub\CEAforArcGIS\cea\GUI\toolbox.py", line 24, in add_message
    arcpy.AddMessage(msg % kwargs)
TypeError: not enough arguments for format string

Failed to execute (DemandTool).
Failed at Tue Sep 13 11:30:11 2016 (Elapsed Time: 4.33 seconds)

fixed in PR #342


Test the CLI tool

At the moment only index.js is tested. That’s definitely not enough :)

https://github.com/nodejitsu/nexpect looks goot BTW.


Update index.mdx

👷 Deploy Preview for famous-marshmallow-cfbd61 processing.

Name
Link

🔨 Latest commit
358ee01783b03615af81350462cc44c1c12fa034

🔍 Latest deploy log
https://app.netlify.com/sites/famous-marshmallow-cfbd61/deploys/64a3bd9a21063c00080e8b59


Any list clarity

The problem
The "1-item list" in Any docs is inaccurate #2176
Solution provided
I have standardised the language based on other language in the document, though will need checking by someone with a greater understanding of what's actually being said.
Looking at the Cool type document, I have changed all descriptions which say 'coerce' to 'coerces' as there were both in the document.
I have added 'the invocant' in many places and hope this is correct to fit in with the language I was using in this update. Again, this was something used sporadically and I had to choose what to follow. It is now more consistent.
I have referred to C<List> meaning a class, rather than just 'a list'. Again, this seems more consistent to me with the rest of the document.

Looks good except for the:

I have referred to C<List> meaning a class, rather than just 'a list'.

There's a deliberate difference there. Note there are both .List and .list methods. Only .List specifically coerces to a List type; .list is allowed to coerce to any Positional type:
[].List.^name.say; # List
[].list.^name.say  # Array

(the same thing exists for .Hash vs .hash; the latter is allowed to return any Associative)

Ok, will have another go...see it's failed a test as well.

Having doubts about methods pairs, anti-pairs and kv. Based the re-wording on method pairs and not sure that it's correct in List v list..? Bit out of my depth there. Should I revert that part?
But otherwise, I think this is ok as far as fixing the related bug?

Having doubts about methods

The only thing I see is the use of word undefined. Should be changed to something like …if the invocant is a type object. The non-definite objects (i.e. type objects rather than instances) are slightly different from "undefined" objects. An object can override the .defined value (and some things like Failures do) and can be false even for instances:
say Failure.new.DEFINITE; # True
say Failure.new.defined;      # False

👍 Thanks!
(gonna fix up the defined thing myself; need to do some other edits in the same area and don't want to introduce merge conflicts).


Status page returns 404

When clicking the "Data source status" link from the homepage or the results page we get to see a nice overview of the freshness of all data. However, directly linking to <site>/status fails, as does reloading the statuspage once it's opened. The status API page works as expected.
Demo setup can be found on https://irrexplorer.teun.tv/, relevant irrexplorer HTTP server log entry:
INFO:     xxx.xxx.xxx.xxx:0 - "GET /status/ HTTP/1.0" 404 Not Found

This is tested on a fresh install running today's git checkout of irrexplorer code.

Can confirm the same on a fresh install using latest code.

Just did a bit more testing, appears to only be an issue when calling the /status/ path directly.
i.e. going to https://irrexplorer.accuris.ca/status/ will return the 404 not found error, however selecting "Data source status" on the homepage of IRRexplorer loads the page fine as when going through that method it seems to call the following endpoint:
INFO:     xx.xx.xx.xxx:0 - "GET /api/metadata/ HTTP/1.0" 200 OK

Fixed in code, will be deployed on irrexplorer.nlnog.net soon.


CREATE LENS fails after SELECT

Running any SELECT query and following it with a CREATE LENS:
SELECT * FROM sane_r;
CREATE LENS insane_r AS SELECT * FROM r WITH missing_value('C')

results in the following exception
java.sql.SQLException: [SQLITE_BUSY]  The database file is locked (database is locked)
	at org.sqlite.core.DB.newSQLException(DB.java:890)
	at org.sqlite.core.DB.newSQLException(DB.java:901)
	at org.sqlite.core.DB.execute(DB.java:807)
	at org.sqlite.jdbc3.JDBC3PreparedStatement.execute(JDBC3PreparedStatement.java:50)
	at mimir.sql.JDBCBackend.update(JDBCBackend.scala:56)
	at mimir.Database.update(Database.scala:96)
	at mimir.lenses.LensManager.save(LensManager.scala:71)
	at mimir.lenses.LensManager.create(LensManager.scala:67)

This bug arises differently for brand new databases. The first create lens statement succeeds. The second gives the same error. I will work on this further.

This seems to be a bug with the closeOnCompletion() support of MySQL at class JDBCBackend
def execute(sel: String): ResultSet =
  {
    // println(sel)
    val stmt = conn.createStatement();
    val ret = stmt.executeQuery(sel)
    stmt.closeOnCompletion();
    temp = stmt
    return ret;
  }

Even though I am closing the iterator in the WebAPI class, it doesn't seem to close the connection, which it should according to the documentation. I have implemented an ugly hack to get around this problem, by adding a dummy method to the Backend abstract class which returns to me the Statement variable, on which I'm calling exit manually after closing the iterator. This fixes the issue.
Should I commit a cleaner more documented version of this approach, or think of a more elegant way?

It seems like this might actually be WAI, and not a bug: See Connection.commit().  Bah.
Perhaps the simplest, cleanest fix here would be to add another layer of encapsulation and have Backend return a mimir.exec.ResultIterator rather than a java.sql.ResultSet.  ResultSet only makes appearances in mimir.Database, where it's immediately wrapped in a ResultSetIterator, so this should be a fairly minor change.
Then java.sql.Statement could be added as a second parameter to mimir.exec.ResultSetIterator, for ResultSetIterator.close().

That approach created quite a lot of problems, and broke the command line interface too.
The root of the problem seems to be that every handler for a request to the server is its own thread, and I was using the same WebAPI instance for all of the methods. What I have gone with is having a new instance of the WebAPI class be generated for each request, and I have added a close() method to Backend which explicitly closes the connection after every request is processed. This seems to have fixed the issue.

I see... so now there's one Connection instance per thread?  That's a bit ugly, but probably ok.


Change filter label to better one

https://github.com/oVirt/ovirt-web-ui/issues/167

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

The commiter is not a member of organization nor whitelist. Please contact maintainer for patch verification.

@jelkosz fixed

@bond95 in meanwhile I had a different comment :) So, it would be even better to remove the checkbox completely and to send the Filter: true/false according to the permissions of the user without exposing an option to change it.

@jelkosz fixed

Please rebase once https://github.com/oVirt/ovirt-web-ui/pull/197 is merged

@bond95 , please rebase

@mareklibra rebased


Trigger verify GH action to run as a PR check, run only with latest version of go

@jeefy let me know that the verify github action is not running as a checker on PRs to this repo asked me to fix this.
Also there is a go lang matrix invocation of the verify tool that we do not need. Just run the verify check with the latest version of go.

Done. #3011 and #3012


plugin upgrade bug

VSCode Version:1.5.3
OS Version: mac

Steps to Reproduce:

publish two version of my plugin in one hour
go to extensions tab
update plugin
press enable to restart
go to extensions tab and update is still warning.

#12011


fix: solve multipart uploads in browser context

This PR uses @bcoe's test to stub out a solution for this issue in nodejs-client. Currently, there is an issue when uploading files in the browser context through multipart uploads, because the content is uploaded as a stream. This PR changes the logic in browser settings to not use streams.

@bcoe  - Thanks for looking this over! As the code stands right now, it works. However, I was not able to successfully replicate with an image (I either got empty or corrupted). I tried checking to see if I was just attempting to upload incorrectly, when I noticed that our samples have us uploading the file incorrectly (i.e., via stream) without specifying non-browser context.  Specifically,
  mimeType: 'image/jpeg',
  body: fs.createReadStream('files/photo.jpg')
};

I'm not sure if I wasn't testing correctly, or if we've run into another issue with this configuration.


atom-beautify fails to install

Not only does it take forever to install, it sometimes just fails altogether. From the screenshot below, it looks like node is called (which isn't installed).

The output above also suggests<EMAIL_ADDRESS>is to blame, but I'm not sure if that is the case.
Tested on Atom 1.3.3 and 1.4.0-beta3.

Also hanging/failing when installing from within the settings of the application.

I'm getting this same error on atom 1.5.4

Those are NPM errors, which indicates both Node and NPM are actually installed.  The error message indicates a failure at an NPM script for the install phase of package spawn-sync which is a dependency of cross-spawn which is a direct atom-beautify dependency.
@Glavin001 could we look up updating Node and NPM to the latest versions.  I think that would fix a lot of these stability issues, particularly on Windows.  This spawn-sync appears to have different behavior for this version of node according to its readme: https://www.npmjs.com/package/spawn-sync

I just published a patch in release v0.29.4 that makes cross-spawn dependency optional.
The cross-spawn package depends on spawn-sync and has been causing problems when installing Atom-Beautify for many users. By making this dependency optional, users will be able to easily install Atom-Beautify and, in the case that cross-spawn fails to install, will fallback to the builtin spawn method.


Premium Tabs are Searchable

Closes #855
Significant changes were needed to get this to work:
Demonstration:

Please feel free to critique.

Nice work, for future reference I would prefer if we rebase rather than merge master when updating PRs so that the commit history is kept clean.

This seems to have introduced #957


Not informative message when plugin not presented

Here I forgot to install  fly-babel preset and it throws ugly exception instead of  message like
fly-babel plugin is not presented
➜  xeon-bash-ast git:(master) ✗ fly
[12:2:40] Flying with /home/olehkuchuk/Projects/xeon-bash-ast/flyfile.js...
[12:2:40] Starting default
[12:2:40] Watching files...
[12:2:40] Starting babel
stack:
  - TypeError: this.source(...).babel is not a function
  -     at Fly.x.babel (~/Projects/xeon-bash-ast/flyfile.js 9:6)
  -     at next (native)
  -     at onFulfilled (~/Projects/flyproject/node_modules/co/index.js 65:19)
  -     at ~/Projects/flyproject/node_modules/co/index.js 54:5
  -     at Fly.co (~/Projects/flyproject/node_modules/co/index.js 50:10)
  -     at Fly.toPromise (~/Projects/flyproject/node_modules/co/index.js 118:63)
  -     at next (~/Projects/flyproject/node_modules/co/index.js 99:29)
  -     at onFulfilled (~/Projects/flyproject/node_modules/co/index.js 69:7)
  -     at ~/Projects/flyproject/node_modules/co/index.js 54:5
  -     at Fly.co (~/Projects/flyproject/node_modules/co/index.js 50:10)
message: this.source(...).babel is not a function
[12:2:40] babel failed due to TypeError: this.source(...).babel is not a function
[12:2:40] Finished default in 31 ms

@lukeed @bucaran

Closing only because it's a duplicate of #145. Our error messages are sub par.

@lukeed btw,  I am working on this.
The major problem is that when Fly loads plugins it bounds that to original fly instance and there is no identifier for something like is it a plugin or just a fly method.
There are few solutions to this problem. I will submit PR today or tomorrow.

@lukeed
Also, I was wondering how critical is rewritting plugin API could be?
Basically providing good error messages in this scope could be very tricky.
Also there are some potential problems with binding this to plugin instance,
maybe it's better to share context via dependency injection.
It wont change API much, like
  module.exports = (fly) =>
      fly.filter('whatever' , callback)

but here we have isolated fly instance that wont point to main fly instance
What do you think :question:

@hzlmn I'm not sure I see what you gain from doing this? (I also don't have code in front of me)

@lukeed isolation of fly instance, for example here sample plugin api (structure can be redefined)
  module.exports = (fly) =>
     fly.plugin({
       type: fly.filter,
       handler: whateverFn
     })

fly is a shallow copy with binded method plugin that have reference to real this.
In this case we are sure that fly instance readonly and if someone want to redefine for example self.root,  it will be only in scope of plugin.
btw, its just food for thoughts

@hzlmn I remember @TrySound saying something similar to this when the project first got started. I don't know if he'd like to comment on it or discuss the idea with you.


push notifs: For group PMs, identify the users in the group.

Testing Plan:
Just the unit tests.
@borisyankov , @kunall17 -- does this look like the right information to you? Is there anything you'd like tweaked?

lgtm modulo the tests.

Merged so it's there. Happy to make further edits later.


Handle lines getting shorter during analysis

cc @devoncarew, @pq

(I keep hitting this because I run analyzer continually in the background, so I see this whenever I switch branches.)

lgtm


OSError: You seem to have cloned a repository without having git-lfs installed. while running on habana-gaudi

Followed these commands: -
git clone https://github.com/intel/intel-extension-for-transformers.git
cd ./intel-extension-for-transformers/
apt-get update
apt-get install git-lfs
git-lfs install
docker run -it --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --net=host --ipc=host -v $(pwd):/intel-extension-for-transformers vault.habana.ai/gaudi-docker/1.10.0/ubuntu22.04/habanalabs/pytorch-installer-2.0.1:latest
cd /intel-extension-for-transformers/workflows/chatbot/inference/
git clone https://huggingface.co/mosaicml/mpt-7b-chat
pip install datasets
pip install optimum
pip install git+https://github.com/huggingface/optimum-habana.git
pip install peft
pip install einops
pip install<EMAIL_ADDRESS>
But while running
python generate.py --base_model_path "./mpt-7b-chat" \
             --habana \
             --tokenizer_name "EleutherAI/gpt-neox-20b" \
             --use_hpu_graphs \
             --use_kv_cache \
             --instructions "Transform the following sentence into one that shows contrast. The tree is rotten."

ran into this error
OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run `git lfs install` followed by `git lfs pull` in the folder you cloned.

Tried doing git init and re cloning the mpt repo but to no avail.
git lfs install works but git lfs pull doesn't.
When I do git lfs pull, it says
Not in a git repository

This was due to a recent readme update. the git-lfs should be installed inside the docker given the mpt-7b-chat is now cloned inside the docker.
apt-get update
apt-get install git-lfs
git-lfs install

@Abhaycnvrg,
Apologies for the inconvenience caused. The issue has been addressed and fixed through https://github.com/intel-innersource/frameworks.ai.nlp-toolkit.intel-nlp-toolkit/pull/1232.


Debug didn't start

Hi I've a problem when starting the debug the error is:

I've tried to cancel the entire content of the directory:
/QIBM/ProdData/IBMiDebugService/bin/certs/
recreate the certificate
reimport the new debug_service.crt
make the enddbgsvr and strdbgsvr
reconnect to my server
when i make the command:
IBMi Debug: Start debug service
I receive the error above.
Here's my code for i output:
Code_For_I_output.txt
my setting (I only change my user name and my server name)
Code_For_I_setting.json.txt
I'm on V7R4, ptf SI80364 and SI81031 are temporary applied.
Which is my problem?
Many thanks.

@pabloto Code for IBM i simply calls scripts on the IBM i server - scripts provided by the Remote Debug PTF's.
Please report your problem to IBM for them to investigate. It is not a Code for IBM i problem.
My guess from your error message is that some foreign Java library is installed on your system, which does not contain the correct algorithms - but again, this is a case for IBM.

Hi,
only if someone other have the same problem:
Discussing with IBM, I discover the problem, I have download (on my IBM i) the open source version of openssl (3.0.8) while the official version from SC1 IBM product is (1.1.1p), when openssl generate the key n my IBM i use and encryption method don't know from the java 8.
Removing the open source version of openssl it start works.
Many thanks.
Bye


Unable to invoke an arrow function with an assertion predicate

🔎 Search Terms
arrow function, assertion, predicate, 2775
🕗 Version & Regression Information

This is the behavior in every version I tried

⏯ Playground Link
https://tsplay.dev/w8QLpN
💻 Code
type A = { x: number };

type B = A & { y: number };

const foo = (a: A): asserts a is B => {
  if ((a as B).y !== 0) throw TypeError();
  return undefined;
};

export const main = () => {
  const a: A = { x: 1 };
  // TypeError: Assertions require every name in the call target to be declared with an explicit type annotation.(2775)
  foo(a);
};

🙁 Actual behavior
It looks like they goal of https://github.com/microsoft/TypeScript/pull/45952 was for assertion predicates to work for arrow functions, but this only handles the JSDoc case, which I assume TS treats as equivalent to directly annotating the entire function at once, i.e.:
 const foo: (a: A) => asserts a is B = (a) => {};

For functions with more named parameters, this annotation style quickly becomes unwieldy. There is no semantic difference between this annotation or the style from the repro:
const foo = (a: A): asserts a is B => {};

Is it possible to identify a top-level arrow function like this assigned to a const variable with annotated parameters and return as having an "explicit type," which was defined as the standard for being able to use an assertion predicate like this in @ahejlsberg's initial PR (https://github.com/microsoft/TypeScript/pull/32695)?
This style is increasingly common, and I think many developers (my self included) simply write a function like this, see it doesn't work, then choose not to use the feature, not knowing something like moving the annotation to the variable itself could have an effect.
🙂 Expected behavior
(see above)
Additional information about the issue
No response

Unfortunately, it is indeed a design limitation that foo must be explicitly annotated.  Annotating the arrow function itself isn't enough - the compiler doesn't know the type of foo until type inference kicks in, which happens after the control flow graph is computed.

@fatcerberus Do you know if there's a mechanism for this to be special-cased? It seems like it would be relatively simple to detect a top-level arrow function declaration.


Observer not reacting to changes in observable ref

When upgrading for 2.x to 3.x, observers no longer react to React component refs that are observers. I created a demo here:
https://github.com/mobxjs/mobx-examples/pull/9
I couldn't figure out how to get it working in JS fiddle, but it works on my local version of chrome.
The expected behaviour is the phrase "This should console log" should be present in the chrome console when a user clicks the checkbox.

See my response under mobx-examples: https://github.com/mobxjs/mobx-examples/pull/9
Feel free to follow up on the gitter channel if you'd like more help.

Also note that this.foo was nowhere declared to be an observable. I expect at least something like extendObservable(this, { foo: observable.ref(null) }) in componentWillMount.
Besides that it is indeed strictly discouraged / bad practice to expose component state to the outside world. If you want to access some state in a parent; either pass callbacks to the child, or pass a data structure to the child which the child could update.

Closing question for inactivity. Feel free to revive

I have an array of observable which has form elements , its value, validation result etc are stored. An observer has this values. Whenever the form element is changed, the observer prints the validation results. It works fine with @observable.
But i want to use @observable.shallow with them. Now the observer is not reacting with the changes.
What is the @observable.shallow for?


Does terminus has tunnel function? Can I adjust line space?

As described in title.

No.
Yes, you can adjust the lineSpacing config file option when using the hterm frontend.


operator elastic-cloud-eck (2.15.0)

Update the ECK operator to the latest version 2.15.0.

/merge possible

/merge possible


Creating a new step from scratch is confusing

Right click, "Create new step" ✔
Name step ✔
…now what? If the filename is not found, it's unclear how to proceed ❓

https://user-images.githubusercontent.com/316517/196358682-2c2664e4-95d0-4e56-b5ef-2115ee7c96fc.mp4

Part of this is solved by removing the icon from the file path box and only providing validation/feedback through the input field when there is an error...

Other things:

We probably shouldn't let users connect steps unless they have a file path
The Pipeline step should not say "ready" if the file path is missing... in fact we could probably say "Missing file path"
Autofill file path from step name may be annoying, vice versa would be useful tho IMO

I think we could probably merge this issue with https://linear.app/orchest/issue/ORC-770/createbrowse-files

Fixed with https://github.com/orchest/orchest/pull/1401


Multiple author support

Will there be support for multiple blog authors? E.g. with two containers for two people.
I have found (allegedly) such option in https://github.com/UtkarshVerma/hugo-dream-plus, but it's not being updated.

You mean multiple authors in the front matter? Like:
---
authors:
  - author1
  - author2
---

It would be neat to have two author pages and be able to link each of them to blog posts.

Seems it's difficult to implement this feature.
This means that you need to regenerate some pages with completely different data, not only posts but also pages similar to social links, post categories, etc.
But I thought of a compromise. I can set a param authorlink in the front matter of the post so that you can jump to another author's site by clicking the name on the summary card.

All you need is to generate two sites with the same theme.

Sure, that is creative. After all, I only propose a feature to consider. Unfortunate that it's difficult to implement.

Thanks for the suggestion. I will add the authorlink param soonly to help to cite other authors' articles.


Clear buffers when they are reset.

The aggregator can use multiple buckets in an aggregation computation. It marks
each bucket as inactive after the computation, but buckets can be reactivated
if new points are added - this can occur if the aggregation computation timing
doesn't align with the bucket boundaries. If that happens, then points will be
re-used between computations, leading to inflated or otherwise incorrect
values. Cleaning buckets after they are used ensures that old data is never
used again even though the bucket may be reused.

Maybe I'm confused, but if we're recalculating aggregation buckets, wouldn't we want the original values reused with the new datapoints? Once it's flushed it should overwrite the existing timestamp/value in Whisper.

This looks to break the use case where WRITEBACK_FREQUENCY is less than the frequency of aggregation (e.g. you want to flush your hourly aggregate every minute so that you always have some data for your latest point).
I think the same thing can be achieved by setting MAX_AGGREGATION_INTERVALS to 1 (note: this means if a datapoint comes in older than (now - aggregation_frequency) it'll be ignored in the aggregate)

Yup, I missed the line where the timestamp of the bucket is re-used. Please close this PR.

Yup, I missed the line where the bucket timestamp is re-used. Thanks for the double-check.


ignore certain types of errors

Adds ability to ignore errors you do not want to log

And what about tests for this feature ?

What about test for this feature ?

Sorry, no idea how to test plug. any advices/examples?

Thanks, implemented. Testing plug is still the issue, naive approach didn't work for me

@fazibear any updates here?

Can we get this merged?


Fix fix qualifier problem that affects delete stmt in another catalog

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run externalregression

run external


Expose Access Token in Lens SDK for server-side verification of user

Is your feature request related to a problem? Please describe.
The lens SDK does not expose the access token directly. However, the
verify-jwt endpoint requires it.
This seems to be the only way for a lens protocol implementer's API
server to verify that the user has logged in through lens.
Describe the solution you'd like
Add a getAccessToken(): Promise<string> method to IAuthentication.
Re-use the code currently in Authentication.getRequestHeader and pull it
out into a publicly exposed method on IAuthentication.
Describe alternatives you've considered
Adding getRequestHeader to the public interface. But this seems a little too
use-case specific. You don't always need the access token for adding to your
request headers.
Additional context
Current workaround from a package that uses the official SDK:
async function getCredentials (lens: LensClient): Promise<string> {
const lensAuth = lens.authentication as Authentication
const getHeadersResp = await lensAuth.getRequestHeader()
if (getHeadersResp.isFailure()) {
  return ''
}
const headers = getHeadersResp.unwrap()
const authHeaderValue = headers.authorization
if (authHeaderValue.length < 7) {
  return ''
}
const accessToken = authHeaderValue.slice(7)
return accessToken
}

would a simple implementation like this be enough or do we also need to include "the refresh" flow?
async getAccessToken(): Promise<string | undefined> {
  const credentials = await this.storage.get();

  return credentials?.accessToken;
}

would a simple implementation like this be enough or do we also need to include "the refresh" flow?

By "the refresh flow", do you mean the ability to automatically check if the token is expired and then fetch a fresh one from the server? Yep, in a high level SDK that is VERY useful.
I cannot think of many usage scenarios where I would want an old, expired lens access token :smile:

@wingedrhino this seems a pretty good first issue. Would you like to submit a PR?

@cesarenaldi I can take this up over the weekend!

Let me work on this now @cesarenaldi Sir

I got a little caught up. Wasn't in the best of health.
@ashutosh887 feel free to take it up if you're more free! There's also a little bug somewhere in the CredentialStorage class that causes isAuthenticated() to return false if you reload the page.

This will go out in 1.1.0 stable release.


Issue 166 obtain modules app maven

Description
we use exec:exec to ask maven to echo the modules properties.
Related to # 166
Type of Change
Please check the types of changes your PR introduces.

[ ] Bug fix (non-breaking change that fixes an issue)
[X] New feature (non-breaking change that adds functionality)
[ ] Refactoring (non-breaking code restructuring that preserves functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Build-related update (CI workflow, test cases)
[ ] Documentation update
[ ] Other (please describe):

How Has This Been Tested?
unit test on the wind up app
test_getting_modules_maven()
Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

removed these lines


core_perception: 1.14.9-3 in 'noetic/distribution.yaml' [bloom]

Increasing version of package(s) in repository core_perception to 1.14.9-3:

upstream repository: https://github.com/nobleo/core_perception.git
release repository: https://github.com/nobleo/core_perception-release.git
distro file: noetic/distribution.yaml
bloom version: 0.10.0
previous version for package: 1.14.9-2

points_preprocessor
* Remove Autoware Health Checker as dependency
* Contributors: Tim Clephas

This fix in the velodyne drivers made this release possible:
https://github.com/ros-drivers/velodyne/issues/368

This fix in the velodyne drivers made this release possible:
https://github.com/ros-drivers/velodyne/issues/368


Test out sparse matrix speed for full PTA band diagonal matrix

In the current codes (i.e. PAL2, NX01, piccard) we use a scheme where we invert individual npsr x npsr blocks of the full PTA phi matrix. This is very fast but it requires a lot of bookkeeping. We would like to try out some sparse matrix algebra to see if inverting this band diagonal matrix via sparse methods is comparable to the block method.
Unless the sparse matrix is significantly slower we should start with this method in the PTA code base but should allows for generic methods that will have solve methods. That way, the user can specify which method to use but the API remains the same.
@stevertaylor, can you look in to this?

I'm on it.

The plot above shows the relative evaluation time (sparse / frequency-wise) for the big phi inversion. Sparse is only better for fewer than ~8 pulsars. (The number of timing model parameters was assumed to be 100, and the number of red modes was 30. However the actual phi inversion was performed for the red processes only, then the big phiinv was filled in with the results.)

The above plot shows the time for the entire big Phi formation, inversion, big Sigma formation, and big Sigma inversion. We should always be using sparse inversion for big Sigma. Sparse inversion of big Phi costs slightly with respect to frequency-wise inversion of Phi, but it is ~20% at most. If book-keeping is much easier for the sparse inversion of big Phi, then I think we should use it.

There is a costly step in the likelihood which I had not appreciated before. Sigma = bigTtNT + Phiinv is very expensive. Perhaps we should form big Sigma all at once.

@stevertaylor, yes I think it may be because it is creating a new matrix for Sigma. It should be stored in the Likelihood class and filled in as we go.

@jellis18 Yes, I just did some tests with Phi += bigTtNT instead and that was already better.

OK, hopefully this issue is now resolved. I will upload my jupyter notebook to slack. It is stand-alone so you can play around with it. It seems that the ease of using sparse algebra on big Phi is a 20% cost at most, which we can probably get back through other optimizations.

@stevertaylor, initialization of the matrices eats up a bunch of time. At the hackathon there were gains for carrying around Sigma and it's cholesky factorization in a class.  They would be overwritten each evaluation, but they wouldn't have to be initialized and freed.

I think we are good with this now as was addressed in PR #89


chore: define suppression rules for cppcheck

This PR adds two suppression rules (missingIncludeSystem and unusedFunction) for cppcheck in order to make using the linting step a bit more useful. As make lint probably won't report false positives anymore, we could consider letting the linting CI step fail (after fixing the remaining minor issues) if there are any warnings emitted.

I just added a third suppression rule (missingInclude) to the file as there were still some false positives being reported – now the linter should only emit warnings on actual issues within the codebase.


Import doesn't work in Nuxt for some reason

Trying to get vue-socials working with a Nuxt app. When I try to import VueSocials from 'vue-socials' in a plugin I get the following error:
Failed to resolve entry for package "vue-socials". The package may have incorrect main/module/exports specified in its package.json.

Fixed in v2.0.1

@watzon : wich Nuxt release do you use ?
If Nuxt3, could you please share your plugin content ?
Thanks.


How to tell mpv to play to specific position when it is playing?

I'm making a video-based game using mpv gem. Wonder if there is a way to tell mpv to play from the current position to a specific position then stop? Using session.set_property("end", position) doesn't produce the desired effect.

Making sure I understand: you want to seek to some timestamp, play until another timestamp, and then stop?
I think you probably want an AB-loop, with a loop count of 1: https://mpv.io/manual/master/#options-ab-loop-b

Here's the corresponding IPC command: https://mpv.io/manual/master/#command-interface-ab-loop

How can i specify the loop count?

I don't know 🙂
ruby-mpv is just a wrapper over MPV's JSON IPC -- I'm not familiar with the details of each command that MPV can take. My suggestion would be to read through the docs and, if you can't find it there, raise a question on the upstream repository.

Okay. there isn't a simple solution with that. So I ended up using sleep to wait.


dyld: Library not loaded when using SPM

Describe the bug
Hello,
I have a project which had Amplify integration using Cocoapods. This worked fine.
I have now converted to Swift Package Manager and it works fine on simulator.
Unfortunately, when I try to run the app on device I get an error:
dyld: Library not loaded: @rpath/AWSCore.framework/AWSCore
  Referenced from: /private/var/containers/Bundle/Application/SOME_ID/XXX.app/Frameworks/ZZZ.framework/ZZZ
  Reason: no suitable image found.  Did find:
	/private/var/containers/Bundle/Application/SOME_ID/XXX.app/Frameworks/ZZZ.framework/Frameworks/AWSCore.framework/AWSCore: code signature in (/private/var/containers/Bundle/Application/SOME_ID/XXX.app/Frameworks/ZZZ.framework/Frameworks/AWSCore.framework/AWSCore) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

The values "SOME_ID", "XXX" and "ZZZ" is to hide sensitive client data. Not the actual names. This is also why I cannot provide the actual project to you for testing.
The project is structured with a target and two frameworks.
It is only one of the frameworks (not the target!) which has the dependency to Amplify (e.i. is linked in the build phase "Link Binary With Libraries".
The target doesn't link in any way to Amplify beside having embedded the framework which has the Amplify dependency.
The Amplify frameworks linked is "Amplify", "AWSPluginsCore", "AWSAPIPlugin" and "AWSCognitoAuthPlugin".
I would love to hear some suggestions.
I have tried the "obvious" closing of Xcode and deleting DerivedData. This did not work unfortunately.
Steps To Reproduce
1. Add "Amplify", "AWSPluginsCore", "AWSAPIPlugin" and "AWSCognitoAuthPlugin" as a SPM dependency
2. Run app on device
3. Crash

Expected behavior
The app should successfully run
Amplify Framework Version
1.13.3
Amplify Categories
Auth
Dependency manager
Swift PM
Swift version
5.4
CLI version
0
Xcode version
12.5.1
Relevant log output
No response
Is this a regression? (i.e. was this working before a version upgrade)
No response
Device
iPhone 12 Pro
iOS Version
14.7.1
Specific to simulators
No
Additional context
No response

@OliverNielsen did you manually migrate your project from Cocoapods to SPM or by using an automated tool like cocoapods-deintegrate?

Thanks for the further information.
This can occur when Swift Package target dependencies are not added as products.
Here is an example of a working Package.swift file that should suite your needs.
// swift-tools-version:5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

typealias Requirement = Package.Dependency.Requirement

enum Packages {
  enum AWS {
    static let PackageName = "AWSiOSSDKV2"
    static let PackageURL = "https://github.com/aws-amplify/aws-sdk-ios-spm"
    static let Requirement: Requirement = .upToNextMinor(from: "2.25.0")
    static let Package: Package.Dependency = .package(
      name: Packages.AWS.PackageName,
      url: Packages.AWS.PackageURL,
      Packages.AWS.Requirement)
  }
  enum Amplify {
    static let PackageName = "Amplify"
    static let PackageURL = "https://github.com/aws-amplify/amplify-ios"
    static let Requirement: Requirement = .upToNextMinor(from: "1.13.4")
    static let Package: Package.Dependency = .package(
      name: Packages.Amplify.PackageName,
      url: Packages.Amplify.PackageURL,
      Packages.Amplify.Requirement)
  }
}

let package = Package(
  name: "MyLibrary",
  platforms: [.iOS(.v14)],
  products: [
    .library(name: "MyLibrary", targets: ["MyLibrary"]),
  ],
  dependencies: [
    Packages.AWS.Package,
    Packages.Amplify.Package
  ],
  targets: [
    .target(
      name: "MyLibrary",
      dependencies: [
        .product(name: "Amplify", package: Packages.Amplify.PackageName),
        .product(name: "AWSCore", package: Packages.AWS.PackageName),
        .product(name: "AWSPluginsCore", package: Packages.Amplify.PackageName),
        .product(name: "AWSAPIPlugin", package: Packages.Amplify.PackageName),
        .product(name: "AWSCognitoAuthPlugin", package: Packages.Amplify.PackageName),
      ]),
    .testTarget(
      name: "MyLibraryTests",
      dependencies: ["MyLibrary"]),
  ]
)

Additionally here is a working example of a workspace with a Swift Package including the listed Amplify
dependencies attached.
1392.zip
Please let us know if this helped.

Thank you for the response.
Unfortunately, I didn't get it to work. I am getting the same issue as described here.
I decided to make a test project with my setup since I think it might result in some confusion.
In the test project, I have an app, and two dynamic frameworks.

AmplifyIssueTestProject (The app)
AmplifyIssueTestProjectKit (Dynamic framework)
AmplifyIssueTestProjectUIKit (Dynamic framework)

I need the Amplify SDK to be linked with AmplifyIssueTestProjectKit since that is the only place I have interact with the SDK.
This works fine on simulator but will crash on device with the same error as described in the original message.
This isn't in the test project but I have tried adding a Swift Package, with the Package.swift file you wrote, and linked it to my AmplifyIssueTestProjectKit. Same experience, simulator runs fine, device crashes.
The only thing I haven't tried is replacing AmplifyIssueTestProjectKit with a Swift Package and move all my files into that. This is a huge task for this project and doesn't seem like the correct solution, since the structure/setup works perfectly fine with Firebase and various other SDK's.
Can you see what I am doing wrong here?
AmplifyIssueTestProject.zip

@OliverNielsen Currently, we have the same problem in the project, did you manage to bring it to live?

@Namedix Unfortunately, no. I am waiting for response from the maintainers, so I had to stash the stuff I had for now.

Thanks for the follow up with more information @OliverNielsen.
We were able to replicate the issue you're describing and track it down to an issue with how Xcode handles dependencies and code signing.
Here is a Swift forums post that discusses the issue.
As well as two filed bugs ( SR-13343 and 13345
One option would be separately adding the Swift package to your app's frameworks. However this is not an ideal solution because it will duplicate the frameworks, including them both in your application and your dynamic framework.
Another option you can explore is writing a build script that moves the frameworks from AmplifyIssueTestProject/Frameworks/AmplifyTestProjectKit.framework/Frameworks to AmplifyIssueTestProject/Frameworks.

@atierian Thank you for your response.
I will try to develop a script which moves the frameworks. Not sure when I will have time to try it out though.
Until Apple prioritises to fix the bugs in SPM, I would consider this closed.
Thanks for your help.

Thanks for your response @OliverNielsen.
We tested with Xcode 13 RC as well; unfortunately the issue persists.
We'll monitor this and update your issue if we see a fix come through in the future.

I have the same issue.
Did anyone developed a script that could share please?
Thanks


Make generator higher heating value an input

Added

Generator input fuel_higher_heating_value_kwh_per_gal, which defaults to the existing constant KWH_PER_GAL_DIESEL

Approved, but do you think we should remove the const KWH_PER_GAL_DIESEL in REopt.jl to avoid confusion, or is that used elsewhere that warrants it still being a global constant?

I'm still using it for the default value


Underscore versioning

I am not including the usual check lists, because my issue isn't a bug, per se, but what I see as a flaw in the general design of the Linuxbrew package manager.
Many times I notice that there are underscore versions which don't actually reflect changes to the application, python3 3.6.4_2, for instance. These underscore versions present problems during upgrades. I already have python3 3.6.4 installed. brew outdated will list python3 (3.6.4) < 3.6.4_2, and brew upgrade will reinstall python3 3.6.4. I have a script which runs brew upgrade so that the applications which I have installed are up-to-date. The underscore versioning is creating a headache. There should be a way to segregate the "linuxbrew" versioning from the actual application versioning for upgrade purposes.
It may be that I have to go through and upgrade applications individually or in my script I may have to loop through and parse brew outdated so as to only upgrade to versions which represent actual application versions. I've noticed that this isn't a complete solution, however. I've noticed in the past that if I upgrade an application and a dependency of that application is also seen by brew to require an upgrade then that dependency is also upgraded. I distinctly remembering this occurring even if the dependency had been pinned.
Maybe I'm missing something. Maybe I don't understand the reasoning behind the underscore versioning, and how it's supposed to work. Maybe I'm being daft. Can someone please explain this to me, or can we work on some sort of solution?
Thanks and cheers

The version part after the underscore is called the revision in brew vocabulary. The revision is bumped when the formula is changed in a way that requires users to upgrade, such as rebuilding against new versions of dependencies, or possibly fixing a bug in packaging.
I'm closing this issue, but feel free to comment or ask more questions.

@sjackman
I'm confused. "The revision is bumped when the formula is changed in a way that requires users to upgrade" I've installed Python3 3.6.4, and it seems to work just fine. It seems that Python3 3.6.4_1 and Python3 3.6.4_2 only represent changes in the rb to the sha256 hashes for the bottles. Does this mean that the previous bottles were wrong and not working for people? Is there something wrong with my Python3 installation?...
$ brew info python3
python3: stable 3.6.4 (bottled), devel 3.7.0a3, HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/home/linuxbrew/.linuxbrew/Cellar/python3/3.6.4 (8,622 files, 182.4MB) *
  Built from source on 2017-12-22 at 06:35:26 with: --with-tcl-tk --with-sphinx-doc

If there isn't anything wrong with my Python3 installation, why should brew upgrade reinstall 3.6.4?
Thanks and cheers

For python 3, I made some changes lately for different reasons (due to changes with the x11 requirement). It may be that not all revision bumps are always needed, but I have no time to test this before bumping. Of course with infinite help from contributors, we would be testing this before. But as I am mostly updating the formulae alone, I sometimes take shortcuts. Please remember that we are an understaffed open source project, with contributors working on this during their free time.
So in 90% of the cases the revision bump is justified.
It also prevents some weird errors which we need to debug later if we had forgotten to bump the revision, which makes us loose even more time.

@iMichka
Thanks for your response.
@iMichka and @sjackman
Thanks for the tremendous effort that you guys put into Linuxbrew. I understand that things could be refined. I will deal with the imperfections from my end.
Cheers

It seems that Python3 3.6.4_1 and Python3 3.6.4_2 only represent changes in the rb to the sha256 hashes for the bottles.

The most common reason for bumping the revision when only the sha256 changed is to rebuild it the binary with new versions of its dependencies.


Problem in file edit

Hello,
I am trying to edit a file with "edit /flash/hh.py" in rshell, but an exception is thrown.  The traceback is
`Traceback` (most recent call last):
  File "/home/hhoegl/anaconda3/bin/rshell", line 11, in <module>
    load_entry_point('rshell==0.0.11', 'console_scripts', 'rshell')()
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/command_line.py", line 4, in main
    rshell.main.main()
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 2659, in main
    real_main()
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 2642, in real_main
    shell.cmdloop(cmd_line)
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 1552, in cmdloop
    cmd.Cmd.cmdloop(self)
  File "/home/hhoegl/anaconda3/lib/python3.6/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 1582, in onecmd
    self.onecmd_exec("".join(group))
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 1593, in onecmd_exec
    return cmd.Cmd.onecmd(self, line)
  File "/home/hhoegl/anaconda3/lib/python3.6/cmd.py", line 217, in onecmd
    return func(arg)
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 2038, in do_edit
    cp(filename, local_filename)
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 584, in cp
    filesize, xfer_func=recv_file_from_remote)
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 1336, in remote
    xfer_func(self, *args, **kwargs)
  File "/home/hhoegl/anaconda3/lib/python3.6/site-packages/rshell-0.0.11-py3.6.egg/rshell/main.py", line 987, in recv_file_from_remote
    dst_file.write(binascii.unhexlify(write_buf[0:read_size]))
binascii.Error: Non-hexadecimal digit found

I already tried some debugging and found that in main.py, line 986
dst_file.write(binascii.unhexlify(write_buf[0:read_size]))

write_buf contains the following data on the last iteration, which is the reason for the exception:
b'632829290a202020207072696e74282264657669636520455549203d222c206d616329\xf0ets Jun  8 2016 00:22:57\r\n\r\nrst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\r\nconfigsip: 0, SPIWP:0xee\r\nclk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\r\nmode:DIO, clock div:1\r\nload:0x3fff8028,len:8\r\nload:0x3fff8030,len:1728\r\nload:0x4009fa00,len:0\r\nload:0x4009fa00,len:14584\r\nentry 0x400a059c\r\nMicroPython v1756e28293a0a202020206d6163203d2062696e61736369692e6865786c696679286e6574776f726b2e4c6f526128292e6d61'
I am using a LoPy1.0r with up-to-date firmware. On the host computer I have Python 3.6.4 (Anaconda).
With kind regards,
Hubert

Solved!
A few minutes after posting I found out, that I have to set the buffer size to a larger value than the
default value 512, e.g.
rshell -p /dev/ttyUSB0 --buffer-size 2048
Now everything works well. Thanks for the nice rshell tool!

Normally, you need to decrease the buffer size to a value like 30. This is especially true for the devices which don't have native USB support. The pyboard supports USB natively, most of the others require the use of a USB-to-serial converter, which is often built into the board.

I tried it now with a buffer-size of 30, but execution of "edit" aborts again as I described it above. The problem has something to do with the file size. My file hh.py is 571 byte long. Smaller files with only a few Python source lines always can be edited without any problem for the default buffer size 512.  My LoPy [1] UART is driven by a FT234XD which sits on the LoPy expansion board V2 [2].
[1] https://pycom.io/product/lopy/
[2] https://pycom.io/product/expansion-board-2-0/