Composite package

Summary Change Description
Turned compositevies.py into a few different classes/packages.  There are no functionality changes.  This is just a refactor.  I changed the "composite view" terminology to "format".
There is now a Format class and the 3 formats (PeakDataFormat, PeakGroupsFormat, and FluxCircFormat) are derived classes of Format.  There is also a FormatGroup class that groups the formats and provides a single interface for all compatible formats.  I added a derivation of FormatGroup classed SearchGroup that has the 3 formats hard-coded into it.
I also wanted to split off another class called Query, but in the interests of time, I didn't go as far as to classify it, but I did pull apart the inner workings of qry objects from FormatGroup (and Format).  I think of Query as a passable & manipulable small version of FormatGroup because it contains search data of all 3 formats.  If I were to extend that relationship analogy, I would have broken Query into QueryGroup and Query, but I didn't feel it was worth it.
Affected Issue Numbers

Resolves #415

Code Review Notes
I have not teased apart the associated test files.  I suggest we make that a separate PR.
Checklist

[x] All issue requirements satisfied (or no linked issues)
[x] Linting passes.
[x] Migrations created & committed (or no model changes)
[x] Tests implemented (or no code changes)
[x] All tests pass

Couldn't help it, I just did some separation and renaming of the tests.  Note, to deal with a new jscpd error in unchanged code, I created a global method called from 2 different test classes.

I haven't looked through in great detail, but it seems like a good change overall. A couple of early comments/questions:

The term Format as a module name seems a bit generic and I'm not sure I understand it. Would something like 'DataFormatorMassspecDataFormat` work?
I don't understand the directory structure DataRepo/formats/DataRepo. Could those just be moved to DataRepo/formats/?

Also, I know we haven't been strict about following it, but working across Python projects is a bit easier when language specific conventions are used. Specifically I'm thinking about package and module names in PEP8.

Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.

I haven't looked through in great detail, but it seems like a good change overall. A couple of early comments/questions:

The term Format as a module name seems a bit generic and I'm not sure I understand it. Would something like 'DataFormatorMassspecDataFormat` work?

