How to monitor node changes . For example, scaling out a node can generate datadog alerts. What are the best practices?

Description
When expanding a node, will the event corresponding to the provisioner be generated?

Check out https://github.com/kubernetes/kube-state-metrics


Class vs instance permissions incorrect

Steps to reproduce
class TestAbility
  include CanCan::Ability

  def initialize(owner)
    cannot :read, DummySubject
    can :read, DummySubject, id: 123
  end
end

@ability = TestAbility.new(user)
@dummy_subject = DummySubject.new(id: 123)

Expected behavior
@ability.can?(:read, DummySubject) # => false
@ability.can?(:read, @dummy_subject) # => true

The user should not be able to :read any object of the DummySubject class.
But, it should be able to :read a specific one.
Actual behavior
@ability.can?(:read, DummySubject) # => true
@ability.can?(:read, @dummy_subject) # => true

Adding any conditional rule automatically makes the whole class readable. That seems logically incorrect.
System configuration
Rails version:
6.0.0.rc1
Ruby version:
2.6.3p62
CanCanCan version
3.0.1

Hi @tomasc , thanks for opening the issue. The explanation on why this happens is here: https://github.com/CanCanCommunity/cancancan/wiki/Checking-Abilities#checking-with-class
The current behaviour is considered correct.

Hi @coorasse thanks for the explanation, that is helpful.


question: how to return client errors for pod deletion with fake client?

Hello,
I'm trying to write some unit tests using the fake package. I want to be able to return an error for unit testing, but it's unclear how to do so.
In my example, I want to be able to call fakeClient.CoreV1().Pods(pod.Namespace).Delete(context.Background(), pod.Name, metav1.DeleteOptions{}) and have Delete return an error. Is there a simple way to do this?
I have tried it already with the following snippet, but the reactor never get's triggered
fakeClient.CoreV1().(*fakecorev1.FakeCoreV1).AddReactor("delete"," pods",
	return true, nil, errors.New("fake-error")
})

Thank you for the help :)
Similar to https://github.com/kubernetes/client-go/issues/742, but only for the DELETE case

Also I have tried switch from AddReactor function to PrependReactor. But it doesn't make a difference

Closing, since a simple leading whitespace  in  pods caused the issue. Switching to pods fixed it


Adds support for watchOS and tvOS

Added new targets and schemes
Added correct Foundation class mapping for the two new OS
Bypasses memory warning logic for watchOS as it is not supported

Thanks for this! One question above, and then I think we can merge it.

I will rebase on 1.1 and upgrade to swift 3.1 during the week, can't deal with having Xcode mess my dependency management at the moment ;)

No rebase needed, I think! Just the one code question above.

I replied into your question above ;)

Ok through the swift 3.1 Xcode 8.3 update, it somehow botched the schemes so I had to re do them.
I've also checked all your changes and it seems to be working fine.
In theory it should be rebased on master, working with Xcode 8.3 and Swift 3.1 but I could use a second pair of eyes on this.

Thanks, @victorcotap! I’ll merge this once it’s passed CI. Alas, looks like we can’t run the tests on tvOS (because Nocilla doesn't support it) or watchOS (because it doesn’t support tests at all?!) — but I'm willing to live with that.
Thanks for seeing this through.

Hey @pcantrell , I'm going to try putting this in a tvOS app and will report back the status. We are shipping a tvOS MVP (emphasis on M) tomorrow and need to get a polling solution in place so I'll let you know what I find. If you want to talk in person at some point we could do that (i'm at corner coffee as I type this haha) since I live close by BustOut.

I'd love to hear about your project! I'm rarely actually in the Bust Out offices (mostly remote), but drop me a note and we can set up a meeting at Corner Coffee. My first name @ bustoutsolutions.com.

Hey @pcantrell , our MVP was a success! Here were the changes I had to make to siesta https://github.com/Dept24c/siesta/commit/10d437cb1e464749e71b95dec72b197e30c3dec6
I then referenced this git fork in my podspec and everything worked smoothly. The big thing was removing the call to UIApplication.shared.isNetworkActivityIndicatorVisible . I'm quite ignorant of what the right thing to do here was, however this worked to make our deliverable.

@xuaninbox Please see the checklist at the top of #28. This is essentially waiting for community members who are actually using Siesta with tvOS to report back on whether it’s working, and to send PRs. Please comment on that issue, let us know what is working and what is not, and if you had to tweak anything, please send a PR!

@pcantrell is WatchOS a platform already accepted as working correctly? I see there is a tvOS issue that you referenced but didn't see a similar one for WatchOS.
I've tried to use the framework with my project which will have a WatchOS extension, but I'm using cocoapods and the spec is missing a line such as:
s.watchos.deployment_target = "5.1"
Just curious if this was an oversight or if WatchOS support is in a similar place as tvOS.
Thanks!


Preferred Language doesn't work for Polishing function

Describe the bug
问题描述
Prompting is defaulting to Chinese and leading the result generation to also be in Chinese when some English texts are inputted to the Polish function, with English set as preferred language.
To Reproduce
如何复现
Select the following text and press Polish: what's wrong with this tool , can not access GPT, there is a API key error
Expected behavior
期望行为
Prompt sent to API should be in English (set preferred language) in order to response also be in English.
Screenshots
截图说明

Please complete the following information):
请补全以下内容

OS: Windows 10
Browser: Chrome 111.0.5563.149
Extension Version: 2.2.4

Additional context
其他
Add any other context about the problem here.

v2.2.6 should fix the problem. Waiting for the store review

by the way, gpt-3.5-turbo is recommended for better price and performance

Works fine now with v2.2.6! btw, indeed I was mistakenly using "GPT 3.5" as it was 3.5 Turbo. thanks for the heads up!


Matplotlib/graphviz integration

This PR adds a plot_gv() function in the hapclust_utils notebook, which enables plotting of a graphviz graph onto a matplotlib axes object. A demonstration is at the bottom of the hapclust_demo notebook.
(Also fixes the jupyter notebook menubar disappearing when scrolling.)

Hi @cclarkson, see hapclust_demo at the bottom for example of using plot_gv().

Ah, awesome, so you turned the png into an image array which can be plotted in matplotlib axes?
This looks great, can we merge it?

Cool, yes exactly, get graphviz to make a png then bring that in and plot
with imshow.
I'm actually just working on an initial implementation of labelling edges,
nearly done. Will push that up to the same PR then merge.
On Friday, March 10, 2017, Chris Clarkson<EMAIL_ADDRESS>wrote:

Ah, awesome, so you turned the png into an image array which can be
plotted in matplotlib axes?
This looks great, can we merge it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/malariagen/agam-vgsc-report/pull/30#issuecomment-285638449,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAq8QrI1061BWD_U-u_rahHrkhHafCL9ks5rkSrLgaJpZM4MYrcb
.

--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health http://cggh.org
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Email<EMAIL_ADDRESS>Web: http://purl.org/net/aliman
Twitter: https://twitter.com/alimanfoo
Tel: +44 (0)1865 287721

I've added nascent support for labelling edges with mutations, examples in updated hapclust_demo notebook. Will need tidying up and some refactoring but should be good enough to be going on with. I'll merge when CI checks pass.

OK, merged, let me know if you hit any snags.

 Something weird was happening with these svg files yesterday too, but I wiped everything and started again and thought I'd fixed it.
...
Auto-merging build/notebooks/hapclust_demo_files/hapclust_demo_38_0.svg
CONFLICT (content): Merge conflict in build/notebooks/hapclust_demo_files/hapclust_demo_38_0.svg
Auto-merging build/notebooks/hapclust_demo_files/hapclust_demo_37_0.svg
Auto-merging build/notebooks/hapclust_demo_files/hapclust_demo_36_0.svg
Auto-merging build/main.pdf
CONFLICT (content): Merge conflict in build/main.pdf
Failed to merge in the changes.
Patch failed at 0001 ?
The copy of the patch that failed is found in:
/home/chris/Git/agam-vgsc-report/.git/rebase-apply/patch

Hi @alimanfoo,
I've started again a couple of times now because I thought I'd cracked where I had gone wrong but I end up unable to rebase to the new latest master due to the .svg files in  build/notebooks/hapclust_demo_files due to conflicts.

Hi Chris,
You are trying to rebase your master branch on upstream/master, is that
right? Or are you trying to rebase a different branch?
If you have conflicts while rebasing your master on upstream/master, that
means you must have committed some changes directly to your master branch.
Best thing is to try and avoid doing that, keep your master clean and don't
ever commit any changes to it. Only ever do any work in a branch other than
master.
If you have conflicts while rebasing a working branch then you can work
through that, you just need to resolve the conflicts. We can work through
this together on Monday, but if you want to have a crack before, basically
you start the rebase with...
$ git fetch upstream
$ git checkout my-working-branch
$ git rebase upstream/master
...then if conflicts appear, for each conflicting file, do:
$ git checkout --theirs path/to/conficting/file.svg
This will resolve the conflict always in favour of the version of the file
coming from the other branch. Be careful as this will overwrite any changes
you have made in a file in your branch. For .svg files this should be fine,
but if you have a conflict in a .ipynb then God help you :-)
Once conflicts are resolved, then you should be able to do:
$ git rebase --continue
You may need to go round this step of resolving conflicts and continuing
the rebase several times.
Once the rebase is complete, you then need to do:
$ git push -f origin my-working-branch
...to force the rebase changes up to your remote branch. You need the -f
because the rebase re-writes your git history.
Lots of docs on the web on how to resolve conflicts during a rebase, being
about git they are all written in very transparent language and completely
easy to understand of course [1] :-)
Good luck!
Cheers,
Alistair
[1] https://git-man-page-generator.lokaltog.net/
On Friday, March 10, 2017, Chris Clarkson<EMAIL_ADDRESS>wrote:

