ciao-cli: Implement subcommands

ciao-cli instance [add list delete restart stop]
ciao-cli workload [list]
ciao-cli tenant [list]
ciao-cli event [list delete]
Signed-off-by: Alberto Murillo<EMAIL_ADDRESS>

Opening pull request for early review as this is not finished yet.

TODO:

Implement the help command
Add short description for items and commands
Parse global variables like -username, -password, etc

Coverage decreased (-0.02%) to 57.298% when pulling 3e4f7ee1c1b879c8778e141b581697b910524b10 on albertomurillo:topic/subcommand into c218f4ba1525951ff85ba19590605f3497ea405e on 01org:master.

Coverage decreased (-0.02%) to 57.147% when pulling 4c36c0ac434e53ceaa660a7257e75701232dac7b on albertomurillo:topic/subcommand into 5a3f50e58acc95fd86bb40b7d05b35489ce0bc49 on 01org:master.

@albertomurillo Besides one or two nitpicks, it looks really good to me. You will have to fix the golint errors as well.
Here are the options that your code currently does not support:
        listQuotas       = flag.Bool("list-quotas", false, "List quotas status for a tenant")
	listResources    = flag.Bool("list-resources", false, "List consumed resources for a tenant for the past 15mn")
	listComputeNodes = flag.Bool("list-cns", false, "List all compute nodes")
	listCNCIs        = flag.Bool("list-cncis", false, "List all CNCIs")
	listLength       = flag.Int("list-length", 0, "Maximum number of items in the reponse")
	listLabels       = flag.Bool("list-labels", false, "List all trace labels")
	dumpCNCI         = flag.Bool("dump-cnci", false, "Dump a CNCI details")
	dumpToken        = flag.Bool("dump-token", false, "Dump keystone tokens")
	clusterStatus    = flag.Bool("cluster-status", false, "List all compute nodes")
	cnci             = flag.String("cnci", "", "CNCI UUID")
	dumpLabel        = flag.String("dump-label", "", "Dump all trace data for a given label")

Coverage decreased (-0.007%) to 60.679% when pulling 2309f5a8b52a1f29ddb604d05544a020c50d262d on albertomurillo:topic/subcommand into 9d7fd6677256bd8859edcd4432c4d662b7b0548b on 01org:master.

Coverage decreased (-0.007%) to 60.841% when pulling 853f6f42f9acdc088711691521fca9917b7e46f5 on albertomurillo:topic/subcommand into e0799e53f9b6a594e633e0f073f9b6d20e590e25 on 01org:master.

Besides the Command interface method names, the code looks good to me now.
There's one missing change: README.md. It should reflect the new command line handling.

Coverage decreased (-0.007%) to 60.841% when pulling dd414d57fd938278bab20faf038d38b87fc0ffba on albertomurillo:topic/subcommand into e0799e53f9b6a594e633e0f073f9b6d20e590e25 on 01org:master.

Coverage decreased (-0.007%) to 60.841% when pulling dd414d57fd938278bab20faf038d38b87fc0ffba on albertomurillo:topic/subcommand into e0799e53f9b6a594e633e0f073f9b6d20e590e25 on 01org:master.

Coverage remained the same at 60.848% when pulling 90da83e2cfe1372766aaa6b0816dcd8ae1d69e29 on albertomurillo:topic/subcommand into e0799e53f9b6a594e633e0f073f9b6d20e590e25 on 01org:master.

It all looks good to me now, thanks.
@tpepper or @markdryan: it's ready to be merged.

There's nice description of why this patch is being done and the choice to not include backwards compatibility in https://github.com/01org/ciao/issues/167.  This information should be included in the commit message.

Coverage decreased (-0.05%) to 60.799% when pulling 0d8412391d530104ec491aee82e30a87bf567155 on albertomurillo:topic/subcommand into e0799e53f9b6a594e633e0f073f9b6d20e590e25 on 01org:master.


Go HTTP-only, part 1

Motivation:
Providing a protocol-agnostic API is a noble goal, but in practice it's
hard to balance between API user experience and generalization. I'd like
to make our server-side API go HTTP-only so that we can improve the
overall user experience.
Modifications:

Add the notion of path parameters (a.k.a path variables) to
ServiceRequestContext

Make PathMapping.apply() return a PathMappingResult
Make PathMapping.apply() require a query string so that PathMapping
can match a query string or replace a query string for internal
redirection
Replace the notion of 'mapped path' with 'path without prefix'
Rename PathParamExtractor into DefaultPathMapping
Allow a user specify the path pattern with path parameters when
binding a service with serviceAt()
Support path parameters for RegexPathMapping

Make sure that the request/response type of a service is always
HttpRequest and HttpResponse by changing the type signature of service
binding methods from Service<?, ?> to Service<? super HttpRequest, ? extends HttpResponse>

Add LoggingService.newDecorator() because method reference does not
work anymore because of the type parameter change

Split RequestContext.path() into path() and query()
Make RequestContext.fragment() nullable to distinguish between
non-existent fragment and empty fragment
Change the type of RequestContext.method() to HttpMethod
Miscellaneous:

Add LoggingClient.newDecorator() for consistency
Make sure RequestContext.path() is always raw (undecoded)
Extract path and query validation and sanitization logic into
ArmeriaHttpUtil

Result:

A user can use path parameters without using DynamicHttpService.
ServerBuilder expects a user specifies a Service<HttpRequest, HttpResponse>
explicitly. This means more type safety in general.

To-dos:

Add the path overlap detection back again
Merge DynamicHttpService into the core construction logic
Overall package reorganization; there's no point of having 'http in
a package name once we go HTTP-only.

Please skip reviewing the classes related with DynamicHttpService until I add them back. Meanwhile, please focus on the public API changes.

I eventually want to integrate DynamicHttpService into the core:
ServerBuilder sb = ...;
sb.service(new MyAnnotatedService());
...

public class MyAnnotatedService {
    @Get
    @Path("/users/:userId")
    public CompletableFuture<UserInfo> getUserInfo(@PathParam("userId") String userId) { ... }
}

LGTM 👍  I will review again after your next work.

Thanks, @hyangtack. Any other comments, people?

I found the current DynamicHttpService doesn't accept @Path("/no-path-variable") annotation because of the below link. I think this should be accepted in your new implementation. :)
https://github.com/line/armeria/blob/master/core/src/main/java/com/linecorp/armeria/server/http/dynamic/DynamicHttpFunctionEntry.java#L83
https://github.com/line/armeria/blob/master/core/src/main/java/com/linecorp/armeria/common/http/PathParamExtractor.java#L155

I found the current DynamicHttpService doesn't accept @Path("/no-path-variable") annotation because of the below links. I think this should be accepted in your new implementation. :)

Yeah, that's the plan.

I realized losing mappedPath seems to remove the ability to do internal redirects with armeria. One example is this mapping that routes all urls to index.html for handling by a SPA
https://github.com/curioswitch/curiostack/blob/master/common/server/framework/src/main/java/org/curioswitch/common/server/framework/staticsite/StaticSiteService.java#L46
And another I was thinking of is repointing /legacy/rest/method to new.grpc.Service/Method for migrating APIs.
Perhaps it makes sense to allow mappings to continue to return a mapped path like current with the addition of the params map?

I realized losing mappedPath seems to remove the ability to do internal redirects with armeria.

Shouldn't this be done with a 302 Found redirect response? Otherwise the index.html will be served from any location, causing an unexpected behavior. For example, a user can request /foo/bar/baz/qux.html, qux.html may refer to a script path ./qux.js and ./qux.js will be mapped to /index.html again.

And another I was thinking of is repointing /legacy/rest/method to new.grpc.Service/Method for migrating APIs.

This indeed sounds like a good reason to use internal redirects. I'm not sure if it is a good idea to implement an internal redirect with PathMapping, though. Would it be better providing internal redirects as a core functionality?

That's why the static path does need to be specially mapped as well as it is in that service - this is normal for SPAs I think. Routing for SPAs happens within index.html - so all URLs for the service need to be handled by the same file - the URLs are correct so they can't be changed via the http redirect (which would cause the JS routing to not work since it would always see the same url, /), it should be an internal redirect.
There could be other implementations for this specific use case (single file static service), but internal redirects are common in server frameworks (nginx and apache call it url rewriting) so losing it seems like a regression.

Having internal redirects as a separate feature would be ok too - I hope services could still be able to set them up agnostic to what prefix they are bound at, probably through a serviceAdded callback.
I agree it feels a little weird doing it in PathMapping, but after trying it, it was actually quite elegant how the redirects fit well into the path hierarchy, which is built on PathMapping.

That makes sense. What I don't like about using mappedPath as a way to do an internal redirection is that mappedPath is meant for stripping the context path of a service from a request path, not for an internal redirection. How about just making PathMapping return a new struct that contains both path parameters and the path so that PathMapping can replace a request path completely?

Yep, that's exactly the implementation I was thinking :)

@anuraaga

Added PathMappingResult and let PathMapping replace path and query completely for internal redirection.
Added RequestContext.query()
RequestContext.path() does not include a query string anymore.
Added RequestLog.query()

I also changed the type of RequestContext.method() from String to HttpMethod. It was always meant to be session-layer method name just in case it wasn't clear.

RequestContext.path() and RequestContext.query() both now return a raw and undecoded string for consistency (and to give a user more control)

@imasahiro Ready for a review.
@kojilin You may be interested as well.

Thanks, @trustin! 😄

Thanks!


queryMap or queryStruct should accept more value type than string

func (s *SuperAgent) queryStruct(content interface{}) *SuperAgent {
	if marshalContent, err := json.Marshal(content); err != nil {
		s.Errors = append(s.Errors, err)
	} else {
		var val map[string]interface{}
		if err := json.Unmarshal(marshalContent, &val); err != nil {
			s.Errors = append(s.Errors, err)
		} else {
			for k, v := range val {
				k = strings.ToLower(k)
				s.QueryData.Add(k, v.(string))
			}
		}
	}
	return s
}

v.(string) always assume v is a string ,which is not always true in practice, I'd like to add some more basic types such as int,float64, etc, even struct with encoded json string
If you guys ok with this feature, I can cook up a pr.

My project's also affected: It's a bit strange to work with cursor numbers as strings.
Since there's the json.Marshal & json.Unmarshal any number types are converted to float64.
There aren't that many types that can jump out of it. A type switch with proper conversions would be enough.