I thought compositeviews was too abstract and things like *AdvancedSearchView were too specific (since it defines more than just a search interface.  I was looking for a way to say "a view comprised of multiple models organized in a specific way", but I realized it wasn't actually a view.  It was the organization of data underlying a view that a view uses - the way it uses a model, but it's not a model either - it's a specific "organization" of multiple models.  So it's like a layer in between models and views.  In that sense, I thought "Format" was perfect.  It's how we were already referring to the output tables which define the results - and a "format" is a way of organizing data (but not defining the data.  The problem with Format, as I see it is it doesn't describe the interface that comes along with the format either (constructing queries and converting form data, etc.
DataFormat works just as well as Format, but it has the same deficiency in fully describing what it does.  I'm not opposed to it, but I'm not satisfied with either moniker either.  Given the choice, I feel like Format is cleaner, but I'm definitely not satisfied either way...

[ ] Rename Format to DataFormat

I don't understand the directory structure DataRepo/formats/DataRepo. Could those just be moved to DataRepo/formats/?

I was mimicking the directory structure @fkang-pu got from bootstrap for the temapltes (e.g. DataRepo/templates/DataRepo).  I liked how it separated the generic (read: parent) templates from the app-specific (read: child) templates.  It's another thing that both satisfies and bothers me at the same time.  How would you separate base and derived classes? Would you move the base classes into a subdirectory or stuff them into a sibling directory?

Also, I know we haven't been strict about following it, but working across Python projects is a bit easier when language specific conventions are used. Specifically I'm thinking about package and module names in PEP8.

Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.

Yeah, I changed my Formats directory to formats, and realized I should use lowercase elsewhere too.  I don't think about it when I'm in the zone.  I probably would have continued lower-casing things, but when I ran into the OS case sensitivity issue, I soured on the effort...  I will try your suggestion about renaming remotely.

[ ] Modify file/dir names to meet pythonic case conventions

BTW, I tried rebasing yesterday to resolve conflicts, but for some reason, the rebased code causes 2 tests to fail and the reason is eluding me.  In fact, if I run the tests individually, they pass.  When I run them together, they fail.  And if I modify the expected result, they fail in the opposite way, claiming they are getting the reverse result.  It's really confusing.  I want to try and poke around in the test database to see what data the tests are actually getting and to try the tested methods interactively, but I can't figure out how to use the test database in the shell.  Suggestions I found online don't seem to work...

Went down a rabbit hole during the rebase.  I fixed another minor bug in the stats code that affected counts in cases I don't think our data likely currently has, and that fix ran into what I believe is a bug in django's SQL construction of distinct clauses.  I was able to work around that bug by avoiding the case that triggers it.  It's all explained in code comments and an exception I made to catch potential future encounters of the bug when the format stats data is edited (or when new many-related models are added).

@lparsons - I re-requested your review so you can take a look at the last 2 commits - the rebase and a bug fix for a bug that I found during rebase.

I created a Django-Users forum thread about the suspected django bug...

I haven't looked through in great detail, but it seems like a good change overall. A couple of early comments/questions:

The term Format as a module name seems a bit generic and I'm not sure I understand it. Would something like 'DataFormatorMassspecDataFormat` work?

I thought compositeviews was too abstract and things like *AdvancedSearchView were too specific (since it defines more than just a search interface. I was looking for a way to say "a view comprised of multiple models organized in a specific way", but I realized it wasn't actually a view. It was the organization of data underlying a view that a view uses - the way it uses a model, but it's not a model either - it's a specific "organization" of multiple models. So it's like a layer in between models and views. In that sense, I thought "Format" was perfect. It's how we were already referring to the output tables which define the results - and a "format" is a way of organizing data (but not defining the data. The problem with Format, as I see it is it doesn't describe the interface that comes along with the format either (constructing queries and converting form data, etc.
DataFormat works just as well as Format, but it has the same deficiency in fully describing what it does. I'm not opposed to it, but I'm not satisfied with either moniker either. Given the choice, I feel like Format is cleaner, but I'm definitely not satisfied either way...

[ ]  Rename Format to DataFormat

I don't understand the directory structure DataRepo/formats/DataRepo. Could those just be moved to DataRepo/formats/?

I was mimicking the directory structure @fkang-pu got from bootstrap for the temapltes (e.g. DataRepo/templates/DataRepo). I liked how it separated the generic (read: parent) templates from the app-specific (read: child) templates. It's another thing that both satisfies and bothers me at the same time. How would you separate base and derived classes? Would you move the base classes into a subdirectory or stuff them into a sibling directory?

In trying to make sure DataFormat was a better name to use (because I felt it didn't fully capture what the underlying code is - nor does Format for that matter), I started reading up again on MVC design.  Apparently, part of my difficulty in figuring out what to call it comes from the fact that Django is MTV (Model Template View), not MVC (Model View Controller).  Django's "View" is MVC's "Controller".
However, that doesn't really resolve the difficulty in figuring out how to categorize the role of the current "Format" related classes.
There are multiple classifications that could fit.  It might be best to first clarify what the "Format" classes do more fully.  The way I see it, (since there are no model change commands coming from the view) the *Format* classes do 3 things:

They receive queries from the view and collate/organize the results that it sends back.
They abstract the business logic that defines a potentially changing model structure so that model changes don't require complete view overhauls
They organize disparate model elements into a "streamlined" model description that maps 1:1 with a view

It could be classified as the "ViewModel" component of an MVVM design pattern (Model View ViewModel).  ViewModel is a separation of the view and the model that makes the UI development less tightly coupled with a particular model structure.
However, you could also call it a controller, because the controller handles user commands coming through the view and interacts with the model, but only in the most generic of senses.  Usually, this is thought of in terms are altering the model and doesn't necessarily include data definitions of mapping models to a view.
But I still don't like either a controller or viewmodel name...
Maybe "ModelFormat"?  There's just nothing that seems satisfying.

As for the package organization:

I was mimicking the directory structure @fkang-pu got from bootstrap for the temapltes (e.g. DataRepo/templates/DataRepo). I liked how it separated the generic (read: parent) templates from the app-specific (read: child) templates. It's another thing that both satisfies and bothers me at the same time. How would you separate base and derived classes? Would you move the base classes into a subdirectory or stuff them into a sibling directory?

I don't see a problem with everything being in DataRepo.formats, but you could also do DataRepo.data and DataRepo.data.formats and put the general stuff in data and the specific formats in formats. Just a quick thought though. I don't understand the logic behind DataRepo.formats.DataRepo.

I originally had it all in DataRepo.formats, but it just seemed disorganized to me with parents and children mixed together.

It implies there might be non-DataRepo formats, but everything is already in the DataRepo app package.

That's actually it exactly.  Formats.py, FormatGroup.py, and Query.py are essentially generally applicable.  They could be used in any Django project.  As is multiforms.py and pager.py.  None of them are tracebase dependent.  Certainly other applications could necessitate fleshing out some things (e.g. the ncmp_choices population).  So maybe they should have their own external package and be added like a dependency.  (I don't mean that literally.  The javascript is tied to those classes and the templates are too - and both of those components are still tightly coupled to tracebase.)  But perhaps, given this point, they should go in an entirely different directory...

For the record, I don't like it in the templates either, but I can live with either or both if need be. Just mentioning it.

It's another one of those things that I both like & dislike at the same time.  I think "classification" in general is something I find distasteful as a task.  There's always exceptions and overlap and alternate schemes.

I was mimicking the directory structure @fkang-pu got from bootstrap for the temapltes (e.g. DataRepo/templates/DataRepo). I liked how it separated the generic (read: parent) templates from the app-specific (read: child) templates. It's another thing that both satisfies and bothers me at the same time. How would you separate base and derived classes? Would you move the base classes into a subdirectory or stuff them into a sibling directory?

For templates structure, I was trying to follow Django's documentation:
Your project and your reusable app
I think we can also use it as a reference to think about the layout for splitting classes/packages.
It's definite better organizations for moving compositeviews into formats.  The name "formats" seems a bit generic, but I can't come up with a better name. Another question to me is if "format" should be directly under DataRepo or as a subdirectory in utils.
I am thinking about the following layout, mainly put classes into a subdirectory in utils if it's not in forms, models, views, or tests categories.
DataRepo/
  __init__.py
  admin.py
    apps.py
    forms/
      __init__.py
      multiforms.py
      ...
    migrations/
      __init__.py
      ...
    models/
      __init__.py
      ...
    static/
    templates/
      DataRepo/
    tests/
      __init__.py
      ...
    urls.py
    utils/
      __init__.py
      formats/
      loaders/
      ...
    views/
      __init__.py
      ...

I was mimicking the directory structure @fkang-pu got from bootstrap for the temapltes (e.g. DataRepo/templates/DataRepo). I liked how it separated the generic (read: parent) templates from the app-specific (read: child) templates. It's another thing that both satisfies and bothers me at the same time. How would you separate base and derived classes? Would you move the base classes into a subdirectory or stuff them into a sibling directory?

For templates structure, I was trying to follow Django's documentation: Your project and your reusable app I think we can also use it as a reference to think about the layout for splitting classes/packages.
It's definite better organizations for moving compositeviews into formats. The name "formats" seems a bit generic, but I can't come up with a better name. Another question to me is if "format" should be directly under DataRepo or as a subdirectory in utils.
I am thinking about the following layout, mainly put classes into a subdirectory in utils if it's not in forms, models, views, or tests categories.
DataRepo/
  __init__.py
  admin.py
    apps.py
    forms/
      __init__.py
      multiforms.py
      ...
    migrations/
      __init__.py
      ...
    models/
      __init__.py
      ...
    static/
    templates/
      DataRepo/
    tests/
      __init__.py
      ...
    urls.py
    utils/
      __init__.py
      formats/
      loaders/
      ...
    views/
      __init__.py
      ...

Yeah.  I'd say, based on that tutorial, making DataRepo/formats/DataRepo makes the package more portable between projects.  The tutorial has the same sort of structure for stuff in their polls app example.  I flattened the directory all the same, but there is a utility & logic to support it...

All the issues are addressed. Since John's not in today, I will merge once the CI is done.


python310Packages.angr: 9.2.38 -> 9.2.39

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 217581 run on x86_64-linux 1

16 packages built:

python310Packages.ailment
python310Packages.angr
python310Packages.angrcli
python310Packages.angrop
python310Packages.archinfo
python310Packages.claripy
python310Packages.cle
python310Packages.pyvex
python311Packages.ailment
python311Packages.angr
python311Packages.angrcli
python311Packages.angrop
python311Packages.archinfo
python311Packages.claripy
python311Packages.cle
python311Packages.pyvex


Update packages

Update (currently) non vulnerable packages. Follow up of !6992

Thanks for the pull request @SunBlack!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.
:earth_africa: :earth_americas: :earth_asia:

I believe there is a regression in globby 8 that caused us to avoid moving to it in the past ( I think it was https://github.com/sindresorhus/globby/issues/75) so we should confirm the release zips are all correct before merging this.

Built both release zips with and without these changes and everything appears to be identical  Thanks @SunBlack!


Clean up desktop's index.html

Initially I wanted to delete only the duplicated <html> opening tag, but then decided to make it a fully valid HTML document.
Passes https://validator.w3.org/nu/#textarea check.

looks good, you have format the HTML code.

Thank you!


Links are broken to the internal CLI pages

Which page is affected?:
https://kudo.dev/docs/
What exactly is broken?:
In the docs page, the link found here: https://kudo.dev/docs/#install-kudo-cli
and the link to kudo init documentation found here: https://kudo.dev/docs/#install-kudo-into-your-cluster
are broken
Which device do you use?:
Google chrome
Anything else we need to know?:
Just need to update these links.

created PR:
https://github.com/kudobuilder/kudo.dev/pull/296

See also https://kubernetes.slack.com/archives/CG3HTFCMV/p1600443438001100


Unable to use this package in React 17

Describe the bug
Not able to import anything from "docx-preview", it gives error "This dependency was not found: docx-preview".
I tried to add "main": "./dist/docx-preview.js" line in package.json inside node_module then it gives below error,
Module parse failed: Unexpected token (99:58)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     }
|     function hasXmlParserError(doc) {
>         return doc.getElementsByTagName("parsererror")[0]?.textContent;
|     }
|     function removeUTF8BOM(data) {

@dmitri-gb @champkeh @fangd1997 @enjineerds @jrclaypool @szabi
Can you please help

can you provide a reproducible projects or code samples?

@mohituplers you can use like this:
import { renderAsync } from 'docx-preview/dist/docx-preview';


Spring microservice instance is not registering with Eureka running in port other than 8761

I am new to microservices and springboot, learning it. Got the following issue. Please check.
application.yml of my microservice (client to Eureka)
spring:
  application:
    name: queue1

eureka:
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://localhost:8762/

server:
  port: 7777

app:
  id: ${random.uuid}

application.yml of Eureka
eureka:
  instance:
    hostname: peer1
  client:
    register-with-eureka: false
    fetch-registry: false
server:
  port: 8762

I am starting Eureka in port 8762 and referring to that in my microservices. Microservice is failing to register itself with Eureka. Following is the exception from microservice logs.
2019-03-21 17:02:16.248 ERROR 1804 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_ZUUL_RIBBON/ICB8061.ibsplc.com:zuul_ribbon:8080 - was unable to refresh its cache! status = Cannot execute request on any known server

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
	at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:1051) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:965) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1479) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1446) [eureka-client-1.9.8.jar:1.9.8]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_202]
	at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_202]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_202]

2019-03-21 17:02:16.278 ERROR 1804 --- [tbeatExecutor-0] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8762/}

javax.ws.rs.WebApplicationException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Root name 'timestamp' does not match expected ('instance') for type [simple type, class com.netflix.appinfo.InstanceInfo]
 at [Source: (com.sun.jersey.client.apache4.ApacheHttpClient4Handler$HttpClientResponseInputStream); line: 1, column: 2]
	at com.netflix.discovery.provider.DiscoveryJerseyProvider.readFrom(DiscoveryJerseyProvider.java:110) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:634) ~[jersey-client-1.19.1.jar:1.19.1]
	at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) ~[jersey-client-1.19.1.jar:1.19.1]
	at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.sendHeartBeat(AbstractJerseyEurekaHttpClient.java:105) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:89) ~[eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:846) [eureka-client-1.9.8.jar:1.9.8]
	at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1405) [eureka-client-1.9.8.jar:1.9.8]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_202]
	at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_202]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_202]

Now the most important thing is, everything is perfectly fine if I change the Eureka server port and the microservice's Eureka registration port to 8761 !!!! Registration of microservice is succeding in this case.
Did this multiple times before posting the question and it is behaving like this.
Any inputs here would be very much helpful.

The springboot version that I am using is 2.1.3.RELEASE.
And the cloud version is Greenwich.RELEASE

@karthikrajas  hello,  did you resolve this problem? can you share? thanks!

Both of your configuration files are named after the hump
register-with-eureka
registerWithEureka
Try to unify them
My English is poor

I meet the same problem as you，and chage the port to 8761,but don't succeed. Would you give some advices, I tried many other solution  , no one works  ...

Use this in client:
defaultZone: http://localhost:8762/eureka and you will be good

eureka:
server:
port: 8762
client:
register-with-eureka: true
fetch-registry: true
service-url:
defaultZone: http://${EUREKA_HOST:localhost}:${EUREKA_PORT:${eureka.server.port}}/eureka/

I got the same issue.  My version is 2.2.7.RELEASE.
cloud version is Hoxton.SR4. Nothing above is solved the problem.

It's probably best to ask in the corresponding Spring repo, this is not really specific to Eureka.

Annotate Bootstrap class with @EnableEurekaServer

Use this in client:
defaultZone: http://localhost:8762/eureka and you will be good

Would u share the reason, pls ？

Please add these dependencies in client.
            <dependency>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-actuator</artifactId>
	</dependency>

add @EnableEurekaClient annotation over main class.
++++++++++++++application.yaml++++++++++
eureka:
client:
register-with-eureka: true
fetch-registry: true
healthcheck:
enabled: true
service-url:
defaultZone: http://localhost:8081/eureka/
server:
port: 8082
spring:
application:
name: EUREKA_CLIENT-1
+++++++++++++++++++++++++++++++++++++
i hope this will work.
and also please make sure that in eureka server application the dependency should be
              <dependency>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
	</dependency>

u can keep any port  i kept 8081 instead of 8761

这是来自QQ邮箱的假期自动回复邮件。你好，我最近正在休假中，无法亲自回复你的邮件。我将在假期结束后，尽快给你回复。

这是来自QQ邮箱的假期自动回复邮件。你好，我最近正在休假中，无法亲自回复你的邮件。我将在假期结束后，尽快给你回复。

i cant understand...can please type in english..

I upgarde eurika server port 8761 --> 8762
Still it is not working now.


Saving large Jupyter notebooks fails due to the string length restriction of JSON.stringify

Given we're serializing a lot of cells, we can easily serialize the cells one by one and then construct the bytes from that, instead of building a string.
I.e. notebook = {cells: [.....], metadata: {...}}
pseudo code:
json = [TextEncoder.encode({), ...notebook.cells.map(cell => TextEncoder.encode(JSON.stringify(cell)))];
Given that we know the indent level, its easy to construct the JSON string in pieces of bytes.

@rebornix /cc

This will address the issue, however we need a way to read the JSON as well,
However given that no one seems to be running into this issue (unable to save/load large notebooks), I'm changing this from bug to paper cut for now

No one has reported this in all these years, hence closing this issue.


us.myles.viaversion.libs.gson.JsonSyntaxException: Expected a us.myles.viaversion.libs.gson.JsonObject but was us.myles.viaversion.libs.gson.JsonNull

What is the output link of /viaversion dump?
http://hastebin.com/nokazagura.json
Are you using any additional software like BungeeCord? If so, what software and version? (Please list your plugins as well)
Running viaversion on bungeeCord
How does this error happen? login? Using an item?
Seems to occur on "InitialHandler has connected"
Is there an error in the console? Use pastebin.com. Is there a kick message?
http://pastebin.com/1KHAdcyR
IP has been changed to <IP_ADDRESS> in the above paste, however I believe it belongs to minecraft-mp.com

Should fix this :)


Race condition in RCTBridge

RCTBridge.setUp is executing. On some moment module is created using [[moduleClass alloc] init]
RCTReachability.m subscribes to event in init method: SCNetworkReachabilitySetCallback(_reachability, RCTReachabilityCallback, &context);
RCTBridge.setUp continuing and calls RCTLocalModulesConfig
RCTReachabilityCallback is called and executes eventDispathed.sendDeviceEventWithName -> enqueueJSCall
enqueueJSCall - crashes because there are no modules exists yet

Here pull request which fixes this issue (actually I guess this is a real reason for #1114).
Now I'm thinking that it worth giving user a warning that his call is ignored because RCTBridge still initializing, what do you think?

Cc: @tadeuzagallo, who's been working on a unified solution for these race conditions.

Thanks @artemyarulin for raising that issue!
I had moved the _loading already, but after your comment I figured out a way so we never ignore any call, so we should it should be alright now.
The commit hasn't landed internally yet, but I'm working on it, shouldn't take long now.

@tadeuzagallo Cool, thank you!

Fixed in https://github.com/facebook/react-native/pull/1165


TabbedView forgets state

If you tap a movie in the movies tab, then tap the "My Lists" tab, then switch back to the movies tab, the app forgets that you tapped a movie and resets to the standard view.
I'm currently playing around with TabbedView in a different project and would be interested on how you would solve this. As far as I understand views are supposed to be "disposable", but storing the state of the subviews in the TabbedView itself feels wrong too...

Yup, IMO if this not handled from Apple it’ll feel weird, I don’t want to deal with restoring a whole NavigationView state for example. So I’ll really hope Apple will implement it within SwiftUI.

Some kind of routing mechanism might be an appropriate solution. This was very difficult to implement in UIKit but the more declarative approach of SwiftUI should improve things greatly.

The ability to go directly to a movie in the Movies tab via notification (such as, when it is released) would be another use case for routing.

Yeah, a router sound very very easy.
You just do a case stringPath: return MovieDetailView(movieId) and done.
Don't know if I'll support notifications yet, but I might do a today widget, so it would be a good occasion to do it.

Great job.
Any update or workaround on this? I have been holding out on SwiftUI because of this issue. It is very un-iOS, losing state when tabview is switched.

I did not tried the following, but it seems the way to go until Apple fixes this.
Workaround: https://gist.github.com/Amzd/2eb5b941865e8c5cccf149e6e07c8810
From: https://github.com/ryangittings/swiftui-bugs


kubernetes_sd_configs selectors not working as expected

What did you do?
Configured prometheus.yaml with the following:
[redacted]
        kubernetes_sd_configs:
        - role: pod
          namespaces:
            names:
              - default
          selectors:
            - role: pod
              label: "app:abc-123"
[redacted]

What did you expect to see?
Success boot, since I followed the documentation available here
What did you see instead? Under which circumstances?
While booting up prometheus I get the following error:

level=error ts=2020-04-29T14:53:46.508Z caller=main.go:740 err="error loading config from "/etc/config/prometheus.yml": couldn't load configuration (--config.file="/etc/config/prometheus.yml"): parsing YAML file /etc/config/prometheus.yml: yaml: unmarshal errors:
line 17: field selectors not found in type kubernetes.plain"

Environment

Prometheus version:
prometheus, version 2.16.0 (branch: HEAD, revision: b90be6f32a33c03163d700e1452b54454ddce0ec)
build user:       root@7ea0ae865f12
build date:       20200213-23:50:02
go version:       go1.13.8

Prometheus configuration file:

global:
  scrape_interval: 1m
  scrape_timeout: 10s
  evaluation_interval: 1m
scrape_configs:
  - job_name: 'kubernetes-pods'
    metrics_path: /metrics
    kubernetes_sd_configs:
    - role: pod
      namespaces:
        names:
          - default
      selectors:
        - role: pod
          label: "app:abc-123"

Logs:

level=error ts=2020-04-29T14:53:46.508Z caller=main.go:740 err="error loading config from \"/etc/config/prometheus.yml\": couldn't load configuration (--config.file=\"/etc/config/prometheus.yml\"): parsing YAML file /etc/config/prometheus.yml: yaml: unmarshal errors:\n  line 17: field selectors not found in type kubernetes.plain"

I found the issue, the selectors are only available in version 2.17 and I am using version 2.16, so will have to update.
Closing the issue.


Android build fixes

This PR adds android buildscripts for several examples that previously didn't have them. It also fixes a few other build issues.
I tested most of these, but did not test descriptorbuffer, meshshader, raytracingpositionfetch, shaderobjects, or texturesparseresidency, as my device doesn't support some of the required features.

Thanks for your PR. Very much appreciated!


[Chore]: Backfill unit tests for repositories package

Background
We've been feeling the pain of our integration-only strategy lately, and have been unable to test some common failure cases. We've already established patterns for testing the controllers with k8s client fakes, and we're confident we can do the same here.
Action to take
Find the // untested comments in the repositories package and backfill unit tests for those cases.
Impact
This will give us more confidence that we're properly implementing error handling, and also help us avoid regressions of untested behavior
Dev Notes

Start with CFServiceInstance and write chores for others

I would generally advice against mocking types we don't own, in this case the controller-runtime client. We'd be making assumptions about how the client (and the Kubernetes API) work, which might be wrong. It would allow us to test some particularly hard to reach error cases, but I could only find 3 instances of // untested in the repositories package, so maybe it's not that big of a deal? Overall I don't think it warrants the introduction of a new test suite.

Thank you, @gcapizzi. I'll discuss this with the AMER team today. I agree that, if we add these, it only makes sense to test the // untested branches.

@matt-royal someone also pointed out that some // untested branches have been deleted because we have a coverage report now, not so easy to spot them via that webpage though 😕  I'm sure there's a way to extract all uncovered lines and extract error checks from them. We should probably be looking at all our uncovered lines anyway, but that is not necessarily related to this issue.

We created a POC to add unit level tests to the existing suite, but it didn't get a lot of support, so we abandoned it. @georgethebeatle has another approach to try by adding an interface layer on top of the k8s cliet, but for now we will close this issue.


More details in document?

Could you provide a complete document with more details? Thanks!

Where is the requirement.txt?

Where is the requirement.txt?


Unable to drop temp tables

Description
sean@Seans-Air ~ % ./glaredb
GlareDB (v0.5.1)
Using in-memory catalog
Type \help for help.
> create temp table a as select 1;
Table created
> drop table a;
Error: Execution error: failed to drop tables: Failed Metastore request: Missing database object; schema: public, name: a

This bug was introduced when making changes for RPC. I'll take it up (along with fixing the same for RPC as well).


ActiveRecord::AssociationTypeMismatch error on sender.send_message - fixed issue #322

Why not using Mailboxer.uses_emails?


Unable to configure number_of_replicas

CrateDB version: 2.0.6
JVM version: jdk 8 (whatever version is installed by docker-crate)
OS version / environment description: alpine:3.5 (using image provided by docker-crate)
Problem description:
Crate won't start if number_of_replicas setting exists in crate yaml configuration file.
Steps to reproduce:

docker run crate:2.0.6 -Cnumber_of_replicas=0
a stacktrace will be printed and crate will stop, the error reads: java.lang.IllegalArgumentException: unknown setting [number_of_replicas] please check that any required plugins are installed, or check the breaking changes documentation for removed settings.

Use case:
Feature description:

@mindscratch
number_of_replicas cannot be set globally, it's a setting that must be specified for every table. Check relevant documentation here:
https://crate.io/docs/crate/reference/en/2.0/sql/ddl/replication.html and here: https://crate.io/docs/crate/reference/en/2.0/sql/reference/create_table.html#number-of-replicas

@matriv Thanks for the quick response. I understand what you're saying, however, we've had that setting in our configuration since we began using crate (back to 0.5x). Also, the documentation for the setting has remained the same so I assumed it worked as it had always been.

The link that you provided states that it's a setting for the CREATE TABLE.
The thing that has changed is that in 2.0.x there is a strict validation of the cluster/node settings you provide, while before they were ignored.

Oh I see. I thought it was a global setting for tables, which could also be overridden when using create table. I think the confusion came from the fact that this setting is documented in the "configuration" section, which seemed to me to imply that you set it up when configuring crate.
I appreciate the clarification, perhaps something can be done in the docs to make it more clear that the "table settings" in the "configuration" section are only for use when doing create table, or perhaps, just move the documentation of those settings so its only in the create table portion of the docs.

@mindscratch
We have already removed any reference to the table settings from the configuration section in 2.1, you can check here: https://crate.io/docs/crate/reference/en/2.1/configuration.html

thanks


Is there a non-capture function?

Hi there Martin,
Thank you for the plugin. This has been tremendously helpful, especially reviewing my old notes and imports from other platforms.
Wondering if there is a non-capture function... I have tried using (?:xxx), xxx being where to skip over but it hasn't worked for me. I am trying to delete the external links in markdown \[(?:\w+)\]\(https?\:\/\/.+?\)  so that [site](https://website.com) will be rewritten to site only.
If there is something obvious that I overlooked, please let me know that as well!
Thank you,
Jason

I figured a workaround where I could use captured group with $<group number> syntax as a replacement for the initial search!
So, the (\[)(.+?)(\]\(https?\:\/\/[a-zA-Z0-9_\.\/-]+\)) is replaced with $2... which is (.+?) which is capturing site from [site](https://site.com) while deleting the others.
Anyway, posting this for others who might be thinking about the same question.
Thanks againg for the plugin!

thanks for sharing!


Beatmaps are always read from osu!.db, setting path to Songs folder does nothing

The "old" method of syncing is still implemented as a fallback, which requires this variable.


Cubemap bug

Operating system or device - Godot version:
Ubuntu 15.10 (64 Bits) - Godot 2.1 Stable
Issue description
Cubemap is wrong saved when scene is closed and open again
Steps to reproduce:

Create a scene, with spatial node as root, and camera and WorldEnviroment as children, create and set cubemap with all images
Save scene (if you execute scene, you see that cubemap doesn't work)
Close scene
Open scene (cubemap disappeared)
If you edit cubemap, you see that only Left image is configured, the others are in blank.

Link to minimal example project
Minimal example project and screenshots:
https://mega.nz/#!1IcAzJxL!7TzTeaT5iInpNSFYx_jKlinOLzMzVhfVn3l2M2aMy6U

Cubemap support was removed in Godot 3.0 in favor of panorama skies, so this issue is no longer relevant.


Zoom-in/out with animation too fast

Quoting @c0dd3vi11 :
I found this: mapView.smoothScaleFromCenter(mapView.scale * 1.5f). And the opposite is mapView.smoothScaleFromCenter(mapView.scale / 1.5f). But when I call the functions too fast then MapView starts blinking.

I'll try to reproduce this one.

Sorry, that was because of my mistake: https://github.com/peterLaurence/MapView/issues/15#issuecomment-636654911

No worries, and indeed, I can't reproduce this issue.


Timeseries of domain averaged mean and stdev or box whisker plots of domain averaged fields

[ ] Generate box whisker plots for 2D fields to investigate the data range against forecast range
[ ] Then extend the capability to create a timeseries of box whisker plots against forecast range. Alternatively use a line for the median and shading for percentiles. This will be useful to look at differences between UM and LFRic.
[ ] include option to plot the timeseries of box whisker plots from two different simulations in the same figure
[ ] @jfrost-mo does the cycling over model simulation happen at cylc level or via templating in the recipe? I assume the first. using $model_run in the recipe?
[ ] requires completion of ticket #453 first

does the cycling over model simulation happen at cylc level or via templating in the recipe? I assume the first. using $model_run in the recipe?

The simplest way would be to do it at the cylc level, and treat the models as different diagnostics. This would lead to separate plots for them both, rather than being plotted on the same axis however.

#567


How are we going to consistently modify the clipboard on new paste events?

Imagine a scenario where you own two phones. You copy on the first one and then open the second one. The data copied from the first device should already be in your clipboard on the second device. So in order to handle this case the app or some process has to be running all of the time. Phaqui suggested using a daemon for this. We should have an implementation that works both on mobile and desktop. The actual implementation details don't matter.

@Mobilpadde mentioned https://clipboardjs.com/#browser-support


Cloning a TFVC repo on dev.azure.com just creates a .git directory

Hi,
I'm attempting to clone my TFVC repo on dev.azure.com into a new local git repo.
As per the guidelines, I ran the following commands, but unfortunately the result is just a new GIT repo with its .git directory, without any source file (and its full 5 year history, which is why I'm going for git-tfs):

PS X:\WORK\projects\my_project_tfvc>git tfs list-remote-branches https://dev.azure.com/my_orgname
TFS branches that could be cloned:

 $/MyProjectName/main [*]

Cloning root branches (marked by [*]) is recommended!

PS:if your branch is not listed here, perhaps you should convert its containing folder into a branch in TFS:
  -> Open 'Source Control Explorer' and for each folder corresponding to a branch, right click on the folder and select 'Branching and Merging' > 'Convert to branch'.

so, the repo is correctly detected by git-tfs, along with its single main branch. I then finally execute the clone command:
PS X:\WORK\projects\my_project_tfvc>git tfs clone https://dev.azure.com/my_orgname $/MyProjectName/main  . --branches=all
Initialized empty Git repository in //myNasServer/private/WORK/projects/my_project_tfvc/.git/

Fetching from TFS remote 'default'...
C6 = bc6f6******************4d9ac

No other Tfs branches found.
PS X:\WORK\projects\my_project_tfvc>

I also attempted forcing a git tfs fetch, but without any result.
What am I missing? Any help much appreciated!
Thanks

You need to checkout the branch after cloning, e.g. something like git checkout -B master tfs/default should do the trick
to set your local master branch to the branch created by git-tfs.
Pls check with git branch -r  which branches git-tfs actually created and switch the branch name accordingly.
As this  is quite a common problem I am closing this issue, with the assumption that the above described steps work,
If not, please come back and we can reopen the issue and investigate further

Thanks for the feedback. I did what you suggested (starting again from scratch), but still nothing is being downloaded from the TFVC repo (just the .git directory gets created):
PS X:\WORK\projects\my_project_tfvc>git tfs clone https://dev.azure.com/my_orgname $/MyProjectName/main  . --branches=all
Initialized empty Git repository in //myNasServer/private/WORK/projects/my_project_tfvc/.git/

Fetching from TFS remote 'default'...
C6 = bc6f6******************4d9ac

No other Tfs branches found.

PS X:\WORK\projects\my_project_tfvc> git checkout -B main tfs/default
Reset branch 'main'

PS X:\WORK\projects\my_project_tfvc> git branch -r
  tfs/default

PS X:\WORK\projects\my_project_tfvc> git status
On branch main
nothing to commit, working tree clean

PS X:\WORK\projects\my_project_tfvc> git tfs fetch
Working with tfs remote: default => $/MyProjectName/main
Fetching from TFS remote 'default'...

PS X:\WORK\projects\my_project_tfvc>

Hm. There is at least changeset C6 fetched according to your log, so there should be somehting available in the branch tfs/default
Are there no files in the local working directory?
And is git show bc4f6****4d9ac    (you redacted it in the above log) showing the files/changes expected when importing?

Yes, the local directory was completely empty before cloning (after all above, it still contains just the .git).
The git show gives the following:
PS X:\WORK\projects\my_project_tfvc> git show bc6f6******************4d9ac
commit bc6f6******************4d9ac (HEAD -> main, tfs/default, master)
Author: *************** <********@*********>
Date:   Tue Mar 3 14:14:12 2015 +0000

    created MAIN

    git-tfs-id: [https://dev.azure.com/my_orgname]$/MyProjectName/main;C6

Really strange since it seems all in place to me...

How many changesets do you have in your TFVC repository?
Because we clearly see that git-tfs only fetch the 6th one.
Are you also sure that is this branch that is the main one and that you
should clone? Perhaps what you really want to clone is something that
hasn't been converted to a branch and so that is not displayed by the first
git-tfs command....
That's quite strange because everything seems to went well without errors.
Perhaps you could also have a look at the log file.
On Wed, Dec 2, 2020, 17:33 Gianni Trevisiol<EMAIL_ADDRESS>wrote:

Yes, the local directory was completely empty before cloning (after all
above, it still contains just the .git).
The git show gives the following:
PS X:\WORK\projects\my_project_tfvc> git show bc6f64d9ac
commit bc6f64d9ac (HEAD -> main, tfs/default, master)
Author: *************** <@*>
Date:   Tue Mar 3 14:14:12 2015 +0000
created MAIN

git-tfs-id: [https://dev.azure.com/my_orgname]$/MyProjectName/main;C6

Really strange since it seems all in place to me...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/git-tfs/git-tfs/issues/1353#issuecomment-737346080,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADQLJFAOQUTEKFZYA5KRF3SSZT4BANCNFSM4UJZI5GQ
.

Looks like you only created the folder / branch in Changeset 6 in  $/MyProjectName/main
So this TFS branch is mapped/replicated to the git remote branch tfs/default and as there are no files in
$/MyProjectName/main, the corresponding branch in git (tfs/default) also doesn't contain any files.
So right now everything looks fine to me.
As soon as you add files to $/MyProjectName/main/  they will appear.
Alternatively, you can create them in git and use either git tfs checkin or git tfs rcheckin to put what you have in git back to TFS

Actually, it is not like you say: $/MyProjectName/main has thousands of files within tens projects in it and a history of 5 long years with 1444 commits (as mentioned initially).
Definitively, it is not empty :)

Could you perhaps check if the next changeset after C6 is somehow deleting the folder and/or branch or moving?
I want to find out if this is somehow a special case, not using the normal pattern of

create the branch main
commit changesets to it

My guess is that perhaps the branch was deleted  (or moved) and later recreated somehow which confuses git-tfs
If so, you might at least import part of the history by giving it a starting point with specifying --changeset, e.g.
git tfs clone --changeset=<some_sensible_changeset> --up-to=-1 https://dev.azure.com/my_orgname $/MyProjectName/main  .
Replace the <some_sensible_changeset> with a correct changeset value

@siprbaum I think you nailed it!!
This is a great progress: I tried your suggestion for the last changeset (1444), and it worked!
At this point, it may be that some have made some hiccups in setting up the repo 5+ years ago.
I'm now iterating by walking up from CS#6 in attempting to get the lowest CS# to start from... at the moment it seems like CS#13 is the lowest.
At this moment of typing, cloning is @ CS#54 without stopping, so fingers crossed we should be rolling to the top!
Many thanks again!

If this is working for you, I would be interested on what happened in TFS in between CS6 and the working C13.
So if you can describe what happened on the branch/folder structure like in this made made up example
C6: $/MyProjectName/Main created
C7:  $/MyProjectName/Main renamed to $/MyProjectName/Example
...     <<continue till the changeset which works>>

we might have chance to look into why git-tfs couldn't deal with it.

Absolutely. In the meanwhile, happy to confirm the cloning worked perfectly from C13-C1444.
I dug into the changesets, and here is what happened (all in the same day, in 2015):
C6: created a 'main folder under $/MyProjectName
C7: deleted 'main folder under $/MyProjectName
C8: created 'main folder under $/MyProjectName
C9: repo "reset" to $/MyProjectName/__common
C10: repo "reset" again and all files were added directly in $/MyProjectName/Apps/src
C11: repo "reset" to $/MyProjectName a '_tf_main' folder was created under it
C12: '_tf_main' folder was deleted
C13: repo reset for the last time, to what then stayed fixed to $/MyProjectName/main/src (cloning works from here on)
It seems this repo has started with some hacking on the first day, so my view is that it might not be worth investigating.
hope it helps.

I never heard of a reset operation in TFS. Care to explain what you mean by that ?

I've not mentioned a formal, "TFVC reset", but reset in a more generic sense.

My problem is, I don't have a clue what you mean with that. If you can describe this, e.g. in terms of tf vc <operation> commands,
that would be very helpful

Unfortunately, I can't help you on this: I may not have made it clear when just above I refer to what has been done in 3rd person ("It seems this repo has started with some hacking on the first day..."), intending I haven't setup the repo myself and therefore I don't know what specific operations were done (and unfortunately cannot ask to that person anymore...).

OK. As you now have a workaround and can clone the repo without the "hacking" done in the first few changesets and it doesn't look like we can get fthe information to analyze the underlying problem, I am closing this issue.
In case we get further information, we can reopen and look at it again.


Improving JSON/YAML formatting performance on the CLI

Background
Fix for #3697 . JSON/YAML formatting on the CLI were incredibly slow, especially compared to standard table formatting (seemed odd to me).
Investigation
See timing results in #3697 . During code inspection and testing it was clear that the jsonpath_rw call was the culprit.
Fix
This first attempt, i've replaced the jsonpath_rw calls with a very simple loop that iterates over a nested dictionary, extracting data based on the keys string as it goes. This loop is not anywhere close to as robust or full featured as jsonpath_rw and only supports simple key looks like x.y.z. However, these were the only types of lookups present in the unit tests and the only ones i could find when reading the code.
Results
Before
$ time st2 action list -p aws -y | tail -n 1

real    1m46.834s
user    1m34.807s
sys     0m1.106s

After
$ time st2 action list -p aws -y | tail -n 1

real    0m10.953s
user    0m0.455s
sys     0m0.077s

Note
Feedback is much appreciated here. Is everyone OK with removing the additional query functionality in order to improve performance? Should i look for another solution?

Another piece of info:
I've also created an alternate implementation that uses jmespath instead of jsonpath_rw. This alternative implementation allows expressive queries, and performs almost as well as the hand-rolled-loop while still performing MUCH better than jsonpath_rw.
Here's the code in case we want to go that direction (simply replaces the get_value() function):
import jmespath

def get_value(doc, key):
    if not key or not isinstance(doc, dict):
        raise ValueError()

    jmespath.search(key, doc)

@Mierdin Totally understand. In my second comment i've proposed an alternate solution, which is mainly to switch to another query language JMESPath. Are you open to the alternate solution, or should i try to find a more optimized version of JSONPath?

@nmaludy I was doing a bit of telecommuting so I didn't see your last comment before my review. Sorry for the IRL race condition. 😆
The library in use today doesn't seem to be that large or complicated - I wonder how difficult it would be to identify the performance issue there - might be a simple fix, and a better alternative to switching libraries at the st2 layer. Maybe you could post your numbers on the repo - the last commit was almost a year ago but hopefully they're still getting emails for the project.

@Mierdin based on my profiling i did originally in #3697 it appears the root of the issue is in jsonpath_rw.parser.
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000   44.260   44.260 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/shell.py:351(main)
        1    0.001    0.001   44.141   44.141 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/shell.py:275(run)
        1    0.000    0.000   44.138   44.138 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/commands/resource.py:255(run_and_print)
        1    0.000    0.000   42.186   42.186 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/commands/__init__.py:86(print_output)
        1    0.000    0.000   42.183   42.183 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/commands/__init__.py:74(format_output)
        1    0.000    0.000   42.183   42.183 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/formatters/doc.py:54(format)
        1    0.003    0.003   42.147   42.147 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/formatters/doc.py:33(format)
      702    0.006    0.000   42.142    0.060 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/utils/jsutil.py:28(get_kvps)
     2106    0.009    0.000   42.136    0.020 /opt/stackstorm/st2/lib/python2.7/site-packages/st2client/utils/jsutil.py:19(get_value)
     2106    0.005    0.000   42.088    0.020 /opt/stackstorm/st2/lib/python2.7/site-packages/jsonpath_rw/parser.py:13(parse)
     2106    0.007    0.000   42.080    0.020 /opt/stackstorm/st2/lib/python2.7/site-packages/jsonpath_rw/parser.py:30(parse)
     2106    0.165    0.000   42.068    0.020 /opt/stackstorm/st2/lib/python2.7/site-packages/jsonpath_rw/parser.py:34(parse_token_stream)
     2106    0.268    0.000   38.902    0.018 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:3214(yacc)
     2106    0.034    0.000   32.962    0.016 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:2100(__init__)
     2106    5.421    0.003   29.708    0.014 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:2533(lr_parse_table)
  2072304    6.498    0.000   12.183    0.000 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:2163(lr0_goto)
     2106    1.055    0.001   10.773    0.005 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:2198(lr0_items)
     2106    0.023    0.000    9.769    0.005 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:2509(add_lalr_lookaheads)
     2106    2.694    0.001    4.872    0.002 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:2371(compute_lookback_includes)
    92664    2.172    0.000    3.589    0.000 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:2137(lr0_closure)
     2106    0.006    0.000    2.965    0.001 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:323(parse)
     2106    0.073    0.000    2.960    0.001 /opt/stackstorm/st2/lib/python2.7/site-packages/ply/yacc.py:1001(parseopt_notrack)
     4212    0.014    0.000    2.826    0.001 /opt/stackstorm/st2/lib/python2.7/site-packages/jsonpath_rw/parser.py:177(token)
     4212    0.005    0.000    2.812    0.001 {next}

Digging down further a majority of the time is spent in the ply.yacc module.
Looking at jsonpath_rw.parser https://github.com/kennknowles/python-jsonpath-rw/blob/master/jsonpath_rw/parser.py : It looks like i'd have to rewrite that whole to replace the library their using. Based on comments in that file, it appears that the ply.yacc module is actually writing temporary files to disk, so i'm sure this isn't helpful for a CPU-based task to incur disk I/O (just a hunch, i'd still need to measure to verify).
Thoughts?

@Mierdin for your usecase of IP Address matching ( i think that's a great one). JMESPath fits the bill:
#!/usr/bin/env python

import jmespath

obj = {'address': {'192-168-1-1': {'name': 'aaa'}}}
query = 'address."192-168-1-1".name'

print jmespath.search(query, obj)
# output: aaa

There are a ton of extra options, an online evaluator and well documented (some things i feel JSON path is lacking).
Main site and online evaluator: http://jmespath.org
Tutorial: http://jmespath.org/tutorial.html
Are you open to a change in implementation?

@nmaludy Sure - my thoughts mirror that of @Kami:

if we have good test coverage for all the common and edge cases we want to support, I don't care about the actual implementation detail.

Primarily my concerns are consistent UX (i.e. if we're moving away from JSONpath, we should make sure we're doing it everywhere, so we're not supporting two different methods) and proper documentation including upgrade notes (this may/may not be a breaking change) and standard docs letting folks know where to find those resources you linked to for constructing proper queries.

@nmaludy How is this PR going?
It would be great if we could go with the middle of the ground approach we discussed a while back here (https://github.com/StackStorm/st2/pull/3854#discussion_r150541003) and on Slack - use simple implementation you proposed for simple scenarios where jsonpath is not actually needed and for anything else more complex fall back to the existing  jsonpath approach.
I think this would be a great win for a common use case and speed things up significantly. And it should also be relatively simple and small change (+ more tests).

@Kami i kind of got stalled out on the "use hand-rolled loop for simple case and jsonpath for others" approach and hadn't come back to it.
I got stuck trying to determine if the query was "simple" or "not simple" . Thinking through a little in my head i could check if the query contains only: letters [a-zA-Z], numbers [0-9], dashes [-], underscores [_], and periods [.]. If this is the case it should be a "simplistic" query we can use our hand-rolled loop for. Anything else will get passed through to jsonpath.
Regex: ^([a-zA-Z\-_]+[\.])*([a-zA-Z\-_]+)$
https://regex101.com/r/SSc4I6/1/
This will match:
aaa
aaa.bbb.ccc

But will not match:
aaa.
aaa..bbb
#(*&$(*#

Thoughts?

I think we should work. We just need to have enough test cases and also verify that regex doesn't actually slow things down a lot and make it worse.

OK, not sure if i'll get to this before the end of the week (busy week here), but i should have some time this weekend to work on it.

@nmaludy No rush, just ping me when you make some progress and I will have a look :)

Any update on this?
Would be great if we could get this finished and merged in time for the next release :)

@Kami @Mierdin I've implemented the "fast path" logic we discussed in the review comments.
I've created the notion of a "simple expression" defined as:

# A simple expression is defined as a series of letters [a-zA-Z], numbers [0-9],
# dashes '-', and underscores '_' separated by one period '.'.
# A simple expression must not start with a period.
# A simple expression must not end with a period.
# A simple expression must not have more than one period in succession, ie. in
# between each period must be one or more of the valid non-period characters.
#
# Examples of valid "simple expressions":
#  abc
#  abc.def.ghi
#
# Examples of non-simple expressions:
#  .aaa
#  a..b
#  abc.
#  a(*

If the expression being passed in matches our definition of a "simple expression" given the regex compiled at the top of the file, then the "fast path" (naive "a.b.c" assumption) is used. Otherwise we fall back to the jsonpath_rw implementation.
As requested i've added additional unit tests to validate we're calling the "fast path" and "complex path" appropriately, along with an "ip address" test.
One note about IP addresses: The current logic in the get_kvps() function, when given an ip address query like: ips."<IP_ADDRESS>" breaks down that query by every period and returns a dict like:
DOC_IP_ADDRESS = {
    'ips': {
        "<IP_ADDRESS>": {
            "hostname": "router.domain.tld"
        },
        "<IP_ADDRESS>": {
            "hostname": "server.domain.tld"
        }
    }
}

print jsutil.get_kvps(DOC_IP_ADDRESS,
                                         ['ips."<IP_ADDRESS>"',
                                          'ips."<IP_ADDRESS>".hostname'])
# {'ips': {'"192': {'168': {'1': {'1"': {'hostname': 'router.domain.tld'},
#                                '10"': {'hostname': 'server.domain.tld'}}}}}}

Instead I would expect it to output something like:
{'ips': {'<IP_ADDRESS>': {'hostname': 'router.domain.tld'},
        '<IP_ADDRESS>': {'hostname': 'server.domain.tld'}}}

At this point i don't want this to hold up this PR and instead create another issue to track this. Also, the behavior hasn't changed with this PR, it has always worked like this.

@nmaludy Thanks for making those changes.
Did you happen to have a chance to check how much performance overhead does regex add? If I understand the code correctly, this regex expression will run N * M times where N is number of results / items returned by the API (we iterate over each item) and M is number of "keys" specified by the user, right?
If that's the case, I believe we could reduce this to just M aka 1 for a very common use case where a single key is provided by caching in memory if some key is simple or not. This should work fine because CLI is not a long running process and there is no danger of cache growing too large or similar because new process is created for each CLI invocation.

Overall the changes look good to me (it would still be good to add some more test cases with more real-life like examples).
Only thing I would like to check is this - https://github.com/StackStorm/st2/pull/3854#issuecomment-350663407. It would be good to profile that code when operating on multiple documents (e.g. 100) and see how much overhead does calling re.match 100 * num_keys add and if it's worth implementing simple memory cache for "is_simple_key".

@Kami I don't have the numbers in front of me, but when I tested yesterday it was equal in runtime when using the regex and when bypassing and going straight to the simple method. Post numbers later once I'm at my laptop.

From very simple and naive testing, the overhead is quite small so we are probably fine without caching:
In [37]: timeit.timeit('for x in range(0,1000): SIMPLE_EXPRESSION_REGEX_CMPL.match("foo.bar.<IP_ADDRESS>")', setup='import re; SIMPLE_EXPRESSION_REGEX = "^([a-zA-Z0-9\-_]+\.)*([a-zA-Z0-9\-_]+)$"; SIMPLE_EXPRESSION_REGEX_CMPL = re.compile(SIMPLE_EXPRESSION_REGEX)', number=100)
Out[37]: 0.07767295837402344

In [38]: timeit.timeit('for x in range(0,10000): SIMPLE_EXPRESSION_REGEX_CMPL.match("foo.bar.<IP_ADDRESS>")', setup='import re; SIMPLE_EXPRESSION_REGEX = "^([a-zA-Z0-9\-_]+\.)*([a-zA-Z0-9\-_]+)$"; SIMPLE_EXPRESSION_REGEX_CMPL = re.compile(SIMPLE_EXPRESSION_REGEX)', number=100)
Out[38]: 0.6292898654937744

@Kami @Mierdin here is some raw timing data:
Default table formatting
(virtualenv) [root@stackstorm st2]# time st2 action list -p aws |tail -n 1
+-----------------------------------------+------+-----------------------------------------+

real    0m11.990s
user    0m1.185s
sys     0m0.110s

With Regex Evaluation
(virtualenv) [root@stackstorm st2]# time st2 action list -p aws -y | tail -n 1

real    0m11.971s
user    0m1.346s
sys     0m0.096s

Bypassing Regex and Going Directly To Simple path
(virtualenv) [root@stackstorm st2]# time st2 action list -p aws -y | tail -n 1

real    0m11.887s
user    0m1.229s
sys     0m0.104s

Bypassing Regex And Going Directly To jsonpath_rw
(virtualenv) [root@stackstorm st2]# time st2 action list -p aws -y | tail -n 1

real    1m48.107s
user    1m35.157s
sys     0m2.263s

Looks pretty good and as @Kami found the regex doesn't add much overhead.
Thoughts? Anything further you would like to see?

Merged.
Sorry for the delay and thanks again for working on this.


Plots in tensorboard overlay when change horizontal axis

Problem
When using tensorboard, if the axis is changed from 'step' to 'relative' and back to 'step' quickly a new graph is created and overlays the original one.  This looks confusing as in the images below.  Note that the issue can be cleared by refreshing the page.
Small graph, both of the graphs shown here have an extra graph overlayed.

If the graph is expanded, the old graph stays small and the new graph is enlarged showing the double graph issue more clearly.

Environment info
Operating System: Fedora release 23
Tensorflow Version: 0.7.1
Steps to reproduce

Run tensorboard from a directory with some tensorflow summary files.
Open tensorboard in on the 'Events' page.
Quickly change the 'Horizontal Axis' from 'Step' to 'Relative' and back to 'Step' (ie. all within < 1 second)
Graphs are now reproduced as described above.

Workaround
Just refresh the page if you accidentally do this.
Would be worth fixing if somebody is aware of the code responsible and it's an easy enough fix.

Thanks for the report. Because there's an easy workaround, and it seems to come up pretty rarely, I'm not going to prioritize this right now.

Closing due to inactivity. If this is still happening, please feel to open an issue in our new repository at https://github.com/tensorflow/tensorboard/issues. Thanks!


Allowed or Disallowed Query List (Words) Feature

Hello,
I think it will be nice if you can some settings to allow only specific queries or deny specific queries (or maybe both).
For example:
allowed_query_words = SELECT,USE,SHOW,DESCRIBE,EXISTS,USE,KILL
disallowed_query_words=CREATE,ALTER,DROP,INSERT
So the user will only able to send queries starting with "SELECT"
I know there is a readonly mechanism inside Clickhouse. But through proxy we can restrict proxy users more granular.
What do you think?

Currently chproxy doesn't parse the incoming query at all - it just proxies it as-is to clickhouse. The requested feature would require adding non-trivial query parser into chproxy. There is a hacky solution - just scan the first word of the query and determine whether it is allowed. It is already used when determining whether to cache the response - see canCacheQuery. Such hacky solution may fail when the query starts with unexpected syntax, for instance with a -- comment or WITH statement. So the solution may break at any time.
As you already mentioned, clickhouse already provides readonly mechanism for disabling non-readonly queries, thus lowering the importance of the feature.
@alivelimeli , could your provide use cases for this feature?

Yes its possible to make a hacky solution like that. I've thought that maybe chproxy can be behaves like a WAF (Web Application Firewall) to limit some kind of queries. Thanks

From security POV it would be better to implement only allowed_query_prefixes, because disallowed_query_prefixes can be easily misconfigured.
But even the simplest allowed_query_prefixes: SELECT gives false sense of security, since:

SELECT query may be specially crafted the way that exhausts all the available RAM or CPU resources;
SELECT syntax may be extended in the future in unsafe ways allowing writing output files on the server side, creating new tables or doing other nasty things;
ClickHouse may contain security bugs that may be easily triggered via specially crafted SELECT queries.

It is bad practice from security POV to allow untrusted direct SELECT access to any DBMS, not only ClickHouse. So even allowed_query_prefixes has little sense :(


Set networking for golden VM

@sdake I think we can close this, as it's handled by PR #10

@rstarmer in the future, its superior for a variety of reasons to rebase, rather than merge, other PRs into yours.
Tanks
-steve


Graphical abstract

Hi all,
just a small suggestion: if you put a screenshot in the readme, users can see how the plugin (and typical data it was made for) looks like. This helps them deciding if they should give it a try 😉
Thanks!
Best,
Robert

yesss, I have been wanting to add a graphical abstract for a long time. Do you have a preferred software for making GIF screen recording?

I use blueberry flashback recorder (💸) but if one of you guys uses Mac, the Preview app can do the job...


Use configure_file for HPXCacheVariables.cmake

Mainly just to get rid of the message Installing: .../HPXCacheVariables.cmake when configuring HPX.

The failures look Piz Daint related, but this can wait for another round of builds.

Thanks!


Javascript

Javascript
User Story
As a bootcamp student I want the prework study guide to be
on a webpage so I can easily find and read information
Acceptance Criteria
GIVEN a prework study guide website
WHEN I view the study guide
THEN I can see four topics I learned listed alongside a suggestion on what I should study first

All done


Sanitizer builds are broken (regressed on travis)

https://github.com/travis-ci/travis-ci/issues/8840 notes what we are seeing as of today for node-cpp-skel and all repos based on it: the sanitizer job is crashing due to a regression in travis.
https://travis-ci.org/mapbox/node-cpp-skel/builds/308170224
/cc @mapbox/core-tech

This was fixed! https://travis-ci.org/mapbox/node-cpp-skel/jobs/308170250 is now 🍏 again.

Unfortunately, this is popping up again 😢  https://travis-ci.org/mapbox/vtquery/jobs/312013091

@mapsam - that looks slightly different to me. I also see that the LSAN debugging flag is on still in that build. Can you turn it off, try another build, and then post what you are seeing?

Closing, looks like @mapsam resolved the vtquery specific issue by removing LSAN_OPTIONS in https://github.com/mapbox/vtquery/commit/18b682b7f0450f572fd755960b794d52ccce5f6c#diff-354f30a63fb0907d4ad57269548329e3

if the problem persists then we'll look at applying a workaround (like sudo: true, but ideally we'll not need to do anything)

Problem is persisting. Let's move to applying sudo: required overload for sanitizer jobs. We can keep sudo: false for other jobs. /cc @mapbox/core-tech

Adding some of the santizer errors to this ticket (instead of links to travis builds) so it's more search friendly:
==18649==AddressSanitizer: failed to intercept '__isoc99_printf'
==18649==AddressSanitizer: failed to intercept '__isoc99_sprintf'
==18649==AddressSanitizer: failed to intercept '__isoc99_snprintf'

==18651==Installed the sigaction for signal 11
==18651==Installed the sigaction for signal 7
==18651==Installed the sigaction for signal 8
==18651==T0: stack [0x7ffcefeff000,0x7ffcf06ff000) size 0x800000; local=0x7ffcf06fc21c
==18651==AddressSanitizer Init done

|| `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||
|| `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||
|| `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||
|| `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||
|| `[0x000000000000, 0x00007fff7fff]` || LowMem     ||
MemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff
redzone=16
max_redzone=2048
quarantine_size_mb=256M
thread_local_quarantine_size_kb=1024K
malloc_context_size=30
SHADOW_SCALE: 3
SHADOW_GRANULARITY: 8
SHADOW_OFFSET: 0x7fff8000

==18667==T6: FakeStack created: 0x7f633d2db000 -- 0x7f633dde4000 stack_size_log: 20; mmapped 11300K, noreserve=0

==18667==T6 TSDDtor
==18667==T6 exited
==18674==Processing thread 18667.
==18674==Stack at 0x7ffd9a93e000-0x7ffd9b13e000 (SP = 0x7ffd9b138128).
==18674==TLS at 0x7f6349ed4000-0x7f6349ed50c0.

==18667==WARNING: Can't read from symbolizer at fd 10
==18667==WARNING: Can't read from symbolizer at fd 10
==18667==WARNING: Can't read from symbolizer at fd 10
==18667==WARNING: Can't read from symbolizer at fd 10
==18667==WARNING: Failed to use and restart external symbolizer!
=================================================================
==18667==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1024 byte(s) in 1 object(s) allocated from:

@mapsam The diagnostic error is:
=4346==LeakSanitizer has encountered a fatal error.
==4346==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==4346==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)

Which indicates broken ptrace support (ability for an external program to attach to another). I think those other lines you shared are a result of setting LSAN_OPTIONS=verbosity=1:log_threads=1 which is not recommended and does not fix the problem.

Thanks for including those @springmeyer - looks like you already called me out on this above. Forgot about my past self apparently!


Warn on Undeclared Variable

There is currently a rule that warns when I have assigned a variable but haven't called it (UseDeclaredVarsMoreThanAssignments), however, there doesn't appear to be a rule that warns me if I have used a variable that hasn't been assigned.
Is this a possibility? I can definitely see there would be some challenges around implementing it correctly, but this would be a useful warning.

I afraid this is going to be noise. PowerShell allows using of global or parent scope variables. Thus, use of an unassigned variable is more likely by design. Otherwise, it is a bug which is fixed sooner or later (strict mode helps to discover such cases). Thus, the remaining cases are intentional and they should not cause warnings.

I agree, I'm concerned that this would be noise as well, since variables can be defined and assigned values in so many different locations.

I definitely see your point, but if this warning is noise, is the reverse not also true - that the current "UseDeclaredVarsMoreThanAssignments" rule is also just noise?

I cannot imagine a practical case when assigning a variable and not using it is by design. But using not assigned parent scope variables or variables created without declaring is quite common.

I could assign variable values in one script but call them in another, or just export them from a module. In fact, I could have a module of nothing but variables. That's an extreme case, but you see the point.
Some modules I've created have a "config" file, which is nothing more than some variables that can be configured to support functionality in the module. In this case, PSScriptAnalyzer will flag the variables in this script because they haven't been called anywhere else in the script.

Yes, I see the point now. You are right, it can be noise, too.
Looking at my scripts through the analyser, I do not have too many such cases. On the other hand, I have quite a lot of use of "unassigned". Well, maybe it's just me.

Depending on the day of the week, I seem to have scripts that have one or the other of these two cases, but rarely both. ;)
So I guess the question is: Should we have as many potentially useful checks as possible and let the users decide which ones to run, or try to pare these down to universally agreed upon checks? If memory serves this question has been answered to some degree elsewhere, just can't remember where.

We had this rule as part of the default rule set originally. People found this to be very noisy.
https://github.com/PowerShell/PSScriptAnalyzer/blob/development/DeprecatedRules/AvoidUninitializedVariable.cs

Ok, sounds like the agreement is to leave this out. I'll concede the point!

I'd love to see this rule too.

When you guys say you want this rule, how are you using PSSA?

Via Invoke-ScriptAnalyzer
Only in VS-Code

Also: In either cases, do you use the out of the box experience or a settings file?
Whilst we could re-add the rule, given historic feedback the rule would probably not be turned on by default both in the editor and probably not in the command line experience either. Happy to re-open the issue but let's establish some ground/expectations first

Thanks for a quick reply!
I'm using PSScriptAnalyzer mainly in VS-Code. I think that for me it'd be an opt-in feature, not something that I want to have on by default if it too noisy.

@bergmeister  - I do some in Visual Studio via an External Tool I hooked into the menus, but mostly in vscode now.

I'd like to be able to run this rule on builds. Largely because uncovering bugs due to use of externally defined variables is really hard.
Agree not by default but I'd like to be able to  use it

I'd like to be able to run this rule on builds. Largely because uncovering bugs due to use of externally defined variables is really hard.
Agree not by default but I'd like to be able to  use it

This definitively should be one of the available rules & whilst it can be a noisy rule it can and will help in finding issues early and I would like it to be an optional rule that was available to use

Ditto; It makes sense that it would be noisy in CI systems, but I think it could be very helpful in code editor linting; I primarily use in vscode and almost got burned by an undefined variable with no warning, googled this, and ended up here!
What about .\ dependency resolution for avoiding noise? or a non-default AvoidUninitializedVariable flag that would primarily be in code editors?

@rjmholt Has a great explanation about why this is a hard rule to get right.

This comes up again and again on the PowerShell discord. Yeah it's probably gonna be real finicky. Yeah there's not a chance we can make it a default in VSCode. But it'd still be great to have.
The engine already has some logic for this built in for classes. While far from perfect, it'd be nice to surface the logic from that semantic check into an optional analyzer.


Find doesn't return error if record not found

GORM Playground Link

https://github.com/go-gorm/playground/pull/93
Description

First function:
Code:
	var tDB appmodels.TaskDB

	if err = getgDB().WithContext(ctx).Table("task_db").Where("task_id = ?", taskID).First(&tDB).Error; err != nil {
		return nil, err
	}
       // The following is printed by gorm logger - level INFO
       // SELECT * FROM "task_db" WHERE task_id = '37-5' AND "task_db"."deleted_at" IS NULL ORDER BY "task_db"."task_id" LIMIT 1

This function return an err != nil if record not exist.
Find function:
Code:
	var tDB appmodels.TaskDB

	if err = getgDB().WithContext(ctx).Table("task_db").Where("task_id = ?", taskID).Find(&tDB).Error; err != nil {
		return nil, err
	}

       // The following is printed by gorm logger - level INFO
      // SELECT * FROM "task_db" WHERE task_id = '37-5' AND "task_db"."deleted_at" IS NULL

This function return an err == nil if record not exist.
Conclusion:
While the first function can be used but it will cost some overhead for ordering the result.
I think the reason is Find function update the DeletedAt fields while First funtion doesn't.

this is the expected behavior, http://v2.gorm.io/docs/query.html#Retrieving-a-single-object

this is the expected behavior, http://v2.gorm.io/docs/query.html#Retrieving-a-single-object

I think this is still a error to return. And maybe sorting data will cost time than not doing it.


Support disagg read after data ingest by FAP

What problem does this PR solve?
Issue Number: ref https://github.com/pingcap/tiflash/issues/6827
Problem Summary: After FastAddPeer (https://github.com/pingcap/tiflash/pull/6987), the data of one TiFlash write node could ingest some data (ColumnFileTiny/DMFile) that is generated by another TiFlash write node. This break the previous consumption. WNs should return the real remote location to the RN so that RN can fetch the data from remote store (e.g. S3) directly.
What is changed and how it works?

Change the checkpoint interval from 60 seconds to 30 seconds
Serialize the remote key (S3 path) for DMFile to RemotePb::ColumnFileBig so that RN can get the correct S3 key for reading
Note that if a ColumnFileTiny is ingested by FAP and later read by RN,

Now it is still read by WN at the first time, then written back to WN's UniPS
When RN receives the page data, it will put it into its LocalPageCache

Now it is still read by WN at the first time, then written back to WN's UniPS
This might increase some latency at the first time reading data after FAP, but we can optimize it later

Other

Q: Why not let the RN parse the WN's manifest on S3 to get the location info of given PageIDs on that store_id?
A: The latest segment info could be not in the manifest on S3 yet.

Check List
Tests

[ ] Unit test
[ ] Integration test
[x] Manual test (add detailed scripts or steps below)
[ ] No code

Deploy a cluster with 1 disagg WN and 1 disagg RN
Load some data to WN
Scale-out another WN and read data through RN
Scale-in the origin WN totally and read data through RN

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/merge

/merge


Add foundations for extensible validation in forms

@wesleybl, @luxcas This is about getting validation also on blocks

@sneridagh Is it possible to pass parameters to validators? For example, if I have a validator "minmax", would I have to create and register a custom one for each use case?

Closing this pull request since we have the superseding https://github.com/plone/volto/pull/6181


fix: Clicking on edit existing profile opens  wrong modal state

PR Type

[x] Bugfix
[ ] Feature
[ ] Refactoring

Context
issue: initial step was being set on modal close on not when opening the modal

[x] Closes #10586

Did your issue had any of the "$" label on it?

[x] Fill up your DOT address: Payout

Screenshot 📸

[ ] My fix has changed something on UI;

https://github.com/kodadot/nft-gallery/assets/44554284/de16b582-7c1d-454c-bb25-9d4a1993af38

Why did the app make hard reload? (6th sec on video)

Why did the app make hard reload? (6th sec on video)

I reloaded the page


Internal compiler error (Segmentation fault) in GCC when building z3, qtwebengine

Describe the bug
Build fails
during GIMPLE pass: local-fnsummary
In file included from gen/third_party/blink/renderer/core/inspector/inspector_jumbo_5.cc:18:
./../../3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_task_runner.cc: In function 'int snprintf(char*, size_t, const char*, ...)':
./../../3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_task_runner.cc:81:1: internal compiler error: Segmentation fault
   81 | }  // namespace blink
      | ^
0x1d35627 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
        ???:0
0x1d36547 internal_error(char const*, ...)
        ???:0
0xe588df crash_signal(int)
        ???:0
0xc16b35 fast_call_summary<ipa_call_summary*, va_heap>::get_create(cgraph_edge*)
        ???:0
0xc118e8 analyze_function_body(cgraph_node*, bool)
        ???:0
0xc14d1a compute_fn_summary(cgraph_node*, bool)
        ???:0
0xc15339 (anonymous namespace)::pass_local_fn_summary::execute(function*)
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

See https://github.com/NixOS/nixpkgs/pull/327052#pullrequestreview-2430112333 for another failure.
Steps To Reproduce

Build qtwebengine (or z3 from above)

Expected behavior
No internal compiler error
Additional context
I couldn't find anything about this upstream. Then again, Bugzilla is somewhat painful to search...
Metadata

system: "x86_64-linux"
host os: Linux 6.6.60, NixOS, 24.05 (Uakari), 24.05.20241109.fd66cd1
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.18.8
channels(root): "nixos-21.05-21.05.1268.21b696caf39"
channels(arne): "nixos-21.05-21.05.1268.21b696caf39"
nixpkgs: /home/<me>/nixpkgs

Notify maintainers
gcc team: @synthetica9 @vcunat @ericson2314

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

Tried switching z3 to LLVM and that came with its own problems...

This seems like a race condition in GCC. We were unable to reproduce it in https://github.com/NixOS/nixpkgs/pull/327052 eventually.

Just got the error again for openjdk23-headless. This time I was using GCC 14
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_jvmciCompilerToVMInit.o:
during GIMPLE pass: ealias
/build/source/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp: In static member function ‘static JVMCIObjectArray CompilerToVM::initialize_intrinsics(JVMCIEnv*)’:
/build/source/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp:512:1: internal compiler error: Segmentation fault
  512 | }
      | ^
0x20db3f4 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
        ???:0
0x20dbc29 internal_error(char const*, ...)
        ???:0
0xf7580f crash_signal(int)
        ???:0
0x11897b2 unify_nodes(constraint_graph*, unsigned int, unsigned int, bool)
        ???:0
0x1189b80 find_equivalent_node(constraint_graph*, unsigned int, unsigned int)
        ???:0
   ... (rest of output omitted)

* All command lines available in /build/source/build/linux-x86_64-server-release/make-support/failure-logs.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78216 seems related, especially the last comment.

And another, when building python311Packages.openusd. The bad (but also good) aspect of these is that they often disappear when re-running the same build. I might have to look into reporting this upstream.

/nix/store/kd1amvbva27hbqajakffvrhjcblz1npn-gcc-14-20241116/include/c++/14-20241116/bits/stl_vector.h:370:7: internal compiler error: Segmentation fault
  370 |       }
      |       ^
0x20db3f4 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
        ???:0
0x20dbc29 internal_error(char const*, ...)
        ???:0
0xf7580f crash_signal(int)
        ???:0
0x7df42b cp_gimplify_expr(tree_node**, gimple**, gimple**)
        ???:0
0xc67194 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
        ???:0
0xc67be8 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
        ???:0
0xc7698e gimplify_bind_expr(tree_node**, gimple**)
        ???:0
0xc68306 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
        ???:0
0xc6b91c gimplify_and_add(tree_node*, gimple**)
        ???:0
0x7df16c cp_gimplify_expr(tree_node**, gimple**, gimple**)
        ???:0
0xc67194 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
        ???:0
0xc6bace gimplify_body(tree_node*, bool)
        ???:0
0xc6beba gimplify_function_tree(tree_node*)
        ???:0
0xac5737 cgraph_node::analyze()
        ???:0
0xac7eb7 analyze_functions(bool)
        ???:0
0xac8b7d symbol_table::finalize_compilation_unit()
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

[posting here the same thing as in matrix]
If the crashes are non-deterministic it might be hardware failure. I'd suggest running memtest just in case.
For example cp_gimplify_expr() is a conversion from C++ frontend representation to GIMPLE. Those should crash all the time if they go wrong. Other crashes are in other subsystems, like unify_nodes() or compute_fn_summary(). Them all being SIGSEGVs is suspicious (usually gcc internal asserts and produces slightly more meaning ful errors).
Thus I would explore hardware stability angle.

I ran memtest and found 1 bit of bad RAM.. will get a replacement soon. Closing as hardware issue.

Aw shucks. :-(


CTRL+ENTER does not work when some SQL commands like SHOW / EXPLAIN / ANALYZE are in script without ";" before them

Description
Getting an error "SQL Error [1064] [42000]: You have an error in your SQL syntax...."  when trying to run using CTRL+ENTER any statement when SHOW / EXPLAIN / ANALYZE statements (there might be more) are not separated with ";" even though they are spaced with new lines between them.
DBeaver Version
<IP_ADDRESS>405042322
Operating System
Windows 10 64 bit
Database and driver
RDS for MySQL v8.0.36
Steps to reproduce
Try to run any statement separately with CTRL+ENTER in this script:
select 1

explain select 1

select 2

show variables like 'test'

Additional context
No response

Solved in v24.0.5.


Tracking issue for troubles with the simpNF linter

This link searches for references to this issue in the source code.


[2.6.x backport] 'execute Shell' on Workload open Shell in other Workload in other Namespace with same Name

Internal reference: SURE-5799
Reported in 2.6.9
Issue description:
While open a Shell on Workload, a Shell are open from other Workload (with the same Name) on other Namespace. Same behavior if Workload are Scale = 0. This means users are unable to get exact container shell.
Related 2.7.x work: https://github.com/rancher/dashboard/issues/8040 (which may have to land first)
Possible connection to https://github.com/rancher/dashboard/issues/6982

Unable to reproduce after testing against v2.6-head. Based on description and repro steps, this looks to be resolved by #7274. Moving to test for confirmation.

Ticket #8060 - Test Results - ✅
With Docker on a single-node instance:
Verified on Rancher v2.6-582851228efff89caa4ed35e49fb777be67209a6-head:

Fresh install of rancher v2.6-head
Deploy a downstream RKE1 AWS Node driver cluster - [ k8s v1.24.9 ]
Once active, create two new projects - [ projectone, projecttwo ]
Create namespaceone in projectone and create namespacetwo in projecttwo
Create the same deployment, with same name, in both namespaceone and in namespacetwo
Once pods are active, execute shell on each and observe targeted pod
Verified - Both deployed workloads resolve to correct pod when launching shell


[UT] ASAN false positive with exception

Fixes #42349
What type of PR is this:

[ ] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[x] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[ ] This is a backport pr

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.2
[x] 3.1
[x] 3.0
[x] 2.5

@imay Could you please help merge in this PR?  The coverage report can be ignored.


How to add migration?

I am having error (Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728) when running "dotnet ef migrations add sampleMigation" inside the infrastructure project. Am I doing the right way?
Kindly advise.
Thanks!

@dheltanumericz you're doing it the right way, but you're missing the DesignTimeDbContextFactory EF can use for generating migrations.
The easiest is to refer to this code in another Jason's repo:
https://github.com/JasonGT/NorthwindTraders/blob/master/Src/Persistence/DesignTimeDbContextFactoryBase.cs


Convert to docker

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Docker created now on actions. However need a docker compose with examples, etc for settings and deployment.

Docker compose created. Services fully operational without compromising DB or passwords.


Release notes are missing

Description
Version 2.0 packages are available or nuger. But no release notes/changelog. Is not it a good practice to put release notes/changelog up online before publishing the new packages to nuget?
Steps to reproduce

Go to the project page.
No release notes

Yesterday we have v2.0 pushed and today I realized my functions has no invocation logs anymore since yesterday around 6pm... Coincidence ?

@lasyan3 can you please open a separate issue with the information requested in the template? We'll be in a better position to investigate and engage with those details. Thanks!

Branches have been updated and the releases are out with notes. Doc changes are also in progress.
Thank you!


docs: API v2.0.0-beta.10 redirects to the latest release

Steps to reproduce:

Go to the API docs: http://ionicframework.com/docs/v2/api/
Click the dropdown menu and go to 2.0.0-beta.10
Click on one of the options in the side menu and see it navigates to the latest release

Going directly to the URL works, for example: http://ionicframework.com/docs/v2/2.0.0-beta.10/api/components/alert/Alert/
It seems like the sidemenu links weren't generated properly for beta 10. Going down the versions I am seeing the correct links for 9 and below.

Fixed with  6fbdcccaef666236fc959d2984e03df683ce2d2c.
This will need to be done manually when the version is bumped for the time being.