Hi @alimanfoo https://github.com/alimanfoo,
I've started again a couple of times now because I thought I'd cracked
where I had gone wrong but I end up unable to rebase to the new latest
master due to the .svg files in build/notebooks/hapclust_demo_files due
to conflicts.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/malariagen/agam-vgsc-report/pull/30#issuecomment-285721134,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAq8Qvk8dYuHmBCLNeCX9foUCpwd0rAlks5rkX8igaJpZM4MYrcb
.

--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health http://cggh.org
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Email<EMAIL_ADDRESS>Web: http://purl.org/net/aliman
Twitter: https://twitter.com/alimanfoo
Tel: +44 (0)1865 287721

I'm guessing I must have accidentally changed my master, and this is why even when I delete everything and start again my git history breaks it again. Can I delete the repository cclarkson/agam-vgsc-report and re-fork?

Yes I think you can delete your fork and refork, probably somewhere in
settings online. But shouldn't be necessary, you should be able to rebase
and/or revert any changes you've made to your master.
On Fri, 10 Mar 2017 at 17:23, Chris Clarkson<EMAIL_ADDRESS>wrote:

I'm guessing I must have accidentally changed my master, and this is why
even when I delete everything and start again my git history breaks it
again. Can I delete the repository cclarkson/agam-vgsc-report and re-fork?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/malariagen/agam-vgsc-report/pull/30#issuecomment-285730386,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAq8QkkGyZm_QTRWjZatLqKNMgm0J6GJks5rkYcmgaJpZM4MYrcb
.

--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health http://cggh.org
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Email<EMAIL_ADDRESS>Web: http://purl.org/net/aliman
Twitter: https://twitter.com/alimanfoo
Tel: +44 (0)1865 287721


CT generation

Hi,
Thanks for the code! Is it possible to predict a CT volume instead of different views (DRRs) once the network is trained?
I want to give the trained network a single DRR and predict a volume cube. Is that possible with your model? If not, where should I make the modifications?
Thank you for your help in advance!
Dario

Hi! Did you manage to figure out if this is possible with the model? If yes, could you guide me on the same? If not, were there any other papers with code that could do this? Thanks!

@ro1406 With this model, not yet...let me know if you find a solution

@dsitnik-mango Sure. Is there another model you were able to find that generates 3D volumes from a 2D input? If  so I'd appreciate it if you could share the repo :)

I also have the same question. But could we do marching cudes with the well-trained generative model? FYI: build a voxel grids, query coordinates density value, and then form a 3D CT volume.


Better Scala support

1 some code for transforming some scala types into python  ones and back
import re
from .JVMInitializer import *

class ScalaJVMInitializer(JVMInitializer):
	def __init__(self, classes2import):
		super().__init__(classes2import)
		self.loadScala()

	def loadScala(self):
		self.loadClasses((
			"scala.concurrent.Await",
			"scala.collection.Seq",
			"scala.concurrent.duration",
			"scala.collection.JavaConverters"
		))

		scala = self.loadClass("scala")
		self.scalaPredef = getattr(getattr(scala, "Predef$"), "MODULE$")
		self.scalaCollSeq = getattr(getattr(scala.collection, "Seq$"), "MODULE$")

	def scalaSeq(self, it):
		return self.scalaCollSeq.apply(self.scalaPredef.wrapRefArray(list(it)))
		#return self.scalaPredef.wrapRefArray(list(it))
		#return scala.collection.JavaConverters.collectionAsScalaIterable(java.util.Arrays.asList(list(it))).toSeq()

	scalaTupleRx = re.compile("^_(\\d+)$")

	@classmethod
	def scalaDetuple(cls, t):
		res = [None] * t.productArity()
		for n in dir(t):
			m = cls.scalaTupleRx.match(n)
			if m is not None:
				res[int(m.group(1)) - 1] = getattr(t, n)()
		return tuple(res)

	@staticmethod
	def getSomeKindOfImmutableObjectTemplate(cls):
		c = max(cls.class_.getConstructors(), key=lambda ct: len(ct.getParameters()))
		return OrderedDict([(str(p.getName()), None) for p in c.getParameters()])

	@classmethod
	def scalaSomeKindOfImmutableObjectToDict(cls, o, template=None):
		if template:
			d = type(template)(template)
		else:
			d = cls.getSomeKindOfImmutableObjectTemplate(o.__class__)

		for p in d.keys():
			d[p] = getattr(o, p)()
		return d

	@classmethod
	def mergeScalaSomeKindOfImmutableObjects(cls, defaultOne, *args, subMerge=None):
		res = cls.getSomeKindOfImmutableObjectTemplate(defaultOne.__class__)
		if subMerge is None:
			subMerge = {}
		scheduledSubMerges = defaultdict(list)
		defaultOne = cls.scalaSomeKindOfImmutableObjectToDict(defaultOne, res)
		res = type(defaultOne)(defaultOne)

		for i, o in enumerate(args):
			if not isinstance(o, dict):
				o = cls.scalaSomeKindOfImmutableObjectToDict(o, res)
			for k, v in o.items():
				#print(i, k, v)
				if k in subMerge:
					scheduledSubMerges[k].append(v)
				else:
					if v != defaultOne[k]:
						res[k] = v
		#print(res)
		subMerged = type(res)()
		for k in scheduledSubMerges:
			subMerged[k] = subMerge[k](*scheduledSubMerges[k])
		#print(subMerged)
		res.update(subMerged)
		vals = list(res.values())
		#print(vals)
		return args[0].__class__(*vals)

2 we need better support for ctors. Some ctors are not ctors and the right way to construct a class is to call apply

Does 0.7 help with this, or is there addition support needed?

IDK how it can help. Has it introduced any scala-specific code? Because this problem is because of the way Scala uses JVM. I mean if one decompile a scala application into java code (only Krakatau has managed to decompile, everything else I had tried (jd and luyten) had failed), he really will see calls to apply.

Okay lets see if I can grant this wish.   Thus far you haven't provided enough information for me to go on.   To begin you didn't introduce the problem.  Something like...

Hi, I am trying to make use of Scala with jpype.  Scala is another language that with syntax similar to Java.  It uses the same JVM but has different syntax and method name mangling.  I have a list of differences that you should be aware of  (a list of terms and other info needed so we are speaking the same language.)   What additional  information would you require to support Scala as part of jpype?

This would help because it would direct me that you are not trying to access a Java library named Scala but rather something different.  That way I am not scratching my head with "Scala ctors" ... "apply",  what is he talking about?!
So lets assume that you started there....  I would say.  "Okay it sounds like you are looking for a module jpype.scala  that holds basic class types and does the name mangling.  But before we begin can you clarify a few things?

Are you going to put in sufficient contributions to make something like this happen?   Adding a module like that would require long term commitment on your part.  It would need to be testable using the test bench and documented.   And you would need to answer any questions that come up regarding that module.  Are you up for that?

Can you provide me some instructions on how to execute hello world using JPype with Scala currently?  Where do I get Scala, does it require a special path?   What is the required entry call to get it started? etc.

Do you have a Rosetta stone for the name mangling?  (The Rossetta stone being the famous tablet containing the same  decree in 3 languages, which is exactly what I need here.)  Something in the form of a 3 column translation.     [Scala says] -> [Java sees] -> [Python calls]