I pretty much understand why the author didn't add these quick fixes for this function. It is too hard to find a suitable parameters to convert. See its easy to do a type switch and follow the standard json convert like this:
func (s *SuperAgent) queryStruct(content interface{}) *SuperAgent {
	if marshalContent, err := json.Marshal(content); err != nil {
		s.Errors = append(s.Errors, err)
	} else {
		var val map[string]interface{}
		if err := json.Unmarshal(marshalContent, &val); err != nil {
			s.Errors = append(s.Errors, err)
		} else {
			for k, v := range val {
				k = strings.ToLower(k)
				var queryVal string
				switch t := v.(type) {
				case string:
					queryVal = t
				case float64:
					queryVal = strconv.FormatFloat(t, 'f', 6, 64) //what if someone wants 10 precision
				case time.Time:
					queryVal = t.Format(time.RFC3339) //what if the time.Kitchen is preferred
				default:
					j, err := json.Marshal(v)
					if err != nil {
						continue
					}
					queryVal = string(j)
				}
				s.QueryData.Add(k, queryVal)
			}
		}
	}
	return s
}

Yes, thank you for writing the solution, that was what I had in mind, too. Would you please create the PR?
For numbers I would use strconv.FormatFloat(t, 'f', -1, 64) which conveniently converts to "needed" precision. See last paragraph here. This proves even expected integers (event though in float data type) will be integers. If someone needs a specific precision, well, they'll have to round in the struct first. Logical, though.
For time, always use standards. Unless presenting to a human. RFC3339 would be the way to go.
That said, you won't have that problem. Only BSON distinguishes dates, JSON treats them as normal strings. And the go library (Unmarshal) also doesn't know it's a date. So it will be already converted to a string on the first line of the method.
The boolean type is not explicitly mentioned, but it works with the default.

PR is done #128, waiting for review, test case also updated

This should be closed as a related PR was merged.

closed


Error while trying run npm test

I am trying the following steps on ubuntu 14.04 14.04, Trusty Tahr to build and test appmetrics from source
//To build and install
git clone https://github.com/RuntimeTools/appmetrics
cd appmetrics && npm install node-gyp<EMAIL_ADDRESS>&& node_modules/.bin/node-gyp configure rebuild && cd .. && npm install ./appmetrics
//To run the tests
cd appmetrics && npm test
Is the correct way to run the tests?
I am getting this error
root@hj-ibmibm1492:~/PriyaS/appmetrics# npm test

<EMAIL_ADDRESS>test /root/PriyaS/appmetrics
node tests/test_runner.js