(Making this up as I don't know)

Scala
Java
Python

a==b
a.Type_cmp$(b)
def cmp(self, a)

Do you have a basic list of language defined types?  SString, SInt, SFloat, etc?

From here I would be able to say.  "Sounds like the first step would be to define the class start up routines.   Perhaps something like jpype.scala.SClass similar to jpype.JClass entry point?  We would have to define a class customizer with __jclass_init__ on the languages base Object type.  It would be there that you deal with all the name mangling.   And second we would need to use the customizer to define the class __init__ method which does the Scala constructor sequence."
Last, I would point out that since JPype currently only thinks in terms of Java there are likely a lot of missing support hooks.   For example, I just finished the docstring and annotation routine for Java.  But as I was not considering that that more than one language convention would be used I coded it as a fixed entry point using JPype setResources.   Those sort of issues would need to be identified and engineered around.  All doable, but I would need instructions where ever there is conflict, because I know about as much about Scala as I know about Prolog.  (No, actually I know more Prolog as I took a class on it in 1988.)
I should note that the testing is a big issue.  In order to improve safety and stability and get this package up to "production" level I have been steadily rearranging the guts of the JPype code.  Any piece that is not covered with a fairly extensive testbench is likely to get munched pretty quickly.

Are you going to put in sufficient contributions to make something like this happen? Adding a module like that would require long term commitment on your part. It would need to be testable using the test bench and documented. And you would need to answer any questions that come up regarding that module. Are you up for that?

Not quite. I have some code that may be useful (I have implemented a python module using classes from a scala app and that works pretty fine and an abstration layer for that module allowing to replace JPype with GraalPython without changing app-specific code). But long term commitment and especially unit tests ... no. I really have no time for that. At least for now. I may do some rare contributions, but constant involvement into this project is unlikely. I am not a java or scala programmer, I use JPype mainly for interacting apps (currently there is only one such app, Kaitai Struct compiler) written by third-party developers, not for interacting my code written in Java.

Can you provide me some instructions on how to execute hello world using JPype with Scala currently? Where do I get Scala

https://scala-lang.org/download/

does it require a special path?

If you start a scala application, scala libs should be available in classpath.

What is the required entry call to get it started? etc.

One just adds jar files in classpath and imports classes from them and uses methods from them. The difficulty is that scala constructiion of objects doesn't match java construction of objects. I have used the following algorithm:

decompile the target application written in Scala into eqivalent Java code using Krakatau (there is an issue here: Krakatau requires access to rt.jar and other standard library jars, but in Java 11 there is no such file).
find the places in the original Scala sources where this object is constructed
map these places to the decompiled sources (one constructing call is usually spread among different classes).
copy the pieces and refactor them, removing unneeded decompilation artifacts
rewrite the sources into python

Do you have a Rosetta stone for the name mangling? Something in the form of a 3 column translation. [Scala says] -> [Java sees] -> [Python calls]

No. All I have is the source of my python module and the sources I have posted into this bug tracker. IMHO in order to determine it right sources of Scala compiler should be examined, but it is written is Scala itself and Scala is a bit esotheric.

Do you have a basic list of language defined types? SString, SInt, SFloat, etc?

Not quite. I have some code (I have updated the code in the top message) and some insights.

in order to access Scala collections from python one needs to call JavaConverters.asJavaCollection
in order to access sequences the code from scalaSeq should be used
in order to access tuples use scalaDetuple
strings are a subclass of Java strings.
properties are getters and setters with the same name
default functions arguments are stored as methods with esotheric names. These methods are called to construct them.  The good news is that they are usually not complex, so it may ge possible to extract the raw values and use them as default args in functions signatures.
sometimes in order to construct an object you need to call apply rather than class name
sometimes in order to create an instance of a class you need to prepend its name with a dollar sign

Not quite. I have some code that may be useful (I have implemented a python module using classes from a scala app and that works pretty fine and an abstration layer for that module allowing to replace JPype with GraalPython without changing app-specific code). But long term commitment and especially unit tests ... no. I really have no time for that. At least for now. I may do some rare contributions, but constant involvement into this project is unlikely. I am not a java or scala programmer, I use JPype mainly for interacting apps (currently there is only one such app, Kaitai Struct compiler) written by third-party developers, not for interacting my code written in Java.

It would be relatively difficult for me to support this without a user willing to place a time commitment in.  To interact properly test the interactions with Java required about 400 unit tests and I am not sure that we have completely covered it.  In order to support something I am not a primary user on, I would need a test bench with similar levels of coverage.   Of course many of those tests are for basic interactions with the core but even if I assume that half the tests in jpype are core (which is a WAG) , that means on the order of 200 tests would still be needed.
Is there a community need for Scala interactions with Python?  If so are there not already alternatives?  If there is a need and no good alternatives, where would we find someone who is interested in building the required test bench?
I can certainly put in time to place low level hooks required for such an endeavor (that is sort of my niche), but I am unlikely to be able to drive it at the api level.  The only way that can determine needs for JPype are my own professional usage and the occasional Issues posting.  I am afraid without I user any attempt I make would just look half assed and not be usable.

Unfortunately I am going to close this thread due to lack of user support at present.  If you do have the time to write out a quickuse guide for Scala, write some test units, and can point me to the required technical documents we can pick this up later.


Fix #2582, Cast to unsigned int

Checklist (Please check before submitting)

[x] I reviewed the Contributing Guide.
[x] I signed and emailed the appropriate Contributor License Agreement to<EMAIL_ADDRESS>and copied<EMAIL_ADDRESS>
Describe the contribution
Fixes #2582

cfe_msg_sechdr_time.c promotes the byte (unsigned char) to a signed integer before the shift operation, which can cause overflow on a 32-bit machine.
Modified the code to cast the bytes to unsigned integers before performing the shift operations to avoid overflow issues.

Testing performed
Unit Testing
Expected behavior changes
Reduced risk of overflow-related bugs.
System(s) tested on
OS: Ubuntu 18.04
Contributor Info - All information REQUIRED for consideration of pull request
Tvisha Andharia - GSFC 582 intern

CCB 1 Aug 2024: Approved pending workflow runs and replacing "unsigned int" with "uint32".


[SR GeekCamp] Adding metrics and audit log for resource group to improve…

What type of PR is this：

[ ] bug
[x] feature
[x] enhancement
[ ] others

Which issues of this PR fixes ：
#4847
Problem Summary(Required) ：
Add two fields to the fe audit log:

ResourceGroup: The name of the resource group to use when executing sql
ErrorCode: The error code when the be service fails to run sql, see gensrc/thrift/StatusCode.thrift. Focus on MEM_LIMIT_EXCEEDED

Add fe resource group metrics:

starrocks_fe_query_resource_group: Count the number of queries for each resource group
starrocks_fe_query_resource_group_latency: Calculate the query latency percentile for each resource group
starrocks_fe_query_resource_group_err: Count the number of incorrect queries for each resource group

Add be resource group metrics:

starrocks_be_resource_group_cpu_limit_ratio: Instantaneous value of resource group cpu quota ratio
starrocks_be_resource_group_cpu_use_ratio: Instantaneous value of resource group cpu usage ratio
starrocks_be_resource_group_mem_limit_bytes: Instantaneous value of resource group memory quota
starrocks_be_resource_group_mem_allocated_bytes: Instantaneous value of resource group memory usage

[FE PR Coverage check]
:disappointed: fail : 27 / 165 (16.36%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/qe/Coordinator.java
0
1
00.00%

:large_blue_circle:
com/starrocks/qe/StmtExecutor.java
0
3
00.00%

:large_blue_circle:
com/starrocks/metric/ResourceGroupMetricMgr.java
9
134
06.72%

:large_blue_circle:
com/starrocks/qe/QueryDetail.java
1
4
25.00%

:large_blue_circle:
com/starrocks/qe/ConnectProcessor.java
2
5
40.00%

:large_blue_circle:
com/starrocks/qe/ConnectContext.java
4
7
57.14%

:large_blue_circle:
com/starrocks/plugin/AuditEvent.java
6
6
100.00%

:large_blue_circle:
com/starrocks/catalog/WorkGroupMgr.java
4
4
100.00%

:large_blue_circle:
com/starrocks/metric/MetricCalculator.java
1
1
100.00%

@only2yangcao fe/fe-core/src/main/java/com/starrocks/qe/ConnectContext.java is conflicting, rebase and solve the it

[FE PR Coverage check]
:heart_eyes: pass : 141 / 165 (85.45%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/qe/Coordinator.java
0
1
00.00%

:large_blue_circle:
com/starrocks/qe/StmtExecutor.java
0
3
00.00%

:large_blue_circle:
com/starrocks/qe/ConnectProcessor.java
2
5
40.00%

:large_blue_circle:
com/starrocks/qe/ConnectContext.java
5
7
71.43%

:large_blue_circle:
com/starrocks/metric/ResourceGroupMetricMgr.java
119
134
88.81%

:large_blue_circle:
com/starrocks/qe/QueryDetail.java
4
4
100.00%

:large_blue_circle:
com/starrocks/plugin/AuditEvent.java
6
6
100.00%

:large_blue_circle:
com/starrocks/catalog/WorkGroupMgr.java
4
4
100.00%

:large_blue_circle:
com/starrocks/metric/MetricCalculator.java
1
1
100.00%


Google_maps_flutter doesn't display map on IOS devices

I tried to run the example code inside google_maps_flutter package, but it doesn't display a map on IOS device and it work well on Android devices.
Here is my flutter doctor info:
flutter doctor -v
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.1 18B75, locale zh-Hans-CA)
    • Flutter version 1.2.1 at /Users/shijiesun/flutter
    • Framework revision 8661d8aecd (8 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3496156bd9
    • Dart version 2.2.1 (build 2.2.1-dev.2.0 None)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/shijiesun/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.6.1

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
ShijiedeMini:example shijiesun$ flutter doctor -v
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.1 18B75, locale zh-Hans-CA)
    • Flutter version 1.2.1 at /Users/shijiesun/flutter
    • Framework revision 8661d8aecd (8 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3496156bd9
    • Dart version 2.2.1 (build 2.2.1-dev.2.0 None)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/shijiesun/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.6.1

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 33.3.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] VS Code (version 1.33.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.25.0

[✓] Connected device (3 available)
    • ANE LX3                      • 6NUDU18514000435                         • android-arm64 • Android 8.0.0 (API 26)
    • Android SDK built for x86 64 • emulator-5554                            • android-x64   • Android 9 (API 28) (emulator)
    • Shijie的 iPhone               • 434c8276a3293017667e57053ed612c5d47358af • ios           • iOS 12.2

• No issues found!

Here is a screen shot.

So please help me.

My Bad. I found something wrong with my API KEY.


Versions show as unused when only used outside of a dependency context

For versions that aren't used in dependencies, and are instead only used directly in build.gradle.kts files, the linking to libs.versions.toml works fine but the version shows as being unused in the version catalog.
As an example, I have a composeKotlinCompiler version in my catalog, and I only end up using it directly in build.gradle.kts or convention plugins like so:
android {
    buildFeatures.compose = true
    composeOptions {
        kotlinCompilerExtensionVersion = libs.versions.composeKotlinCompiler.get()
    }
}

and seemingly because of that, this version shows as unused in the libs.versions.toml view.
Side-note: Thanks so much for the plugin, much appreciated!

That seems to work fine in my case.


Flaky odo logs test: should successfully show logs of the running component

/kind bug
/area testing
  Expected
      <string>: main: Wed Feb 22 12:34:48 UTC 2023 - this is infinite while loop
      main: Wed Feb 22 12:34:53 UTC 2023 - this is infinite while loop
      main: Wed Feb 22 12:34:58 UTC 2023 - this is infinite while loop
      main: Wed Feb 22 12:35:03 UTC 2023 - this is infinite while loop
      main: Wed Feb 22 12:35:08 UTC 2023 - this is infinite while loop
      main: Wed Feb 22 12:35:13 UTC 2023 - this is infinite while loop
      runtime: npm notice created a lockfile as package-lock.json. You should commit this file.
      runtime: npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/chokidar/node_modules/fsevents):
      runtime: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
      runtime: npm WARN<EMAIL_ADDRESS>No repository field.
      runtime: npm WARN<EMAIL_ADDRESS>No license field.
      runtime:
      runtime: added 32 packages from 28 contributors and audited 33 packages in 2.29s
      runtime:
      runtime: 3 packages are looking for funding
      runtime:   run `npm fund` for details
      runtime:
      runtime: found 0 vulnerabilities
      runtime:
      runtime:
      runtime: ><EMAIL_ADDRESS>start /projects
      runtime: > node server.js
      runtime:
      runtime: Server running on <IP_ADDRESS>:8080
      main[1]: Wed Feb 22 12:35:08 UTC 2023 - this is infinite while loop
      main[1]: Wed Feb 22 12:35:13 UTC 2023 - this is infinite while loop

  to contain substring
      <string>: main[2]:
  In [It] at: C:/Users/Administrator.ANSIBLE-TEST-VS/3293/tests/helper/helper_generic.go:79

...

Summarizing 1 Failure:
  [FAIL] odo logs command tests when component is created and odo logs is executed when running in both Dev and Deploy mode [It] should successfully show logs of the running component
  C:/Users/Administrator.ANSIBLE-TEST-VS/3293/tests/helper/helper_generic.go:79

Ran 414 of 771 Specs in 1067.107 seconds
FAIL! -- 413 Passed | 1 Failed | 0 Pending | 357 Skipped

Any logs, error output, etc?

https://s3.eu-de.cloud-object-storage.appdomain.cloud/odo-tests-openshift-logs/pr-6616-windows-tests-3293.txt

/kind flake


As a developer of an Agent that uses restricted signals or controls, I would like to use the batch interface of the ServiceIOGroup

Currently there is no support for the batch server that is documented in the service/README.md.

There is no C++ implementation for the server/client batch interface over shared memory with signals.
The design is sketched out in the README, but some details about how the POSIX siginfo signals will work are unclear.

Duplicate of
https://github.com/geopm/geopm/issues/1962


Fix issue 15309 again, without breaking the fix for regression 15550

Issue 15309 has fixed in #5263, but it had introduced a regression issue 15550.
By @MartinNowak, 15550 has been fixed in #5368, but it has also reopened 15309.
Fix 15309 again.

Auto-merge toggled on

Thanks!


Centralized custom Service/Characteristic repository

An idea, not sure how best it fits.
When I wrote the homebridge-yamaha platform, I created a custom AudioDeviceService and two custom Characteristics AudioVolume and Muting. Obviously these have application outside of only the Yamaha AVR integration. I thought it would be valuable to consider somehow collecting generally applicable custom Characteristics and making them available on a similar footing as the Apple-standard ones included in HAP-NodeJS. Also in this category are the Eve power usage characteristics, which are apparently being used in the FHEM Homebridge plugin and I want to add them to the Z-Way plugin as well. It seems sensible to attempt to apply DRY and find somewhere to define these reusable characteristics in one place.
By collecting and promoting the use of shared, commonly used Characteristics, we could possibly even set de facto standards that app developers could incorporate--or I suppose even Apple (even if they wouldn't adopt the UUIDs, the taxonomies of custom Services and Characteristics could provide inspiration--I'd settle for being "Sherlocked").
Unsure how best to implement this, especially since I'm not sure what HomeKitTypes.js is generated from. A separate GitHub project/repo for this might well make sense, but some hooks would be needed at Hap-NodeJS or Homebridge. It seemed like HAP-NodeJS might be the better place to connect, but whichever is fine with me.

+1 for this. @rodtoll check this out...

I like the idea.
A separate repo (eg hapnodejs-customtypes) is a little strange, as plugins using these custom services/characteristics need to depend on the existence of the mod. I think if plugins have the repo in their dependencies npm will install it in a location so deep and away that a
try { require('hapnodejs-customtypes') }

as a hook within hap-nodejs would always lead to nothing, even if it does not break with an exception.
Said that, I haven't tried.

What the...Eve recognizes my custom Audio Volume characteristic all of a sudden!

So I guess app devs are willing to add support for custom services and Characteristics!

@SphtKr That's awesome :)

I am really flabbergasted.
@SphtKr You made up the UUID and the name for that characteristic, right? How does EVE recognize it, even with an icon? Can you try with a misspelled "Audio Volume" to see whether Elgato (the maker of EVE) is reading here (and is using your UUID) or if the match of display name did the trick?
:astonished:

@snowdd1 I'll do one better. I went into the YamahaAVR plugin code and changed the custom characteristic's UUID by one digit. No icon (gets Eve's generic circle-in-square icon). Changed it back, speaker icon is back.
Now, I added that custom characteristic with that UUID back in September, so it's been there a while now. And it's just a percentage value, so very easy to implement. But the only possible conclusion is that Eve's developers have added support for that custom characteristic by its UUID since then.
Gentlemen, I think we have a mole. :open_mouth: Someone at Elgato must use the Yamaha plugin.

yes. we should do that. there are already two other issues and a gist where such data is collected:
https://github.com/KhaosT/HAP-NodeJS/issues/155
https://github.com/KhaosT/HAP-NodeJS/issues/140
https://gist.github.com/gomfunkel/b1a046d729757120907c
having everything in one place and easily includable would be great.
using the same uuid across different plugins would not only avoid that i have to change my volume characteristic to the one eve apparently recognizes :( but also makes it easier to switch it apple decides to include new standard characteristics.

I currently maintains a metadata for all built-in HomeKit services and characteristics that has special properties, sample. Maybe we can build like a platform to allow people to search and submit new services and characteristics so it can be easier for app developers to integrate?

just changed my old custom volume characteristic to the one eve apparently recognizes and it really just works. very nice :)
we should try to get them to include more of these...
color temperature for lights would be one canditate.

Of note, here's some more use cases: https://github.com/SphtKr/homebridge-itunes/blob/master/HomeKitMediaTypes.js . I'll be building out the taxonomy for media device controls more and would welcome feedback/suggestions.

Hello all -
I think this issue warrants reopening, as there's a ton of merit in setting up a way to share and use custom homekit types across apps.  The simplest approach to me is via separate node module with various type categories as individual methods that can be loaded as required.
I'll work something up as a proof of concept and share here for comment/participation.

Just stumbled upon this issue.  Any news on this?  I would like to support it.  I think HomeKit app developers would as well.
Here's the potentially re-usable custom characteristics I've come across:

Color Temperature: the Philips Hue bridge uses a custom characteristic type E887EF67-509A-552D-A138-3DA215050F46 for color temperature lights.  However, this type uses the value in Mired instead of in Kelvin.  Eve actually converts this to Kelvin.  Elgato support tell me that Nanoleaf uses A18E5901-CFA1-4D37-A10F-0071CEEEEEBD with value in Kelvin, which they will support from Eve v2.6.  See https://github.com/ebaauw/homebridge-hue/issues/35;
The Philips Hue bridge uses a custom characteristic type D8B76298-42E7-5FFD-B1D6-1782D9A1F936 which holds the uniqueid of a light.  The Hue app uses this when syncing rooms between the Hue bridge and HomeKit, see https://github.com/ebaauw/homebridge-hue/issues/55;
Sensors connected to the Hue bridge have an attribute lastupdated, which holds the date/time of the last change.  I use a custom type to expose this to HomeKit.
The light sensor in the Hue Motion sensors have configurable thresholds for dark and daylight, typically used in rules instead of the light level.  I plan to use custom types to expose these.
I plan to expose the CLIPGenericStatus sensors on the Hue bridge using a custom type for Status, just an integer number.  I currently use ProgrammableSwitchOutputState, but that doesn't seem to work for iOS 10.3, see KhaosT/HAP-NodeJS#134;
Similarly, I plan to expose the interval (in seconds) for polling the Hue bridge using a custom Heartrate characteristic instead of ProgrammableSwitchOutputState;
Volume and Mute: are now standard HomeKit types.  I'm using these for my homebridge plugin for Sonos.  I'm also using custom characteristics for Current Track, Treble, Bass, Loudness, Balance (not yet implemented).  I'm still trying to figure out the best way to do input selection - the homebridge-itunes types look promising.

Related to this:

How best to pick a UUID for a custom characteristic?
What about custom services?  I used these some years ago, but today most HomeKit apps seem to hide/ignore them, even when they contain standard characteristics.  Semantically it makes sense to model the Sonos services to the UPnP services, similarly to homekit-itunes.  Practically this is kinda useless, if no app is supports this.

Hi folks. FWIW, I had started to build this but just had to spend time on the projects. And, I never watched my own repo 🤦♂ , so didn't realize there are already five forks of it. Not sure if one of those have taken off and run with it. But you might use what I had as a model or as a lesson. Anyone want to own the repo I'll transfer it too, I've just not had the time to keep it up.

@SphtKr I looked at your work a few months back and found that the @homespun fork to be the most updated.

@NorthernMan54 - if not, please let me know.... thanks!

Has anyone figured out a way to do a custom type for Audio Input (CD, NET, etc)?


seaborn 0.12.x breaks plotting functionality

I'm still in the process of figuring out what changed, and subsequently, whether we can change our code to continue with the state-of-the-art seaborn API. In the interim, we should just pin the required seaborn version to <=0.11.2. This is the traceback:
Traceback (most recent call last):
  File "/n/hekstra_lab/people/brookner/miniconda3/envs/rs/bin/rs.ccsym", line 8, in <module>
    sys.exit(main())
  File "/n/hekstra_lab/people/brookner/miniconda3/envs/rs/lib/python3.9/site-packages/rsbooster/stats/ccsym.py", line 144, in main
    sns.lineplot(
  File "/n/hekstra_lab/people/brookner/miniconda3/envs/rs/lib/python3.9/site-packages/seaborn/relational.py", line 645, in lineplot
    p.plot(ax, kwargs)
  File "/n/hekstra_lab/people/brookner/miniconda3/envs/rs/lib/python3.9/site-packages/seaborn/relational.py", line 489, in plot
    func(
  File "/n/hekstra_lab/people/brookner/miniconda3/envs/rs/lib/python3.9/site-packages/matplotlib/__init__.py", line 1412, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/n/hekstra_lab/people/brookner/miniconda3/envs/rs/lib/python3.9/site-packages/matplotlib/axes/_axes.py", line 5245, in fill_between
    return self._fill_between_x_or_y(
  File "/n/hekstra_lab/people/brookner/miniconda3/envs/rs/lib/python3.9/site-packages/matplotlib/axes/_axes.py", line 5150, in _fill_between_x_or_y
    ind, dep1, dep2 = map(
  File "/n/hekstra_lab/people/brookner/miniconda3/envs/rs/lib/python3.9/site-packages/numpy/ma/core.py", line 2366, in masked_invalid
    condition = ~(np.isfinite(a))
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

I've only encountered this with rs.ccsym, but I bet this is the case for any rs-booster function that makes a seaborn plot.
Unrelatedly, we also get the following FutureWarning:
/n/hekstra_lab/people/brookner/miniconda3/envs/rs/lib/python3.9/site-packages/rsbooster/stats/ccsym.py:144: FutureWarning:

The `ci` parameter is deprecated. Use `errorbar='sd'` for the same effect.

which is easily fixable.

IMO, it feels increasingly nonfeasible for rs-booster to live without a test suite of some kind. This bug is an example of the kind of thing that'll probably happen all the time!

Thanks to the heroic efforts of Ian, I've identified the underlying issue as relating to how pandas custom dtypes behave when coerced into numpy. I'll provide more details here on Monday.

Here is the relevant issue in pandas:
https://github.com/pandas-dev/pandas/issues/48891
so this is a known issue, but unclear that it will be fixed anytime soon. If it's a long-term thing, seaborn should probably work around it... in the mean time, we should just pin the seaborn version and call it a day.

This issue has now been worked around, and the associated PR #37 has been closed.


Edit Patterns Not Available under VS2015 UP1

Installed the package and it runs and works on VS2015 UP1. The documentation on page VSColorOutput section Creating Patterns states

The Tools|Options|VSColorOutput|Patterns dialog contains settings. You can add, delete or edit the patterns.

And the description shows a dialog box to edit it.
Yet there is no Patterns sub dialog selection tab to VSColorOutput,(only General) nor does there appear to be a way to bring up the edit dialog.

Try clicking the the RegEx Patterns. You'll see a ... button. Click it.

Uggg my bad, yep it shows up. Hence not a bug, but now a suggestion to update the docs or make the ... button visible at all times. Thanks!

Is there a way to do that in a property sheet?


PatchingaaS

KB article describing how to use blueprint to update Windows 2012 VM and
APIs to gather data.

Technical note from CSA Team:  I don't see any steps on how to execute this function via a standard execute package script (GUI or API) against multiple instances using the group function.  single threaded execution in the GUI particularly won't show well to clients.  if this cannot be executed in mass via GUI or API's that already exist from the public script library it won't scale.
see:
https://www.centurylinkcloud.com/knowledge-base/servers/using-group-tasks-to-install-software-and-run-scripts-on-groups/
https://www.centurylinkcloud.com/api-docs/v2/#server-actions-execute-package

We just decided to make it available as a package script and not a blueprint. I am revising the document. As for the group task, we hope to be able to use that functionality in the future, but we are waiting on Compute for that. I'll edit and submit another pull request later.


Phase vocoder

I'd like to be able to:

Change the pitch of a sample without speeding it up or slowing it down. It seems the tool for this is a phase vocoder, which involves taking a short window fft, shifting the frequencies and then inverse fft. From the existing filters it's not clear to me how to do this. For my use case, I don't mind preprocessing an audio resource(doesn't have to be realtime) to get the desired pitch change.
Compress or extend a sample without changing the frequency.

There's at least one Rust library that can do this: https://github.com/ajyoon/rocoder, though it claims it may not be quite correct.
Mostly, I'm hoping to open a discussion about how frequency domain filters could be best implemented in Kira.

This is a common feature request and I don't have the DSP know-how to implement it. I don't think the existing effects will help you here, and this should be built in to the sound implementations anyway. So if you learn how to do it, let me know!

This is a common feature request and I don't have the DSP know-how to implement it. I don't think the existing effects will help you here, and this should be built in to the sound implementations anyway. So if you learn how to do it, let me know!

I don't think it should be too difficult if I can get something like the following:
pub trait TransformAudio {   fn apply_transform( left: &Vec<f32>, right: &Vec<f32> ) -> ( Vec<f32>, Vec<32> ); }
Then, the user can implement whatever transformations they need for their effect and return ( left, right ) to be processed by the next transformer.
I believe streaming transforms should be able to apply the same function on subsamples.

The first step to writing these kinds of algorithms is to provide a way to buffer the input. Algorithms like the Phase Vocoder require a buffer with a fixed size, consistent between calls, and usually work best with a power of 2 because of the FFT algorithms they use (although these days the FFT is performant in many more cases than just lengths of powers of 2). The way it works is with a circular buffer that fills up with audio samples, and then calls the buffered processing method every time the circular buffer has done a full rotation of its contents.
The buffered processing algorithm then does not have to care about this buffering process.
If I may shoehorn my own library, here's an example (which uses two slices instead of a circular buffer, but the process is the same): https://github.com/SolarLiner/valib/blob/febaa5bab58d103fa31b4a06cdb63ec3a330815d/src/dsp/mod.rs#L186

@SolarLiner , that sounds correct and it looks like you have a lot more experience with writing this kind of transformation. Do you think you could submit a PR or describe within the framework of Kira's existing code what you would expect for that kind of plugin architecture?
I picture two use cases.

My current use case, which is taking samples from instruments and changing the pitch or stretching/compressing without changing the pitch. These would ideally be preprocessed and kept as assets in memory.
Applying a transform to a stream, for example to change the pitch of someone's voice or apply a filter to a track(many audio sources summed together).

If you want to pre-process a sound then your best bet is to use another tool (either graphical or CLI) for that, because the pitch shifting algorithms there are most probably more robust and reliable, not to mention that some of the best implementations are paid, so using a paid tool will probably give you the best results (look up Elastique by zplane for the library, used in tools like FL Studio, Ableton, Traktor, etc.). For open-source alternative, check out Rubberband. It's always going to be better to do this processing ahead of time, where the best quality parameters can be used for the best output. I personally don't see any advantage to doing it at runtime and in memory, rather than having the files already processed, ready to be loaded.
Your next best bet is to write an integration to Rubberband as a Kira effect -- you won't be able to time stretch the files, but you will be able to pitch-shift. Rubberband will probably expect a buffer of audio samples as input, which means you would also need to provide an adapter that does the bufferizing that I explained above. You can even make the buffering code generic, so that it becomes a normal Kira effect that wrap buffered effects.
If you want to stay with pure Rust solutions, then I don't know of any high-quality time-stretching/pitch-shifting crates.
Note that using StaticSoundData as the input and output types for the transform isn't ideal, as they are just holding the file contents, and have not yet been decoded into audio data. A better solution would be to have a function that takes in a Vec<f32> and returns another one, as it's more generic. I don't think StaticSoundData has a way to be created with raw audio data, though, which is a bummer.

Note that using StaticSoundData as the input and output types for the transform isn't ideal, as they are just holding the file contents, and have not yet been decoded into audio data. A better solution would be to have a function that takes in a Vec and returns another one, as it's more generic. I don't think StaticSoundData has a way to be created with raw audio data, though, which is a bummer.

Do you mean StreamingSoundData? StaticSoundData is raw audio and can be constructed manually.

Oh I didn't see that the data fields were public (I need to change my handling in bevy-kira-components 😆 )

If you want to pre-process a sound then your best bet is to use another tool (either graphical or CLI) for that, because the pitch shifting algorithms there are most probably more robust and reliable, not to mention that some of the best implementations are paid, so using a paid tool will probably give you the best results (look up Elastique by zplane for the library, used in tools like FL Studio, Ableton, Traktor, etc.). For open-source alternative, check out Rubberband. It's always going to be better to do this processing ahead of time, where the best quality parameters can be used for the best output. I personally don't see any advantage to doing it at runtime and in memory, rather than having the files already processed, ready to be loaded.

Yeah, so in my case, I'm essentially wanting to build something like a midi instrument in Rust that can play sounds from samples, stretching them or changing the pitch. I would know what notes will be played in a just-in-time manner, but pre-rendering all the samples would be a bit of a i * j * k combinatorial problem. I as may also want to apply additional effects. (For example, an app like sforzando ).

Your next best bet is to write an integration to Rubberband as a Kira effect -- you won't be able to time stretch the files, but you will be able to pitch-shift. Rubberband will probably expect a buffer of audio samples as input, which means you would also need to provide an adapter that does the bufferizing that I explained above. You can even make the buffering code generic, so that it becomes a normal Kira effect that wrap buffered effects.
If you want to stay with pure Rust solutions, then I don't know of any high-quality time-stretching/pitch-shifting crates.

I'm not set on a pure-Rust solution. Rubberband looks like an appropriate tool. Can we discuss what changes would be needed to Kira and what an implementation might look like to integrate Rubberband to do pitch changes and time stretching?
I'd like to break ground on this, I just need a bit of direction on where to start.
@tesselode @SolarLiner

Kira is a game audio engine, not a general-purpose one, and as such you'll run into obstacles. Again, @tesselode is the arbiter here, but I don't think it would make sense to add those features in for this reason.
That being said, sample players (like SFZ players mentioned above) don't to time-stretching when pitch-shifting, they simply change the playback rate, which is already what's implemented in Kira. The reason it doesn't sound bad with SFZ instruments is that they're multi-sampled: you have different files depending on pitch, velocity, and/or other parameters (one of my piano SFZ libraries has 3 velocity per note, all 88 notes, with sustain pedal on and off, and from two mics. That is 3 * 88 * 2 * 2 = 1056 wav files, for a grand total of 12 GB of audio files :)
All that is to say, with sampling, the combinatorial problem is very much real.
For additional effects like delay, chorus or reverb, those are already possible (and some already available) in Kira.
If you really want to choose Kira for this anyway, your first step is going to implement a multi-sample player that can select the right sample to play based on parameters of your choosing (most often used being pitch), and do relative playback rate changes based on the root note of the selected sample, to make it match the key being played.

@SolarLiner I see, that makes a lot of sense(just changing the playback rate) and sounds like it'll do what I need. I had noticed the SFZ files were multi-sampled. So it would make sense to preprocess the frequency shifts to generate higher/lower frequency samples using another tool and then use Kira to get the specific pitch shifts and add effects. I'll give that a try! I hopefully shouldn't need a full 12Gb of sample data.
I am using Kira in a game through bevy_kira_audio, but the game has a midi-like component to it. I guess even as a game oriented library FFT based transformations would be a cool feature to have. So it might be worth continuing the discussion on how to add a plugin interface to Kira that would support transformations from a circular buffer.
As is, your explanation on SFZ should allow me to do what I'm trying to accomplish for now.


Feature Request -- Display service uptime as part of a list-units output

We really enjoy using fleetctl to perform cluster related operations, but during debugging sessions we've seen a need to know how long a service has been running in case services are bouncing, it would be nice to see the uptime listed in addition to the service/unit name, Machine, Active/State and Sub
Would this be a possible feature add or is there an alternate way to easily get the same info for service/units running across an entire cluster?

This information is not exactly easy to surface given the current model of fleet. I'm more than happy to consider it, but we will likely need to change how state is managed to present this information with any sort of accuracy.


start using wreckit

Now I wonder if we should use destruct of inversion_clear in the wreckit tactic, hmmm.

I changed wreckit to rather use destruct instead of inversion_clear.
I guess it should at least be faster.


Added the logo

Added a new logo on the top right corner closes #20.

Hi! @sweta-singh28 you have sent a pull request without creating an issue and being assigned!

I was assigned this issue check issue no. 20.

@sweta-singh28 that time you didn't mentioned the issue number! That's why i didn't get it!

Sir, now what to do? You have assigned the same task to issue number #49 which was created much later.


Python: use separate output for tkinter

Motivation for this change
See issue #19255 and #1819.

Unify expressions of different interpreters
Reduce closure size of Python 3.x interpreters

Things done

[x] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] OS X
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Sigh... putting curses in a separate output won't help because python and libpython directly link against it.

@FRidh that's fine I think. It's not ideal, but this way Python will be way less painful on Nix.

this adds a bonus, since pypy is not shipping tkinter but there is a pypi package for it based on cffi
(so nix could simply match that behaviour now)

@domenkozar as I wrote to @copumpkin in https://github.com/NixOS/nixpkgs/issues/19225#issuecomment-252701145 I think this is a good balance between closure size and usability.

Nice. Very quick testing says this is very promising.
Fixes https://github.com/NixOS/nixpkgs/issues/492 and https://github.com/NixOS/nixpkgs/issues/7134
$ /nix/store/b69qg3a33p8pdlhwr4klwgq081wgdq26-python2.7-virtualenv-15.0.3/bin/virtualenv  fooooo
New python executable in /home/ielectric/dev/nixpkgs/fooooo/bin/python2.7
Also creating executable in /home/ielectric/dev/nixpkgs/fooooo/bin/python
Installing setuptools, pip, wheel...done.

$ cd fooooo/

$ bin/python
Python 2.7.12 (default, Jun 25 2016, 21:49:32)
[GCC 5.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3
<module 'sqlite3' from '/nix/store/3vg24ijz3bc3fjsgpr8zarrsnfadg0f0-python-2.7.12/lib/python2.7/sqlite3/__init__.pyc'>

This breaks the scripts in scribus again (see #19292).

This breaks the scripts in scribus again (see #19292).

Correct, as long as we split Python we will break some things, but with tkinter its only very few packages that are affected. The fix will be pythonEnv = python.withPackages(ps:[ps.python.tkinter]).

@FRidh 👍! I'm wondering if we can alias python.tkinter to pythonPackages.tkinter so people don't have to know that it's bundled with python (and we have the option to move things around more).

yes, we can simply add an alias. However, tkinter won't work exactly the same as Python packages. E.g., all Python packages have python as propagatedBuildInput, but tkinter doesn't. A simple fix would be to use mkPythonDerivation and then copy the contents of python.tkinter. But then python.tkinter and pythonPackages.tkinter would be slightly different.

@FRidh ah, not really sure there. My main issue is that many people probably don't know that tkinter is meant to be bundled with python, and my general approach when I find a failing dependency is to just look for it in pythonPackages. One possibility might be just to put this in pythonPackages:
{
  tkinter = error "tkinter isn't quite like other python derivations, so you should refer to it by python.tkinter instead of pythonPackages.tkinter";
}

That said, it would be nicest if it could look and feel like a conventional derivation.

@copumpkin I added a proper Python package in python-packages.nix, see 331cd94b77f2551c01c634e8c20a880c62d56e97.

So all those remaining sqlite3 mentions should also get removed? This blocks staging evaluation ATM.

@vcunat yes they should. I thought I got them all.

ahh yes, it wasn't just pythonPackages.modules.sqlite3 but also pythonPackages.sqlite3. I forgot those.

I'm sure I've asked this before but how can one test whether the whole of Nixpkgs evaluates?

There are also python27Full and curses, maybe more.

@FRidh: for quick eval I regularly use
nix-env -f . -qaP --meta --json --drv-path --show-trace >/dev/null

But one can do nix-build pkgs/top-level/release.nix -A tarball -Q to be proper (all Hydra platforms etc.).

Thanks @vcunat . That should be it.

No, there were quite a few more: 6eeea6e.

hmm, it seemed to evaluate. But thank you for fixing the (hopefully) last ones.

Thank you @FRidh for doing this <3

Argh, a complication: the darwin stdenv bootstrap depends on python (because LLVM's build process uses it) and this change massively slowed down our bootstrap process, since it now needs to build a ton of TK stuff 😦
Can we make the TK stuff optional so I can ask for a TK-free python during bootstrap? Then only the final "userspace" one would get TK.

Also, it actually seems to have broken the python build, which prevents bootstrap 😢

@copumpkin: I think that should be solved by using pythonSmall for bootstrapping, as that one is without X, tcl and tk.

I am actually thinking of getting rid of the tkinter output again, and just
build without tkinter by default, and then build once with tkinter and copy
the tkinter module in another derivation. Then we can get rid of
pythonSmall.
On Oct 16, 2016 10:00 AM, "Vladimír Čunát"<EMAIL_ADDRESS>wrote:

@copumpkin https://github.com/copumpkin: I think that should be solved
by using pythonSmall for bootstrapping, as that one is without X, tcl and
tk.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NixOS/nixpkgs/pull/19309#issuecomment-254033224, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACB872EUsaiKFngXWl_w_-ylPl14we98ks5q0dmJgaJpZM4KQTvy
.

@vcunat @copumpkin see https://github.com/NixOS/nixpkgs/pull/19594 , I think it's a better solution than what I merged earlier.

Dammit, I was just reaching for pythonSmall during bootstrap 😄 I don't really have a strong opinion on how Python actually works but I'll take a look at the other PR and opine if I have something useful to say.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/python3x-vs-python3xfull-package-name-change-in-2016-vs-standardized-semantic-adopt-to-standard-python-semantic/10896/1

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/python3x-vs-python3xfull-package-name-change-in-2016-vs-standardized-semantic-adopt-to-standard-python-semantic/10896/1

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/help-setting-up-nix-shell-with-python-and-vulkan/14512/2


Player is already set up

Hi,
I have single page application, how is correct flow to change video-url without refresh?
If i setup again player, received error: Player is already set up

You can simply use the player.load(source) API call on a set up player to switch to another source. Please feel free to reach out to<EMAIL_ADDRESS>for questions.


removing squid:s2925

Removing sonar squid:s2925 violation, using org.awaitability
See also: Sonar Squid:s2925, thread.sleep should not be used in tests

LGTM. @marcosnils Please review this as well.

@HeartSaVioR any nnews about the review from @marcosnils? Can someone else reviews if he is not yet available? Thanks

@sazzad16 Could you please review this as well?

@HeartSaVioR I purposely avoided this as I have not enough idea :(

@sazzad16 thank you for the review.
There are about 15 Thread.sleep(). Only 3 of them are addressed in this PR and I am concerned about all of those.
Actually there are much more squid in which I am interested than the s2925. But it is a significant amount of effort to fix. Here are a mention of a various types of squids that I found in the code

squid:S3066
squid:S2153
squid:s2293
squid:s1192
squid:s00107

And many more. I was quite surprise by the important amount of these types of violations in the code, which led me to think that it was maybe not of a big interest. Fixing a few of these and creating a pull request seemed a good way to see if there was any interest in fixing the squid violations on the project. So now I can see there is some interest in it and I can proceed further.
Regarding your remarks on the 3 squid:s2925 that I suggested, I took your remarks into account and changed the approach. In my new approach I am replacing strictly the Thread.sleep statements, nothing less, nothing more, and I use
await().atLeast(duration, ...).until(timeIsElapsed(timeToElapse...)
Please take a look at the newly pushed code. If it is OK, just write back and I will push the 12 other squid:s2925 fixes before the PR can be approved. After that I can proceed one squid type at a time and create a PR for each of them until it is all processed.
I also refactored the waiting code into an Util class

@alainlompo
Please don't address squad issues unless you understand how the relevant code works. For example, we have been receiving PRs regarding squad fix, and already denied the patch about "empty list instead of null" because Redis guide clearly says the client must return null instead of empty list due to classify twos.

@sazzad16 Thanks for the detailed review. Your review comments are great I missed these things somehow.

@HeartSaVioR , thank you for this information. Such cases should be normally occuring only in a few cases, right? It should be great if a comment could be added for such pieces of code so as to explain why the squid could not be fixed, maybe even an annotation, something like:
@IgnoreSquid("squid:s1168", "Using empty list instead of null is not possible for this method because Redis guide clearly says the client must return null instead of empty list due to classify twos.")
public T targetMethod(....)

That way this information which is important can be part of our code base documentation and would be also easily visibile to anyone who tries an attempt to fix such issue.
I also think that the case of using Thread.sleep in test code does not fall into the above situation, unless you say otherwise. It would be great if I could get a new feedback from you or @sazzad16 about the update on that fix, so I can fix the 12 other cases (when the feedback is a GO)

@alainlompo
First, to answer your question:

Such cases should be normally occuring only in a few cases, right?

No. It's very much normal for Jedis. So, even comments or annotations are not feasible options. Because, then, we'd have to add those on almost all methods!
Second, your PR is looks much better now and I truly appreciate your effort. But I'm concerned about your understanding at some places. E.g. to work in AllKindOfValuesCommandsTest.touch() someone should at least know about Redis TOUCH and OBJECT IDLETIME commands. Because it would be vital to get the significance of 2000ms with > 0 checking.
So, as @HeartSaVioR already said:

Please don't address squad issues unless you understand how the relevant code works.

Personally I'm also not supportive to squad because it is not integrated to Jedis codebase. We don't use squad but we need to leave annotation for squad: what a counterintuitive!
If we really want to introduce something like checkstyle to make our code much safer, it should be integrated to build process, and then we could have exceptions on rules.

@HeartSaVioR @sazzad16 thanks for your review and great comments. I guess the squids fixing is here a very sensitive thing and require deeper knowledge of the project. Maybe can you let me know more about your current improvement roadmap.

going back to this PR, is it really necessary?. I even see that even awaitility uses Thread.sleep in their tests. (https://github.com/awaitility/awaitility/blob/70a97670ac54ddcf686db5b9d8fe337a52742d01/awaitility/src/test/java/org/awaitility/WaitForAtomicBooleanTest.java). Does make sense what we're trying to "fix" here?
AFAIK nobody had errors with Jedis tests.

@marcosnils, thank you, for your illustration, they are testing awaitility, they have to use something else to be able to do that. Awaitility is precisely used as a convenient replacement to these Thread.sleep. If they would then use it that's a contradictory behaviour worth stopping their project.
Quoting from sonarcloud.io

Using Thread.sleep in a test is just generally a bad idea. It creates brittle tests that can fail unpredictably depending on environment ("Passes on my machine!") or load. Don't rely on timing (use mocks) or use libraries such as Awaitility for asynchroneous testing.

But I agree that if there is not need to fix these squids, the pull request should be closed.

Closing this for now.


Metrics in the UI, visualized with graphs

This would be the bow on the ribbon, tying the v0.9 release together. Adding graphs to the UI visualization - nailing down the provided extra value and observability that is provided out of the box.
Who's with me?

I'm on it!

This was fixed in #24


When entering Sign flow, an account is refreshing constantly in a loop

Problem
When entering sign flow, an account is refreshing constantly in a loop.
Expected Behavior
The account should refresh only once and display proper results.
Steps to reproduce

Enter this URL:
https://wallet.near.org/sign?transactions=EgAAAG1hcmNpbm9vMTEudGVzdG5ldAD%2BDlj%2FhSnKIDPWe4qhDT0KaXa7CnEZ%2FE8VrdP34EXkaBFP56LJLwAAIAAAAGRldi0xNjI2ODUzNjQzMTUwLTkzMDA4OTQ3NDA3OTA571ZFPz2ju60bF2fFiIW0S9FnvER4j1SvxAq%2FcoofX7cBAAAAAgoAAABhZGRNZXNzYWdlDgAAAHsidGV4dCI6Im1heCJ9AOBX60gbAAAAAADIpRmQuaVvpQAAAAAA&callbackUrl=https%3A%2F%2F1234-teal-kangaroo-dk12p5qp.ws-eu10.gitpod.io%2F%3FtransactionHashes%3DDrDAY3xc52aN8ENxgh9crFSKQ3bHZdwf4xV9DAVA1DRZ

https://user-images.githubusercontent.com/36210360/127236351-6c866b45-0be2-42eb-88bf-7c5b1093daa8.mov

Fixed


Mull keep temporarily files

During mutation process Mull generates temporarily files (for example /tmp/mull-ac220c.exe below):
[info] Applying mutations (threads: 1)
       [################################] 7/7. Finished in 1ms
[info] Compiling original code (threads: 3)
       [################################] 3/3. Finished in 21ms
[info] Link mutated program (threads: 1)
[info] Compiled executable: /tmp/mull-ac220c.exe
       [################################] 1/1. Finished in 78ms
[info] Warm up run (threads: 1)
       [################################] 1/1. Finished in 2ms

These files still exists when Mull finished his work:
sergeyb@pony:~/sources/mull_testing$ stat /tmp/mull-ac220c.exe
  File: /tmp/mull-ac220c.exe
  Size: 19392           Blocks: 40         IO Block: 4096   regular file
Device: 10305h/66309d   Inode: 406196      Links: 1
Access: (0711/-rwx--x--x)  Uid: ( 1001/ sergeyb)   Gid: ( 1001/ sergeyb)
Access: 2021-03-22 15:03:21.062949080 +0300
Modify: 2021-03-22 15:03:21.058949077 +0300
Change: 2021-03-22 15:03:21.058949077 +0300
 Birth: -

Many thanks!

I still see temporary files after running command mull-cxx -keep-executable -mutate-only -output=luajit.mutated -compilation-flags="-isystem /usr/include/linux/" -linker=clang -linker-flags="libluajit.a luajit.o -lm -ldl" luajit;
$ stat /tmp/mull-e5b7cc.o
  File: /tmp/mull-e5b7cc.o
  Size: 8125608         Blocks: 15872      IO Block: 4096   regular file
Device: 10305h/66309d   Inode: 417573      Links: 1
Access: (0600/-rw-------)  Uid: ( 1001/ sergeyb)   Gid: ( 1001/ sergeyb)
Access: 2021-04-24 23:02:47.564858153 +0300
Modify: 2021-04-24 23:02:22.388253958 +0300
Change: 2021-04-24 23:02:22.388253958 +0300
 Birth: -
$ mull-cxx --version
Mull: LLVM-based mutation testing
https://github.com/mull-project/mull
Version: 0.10.0-pr855
Commit: 84b5d8b
Date: 23 Apr 2021
LLVM: 11.0.0
sergeyb@pony:~/sources/LuaJIT-2.1.0-beta3/src$


CSS standardization with UI/UX guidelines

Have consistent naming convention for scss variables and button class using BEM standard.
This commit also fixes button, padding and footer issues.
Description
This PR includes the following proposed change(s):

{List all the changes, if possible add the jira ticket #}

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Refactoring / Documentation
[ ] Version change

How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Development Dependency Working Agreement

[x] My code DOES NOT include the importing of new dependencies into the DPIA ecosystem
[ ] My code DOES include the importing of new dependencies into the DPIA ecosystem
If new dependencies are being introduced to the DPIA ecosystem:
[ ] The functionality of the dependency drastically reduces code complexity and makes my changes more easily maintainable and readible
[ ] The dependency being introduced does not contain multiple layers of nested dependencies introducing maintainability complexity to the DPIA ecosystem

Frontend Development Changes

[ ] N/A
[x] I have performed a self-review of my own code
[ ] I have made corresponding changes to project documentation or diagrams that reflect my changes
[ ] New and existing unit tests pass locally with my changes
[ ] My code follows Airbnb React Style Guidelines

API Development Changes

[x] N/A
[ ] I have performed a self-review of my own code
[ ] My code follows standards and practices outlined in the BC Government API Development Guidelines
[ ] New and existing unit tests pass locally with my changes
[ ] My changes includes Swagger documentation updates that reflect the changes I am introducing

Definition of Done

I know this is super nit-picky but if we're following BEM naming—as referred to in the wiki—then naming should follow this naming template:
block-name__elem-name--mod-name--mod-val

I am also getting this behaviour on the PPQ Landing Page:

I've put the DO NOT MERGE tag on this PR.
Please make sure there's a ticket in our JIRA backlog associated with this work, and if there is, make sure that the title of this PR reflects that via the name.

I am also getting this behaviour on the PPQ Landing Page:

This isn't the case for me. I don't see any blank white space at the bottom.


server: Add /api/thread/set-archive

CI fails seem unrelated, I triggered a new run.

CI fails seem unrelated, I triggered a new run.


How to auto start on boot?

How do I make the script to auto start each time the server reboots?

In fact, this matter is not related to this project, it is a common sense knowledge in Linux server configuration
So I recommend you to search for it on search engines
Since I use Heroku's continuous integration service, I'm afraid I can't help you in this area


Where are the default chat templates stored

I'm trying to write my own chat template for mixtral8 but I cannot find the jinja file.  I read somewhere they are stored with the tokenizer, but even that i can't find the exact one for mixtral8.  I am totally sure i'm just missing something.

@jmoney chat templates are most commonly stored in the tokenizer_config.json. Here is the entry for mixtral https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1/blob/1e637f2d7cb0a9d6fb1922f305cb784995190a83/tokenizer_config.json#L42

And thus why I couldn't find it. That is an obvious place to put them, and just didn't think where to look. Thanks much


How to disable aslr for the newest images?

Hi, thanks your guys for providing these great tools.
Recently, when I use asafw to deal with the newest image (e.g. asav9101.qcow2), trying to disable aslr is unsuccessful. The root cause is there is no echo 0 > /proc/sys/kernel/randomize_va_space inside the fileasa/scripts/rcS.common.
# tune the VM system
if sf_asa_is_ngfw; then
    echo 0 > /proc/sys/vm/overcommit_memory
else
    MemTotal=`awk '/^MemTotal:/ {print \$2}' /proc/meminfo`
    let MemThreshold=1024*1024
    #disable overcommit only for system with more than 1G memory
    if [ $MemTotal  -le $MemThreshold ]; then
         echo 0 > /proc/sys/vm/overcommit_memory
    else
         echo 2 > /proc/sys/vm/overcommit_memory
    fi
    echo 100 > /proc/sys/vm/overcommit_ratio
 fi
ulimit -s 1024

So I modify the disable_aslr() inside the file unpack_repack_bin.sh as follows:
sed -i 's/ulimit -s 1024/echo 0 > \/proc\/sys\/kernel\/randomize_va_space\nulimit -s 1024/' asa/scripts/rcS.common

The command works well and the file is changed as I want. But when I emulate the device with the repacked image inside GSN3, it seems the aslr is still on.
I notice there are some comments inside the disable_aslr() as follows. Does it mean the command echo 0 > /proc/sys/kernel/randomize_va_space added manually is also overriden?
log "DISABLE ASLR"
# we can't just add the following line
#echo "kernel.randomize_va_space = 0" >> etc/sysctl.conf.procps
# because it looks like rcS.common overrides our value later in the boot process
# so we just make the modification in rcS.common :)

By the way, I search randomize_va_space using grep inside rootfs and get no results except for asa/bin/lina.
Is there any other way to disable aslr? Debugging with aslr is annoying.
Any advice would be appreciated! Thanks in advance.

Thanks for your comment on ASAV 9.10.1 (https://software.cisco.com/download/home/286119613/type/280775065/release/9.10.1). Unfortunately I don't have this .qcow2 so can't replicate.
I would have done it the way you did it by adding a line in rcS.common. The comment indicates that we did not do it in etc/sysctl.conf.procps as it was too early in the boot step so instead we did it in rcS.common. It may be too early still on ASAV 9.10.1.
It may be that on the newest images the randomization is done differently because of a new Linux version?
Some ideas you can try:

grep for "aslr" in or "random" more generally on the rootfs in case anything comes up.
try to add this line to another file later in the boot process
use `asafw/info.sh to get the Linux kernel and check online if there is any change on the way to disable ASLR
enable the debug shell (or serial shell) with unpack_repack_qcow2.sh and analyze the Linux environment from the debug shell (or serial shell)

@saidelike Thanks for your suggestions. I'll have a try.

@saidelike Thanks for your advice.

I am wondering in what ASA version the randomize_va_space file became read-only. One way to check if it is related to the Linux version would be to spawn other ASA versions from 9.9.x up until 9.10.1 and document when it changed.

There are only two asav9.9.x.qcow2 images available from the cisco official website, aka asav991.qcow2 and asav992.qcow2. I have tested on the image asav992.qcow2, and the current strategy (disabling ASLR) works well on that version.

I am wondering if there is any output in dmesg when you try to write to the randomize_va_space that would show the reason.

I have checked the output in dmesg. There is nothing related to this.

Since you realised randomize_va_space is read-only from the debug shell, I am wondering if Cisco added a rule to forbid write access to this file from lina

I have searched the strings randomize_va_space in the rootfs. There are only two matched results. One is lina, another is librte_eal.so.5.1. It seems they just read the file /proc/sys/kernel/randomize_va_space and pasre its contents.

I would double-check the randomize_va_space file is also read only from a serial shell

I also check the permission of file /proc/sys/kernel/randomize_va_space from serial shell. It's read-only too.

More generally i would investigate if there is any sign for additional mitigation in place like SE Linux

According to the scripts asa/scripts/waagent, I run the cmd which getenforce manually and get nothing. So it seems the SELinux is not available on the system.
    def isSelinuxSystem(self):
        """
        Checks and sets self.selinux = True if SELinux is available on system.
        """
        if self.selinux == None:
            if Run("which getenforce",chk_err=False):
                self.selinux = False
            else:
                self.selinux = True
        return self.selinux

Now I am wondering if it's related to the kernel. I'll try to figure it out.
By the way, I have tested this with the newest image asav9-12-1.qcow2.  It's the same with asav9101.qcow2.
Thanks again!

Finally, I found a way to tackle this problem. In short, I use the kernel parameter norandmaps. It works well on the latest images such as asav9101.qcow2, asav9-12-1.qcow2.

refer: https://www.kernel.org/doc/html/v4.19/admin-guide/kernel-parameters.html
norandmaps
Don't use address space randomization.  Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space

I'll create a pull request later.


Error database "my_db" does not exist on  connecting DB via Environment Variable.

Using Windows by executing the following command to set the environment variable and perform the migrations, it fails by returning that the DB could not be found.
  "scripts": {
      ....
    "migrate": "SET DATABASE_URL=postgres://USER:PASS@IP:5433/my_db && node-pg-migrate -m migration"
  },

This occurs only when it is used in this way via the ENVIRONMENT VARIABLE (DATABASE_URL).
C:\Users\Maicon\Documents\Sistemas\MedicSolution\WEBSERVICE>npm run migrate up

><EMAIL_ADDRESS>migrate C:\Users\Maicon\Documents\Sistemas\MedicSolution\WEBSERVICE
> SET DATABASE_URL=postgres://USER:PASS@IP:5433/my_db && node-pg-migrate -m migration "up"

could not connect to postgres { error: database "my_db" does not exist
    at Connection.parseE (C:\Users\Maicon\Documents\Sistemas\MedicSolution\WEBSERVICE\node_modules\pg\lib\connection.js:554:11)
    at Connection.parseMessage (C:\Users\Maicon\Documents\Sistemas\MedicSolution\WEBSERVICE\node_modules\pg\lib\connection.js:379:19)
    at Socket.<anonymous> (C:\Users\Maicon\Documents\Sistemas\MedicSolution\WEBSERVICE\node_modules\pg\lib\connection.js:119:22)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:287:12)
    at readableAddChunk (_stream_readable.js:268:11)
    at Socket.Readable.push (_stream_readable.js:223:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:122:17)
  name: 'error',
  length: 102,
  severity: 'FATAL',
  code: '3D000',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'postinit.c',
  line: '846',
  routine: 'InitPostgres' }
error: database "my_db" does not exist
    at Connection.parseE (C:\Users\Maicon\Documents\Sistemas\MedicSolution\WEBSERVICE\node_modules\pg\lib\connection.js:554:11)
    at Connection.parseMessage (C:\Users\Maicon\Documents\Sistemas\MedicSolution\WEBSERVICE\node_modules\pg\lib\connection.js:379:19)
    at Socket.<anonymous> (C:\Users\Maicon\Documents\Sistemas\MedicSolution\WEBSERVICE\node_modules\pg\lib\connection.js:119:22)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:287:12)
    at readableAddChunk (_stream_readable.js:268:11)
    at Socket.Readable.push (_stream_readable.js:223:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:122:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>migrate: `SET DATABASE_URL=postgres://USER:PASS@IP:5433/my_db  && node-pg-migrate -m migration "up"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>migrate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      C:\Users\Maicon\AppData\Roaming\npm-cache\_logs\2018-12-05T11_44_22_123Z-debug.log

Try use https://www.npmjs.com/package/cross-env

But from the stack it seems it uses DATABASE_URL var correctly, but DB does not exist

@dolezel Thanks for the quick response. But as I said the error only happens when using DATABASE_URL if I use the same database settings via config/default.json it connects and finds the database normally.

Are you really sure they are same? It does not matter from where it gets the url string, it does no transformation.
You can try to debug value of DB_CONNECTION at https://github.com/salsita/node-pg-migrate/blob/master/bin/node-pg-migrate#L311

@dolezel I changed the following script to this one and it ran normally via ENVIROMENT VARIABLE:
 "scripts": {
      ....
    "migrate": "SET DATABASE_URL=postgres://USER:PASS@IP:5433/my_db && node-pg-migrate -m migration"
  },

TO
 "scripts": {
      ....
    "migrate": "cross-env DATABASE_URL=postgres://USER:PASS@IP:5433/my_db node-pg-migrate"
  },

Apparently it would be a bug in Windows that can not find DBNAME via environment variable

Would be cool if this (cross-env usage) is document in the README.md

I considered cross-env to be commonly know, but can add a line to docs...