[Thu Apr  7 13:11:43 2016] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 1.0.8-dev.0.201604071309 (Agent Core <IP_ADDRESS>511030958)
[Thu Apr  7 13:11:43 2016] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883
Running API tests:
GC tests running ...
GC tests passed succesfully.
GC tests running ...
GC tests passed succesfully.
GC tests running ...
GC tests passed succesfully.
GC tests running ...
GC tests passed succesfully.
Memory tests running ...
Memory tests passed succesfully.
Node environment tests running ...
assert.js:86
throw new assert.AssertionError({
^
AssertionError: Appmetrics version format not recognised1.0.8-dev.0.201604071309, expected <IP_ADDRESS>456789012
at Object.runNodeEnvTests (/root/PriyaS/appmetrics/tests/general_tests.js:281:5)
at API. (/root/PriyaS/appmetrics/tests/api_tests.js:57:12)
at API.emit (events.js:104:17)
at API.formatOSEnv (/root/PriyaS/node_modules/appmetrics/appmetrics-api.js:87:41)
at API.raiseEvent (/root/PriyaS/node_modules/appmetrics/appmetrics-api.js:36:17)
at events (/root/PriyaS/node_modules/appmetrics/appmetrics-api.js:180:9)
npm ERR! Test failed.  See above for more details.
If I try to comment line root/PriyaS/appmetrics/tests/general_tests.js:281, tests proceed but crash after a while:
Event loop tests running ...
Event loop tests passed succesfully.
*** Error in `node': free(): invalid pointer: 0x00007ff3f6eb7280 ***
Aborted (core dumped)
npm ERR! Test failed.  See above for more details.
Other details of the environment:
gcc version: gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
node version: v0.12.4
I have tried the same in docker container and both on  x86_64 and pp64le, but have run into same issues.
Any inputs here would be of great help. Thanks!
Priya

Hi @seth-priya, thanks for reporting this, it is a bug on the current development version of appmetrics.
We will fix it before we release 1.0.8 (I think I have a fix).
In the mean time, the latest release of appmetrics is on the latest-release branch, so if you don't need any of the new changes you could try using latest-release.

Thanks @tunniclm Validate that this is now resolved on Power 8 LE as well!


PANIC: Started http server on http+unix:///tmp/prisma-4853a1cebce032c1dde71620.sock

Hi Prisma Team! My Prisma Client just crashed.  Can you please provide a minimal reproduction for the above crash? Unfortunately the automatically collected information in the issue does not give us much to go with here - we will need a bit more information. What were you doing? Can you share the code and schema that was active?

Ping @mohammadhmn

Ping @mohammadhmn


FunkinParentDisabler: Fix camera not updating its size

In my previous pull request I proposed a way to prevent the camera from continuing to update but it also brought another bug preventing the camera from updating its size when changing the window size
Now in this pull request I have another simple change that should fix it (I hope this doesn't give us another bug lol)
Before:

After:

oh i stg I was about to start fixing it aswell literally in 1h LOL

Imma start including this in the newer update tyy :D

ty!!


Implement fast numeric printing routines.

Implement ryu algorithm for printing floating point.
Implement a fast integer printing routine.
Remove pretty printing to simplify the JSON implementation.

For saving 7000 trees, runtime drops from 3.262300729751587 to 1.2325658798217773 .
For loading the new model using both implementation it's about 10% faster.  But the comparison isn't fair as the new output model is significantly smaller due the shorter floating point representation.
Extracted from #5046 .

Codecov Report

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

@@            Coverage Diff             @@
##           master    #5772      +/-   ##
==========================================
- Coverage   82.61%   82.59%   -0.02%
==========================================
  Files          12       12
  Lines        2726     2724       -2
==========================================
- Hits         2252     2250       -2
  Misses        474      474

Impacted Files
Coverage Δ

python-package/xgboost/__init__.py
88.88% <0.00%> (-1.12%)
:arrow_down:

Continue to review full report at Codecov.

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

assuming that you are using the same set of tests that the original C implementation is using.

I enlarged the tests set actually.

Found some issues during brute force test.  Will continue the PR.

I brute force tested all floating numbers for roundtrip.  It should be ready to get JSON out of experimental stage.

The sooner we can upstream this to dmlc-core the better.

For the numeric parsing part, yes.  It will be much more useful in there since we also want roundtrip on floating point parameters.


Added a hook to pre-process Swagger model before generating the marku…

…p. This approach heavily relies on the mutability of the Swagger class.
Provides a solution for #26

Hi,
could you please elaborate your idea and show me an example how to use your changes?

Here is how to sort definitions alphabetically in Java 7:
Swagger2MarkupConverter.from(file.getAbsolutePath())
.preProcessSwagger(new Consumer() {
@Override
public void accept(Swagger swagger) {
swagger.setDefinitions(new TreeMap<>(swagger.getDefinitions()));
}
})
.build()
.intoFolder(outputDirectory.getAbsolutePath());
In Java 8, one could write more concise code:
Swagger2MarkupConverter.from(file.getAbsolutePath())
.preProcessSwagger(swagger -> swagger.setDefinitions(new TreeMap<>(swagger.getDefinitions())))
.build()
.intoFolder(outputDirectory.getAbsolutePath());
Since most if not all properties of the Swagger object are mutable, it’s really easy to change any property of it in the preProcessSwagger() call. To give you another example, I generate Swagger docs off of a development integration host, but I really want the production host name in the resulting PDF. Can be easily done by setting it on the swagger object in the preProcessSwagger method.
~dz

On Aug 21, 2015, at 1:52 AM, Robert Winkler<EMAIL_ADDRESS>wrote:
Hi,
could you please elaborate your idea and show me an example how to use your changes?
—
Reply to this email directly or view it on GitHub https://github.com/Swagger2Markup/swagger2markup/pull/27#issuecomment-133336714.

Very nice. Thx.


[camera] Add web support

Adds web support to the camera plugin.

Added camera_web dependency in pubspec.yaml.
Added web support to the camera example app, following the instructions of the web package.
Updated camera README.md with the web instructions.

TODO

[ ] Specify camera_web version in pubspec.yaml when released.
[ ] Update camera version in pubspec.yaml.
[ ] Update CHANGELOG.md to add description of the change.

Part of https://github.com/flutter/flutter/issues/45297.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the relevant style guides and ran the auto-formatter. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
[x] I signed the CLA.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I listed at least one issue that this PR fixes in the description above.
[ ] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[ ] I updated CHANGELOG.md to add a description of the change.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
[x] All existing and new tests are passing.

@ditman @felangel

I'm going to use this to publish a demo version of the camera_web

Published here!
https://dit-vgv-camera-test.web.app
There's something weird going on with the orientation of the preview in my machine. It seems to be preferring a portrait camera rather than landscape in my laptop. Also in my phone the external camera is flipped, when it probably shouldn't? Not sure, but it's a start!! :D

There's something weird going on with the orientation of the preview in my machine. It seems to be preferring a portrait camera rather than landscape in my laptop

Same issue.  Works great but I can't figure out how to force it to landscape on web.

OK, so I've deployed the latest changes to https://dit-vgv-camera-test.web.app, and now there's only one thing that bugs me slightly: the preview does not really give users a clue of what's the orientation of the camera when the photo is taken. This is especially true in mobile phones (where the preview is landscape, but the photo taken is normally in portrait mode).
However, I think this is an issue with the example app itself, rather than the plugin itself. For now, I don't think this is a release blocker, so we probably should publish the first version of the camera plugin asap, and get it in the hands of the people :) (well, more people, at least!)

@ditman Hm, not sure but it seems that the published version did not include some of the latest PRs/fixes. Rebased with master and reverted one unnecessary fix.

@bselwe I've deployed the latest demo, and everything that has been merged so far, here:
https://dit-vgv-camera-test.web.app
(Verified it contains up to "don't flip the preview on external cameras")

This needs to be rebased one last time after https://github.com/flutter/plugins/pull/4358 lands, so we only merge code changes in the camera core package.

This looks good, but I'm not endorsing a plugin at 7:30PM of a Friday, next week :P


Error accessing ResetSignal()

I want to toggle the reset signal of a module in simulation, but I get an error that do not quite understand. Here is a simple example:
from nmigen import *
from nmigen.back import pysim

class Issue(Elaboratable):
	def __init__(self):
		self.rst = ResetSignal()
		self.a = Signal()

	def elaborate(self, platform):
		m = Module()

		with m.If(self.rst):
			m.d.sync += self.a.eq(1)

		return m

if __name__ == "__main__":
	dut = Issue()
	sim = pysim.Simulator(Issue())
	sim.add_clock(1.0 / 12e6)

	def test():
		yield dut.rst.eq(1)
		yield
		yield dut.rst.eq(0)
		yield

	sim.add_sync_process(test())

	with sim.write_vcd("issue.vcd", "issue.gtkw", traces=[dut.rst]):
		sim.run()

This gives me the error AttributeError: 'ResetSignal' object has no attribute 'name'.
If I change it to traces=[dut.a], then I get the error AttributeError: 'ResetSignal' object has no attribute 'reset'.

Btw, here's the full output when I run python issue.py with traces=[dut.a]:
issue.py:28: DeprecationWarning: instead of generators, use generator functions as processes; this allows the simulator to be repeatedly reset
  sim.add_sync_process(test())
Traceback (most recent call last):
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 309, in get_signal
    return self.indexes[signal]
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/hdl/ast.py", line 1442, in __getitem__
    return self._storage[key]
KeyError: <nmigen.hdl.ast.SignalKey (rst sync)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 239, in for_signal
    return self.signals[signal]
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/hdl/ast.py", line 1442, in __getitem__
    return self._storage[key]
KeyError: <nmigen.hdl.ast.SignalKey (rst sync)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "issue.py", line 31, in <module>
    sim.run()
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 1086, in run
    while self.step():
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 1075, in step
    self._settle()
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 1063, in _settle
    while self._delta():
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 1053, in _delta
    process.run()
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 912, in run
    self.coroutine.throw(exn)
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 974, in wrapper
    yield from process()
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 949, in wrapper
    yield from process
  File "issue.py", line 23, in test
    yield dut.rst.eq(1)
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 861, in run
    exec(_StatementCompiler.compile(self.eval_context, command),
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 681, in compile
    output_indexes = [context.get_signal(signal) for signal in stmt._lhs_signals()]
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 681, in <listcomp>
    output_indexes = [context.get_signal(signal) for signal in stmt._lhs_signals()]
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 312, in get_signal
    self.slots.append(self.state.for_signal(signal))
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 241, in for_signal
    signal_state = _SignalState(signal, self.pending)
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 190, in __init__
    self.reset()
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 193, in reset
    self.curr = self.next = self.signal.reset
AttributeError: 'ResetSignal' object has no attribute 'reset'

And when I run it with traces=[dut.a] like in the OP, then this is the output:
  sim.add_sync_process(test())
Traceback (most recent call last):
  File "issue.py", line 30, in <module>
    with sim.write_vcd("issue.vcd", "issue.gtkw", traces=[dut.rst]):
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 1121, in write_vcd
    waveform_writer = _VCDWaveformWriter(self._signal_names,
  File "/home/oguz286/.local/lib/python3.8/site-packages/nmigen/back/pysim.py", line 96, in __init__
    trace_names[trace] = {("top", trace.name)}
AttributeError: 'ResetSignal' object has no attribute 'name'

Are there any workarounds for this, or can simulations just never toggle reset currently?

@bhansconnect you can do something like this:
from nmigen import *
from nmigen.back import pysim

class Issue(Elaboratable):
    def __init__(self):
        self.rst = Signal()
        self.a = Signal()

    def elaborate(self, platform):
        m = Module()

        m.d.comb += ResetSignal().eq(self.rst)

        with m.If(self.rst):
            m.d.sync += self.a.eq(1)

        return m

if __name__ == "__main__":
    dut = Issue()
    sim = pysim.Simulator(Issue())
    sim.add_clock(1.0 / 12e6)

    def test():
        yield dut.rst.eq(1)
        yield
        yield dut.rst.eq(0)
        yield

    sim.add_sync_process(test)

    with sim.write_vcd("issue.vcd", "issue.gtkw", traces=[dut.rst]):
        sim.run()

That does work, thanks.

The above code will generate a driver-driver conflict, because m.d.sync += self.a.eq(1) will try to drive a high, while the reset logic generated by nmigen will try to drive a low, and you will get this in the simulator:

The proper nmigen way to have your signal reset to 1 would be to tell nmigen's internal reset logic to set it to one and
then you can skip your if statement (of course then nothing is left and if we don't want a to be it's reset value forever, we give it a different level):
from nmigen import Elaboratable, Module, ResetSignal, Signal
from nmigen.sim import Simulator
from nmigen.cli import main

class Issue(Elaboratable):
    def __init__(self):
        self.rst = Signal()
        self.a = Signal(reset=1)

    def elaborate(self, platform):
        m = Module()
        m.d.comb += ResetSignal().eq(self.rst)
        m.d.sync += self.a.eq(0)

        return m

if __name__ == "__main__":
    dut = Issue()
    simulate = True
    if simulate:
        sim = Simulator(dut)
        sim.add_clock(1.0 / 12e6)

        def test():
            yield
            yield dut.rst.eq(1)
            yield
            yield dut.rst.eq(0)
            yield

        sim.add_sync_process(test)

        with sim.write_vcd("issue.vcd", "issue.gtkw", traces=[dut.a, dut.rst]):
            sim.run()
    else:
        main(dut, ports=[dut.a])

Which will get you:

So it looks like the only viable path would appear be to decouple a from nmigen's internally generated reset logic:
from nmigen import Elaboratable, Module, ResetSignal, Signal
from nmigen.sim import Simulator
from nmigen.cli import main

class Issue(Elaboratable):
    def __init__(self):
        self.reset = Signal()
        self.a = Signal(reset=1, reset_less=True)

    def elaborate(self, platform):
        m = Module()

        with m.If(self.reset):
            m.d.sync += self.a.eq(1)
        with m.Else():
            m.d.sync += self.a.eq(0)

        return m

but while this works in the simulator as above, the verilog file shows:

Note that the reset input must not be named rst because this is auto generated by nmigen and will cause rst to turn into an output in the verilog.
Now the verilog looks like:
module top(reset, clk, rst, a);
    reg \initial  = 0;
    output a;
    reg a = 1'h1;
    reg \a$next ;
    input clk;
    input reset;
    input rst;

  always @(posedge clk)

    a <= \a$next ;
  always @* begin
    if (\initial ) begin end
    casez (reset)
      /* src = "issue-fix.py:13" */
      1'h1:
          \a$next  = 1'h1;
      /* src = "issue-fix.py:15" */
      default:
          \a$next  = 1'h0;
    endcase
  end
endmodule

which looks useable


Parse log from Grape-API

Hi, i would like to add customized format to logs related to API calls using grape API.
And in a second step, make the logs from the app and from the api unifom, so that it would be easy to index and search on them.
There are many manners to activate logs on grape, but none are related to specific format.
It would be perfect to add a lograge plugin to parse them.
I you can provide a guidance, i will help on the development

Grape isn't something I use myself, so I'm not sure how much help I'd be on that front, but happy to help out where possible if you want to take the lead on the development of a grape-compatible plugin. I seem to remember a grape middleware that does something similar for lograge so maybe worth checking that out first.
Ping me once you're started and if you need any help!

In case someone comes by this at some point (say 3 year later), you can use the grape_logging gem and configure the logs to be sent to the default rails logger where lograge can then pick them up.
Not saying it's the best way to do it, but if you need to.


Test failed because of missing test-data

Hi. i am trying too package vcpkg-rs in fedora and the test failed because the test-data are not include in the crate source.
https://download.copr.fedorainfracloud.org/results/remilauzier/rust-simp/fedora-rawhide-x86_64/02251202-rust-vcpkg/builder-live.log.gz
At the end of the log you can see the issue.
Thanks for your time.

It looks to me like this isn't an issue of test-data missing, but rather a few missing build steps.
vcpkg-rs is a build crate that allows rust users source libraries to link from a prebuilt microsoft/vcpkg tree.
To build the prebuilt vcpkg tree, one normally would use cargo-vcpkg, by invoking the following steps before cargo build:
cargo install cargo-vcpkg     # once per dev environment
cargo vcpkg build             # download and build dependencies from vcpkg in ./target/vcpkg

These steps are required to build the crate.
Re: Fedora integration, I'm not really sure what the goal here is, or how distributions are expecting to package Rust crates in general, and how this would apply to build-helper crates like this one in particular.  Do you have pointers of what your goals are so I can better understand?

For now i need to package vcpkg-rs to be able to package libwebp-sys2 and so on.
You can see fedora guideline for rust there: https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/
I need the test-data since fedora build package without internet access, so it need to be in the crate source for the test to pass.
Here an exemple of a rust package in fedora: https://src.fedoraproject.org/rpms/rust-ripgrep/blob/rawhide/f/rust-ripgrep.spec

Hmm, I was mistaken in my understanding of the test-data breaks you are seeing. I assumed it was due to needing a full tree, but looking more closely at the tests, they are not reliant on pulling and building a working tree, instead are dependent upon a proper test-data files.
If I'm understanding correctly now (thanks for the links!), Fedora is pulling the crate sources as published from crates.io, and the issue is that test-data/ isn't included in that published image?

Exactly! Thanks for your work!

This should now be addressed in 0.2.14.


Missing documentation

I cannot follow the documentation build instructions since there is no docs directory, and the URL for the prebuilt documentation is broken: https://sylvainprigent.github.io/sairyscan/

Thanks!


I'm benchmarking llama-7b with 8 batch size in A40，but oom happened，I'm curious why 7B model need to cost too much memory?

python benchmark.py -m llama_7b --batch_size "8" --mode plugin --input_output_len '2048,2048' --csv --max_input_len 2048 --max_output_len 2048
log error:
 [TRT-LLM] [E] Exception CUDA out of memory. Tried to allocate 512.00 MiB. GPU 0 has a total capacty of 44.35 GiB of which 147.88 MiB is free. Process 1107750 has 44.16 GiB memory in use. Of the allocated memory 12.00 GiB is allocated by PyTorch, and 983.50 KiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF caught while allocating memory; skipping (8, 2048, 2048)
A40 is 46GB memory, I think it's enough to support to 8 batchsize for llama-7b.
And can you tell me how to estimate the memory using in defferent batchsize of differnet models, like 7b model, the weight have to cost how much memory, and if input_output_length is 2k/2k, every batchsize should cost how much memory?

meets the same issue on singe A10 when input/output length exceeds the recommend default value, it seems trt-llm did not optimize well under the long-sequence scene
btw, do you know how to calculate the precise qps value under this benchmark script, thx

try paged_kv_cache option

meets the same issue on singe A10 when input/output length exceeds the recommend default value, it seems trt-llm did not optimize well under the long-sequence scene btw, do you know how to calculate the precise qps value under this benchmark script, thx

I thought tokens_per_sec might be the qps value.

In terms of memory consumption, you can expect that Llama 7B will take 14GB for the weights (7B and each one is 2 bytes). The KV cache, when it's not set to paged KV cache, should take
8 (batch size) x 2 (K and V) x 4,096 (max seqlen) x 32 (layers) x 32 (heads) x 128 (hidden size) x 2B (per element) = 16GB.

In total, that's nearly 32GB for TensorRT-LLM, if PyTorch reserves 12GB as the error message seems to imply, we are getting very close to the 44GB mentions in the error message. No?

yes, it's nearly 44GB in total, and 32GB for tensorrt-llm is the same as my understanding. So why does pytorch reserves 12GB?

allocated by PyTorch

There might be some under-the-hood behavior of PyTorch to allocate the additional memory. BTW, if you want to do perf benchmark, it is suggested to try with the C++ benchmark workflow. Can you try with it to measure the performance and memory consumption?
June

python benchmark.py -m llama_7b --batch_size "8" --mode plugin --input_output_len '2048,2048' --csv --max_input_len 2048 --max_output_len 2048 --max_batch_size 32
model_name,world_size,num_heads,num_kv_heads,num_layers,hidden_size,vocab_size,precision,batch_size,input_length,output_length,gpu_peak_mem(gb),build_time(s),tokens_per_sec,percentile95(ms),percentile99(ms),latency(ms),compute_cap
llama_7b,1,32,32,32,4096,32000,float16,8,2048,2048,34.78,29.17,161.64,101385.156,101385.156,101359.884,sm86

Hi @qihang720 Could you specify the --max_batch_size as well? I can benchmark llama_7b with bs=8 and input/output_len=2048, which takes 34.78GB.
python benchmark.py -m llama_7b --batch_size "8" --mode plugin --input_output_len '2048,2048' --csv --max_input_len 2048 --max_output_len 2048 --max_batch_size 32
model_name,world_size,num_heads,num_kv_heads,num_layers,hidden_size,vocab_size,precision,batch_size,input_length,output_length,gpu_peak_mem(gb),build_time(s),tokens_per_sec,percentile95(ms),percentile99(ms),latency(ms),compute_cap
llama_7b,1,32,32,32,4096,32000,float16,8,2048,2048,34.78,29.17,161.64,101385.156,101385.156,101359.884,sm86

I see that @litaotju is assigned on this issue. His analysis has concluded that it’s not a bug. Quoting him:

Tracing down to TRT memory allocation. TRT needs at least 4 big block to hold the internal Tensors for decoder block.

hidden_states before qkv_gemm = MAX_BS x MAX_IN_SEQ x HIDDEN  = 128x 2048x 4096 x 2 =<PHONE_NUMBER>

qkv gemm output = MAX_BS x MAX_INP_LEN x HIDDEN x 3 (QKV) = 128 x 2048 x 4096 x 3  x 2 bytes (fp16)  =<PHONE_NUMBER>

mlp 1st FC out = MAX_BS x MAX_INP_LEN x  inter size  = 128 x 2048 x 11008 x 2 =<PHONE_NUMBER>

mlp activation out (assume not fused in plugin mode) = 1st FC out =<PHONE_NUMBER>

In this case, the memory consumption is correct, and no bugs.  And the "activation" memory handled by TRT is always computed by max shape, like the max batch size 128, even though, user requests to use bs = 8 in the runtime.

If user build the engine with max bs == 8, then the activation memory allocated by TRT can be reduced by 128/8 = 16x, which is about 1GB.


Fixed small typo in configuration help

It was rendering the phrase as "Whether to use different formatting for items andexpressions if they satisfy a heuristic notion of 'small'.". It should be: "Whether to use different formatting for items and expressions if they satisfy a heuristic notion of 'small'.". Note the space between "and" and "expressions".

Thank you!


allow 'this dot', etc. as synonyms for 'self dot'

would be more convenient for javascript, java, c++, etc. should either make these synonyms globally, or just in javascript.talon by adding commands.
eg, globally:
(self | this) dot: ...

My idea, which I've been running with for a bit: define a code_self list. That way different objects can be referred to without hardcoding them (e.g. Go method receivers don't have a standard parameter name).
{user.code_self} dot: ...

Bonus points for turning code_operator_object_accessor into a list too (to accommodate languages that use -> instead):
{user.code_self} {user.code_operator_object_accessor}:
	insert("{code_self}{code_operator_object_accessor}")


terminal  not working

Type: Performance Issue
terminal  not working
VS Code version: Code 1.70.3 (a21a160d630530476218b85db95b0fd2a8cd1230, 2022-08-31T08:03:55.990Z)
OS version: Windows_NT x64 6.1.7600
Modes:

System Info

Item
Value

CPUs
Intel(R) Pentium(R) CPU        P6100  @ 2.00GHz (2 x 1995)

GPU Status
2d_canvas: unavailable_softwarecanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: disabled_softwaremultiple_raster_threads: disabled_offopengl: disabled_offrasterization: disabled_softwareraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: disabled_softwarevideo_encode: disabled_softwarevulkan: disabled_offwebgl: unavailable_softwarewebgl2: unavailable_software

Load (avg)
undefined

Memory (System)
1.74GB (0.18GB free)

Process Argv
C:\Users\Acer\Desktop\htmlFile --crash-reporter-id a7116166-d8cf-4c35-b68c-105eb831fff8

Screen Reader
no

VM
0%

Process Info
undefined

Workspace Info
undefined;

Extensions (19)

Extension
Author (truncated)
Version

terminal-commands
adr
1.0.5

project-manager
ale
12.7.0

git-add-commit-push
alf
0.13.0

react-component-generator
And
1.1.1

npm-intellisense
chr
1.4.5

path-intellisense
chr
2.8.5

gitignore
cod
0.9.0

vscode-eslint
dba
2.4.4

git-extension-pack-new
dev
1.0.2

githistory
don
0.6.19

gitlens
eam
12.2.2

git-extensions-for-vs-code
for
1.1.3

remotehub
Git
0.26.0

vscode-checkpoints
mic
1.3.3

git-file-history
pom
1.0.1

git-commit-plugin
red
1.2.1

gpack
Sey
2.0.0

git-commit-helper-vscode
tre
1.0.1

vscode-conventional-commits
viv
1.25.0

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
bg6jg535:30979843
ccp1r3:30993539
dsvsc020:30976470
pythonait:30996668
7ghi1836:30988842
dsvsc021:30996838
g1icg217:30999571

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.87.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!


Clean up

Ok, I've removed PHPUnit as a dev dependency (same as in https://github.com/reactphp/whois/pull/6).

@WyriHaximus ping

LGTM :+1: , also did a some checks and toyed around with it and works as intended :+1:

ping @cboden @clue

Just pinging here to see if anybody with merge rights wants to settle this...

LGTM :+1:


[ADVISOR-2612] Fix jobs table pagination

Select a completed task and it should load the jobs table. The pagination is now fixed. If you don't have a task with more than 10 systems, simply run one.

Codecov Report

Merging #23 (e75cf1f) into master (6ed3863) will decrease coverage by 0.29%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
- Coverage   76.84%   76.54%   -0.30%
==========================================
  Files          39       39
  Lines         773      776       +3
  Branches      250      250
==========================================
  Hits          594      594
- Misses        163      166       +3
  Partials       16       16

Impacted Files
Coverage Δ

...nents/CompletedTaskDetails/CompletedTaskDetails.js
2.56% <0.00%> (-0.22%)
:arrow_down:

...ties/hooks/useTableTools/Components/TasksTables.js
100.00% <ø> (ø)

Continue to review full report at Codecov.

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


Ensure that existing properties are configurable before redefining

Context
Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js attempts to setup global variables typical in most JavaScript environments. It finds the previous property value using Object.getOwnPropertyDescriptor and preserves it as original[PropertyName] (if it existed), it then redefines the property using Object.defineProperty.
Problem
Properties may only be redefined if the property descriptor specifies that it is configurable (MDN). Attempting to redefine an non-configurable property will result in an error: TypeError: Cannot redefine property: [PropertyName].
Not all properties being setup in InitializeJavaScriptAppEngine.js are necessarily configurable in the target environment.

By analyzing the blame information on this pull request, we identified @yungsters and @davidaurelio to be potential reviewers.

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at<EMAIL_ADDRESS>Thanks!

@cameronhunter updated the pull request.

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@cameronhunter updated the pull request.

What's an example of a non-configurable property that RN is trying to overwrite?

In the environment that I'm targeting setTimeout, setInterval and clearTimeout aren't configurable. I guess it's more of a fault with the environment, but I think the change still holds up.

@cameronhunter updated the pull request.

@cameronhunter updated the pull request.

Change looks fine. Be careful with environments that don't let RN override them -- there's a chance that one day RN will make a change to its implementations of setTimeout, etc. that require those implementations to run e.g. to coordinate with RN's event loop.
@facebook-github-bot shipit

Thanks for importing.If you are an FB employee go to Phabricator to review internal test results.


Bug in MI released vbox 0.5\0.4

The MI released vbox version 0.5\0.4 are giving error with CentOS.
Firstly, The virtual-box from (hashicorp/precise32) came up on CentOS, while on same CentOS VM (CiscoCloud/microservices-infrastructure) vbox is giving error.
This means specific error with MI packaged vbox.
Secondly, On same CentOS VM, both MI vbox version 0.4 and 0.5 are giving same error.
This means the error in MI code needs to be debugged\fixed and packaging of MI vbox with provider(MI) specific documentation to create v-box.
Could MI support help in fixing this issue, asap?
=============================================================================
I tried with 1.7.4 vagrant , giving error!
Vagrant 1.7.4
Virtualbox 4.3
MI 0.3.2
CentOS7
$ uname -a
Linux localhost.localdomain 3.10.0-229.14.1.el7.x86_64 #1 SMP Tue Sep 15 15:05:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[@CentOS7 ~]$ vboxmanage --version
4.3.30r101610
[@CentOS7 ~]$ vagrant --version
Vagrant 1.7.4
[@CentOS7 ~]$ systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled)
Active: inactive (dead)
[@CentOS7 ~]$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[cisco@CentOS7 microservices-infrastructure]$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'CiscoCloud/microservices-infrastructure'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'CiscoCloud/microservices-infrastructure' is up to date...
==> default: Setting the name of the VM: microservices-infrastructure_default_1442676583790_85866
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: <IP_ADDRESS>:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
===========================================================================
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG virtualbox_4_3: - [1, "ssh", 2222, 22]
DEBUG ssh: Checking key permissions: /home/cisco/.vagrant.d/insecure_private_key
INFO ssh: Attempting SSH connection...
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: <IP_ADDRESS>
INFO ssh: - Port: 2222
INFO ssh: - Username: vagrant
INFO ssh: - Password? false
INFO ssh: - Key Path: ["/home/cisco/.vagrant.d/insecure_private_key"]
INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "dadac1d1-01b0-4f88-abe5-5668d0706755", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: name="microservices-infrastructure_default_1442677009730_22726"
groups="/"

[Solved]
Added Hardware Virtualization on vSphere VM.
It would be good to add advisory to MI outpur when failure happens, since 32-bit vbox doesn't give failure and User assumes failure is only with MI vbox.
Vagrant Failing with 64 bit vbox:
The vagrant instantiation using vbox 64-bit on GCP-Pod has been failing (e.g. hashicorp/precise64 or CiscoCloud/microservices-infrastructure).
Vagrant Passing with 32 bit vbox:
The vagrant instantiation using vbox 32-bit on GCP-Pod has been passing (e.g hashicorp/precise32).
The issue might puzzle since 32-bit vbox works while 64-bit vbox fails with vagrant and this kills many cycles by the time 32-bit Vs 64-bit difference is detected!
======================================================================
Enable Hardware Virtualization over vSphere VM, on which vagrant is creating the instance.
The instruction are shared below.

From vSphere Client.
a.	Power off VM
b.	Right click on the VM, and click the Upgrade Virtual Hardware

Next, login to WebSphere client
a.	click on the VM, check the Settings option.
b.	To verify if it changed in to VM version 10, and click edit.

From WebSphere client
a.	Check the option and click CPU, check the option Hardware virtualization, click OK. you are done.


render localhost:5000

hi, I have just deployed the app to heroku
[](https://novahub-slack-bot-server.herokuapp.com)
but when I finish add new bot to slack, it always return to localhost:5000
you can try this by access to the link
https://novahub-slack-bot-server.herokuapp.com

This is something configured in your slack app on api.slack.com.
https://api.slack.com/applications

Thank you so much !


Support containerd

This is a feature request.
The company I am working for is currently desinging and building an internal/private Kubernetes-based infrastructure. We will no longer even install the docker-engine on the nodes, but run everything with containerd and its cri-plugin.
It would be great if falco could talk to the containerd.sock instead of docker.sock.

Are the two wire-compatible? If so you could link the path, or run falco in a container such that containerd.sock maps to /host/var/run/docker.sock inside the container.

I don't think so.
containerd is a daemon for managing the container-lifecycle on its own. It will be used in future versions of Docker.
Kubernetes can use different container-runtimes as long as they implement Kubernetes CRI (Container Runtime Interface). They ship their own implementation of CRI for Docker (dockershim).
containerd implements CRI via plugin (cri-containerd) and there is even another runtime called CRI-O.

Ah, so the change would be to additionally communicate with containerd for those container types, in cases where we need conainer-level information.

Exactly. It should be configurable wether falco gets container-level information from docker or from containerd (or maybe even CRI as an abstraction layer?).

Using the CRI abstraction would be great..... I've been trying to use falco on kubernetes with CRI-O, and only just recently realized that it was incompatible (the Runtime error: Invalid container ID (expected 'docker://{ID}' or 'rkt://{ID}'): cri-o://<CONTAINER-ID>. Exiting. error was hidden behind another silently failing error that prevented falco from even getting to this point)

Any news on this?

No, no updates yet. We want to do it, but haven't gotten a chance to work on it yet.

+1 this would be cool to have

I checked the lastest Falco 0.14.0, and this issue remain exists. Which version is planning to support?

Indeed, unless there is a flag to set in order to use the CRI ? 🤔
Tue Mar 19 09:30:39 2019: Runtime error: Invalid container ID (expected 'docker://{ID}' or 'rkt://{ID}'): containerd://b30dc1181351f24b94f40b46d83efa2392288277215b0b233ae53bb806d619e1. Exiting.

0.14.1 (when released) should support this.

Hello, I build an image from dev branch today, the error does not disappear, advice?
root@test-695ff8cbf4-qp7tv:/# echo $FALCO_REPOSITORY
dev
root@test-695ff8cbf4-qp7tv:/# falco --version | cut -d' ' -f3
0.1.2736dev

Fri Apr 12 05:35:04 2019: Runtime error: Invalid container ID (expected 'docker://{ID}' or 'rkt://{ID}'): containerd://2d16d0bf23fcb0db298084b04b310bce70a279a2a96d3dcc2df507164315993c. Exiting.

@axot, It looks like the problem you had was when also using the k8s integration. It isn't yet aware of new container types. I think the change needs to be made here. I filed a new issue https://github.com/draios/sysdig/issues/1371 to track that fix.
In the meantime, you should be able to run without -k.
We also have daily dev builds again: https://hub.docker.com/r/falcosecurity/falco/tags.

The image falcosecurity/falco:dev should have the fix for containerd support. With the --cri option you can specify the path to the containerd.sock. The default is /run/containerd/containerd.sock or /host/run/containerd/containerd.sock when running as a container. We've only tested this on IBM Cloud IKS so any feedback would be appreciated.

@mfdii ,
I have tried to use falcosecurity/falco:dev with this yaml on IBM Cloud IKS (1.13.5),
apiVersion: v1
kind: Pod
metadata:
  name: falco-test
spec:
  containers:
  - name: falco-test
    image: falcosecurity/falco:dev
    imagePullPolicy: Always
    command: [ "/usr/bin/falco", "--cri", "/run/containerd/containerd.sock"]
  securityContext:
    runAsUser: 0

but it is showing this error.
/usr/bin/falco: unrecognized option '--cri'
Do you have any advice? Thank you.

Sorry, it’s my fault. We had just done a dev build  before I posted that but it hadn’t picked up the correct package. We are having some problems with signing packages now and as soon as that’s fixed I’ll give you a heads up. Sorry for the confusion.

Alright. I've confirmed the dev build is working again and that it has the containerd support.
09:18 $ kubectl get nodes
NAME            STATUS   ROLES    AGE     VERSION
X.XX.XX.XX   Ready    <none>   7d22h   v1.12.7+IKS

09:18 $ kubectl logs falco-467pf |tail -2
12:46:44.708661342: Notice A shell was spawned in a container with an attached terminal (user=root k8s.ns=default k8s.pod=falco-467pf container=fabeb2e1c6b5 shell=bash parent=<NA> cmdline=bash terminal=34816 container.name=falco container.image=docker.io/falcosecurity/falco:dev)
12:46:52.509993693: Error File below a known binary directory opened for writing (user=root command=touch /bin/hello file=/bin/hello parent=bash pcmdline=bash gparent=<NA>) k8s.ns=default k8s.pod=falco-467pf container=fabeb2e1c6b5

However, there's a bug where the --cri flag didn't get added as a valid option. I've fixed that in #591 and it should be available in tomorrow's dev build. In the meantime, the default location for the CRI socket is /run/containerd/containerd.sock if running directly on the host and /host/run/containerd/containerd.sock if running inside a container. You just need to add a volume and a mount to the falco daemonset as below.
          volumeMounts:
            - mountPath: /host/var/run/docker.sock
              name: docker-socket
            - mountPath: /host/run/containerd/containerd.sock
              name: containerd-socket
            - mountPath: /host/dev
              name: dev-fs
...
        - name: docker-socket
          hostPath:
            path: /var/run/docker.sock
        - name: containerd-socket
          hostPath:
            path: /run/containerd/containerd.sock
        - name: dev-fs
          hostPath:
            path: /dev

I'll also get the helm chart and daemonset example updated with this mount. Let me know how your testing goes.

I have configured daemonset yaml as you mentioned, and succeeded to make current falcosecurity/falco:dev Running on IBM Cloud IKS!
Thank you so much!

This feature is part of Falco 0.15


Front facing

Added BGFX_STATE_FRONT_CCW flag to set front facing winding.
Supported by every API but D3D9.
Some file formats (like GLTF) support changing the winding.

You need to add these defines to bgfx.idl https://github.com/bkaradzic/bgfx/blob/master/scripts/bgfx.idl

Some file formats (like GLTF) support changing the winding.

Technically, it's not glTF that needs this. It's Babylon.

Fixed.

include/bgfx/defines.h is generated by IDL too... Only IDL file needs to change. Also you need to verify flags don't overlap. See my change: https://github.com/bkaradzic/bgfx/commit/bd9600e167714d66c95c3aba9162dd2d75c63fd1


Add xxxhdpi to support very high density phones and tablets

The title is pretty self descriptive, in my device xxhdpi is still a little blurry.

Thanks @pabloppp I'm merging and releasing now!

All done, in release 0.2.10 - thanks for the contribution! I've added you to the CHANGELOG.md so far.


getting issue while file rename

com.hierynomu com.hierynomus.ms smb2.SMB ApiException: STATUS_ACCESS_DENIED (0xc0000022): SetInfo failed for SMB2FileId file rename. rename file

Hey. Can you share a minimal reproducible example + a screenshot of the file permissions?

change in code working fine
    try (Directory directory = getDiskShare().openDirectory(getPath(), EnumSet.of(AccessMask.GENERIC_ALL), null, SMB2ShareAccess.ALL, SMB2CreateDisposition.FILE_OPEN, null)) {
        //String newDirectoryPath = getParentPath().getPath() + PATH_SEPARATOR + newDirectoryName;
        String newDirectoryPath = getParentPath().getPath() + newDirectoryName;
        directory.rename(newDirectoryName, replaceIfExist);
        return new SmbDirectory(getSmbConnection(), newDirectoryPath);
    }

Sorry I was too busy in the last two weeks, but I'll fix the other bug too and make a release today/tomorrow.
Best,
Simon


Build gem5 successfully with no errors, but no .opt file is generated.

It appears others have encountered this issue, though we haven’t been able to reproduce it ourselves.
#1536
#1706
@liuyuxivapor @soniab Please let us know if you're still experiencing this, or if you have found a solution.
If it’s still an issue, could you provide details about your host system? This will help us to create a docker environment and to try to reproduce the issue.
If you have resolved it, sharing your solution would be very helpful for others in the future. Thank you!

Hi. I also recently got this problem when setting up gem5. I'm posting compilation message and my system info here.
Compilation:
scons: Reading SConscript files ...

You're missing the pre-commit/commit-msg hooks.  This script will now install these hooks in
your .git/hooks/ directory.
Press enter to continue, or ctrl-c to abort:
 Cannot find 'pre-commit'. Please ensure all Python requirements are
installed. This can be done via 'pip install -r requirements.txt'.
It is strongly recommended you install the pre-commit hooks before working with gem5. Do you want to continue compilation (y/n)?
y
Mkdir("/home/jianyugen/gem5/build/X86/gem5.build")
Checking for linker -Wl,--as-needed support... (cached) yes
Checking for compiler -gz support... (cached) yes
Checking for linker -gz support... (cached) yes
Info: Using Python config: python3-config
Checking for C header file Python.h... (cached) yes
Checking Python version... (cached) 3.8.10
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for C library tcmalloc_minimal... (cached) yes
Building in /home/jianyugen/gem5/build/X86
"build_tools/kconfig_base.py" "/home/jianyugen/gem5/build/X86/gem5.build/Kconfig" "/home/jianyugen/gem5/src/Kconfig"
Checking size of struct kvm_xsave ... (cached) yes
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) no
Warning: Header file <png.h> not found.
         This host has no libpng library.
         Disabling support for PNG framebuffers.
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for C header file valgrind/valgrind.h... (cached) yes
Checking for pkg-config package hdf5-serial... (cached) no
Checking for pkg-config package hdf5... (cached) no
Checking for H5Fcreate("", 0, 0, 0) in C library hdf5... (cached) no
Warning: Couldn't find HDF5 C++ libraries. Disabling HDF5 support.
Checking for C header file capstone/capstone.h... (cached) no
Warning: Header file <capstone/capstone.h> not found.
         This host has no capstone library installed.
Checking for C header file linux/kvm.h... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... (cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking for shm_open("/test", 0, 0) in C library None... (cached) yes
Checking for pkg-config package protobuf... (cached) yes
Checking for backtrace_symbols_fd((void *)1, 0, 0) in C library None... (cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Checking for compiler -Wno-self-assign-overloaded support... (cached) yes
Checking for linker -Wno-free-nonheap-object support... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
 [VER TAGS]  -> X86/sim/tags.cc
scons: done building targets.
*** Summary of Warnings ***
Warning: Header file <png.h> not found.
         This host has no libpng library.
         Disabling support for PNG framebuffers.
Warning: Couldn't find HDF5 C++ libraries. Disabling HDF5 support.
Warning: Header file <capstone/capstone.h> not found.
         This host has no capstone library installed.

Host system:
LSB Version:    core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

Hopefully you can figure out how to solve this.

@JianYugen what command did you run to compile gem5?
To try to get around this, others have been able to get it to work if they delete the build directory and rebuild from scratch.

@JianYugen I thought i have solved this by enlarging RAM for Ubuntu, and the link step will automatically appear.

@powerjg I just followed the steps on https://www.gem5.org/getting_started/ with command scons build/X86/gem5.opt -j$(nproc). And you are right. The problem is solved by cloning the clean source code and rebuilding it again. Probably there was something wrong when installing the dependencies.
@liuyuxivapor I'm also not sure that this will be affected by the RAM size. I built gem5 on a machine with 1T of memory.

Hi, Sorry for late reply.
I could not solve it yet. I tried with a clean repository(git clone and gemm5-24.0.tar) but ended up having no .opt generating
Host system:
LSB Version:	n/a
Distributor ID:	SUSE
Description:	SUSE Linux Enterprise Server 15 SP5
Release:	15.5
Codename:	n/a
Linux version 5.14.21-150500.55.31_13.0.53-cray_shasta_c
Please let me know if you need more details.

Description: SUSE Linux Enterprise Server 15 SP5

What happens if you compile with scons --verbose?

I solved this issue by reinstalling the gcc dependencies and creating a symbolic link to gcc-10. Not sure if others are facing the same cause


XAML Support

Using JetBrains Rider, any XAML file that gets opened is basically all orange and white, with no distinction between imports, element types, properties, strings, etc...

Thanks for the report. I do not have Rider license and there seems to be no XAML plugin for IntelliJ.. Happy to accept a PR :)
In case you want to give it a try, here's some instructions
https://github.com/catppuccin/catppuccin/issues/35#issuecomment-1030799274

Thanks for the report. I do not have Rider license and there seems to be no XAML plugin for IntelliJ.. Happy to accept a PR :)
In case you want to give it a try, here's some instructions
catppuccin/catppuccin#35 (comment)

Working on this now.
There isn't specific XAML color scheme support, so I'll have to make changes to the language defaults. However looking at it (I'm just changing 2 things) it'll actually more closely match the theme in VSCode with these two small tweaks.
Expect a PR here soonest.


Support DoH resolvers

[ ] Portal changes to support DoH and DoT upstreams
[ ] Connlib changes

refs #4667

refs #4249

@thomaseizinger No major urgency on this, just getting on your radar since you're already in the DNS upstream headspace. We've been requested this from customers a couple times, but the more I think about it the more I realize how essential it is for our architecture, since signing into Firezone effectively means you only get UDP/53 for your whole system.

Currently, connlib only supports DNS over UDP/53 which means we are bound a certain maximum size of DNS responses that we can send to the OS / application. If we start doing DoH, the upstream DNS server may return a response back to us that is bigger than what we can handle.
This is a common problem for DNS servers which is why DNS has the TC bit which allows a server to set, whether it had to truncate the response. Generally, it is advised that responses with a TC bit set should be discarded and the client should retry over TCP instead: https://www.rfc-editor.org/rfc/rfc5966#section-3. The measurements in https://blog.apnic.net/2024/07/15/revisiting-dns-and-udp-truncation/ suggest that most systems are following this recommendation:

Some 97.33% of systems will re-query over TCP if they receive a UPD response with the TC bit. This is kind of a problem because we currently don't support DNS over TCP and it requires us to implement a TCP state machine.
Most DNS queries however will fit in the UDP response payload. To get some implementation of DoH out the door, I think we can do the following:

When DoH is active, forward each DNS query via DoH.
If the response fits, just write it back.
If the response does not fit, log a warning / error and reply with a server-failure.

At a later point, we can implement a TCP state machine and also answer DNS queries over TCP.
An alternative implementation could be to truncate the response but not set the TC bit to avoid re-querying over TCP. However, I am kind of worried that this will break application in other subtle ways. I'd rather fail the entire DNS query instead

For DNS servers that are IP/CIDR resources, I'd suggest that DoH should not have any effect for now. To implement that, we'd have to write a client-side TCP state machine too (answering TCP queries only requires the server-half). My suggestion would be that we should detect that in the portal: If you configure your usptream DNS servers as resources, enabling DoH should be greyed out in the portal.

Just wanted to say nice work finding real-world data on how this behaves in the wild.

If you configure your usptream DNS servers as resources, enabling DoH should be greyed out in the portal.

Related: #4249

Related: #4249

The API between the portal & connlib could be something like:
{
    "dns_transport": "udp" / "https"
}

This would be part of the "interface", i.e. next to where we receive the dns servers. It would apply to all upstream DNS servers (never locally set ones).
For the portal, I think it would make sense to start with a fixed set of servers that we know supports DoH. We can always let customers specify more later.
The scope for now would be:

No support for DNS over TCP in connlib's resolver
Check size of response, map back into UDP packet if possible
Respond with server error if not possible

Out-of-scope:

DNS responses bigger than what UDP DNS allows
DoH as a resource

If we agreed that this would be useful to build, I can start on that.

Yes, I think this all makes sense. So, then:

Custom upstream resolvers are limited to plain UDP. It's important we continue to support these as Resources because that's the only path to a customer having protected DNS queries for their own upstreams.
Support the well-known, public DoH resolvers, allowing the customer to select them as upstreams.

How do we resolve the DoH hostname initially? One option would be to use that service's UDP resolver to do it. So, ask <IP_ADDRESS> for the A record for cloudflare-dns.com (https://cloudflare-dns.com/dns-query) for example.

How do we resolve the DoH hostname initially? One option would be to use that service's UDP resolver to do it. So, ask <IP_ADDRESS> for the A record for cloudflare-dns.com (https://cloudflare-dns.com/dns-query) for example.

Surely there must be a standardised approach? Can the portal resolve it for us? Or are there maybe well-known IPs?

How do we resolve the DoH hostname initially? One option would be to use that service's UDP resolver to do it. So, ask <IP_ADDRESS> for the A record for cloudflare-dns.com (https://cloudflare-dns.com/dns-query) for example.

Surely there must be a standardised approach? Can the portal resolve it for us? Or are there maybe well-known IPs?

I suppose you could argue the service's advertised IPs serve as well-knowns?

I've done some research and it appears the recommended approach is to use the system resolver to initially resolve the DNS server hostname.
The issue here is that by the time we receive the DNS config from the portal, connlib is already up and so any attempt to resolve DNS using the system APIs will just route back to us.
We could intercept that but then we'd have to build our own UDP DNS client with retries and stuff.
In connlib, we already have a concept of "known hosts", i.e. a static mapping of domain names to IPs that is always consulted first before attempting to resolve a name.
We could tap into that abstraction and have the portal send us "fixed DNS records" on every init. This would include the DNS records of all DoH servers. When DoH is active, connlib would then consult this map for the target IP and establish an HTTPS connection to it.

Support the well-known, public DoH resolvers, allowing the customer to select them as upstreams.

This will be a UI-only limitation, right? For the actual API between connlib and the portal, we will simply send domain-names, right? In fact, I think the DoH-flag should be separate from the list of DNS servers.

Also, I am afraid our current representation of DNS servers in the API is not forwards-compatible with new "kinds" of DNS servers: https://github.com/firezone/firezone/blob/3e30bab965a2f297e087db60b3396eb124f4ae29/rust/connlib/shared/src/messages.rs#L253-L257
(Same issue we've had with the Internet Resource type; new variants aren't allowed by default)
Plus, we won't allow a mix of UDP DNS servers and DoH servers, right? It is either one or the other so it doesn't really make sense to differentiate this on an item-level of the upstream_dns field.
We should split this such that we have different fields for the different kinds of DNS configuration. For example:
{
    "upstream_dns": [], // legacy field
    "upstream_udp_dns": [
        {
             "ip": "<IP_ADDRESS>",
             "port": 53
        }
    ],
    "upstream_doh": [
        {
            "url": "https://cloudflare-dns.com/dns-query"
        }
    ]
}

We would parse this such that DoH takes priority over UDP DNS servers (meaning the above example wouldn't make much sense unless we also allow mixing DNS server configuration).

I've done some research and it appears the recommended approach is to use the system resolver to initially resolve the DNS server hostname.

These don't really change though right? Would we use the portal to resolve these on a periodic internal and send the mapping down to the client?
I suppose that could fail if there is a network partition and since the resolution is centralized it would affect all users.
Would it not be more resilient to resolve the initial DoH host from the client using the advertised IPs of the public dns services themselves?
Correct that selecting the upstream will have only the following exclusive user-facing choices:

custom-udp (list)
public-doh provider (single)

I suppose that could fail if there is a network partition and since the resolution is centralized it would affect all users.
Would it not be more resilient to resolve the initial DoH host from the client using the advertised IPs of the public dns services themselves?

It creates a fair amount of work because we now have to be build a reliable DNS resolver and integrate that state machine into connlib, making the entire process of updating DNS servers async. It is doable but not an easy way of managing state.
My assumption would be that a local resolution in the portal per-request would hit some local DNS cache and thus not very expensive.

Note down design decisions from standup:

When Internet Resource is enabled ("Internet Security"), all queries should ultimately go to Internet Resource gateways, unless DoH is enabled - add a warning to the portal if they select this
If custom upstream resolvers are selected, they'll be sent through the tunnel if Internet Resource is enabled (or an IP or CIDR resource matches)
If nothing is enabled (client system default), then DNS queries get routed outside the tunnel even if the Internet Resource is enabled, because the client's system DNS is not reachable by the gateway
Block adding the DNS Resources that match the address of public DoH resolvers

My assumption would be that a name resolution in the portal per-request would hit some local DNS cache and thus is not very expensive.

Resolution for this: Hardcode the list of IPs in the code.


Scoped code blocks

A new symtab scope should be entered when compounded statements are grouped by { and }.
New symtab but same icode? Idk will have to check.

already implemented.


I can't see the cost of an upgrade in the latest version.

I'm using lineage OS with a Moto G7+ (Lake)
It used to show some of the words cost and a number, but now I just have to spam buy and guess the cost. It could be that the upgrades cost equal to the level they are, which does feel a little grindy.
Maybe the cost could be next to the buy button if you can't fit it in the portrait box.

The costs now show up when you long-press on a portrait.

Maybe the cost could be next to the buy button if you can't fit it in the portrait box.

Good idea. Done in 1.23.


Use of python is not obvious, particularly python version

The README.md only casually mentions the use of python. The very brief statement actually assumes the use of python 2, because the used SimpleHTTPServer module was merged to the python core with python 3 and is now called http.server.
Apart from this documentation need, the dependency on python is probably superfluous, because a webserver could also be hosted with node itself (but that's for another issue).

as this application runs entirely in the client, it does not depend on python. any static http server will work just fine. that isn't clear in the README, so I'll update accordingly. :D

I'm stuck trying to get this tool moving. I cloned, but i have a handful of JSON files now. I can't do bower install.
please help
Thanks
EC

hey @ElectricCaffeine, everything you need is in /public. to get this working, open the repo directory in a terminal, then...
if you have python v2.x, run: cd ./public; python -m SimpleHTTPServer 8000
if you have python v3.x, run: cd ./public; python -m http.server 8000

Thanks for the quick response! I'm in the web menu now. @treefort

awesome! :D

forgive my ignorance, but once I got it running once, I just created a bookmark of http://localhost:8000. I won't need to launch Simple HTTP server anymore, right?

so long as that python process is running, you will be able to access http://localhost:8000. if you reboot or anything, you'll need to run that command again. basically, all that command is doing is spinning up a tiny web server for the static files in the /public directory.

oh ok..thanks for the explanation. I started exploring some of the tree branches, looks like all external websites right?

yep :)

Hey @ElectricCaffeine! Not sure which distro you are running but i am on Ubuntu and an easy way to start the SimpleHTTPServer automatically for me is to just make a small shell script in my home directory. Like so;
touch o-start.sh
chmod + x o-start.sh

Then open o-start.sh with your favourite text editor and paste the following lines.
#!/bin/bash

echo -e "\n\x1b[32;01m[+]Starting server at <IP_ADDRESS>:8000\x1b[39;49;00m"
sleep 2

cd "/path/to/your/OSINT-Framework"
npm start

Where you of course replace /path/to/OSINT-Framework with your directory. Something like /home/ElectricCaffeine/OSINT-Framework. Then lastly you just make a simple symbolic link to your o-start.sh script in your /etc/profile.d/directory. Like so:
sudo ln -s /home/ElectricCaffeine/o-start.sh /etc/profile.d/o-start.sh
This will make it so the SimpleHTTPServer runs automatically every time you log in. All that's left to do is click on the bookmark you made for the page and you're set. Good luck!

Finally worked.
C:\Users\IgorMonteiroVieira\Desktop\OSINT-Framework>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>> ^Z

C:\Users\IgorMonteiroVieira\Desktop\OSINT-Framework>cd public

C:\Users\IgorMonteiroVieira\Desktop\OSINT-Framework\public>python -m http.server 8000
Serving HTTP on <IP_ADDRESS> port 8000 (http://<IP_ADDRESS>:8000/) ...


How to change background card color

Hi, your library is wonderful and it would be great if you allow the ability to change the background card color.
Best Regards

Hello as of now it is not possible

I was stopping by to ask the same thing. This would be a great feature to add. I will be forking this so we can design our own custom views. I will share if I think it will help, but probably just will be modifying one of your presets so we can call it easily. We will also be adding rounded corners. Thank you for all the work you have put into this project, it shows. I appreciate you sharing what you created. Cheers!


Remove comment-based syntax for generic methods

We currently support and in some places still use the transitional /*<T>*/ syntax for generic methods. Now that real syntax is supported, we should phase out and then eliminate the old syntax.
I can file tracking bugs for the sub-issues if people want, but, for now, here's the known subtasks:

[ ] Add a deprecation notice when the old syntax is detected. (Do we need to do this?)
[ ] Remove uses of the syntax in our core libraries.
[ ] Remove uses of the syntax in other packages and applications we maintain.
[ ] Remove support in analyzer for parsing the comments and treating them as annotations.

Currently, there are a few places where we still deliberately use the old syntax:

The LineSplitter class behaves differently depending on if you enable strong mode or not.
Some 'as' checks are marked as as Object /*=ConcreteClass*/ for performance reasons because implementations do not currently take advantage of strong mode.

We'll want to ensure those are addressed first before the syntax is removed.

We should also remove uses in our own code before removing support from analyzer.

Yes! I didn't intend that to be an ordered list, but I can see how it looks like it. Re-ordered. :)

That LineSplitter behavior you note, is there an issue for that? Is it an issue?

At least the "Add a deprecation notice when the old syntax is detected" part should be 1.23.
No?

Is this actually happening for 1.23? I don't think there are open tasks for, say, the analyzer for 1.23.

@floitschG how close are we to eliminating this from the core libraries?
@srawlins Is internal code in a good state with respect to this yet?
@kevmoo Do we have a plan for external packages?

@leafpetersen I'd LOVE if we had a milestone w/ a hint/lint that told folks if they have these anywhere and help folks migrate.
@bwilkerson @pq – possible?

Will be removed when we don't support dart 1.x semantics anymore.

It's quite possible to have a hint warning people that this functionality is about to go away, but I'm not sure whether that's the right UX. While it would be nice to be told that these issues exist and to provide help finding all of the places that need to be fixed, having several hundred to thousands of hints in the Dart Analysis view would be annoying.
@jwren @devoncarew Any ideas for a better UX? Maybe we could filter them by default (and explain how to see the rest).

Better UX: have a tool that auto-converts things.
Even having it as a lint (opt-in) would be great for folks that want to
make sure they've migrated everything.
Otherwise we can just run grep – but that's a less-than-ideal solution for
our external users
On Thu, Jun 15, 2017 at 9:10 PM, Brian Wilkerson<EMAIL_ADDRESS>wrote:

It's quite possible to have a hint warning people that this functionality
is about to go away, but I'm not sure whether that's the right UX. While it
would be nice to be told that these issues exist and to provide help
finding all of the places that need to be fixed, having several hundred to
thousands of hints in the Dart Analysis view would be annoying.
@jwren https://github.com/jwren @devoncarew
https://github.com/devoncarew Any ideas for a better UX? Maybe we could
filter them by default (and explain how to see the rest).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dart-lang/sdk/issues/28796#issuecomment-308838937,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABCivM1R8TlA1O1-V5VTBL81rPWY6g5ks5sEYGrgaJpZM4MDiiG
.

@leafpetersen internal code has many examples of using the example syntax, but it should be easy to clean.
I only see a few instances of using as dynamic /*=MyClass*/. The SDK definitely has more.

A hint makes sense - something like a warn on deprecated language features hint.

This is blocked by #28773 (which I think is essentially the 2nd checkmark in this issue's description).

This is also soft blocked by #31091; customers cannot prepare for real-only syntax by migrating methods named get to real-only syntax, until there is a dev release with #31091 fixed.

When I patched https://dart-review.googlesource.com/c/sdk/+/8705, I saw some significant regressions on dart2js and dart2js html benchmarks.


Rename columns function in Legend API

Codecov Report

Merging #57 (06f44bc) into main (dffec36) will increase coverage by 0.02%.
The diff coverage is 97.61%.

@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
+ Coverage   97.07%   97.10%   +0.02%
==========================================
  Files          43       45       +2
  Lines        2670     2796     +126
==========================================
+ Hits         2592     2715     +123
- Misses         78       81       +3

Flag
Coverage Δ

pytest
97.10% <97.61%> (+0.02%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...core/tds/legend_api/frames/legend_api_tds_frame.py
71.87% <66.66%> (-0.54%)
:arrow_down:

pylegend/core/tds/tds_column.py
95.65% <85.71%> (-0.82%)
:arrow_down:

...nd_api/frames/functions/rename_columns_function.py
98.14% <98.14%> (ø)

...tds/legend_api/frames/legend_api_base_tds_frame.py
96.25% <100.00%> (+0.19%)
:arrow_up:

...i/frames/functions/test_rename_columns_function.py
100.00% <100.00%> (ø)

pylegend/tests/core/tds/test_tds_column.py
100.00% <100.00%> (ø)


Simplify cgroup script, add NO_MEMORY_LIMIT variable

@mfojtik @bparees

@mnagy one nit and can you also list the other PRs that need to go in simultaneously with this one?  (is it just the postgres one?)

@bparees I don't think any need to go simultaneously, because this change doesn't break any previous behaviour, it just adds the new variable. We might want to change the behaviour somewhere. @mfojtik will want to update the script that goes into postgres, @php-coder will need the new script for his mysql card and I'm not sure if somebody is doing mongo.
Additionally, I know @mfojtik needed to know if there is no limit set in one of his PR. For sti-ruby, there'll be no change required.

PTAL

I don't think any need to go simultaneously, because this change doesn't break any previous behaviour, it just adds the new variable.

yup, i was overthinking it. thanks.

For sti-ruby, there'll be no change required.

why's that?
lgtm but would like @mfojtik to review since he's actually used this stuff.

It's because we first calculate the number of processes we want to use (using the number of cores) and then we use the memory limit to calculate the maximum number of processes and pick the lower value as the actuall number. See here: https://github.com/openshift/sti-ruby/blob/master/2.0/contrib/etc/puma.cfg#L23

It's because we first calculate the number of processes we want to use (using the number of cores) and then we use the memory limit to calculate the maximum number of processes and pick the lower value as the actuall number. See here: https://github.com/openshift/sti-ruby/blob/master/2.0/contrib/etc/puma.cfg#L23

so put another way, the ruby image doesn't have any specific logic for "if no limit is set"?

LGTM, will leave @bparees to merge :-)

@bparees correct.

will wait on tests to pass :)


Multiple configure runs in parallel

Brief Issue Summary
It’s possible to run CMake configure multiple times in parallel which in the end leads to an error.
Expected:
It should not be possible to run cmake multiple times in parallel.
Platform and Versions

Operating System: macOS Mojave
CMake Version: 3.12.1
VSCode Version: 1.30.2
CMake Tools Extension Version: 1.1.3

This issue has been addressed in CMake Tools 1.2.0 which is available in the VS Code Marketplace or on the Releases Page
Because the publisher id has changed, VS Code does not automatically upgrade you yet. The Marketplace team will enable this in the next few days.  If you want to install 1.2.0 now, please make sure you uninstall any earlier versions of CMake Tools manually to avoid any conflicts.


Calendar Events not showing

help
events not showing

Check https://github.com/saade/filament-fullcalendar/issues/133 for a workaround

try to format ung datetime to date only


SetFrequencySXR(1812,5 MHz) - cannot deliver frequency

Hi, I am using LimeSDR-USB v1.4s with LimeSuite v20.07.2 (built from source) and srsLTE.
I have problems setting certain frequencies - I get "SetFrequencySXR(1812,5 MHz) - cannot deliver frequency" error.
I can reproduce this with LimeSuiteGUI - tab "SRX" - I would type the desired frequency and would press "Calculate" button.
Then I get the following debug log:

[10:37:22] DEBUG: INT 114, FRAC 1365, DIV_LOCH 1, EN_DIV2_DIVPROG 1
[10:37:22] DEBUG: VCO 7250.00 MHz, RefClk 30.72 MHz
[10:37:22] DEBUG: ICT_VCO: 255
[10:37:22] DEBUG: TuneVCO(SXR) - VCO too low
[10:37:22] DEBUG: VCOL : csw=0 tune fail
[10:37:22] DEBUG: ICT_VCO: 255
[10:37:22] DEBUG: TuneVCO(SXR) - VCO too low
[10:37:22] DEBUG: VCOM : csw=0 tune fail
[10:37:22] DEBUG: ICT_VCO: 255
[10:37:22] DEBUG: TuneVCO(SXR) - VCO too low
[10:37:22] DEBUG: VCOH : csw=0 tune fail
[10:37:22] DEBUG: Selected: VCOH
[10:37:22] ERROR: SetFrequencySXR(1812.5 MHz) - cannot deliver frequency

I found that the error happens for frequency ranges: 1710-1920MHz, 859.5-964.0MHz, probably others.
I found out that if I change(usually increase) the Reference Clock from 30.72MHz to 36.72MHz, for example, the desired frequency will be accepted.
I also found that LimeQuickTest fails:

[ TESTING STARTED ]
->Start time: Fri Sep 18 10:55:43 2020
->Device: LimeSDR-USB, media=USB 2.0, module=FX3, addr=1d50:6108, serial=0009081C05C1361B, HW=4, GW=2.23
Warning: USB3 not available
Serial Number: 0009081C05C1361B
Chip temperature: 53 C
[ Clock Network Test ]
->FX3 GPIF clock test
Test results: 23803; 27559; 31315 - PASSED
->Si5351C test
CLK0: 17554 / 17554 - PASSED
CLK1: 17554 / 17554 - PASSED
CLK2: 17554 / 17554 - PASSED
CLK3: 17554 / 17554 - PASSED
CLK4: 17554 / 17554 - PASSED
CLK5: 17554 / 17554 - PASSED
CLK6: 17554 / 17554 - PASSED
->ADF4002 Test
Result: 10 - PASSED
->VCTCXO test
Results : 5112941 (min); 5113077 (max) - PASSED
->Clock Network Test PASSED
[ FPGA EEPROM Test ]
->Read EEPROM
->Read data: 13 01 18 13 01 19 03
->FPGA EEPROM Test PASSED
[ LMS7002M Test ]
->Perform Registers Test
->External Reset line test
Reg 0x20: Write value 0xFFFD, Read value 0xFFFD
Reg 0x20: value after reset 0x0FFFF
->LMS7002M Test PASSED
[ RF Loopback Test ]
Note: The test should be run without anything connected to RF ports
->Configure LMS
CGEN: Freq=80 MHz, VCO=2.4 GHz, INT=77, FRAC=131072, DIV_OUTCH_CGEN=14
CGEN: Freq=80 MHz, VCO=2.4 GHz, INT=77, FRAC=131072, DIV_OUTCH_CGEN=14
CGEN: Freq=491.52 MHz, VCO=1.96608 GHz, INT=63, FRAC=0, DIV_OUTCH_CGEN=1
CGEN: Freq=491.52 MHz, VCO=1.96608 GHz, INT=63, FRAC=0, DIV_OUTCH_CGEN=1
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
SetPllFrequency: error configuring phase
LML TX phase search FAIL
Failed to set sample rate
->RF Loopback Test FAILED
=> Board tests FAILED <=
Elapsed time: 2.29 seconds

Could you please, give some hints how can I solve this problem?
Thank you.

may be not enough voltage

I use external supply (12V, 1.5A) and USB3. On this same PC, I have tried to use another LimeSDR-USB device, and the result was the same. I have tested also with a laptop - same result.

@nedsana

two USB3

I'll delete this picture if you finish seeing it @nedsana

I don't have two USB ports on my Lime device. The device I use is described here:
https://wiki.myriadrf.org/LimeSDR-USB_hardware_description#Clock_distribution
Here is my setup:

You can delete your image, thanks.

two USB3 plug in the computer not Lime

Sorry I'm not an engineer , but two USB3 plug in the computer fixed the same issue as you

Aha, I did not understand this from the image. OK, I have to try this. But I need to find such cable first. Thanks for the idea.

Hello, could you try to use USB3? From the logs it shows that the board was tested with USB2 connection.

I have tried all USB ports on this PC, they are all supposed to be USB3. And in any of the cases I was getting the error.
Then I decided to use external power supply, as I mentioned (12V, 1.5A). Still the same result.

Does it enumerate as USB2 on all the ports? Do you have any other PC with USB3 ports available to run the quicktest program?

I just executed the LimeQuickTest on a laptop, on all ports. They were all recognised as USB2.
And the test always failed when it tried to set certain frequencies. So no matter if I use the PC or the Laptop, and not matter of the USB port, LimeQuickTest always fails.
Does the USB type really matter, when external power source is used? Could it be that the power supply I use is disturbing the SDR?
Btw, some time ago, I got another LimeSDR-USB device (unavailable at the moment), which was recognised as USB3 on this same PC. But again I was not able to set the desired 1800Mhz frequencies - I was getting "SetFrequencySXR(1812,5 MHz) - cannot deliver frequency".

Since you suspect the USB type, I played a bit with my cabling and it turned out that the USB cable, which connects the PC and SDR is USB2 type. I removed and now I have USB3 connection, but still setting 1800MHz fails. Here is the result of LimeQuickTest

[ TESTING STARTED ]
->Start time: Mon Sep 21 11:43:55 2020
->Device: LimeSDR-USB, media=USB 3.0, module=FX3, addr=1d50:6108, serial=0009081C05C1361B, HW=4, GW=2.23
Serial Number: 0009081C05C1361B
Chip temperature: 25 C
[ Clock Network Test ]
->FX3 GPIF clock test
Test results: 35090; 38846; 42602 - PASSED
->Si5351C test
CLK0: 17554 / 17554 - PASSED
CLK1: 17554 / 17554 - PASSED
CLK2: 17554 / 17554 - PASSED
CLK3: 17554 / 17554 - PASSED
CLK4: 17554 / 17554 - PASSED
CLK5: 17554 / 17554 - PASSED
CLK6: 17554 / 17554 - PASSED
->ADF4002 Test
Result: 10 - PASSED
->VCTCXO test
Results : 5112939 (min); 5113075 (max) - PASSED
->Clock Network Test PASSED
[ FPGA EEPROM Test ]
->Read EEPROM
->Read data: 13 01 18 13 01 19 03
->FPGA EEPROM Test PASSED
[ LMS7002M Test ]
->Perform Registers Test
->External Reset line test
Reg 0x20: Write value 0xFFFD, Read value 0xFFFD
Reg 0x20: value after reset 0x0FFFF
->LMS7002M Test PASSED
[ RF Loopback Test ]
Note: The test should be run without anything connected to RF ports
->Configure LMS
CGEN: Freq=80 MHz, VCO=2.4 GHz, INT=77, FRAC=131072, DIV_OUTCH_CGEN=14
CGEN: Freq=80 MHz, VCO=2.4 GHz, INT=77, FRAC=131072, DIV_OUTCH_CGEN=14
CGEN: Freq=491.52 MHz, VCO=1.96608 GHz, INT=63, FRAC=0, DIV_OUTCH_CGEN=1
CGEN: Freq=491.52 MHz, VCO=1.96608 GHz, INT=63, FRAC=0, DIV_OUTCH_CGEN=1
->Run Tests (TX_2-> LNA_L):
CH0 (SXR=800.0MHz, SXT=805.0MHz): Result:(-14.2 dBFS, 5.00 MHz) - PASSED
CH1 (SXR=800.0MHz, SXT=805.0MHz): Result:(-16.0 dBFS, 5.00 MHz) - PASSED
->Run Tests (TX_1 -> LNA_W):
SetFrequencySXR(1800 MHz) - cannot deliver frequency
->Run Tests (TX_2-> LNA_H):
CH0 (SXR=2500.0MHz, SXT=2505.0MHz): Result:(-29.3 dBFS, 5.00 MHz) - FAILED
CH1 (SXR=2500.0MHz, SXT=2505.0MHz): Result:(-12.3 dBFS, 5.00 MHz) - PASSED
->RF Loopback Test FAILED
=> Board tests FAILED <=
Elapsed time: 1.68 seconds

Could you share your register ini file, please.

Please check this file, I hope this is what you requested. I got it from LimeSuiteGUI, simply by pressing Save button.
 Contact Crowd supply for RMA, sorry for inconvenience.

OK, but in the initial description, I mentioned that to make LimeSDR accept the 1800MHz, I had to set the Reference Clock from 30.72MHz to 36.0MHz or 40.0MHz. So, I am able to use the frequency range around 1800Mhz.
What I don't know is whether it is correct to play with the reference clock and what consequences this can have.
Could you please comment on this?
Thank you.

In this case you may get other dead regions in the spectrum.

Yes, I observe indeed dead regions in my current experiments. But apart from this, can I expect problems with sampling and data transfer?
Because, if sampling and data transfer are fine, I could use the Reference Clock toggling as a workaround.

Data sampling is fine, while DACs and ADCs are running from a separate clock PLL - CGEN.

Today I also tried the suggestion from @mindfocus for the 2 USB cable - did not help with my SDR.
But I happened to get for a few moments another LimeSDR-USB. And it is working fine with the 1800MHz.
So indeed I was fighting a hardware issue.
Thanks a lot for the support.