Add ZAP into third_party

Problem
ZAP will be used for code generation. Add it to third_party and ensure docker can do 'npm install' on it.
Summary of Changes

Adds zap into third_party
Adds the LTS version of nodejs into the dockerfile image
Adds dev prerequisites for a npm install of zap (required cairo and pango). resorted package list while I was changing the file to make it look nicer.

Perfect timing!

@BroderickCarlin @jelderton @saurabhst @hawk248 ?

@mspang?

Problem
ZAP will be used for code generation. Add it to third_party and ensure docker can do 'npm install' on it.
Summary of Changes

Adds zap into third_party
Adds the LTS version of nodejs into the dockerfile image
required cairo and pango

Why do we need graphics/fonts libraries to build CHIP?

Problem
ZAP will be used for code generation. Add it to third_party and ensure docker can do 'npm install' on it.
Summary of Changes

Adds zap into third_party
Adds the LTS version of nodejs into the dockerfile image
required cairo and pango

Why do we need graphics/fonts libraries to build CHIP?

I believe we need to clean up. For now for ZAP, it is a single package under npm install so it brings in stuff to build the UI.
Chip should not need them, so I am thinking of alternatives like:

can we make the generator not use node (python? handlebars is reasonably standard)
can we make 'executable' for the generator somehow, so we install it like a binary in the image instead of putting repo in third-party?

Unsure what would be possible, for now assuming we may want to run the full zap until we make it smaller.

Problem
ZAP will be used for code generation. Add it to third_party and ensure docker can do 'npm install' on it.
Summary of Changes

Adds zap into third_party
Adds the LTS version of nodejs into the dockerfile image
required cairo and pango

Why do we need graphics/fonts libraries to build CHIP?

Basically ZAP is an Electron application. So it not a pure command line utility as it also contains a graphic UI.
That said it can be run as a command line application from the build system too since it rely on nodejs.

Bringing in node.js is going to cause extra work for us; we're not deploying that already and we'll have to figure out how to manage it.
We can afford that cost, but are we adding too much burden on the other project participants? Who else is already deploying node.js on their infrastructure?
Right now, to compile CHIP you minimally need

C++ toolchain
GN
ninja
python 3

That's pretty much it. There are some other dependencies depending on platform, but those are related to particular ports not CHIP itself. Furthermore, if you'd rather not spend time managing dependencies we'll actually ship you all of those things on Linux, Mac, & Windows (that's what the "bootstrap" step does).
[we did drop bundling python3 recently - we may want to bring it back, per slack, doing so already broken someone's build]
If everyone is comfortable with this, OK, but I think we should be careful here.

+1 to @mspang's comments. We should keep the dependencies on what it takes to build the "common core" of CHIP (whatever we want to bill that as) as minimal and simple as possible. Node.js seems to go one step too far. If it's for a particular binding, then we should either start forecasting a CHIP packaging / repo approach that layers onto or shells around "common core" where those packages / repo are optional adjuncts.

I'd concur. The code generator has to be lean, with minimal dependencies given it's need to run on a multitude of different platforms, use-cases. Requiring node.js seems like a very heavy lift, and will make it much less usable, which if it wasn't a critical tool, I'd have cared less. But the code generator is a must-have tool for anyone who intends to interact with CHIP devices.

My understanding is that using ZAP as the code generator was the plan of record starting at the point when the Silicon Labs ZCL implementation was selected for integration into CHIP.
What are the alternatives people are proposing, precisely?  As I see it, we have the following options:

Use ZAP, as planned.  This does add a node.js dependency to CHIP builds, which I agree is not nearly as nice as not adding a dependency.  That said, in practical terms, the costs here are setting up CHIP CI and the cost to people actually using CHIP.  Do we have an estimate for the former?  Is the latter a serious bar?  This is needed at build-time, not runtime, so it's not clear to me how wide a variety of platforms we really need the generator to support in practice...

Write a different generator (presumably in python?) that consumes the output of the ZAP UI and generates C++ code.  Timeframe on doing this?  How much of the work here would duplicate ZAP work that's happening anyway vs being CHIP-specific?

Figure out whether there's an existing python package that allows using as much of the existing ZAP bits (templates, input data, etc) as possible.  Not sure whether in practice this would be any less work than "write a different generator".

Any other constructive suggestions?
Note that the long-term tradeoffs here might be different from the "get to 1.0 by a certain date" ones, by the way; it's a lot easier for me to see us writing a separate python-based generator long-term than in the next few months....

My understanding is that using ZAP as the code generator was the plan of record starting at the point when the Silicon Labs ZCL implementation was selected for integration into CHIP.
What are the alternatives people are proposing, precisely? As I see it, we have the following options:

Use ZAP, as planned.  This does add a node.js dependency to CHIP builds, which I agree is not nearly as nice as not adding a dependency.  That said, in practical terms, the costs here are setting up CHIP CI and the cost to people actually using CHIP.  Do we have an estimate for the former?  Is the latter a serious bar?  This is needed at build-time, not runtime, so it's not clear to me how wide a variety of platforms we really need the generator to support in practice...
Write a different generator (presumably in python?) that consumes the output of the ZAP UI and generates C++ code.  Timeframe on doing this?  How much of the work here would duplicate ZAP work that's happening anyway vs being CHIP-specific?
Figure out whether there's an existing python package that allows using as much of the existing ZAP bits (templates, input data, etc) as possible.  Not sure whether in practice this would be any less work than "write a different generator".

Any other constructive suggestions?
Note that the long-term tradeoffs here might be different from the "get to 1.0 by a certain date" ones, by the way; it's a lot easier for me to see us writing a separate python-based generator long-term than in the next few months....

Fair points all and if there's a roadmap, then this might be an easier short-term "get it done" pill to swallow. What's the long-term plan for the Data Model Work Group? The One Data Model effort was/is heading towards SDF. Is that where this post-1.0 and the DMWG efforts are headed? What are SDF's tooling requirements?

FYI: Electron has been the plan of record since the original Data Model source code evaluation, when we discussed the code from Silicon Labs. The code generator can run as a nodejs service, that will take far less time to run than most steps of our build phase itself.

Folks - node.js as a runtime requirement would give me reservations ... as a CI or build tool does not seem too onerous. Therefore I am inclined to support its inclusion as proposed.

ZAP as-is is (like the ZCL impl we agreed to and our huge examples tree) currently a necessary evil.  These 2 projects need to move lockstep during this dev-heavy phase.
Boiling ZAP down to something we can install as a flask or as a debian package would improve the situation greatly.
Backing out handlebars and using mustache for bash would be my preference, though ;)

Folks - node.js as a runtime requirement would give me reservations ... as a CI or build tool does not seem too onerous. Therefore I am inclined to support its inclusion as proposed.

@hawk248 node.js would be a requirement for accessory devs, does that change anything for you?

pushing button for now, let's think about how ZAP's dependency footprint can be reduced, how we can make zapc XXX.zap -o gen be as painless as possible


Web app to expose DynamoDB settings and whitelist tables

Auto Cleanup interacts with two tables that live within DynamoDB (auto-cleanup-settings and auto-cleanup-whitelist). In order to enable users to interact with both of these tables in a more user friendly way, a simple to use web app (preferably static in nature) would need to be built.
Settings
The settings page should simple expose the table allowing addition, modification and deletion of rows.
Whitelist
The whitelist page should allow addition, modification and deletion of rows but should also ensure the expire_at column is automatically populated with an EPOCH timestamp of today plus 7 days (this ensures no one except admins can whitelist a resource permanently).
Against each whitelist record, users should have the ability to extend their whitelist from today to today plus 7. This will ensure that without interaction from the users, their whitelisting records will be removed by DynamoDB and consequently removed by Auto Cleanup.

I would recommend starting this feature with an API & other required backing services, and supply two endpoints - POST to add a resource to the whitelist, PUT to increase the TTL for a whitelisted item, GET to check if a resource is listed and retrieve the TTL, and DELETE to remove an item from the whitelist.


Create a PlantUML sequence diagram for the “List Popular Post” requirement

Objective:
The primary goal of this issue is clear: to generate a PlantUML sequence diagram. Sequence diagrams are a valuable tool for visualizing the interactions between different components or actors in a system. In this case, it's intended to illustrate the behavior related to the "List Popular Post" requirement.

Requirement:
The issue refers to the "List Popular Post" requirement. As such, we should present the client with details from the 5 most popular posts. This can be done using an SQL for better performance. The sorting should be done on the database and only the top 5 should be brought to the Application.

Determine the scope of the sequence diagram:
The Server will receive a request by the Client on the Controller, the message should be encapsulated in a DTO. The Controller will delegate the task, using a DTO, to the ProductService. The ProductService should delegate the ProductRepository with querying the Database. The ProductRepository should Query it. The query is to be done in SQL, for performance reasons. It should send a List of Products containing the 5 most popular posts to the Service which in turn should convert it to DTO and send it to the Controller. The Controller should prepare the adequate JSON response as it occurs (200 OK in case of the happy path).

What triggers the "List Popular Post" action? :
This can be done via a GET to /post/popular or some similar URL.

Data Flow:
The Server will receive a request by the Client on the Controller, the message should be encapsulated in a DTO. The Controller will delegate the task, using a DTO, to the ProductService. The ProductService should delegate the ProductRepository with querying the Database. The ProductRepository should Query it. The query is to be done in SQL, for performance reasons. It should send a List of Products containing the 5 most popular posts to the Service which in turn should convert it to DTO and send it to the Controller. The Controller should prepare the adequate JSON response as it occurs (200 OK in case of the happy path).

Documentation:
This should be additionally documented on the README. Specially the rationale behind the decisions on the drafting of the System Diagram.

Timeline and Responsibilities:
This should be finished by the 1st of October.

First Draft completed. Still going to look again at all of it and will ask for feedback to the professor. Not comfortable with putting it as done for now.


Cannot get the client list of joined rooms from the server disconnect

I would like to add a listener on a client disconnect event on my server and get the current list of rooms used by this client. Unfortunatly, it's not possible since all the rooms are automatically left just before the server disconnect listener handler.
Code from Namespace.java:
    public void onDisconnect(SocketIOClient client) {
        Set<String> joinedRooms = client.getAllRooms();
        allClients.remove(client.getSessionId());

        leave(getName(), client.getSessionId());
        storeFactory.pubSubStore().publish(PubSubType.LEAVE, new JoinLeaveMessage(client.getSessionId(), getName(), getName()));

        for (String joinedRoom : joinedRooms) {
            leave(roomClients, joinedRoom, client.getSessionId());
        }
        clientRooms.remove(client.getSessionId());

        try {
            for (DisconnectListener listener : disconnectListeners) {
                listener.onDisconnect(client);
            }
        } catch (Exception e) {
            exceptionListener.onDisconnectException(e, client);
        }
    }

Listeners are called just after a force leave of all rooms.
There was the same kind of problem with the node socketio server and the solved it by adding a new disconnecting listener called just before the disconnect. https://github.com/socketio/socket.io/issues/1814
Is there a way to have the same behaviour or is there a way to know the room used by a client on a disconnect event?

FYI, u can still get the room set after the onDisconnect evnet by using the version 1.7.7.
After I upgraded to 1.7.17 i encountered the same problem, and my solution is to record the client and room relationship using a HashMap when  your specific join room event happens.

I have the same problem，When the client is disconnected，client leave the room automatically，so when client reconnection，bring the client back into the room. I using the version 1.7.18

I have the same problem，When the client is disconnected，client leave the room automatically，so when client reconnection，bring the client back into the room. I using the version 1.7.18

老铁，咨询一下你们用这个项目做socket多久了？我最近接手的前任留的代码，也是这玩意，我咋感觉到处漏风～


why buggyfill do fill on ios10 and ios10+

when I search in caniuse: https://caniuse.com/#search=viewport
viewport units wokrs find on iOS8 and iOS8+
and I found that, the comment is also said:
var isMobileSafari = /(iPhone|iPod|iPad).+AppleWebKit/i.test(userAgent) && (function() {
      // Regexp for iOS-version tested against the following userAgent strings:
      // Example WebView UserAgents:
      // * iOS Chrome on iOS8: "Mozilla/5.0 (iPad; CPU OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) CriOS/39.0.2171.50 Mobile/12B410 Safari/600.1.4"
      // * iOS Facebook on iOS7: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201 [FBAN/FBIOS;FBAV/<IP_ADDRESS>.20; FBBV/3214247; FBDV/iPhone6,1;FBMD/iPhone; FBSN/iPhone OS;FBSV/7.1.1; FBSS/2; FBCR/AT&T;FBID/phone;FBLC/en_US;FBOP/5]"
      // Example Safari UserAgents:
      // * Safari iOS8: "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4"
      // * Safari iOS7: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A4449d Safari/9537.53"
      var iOSversion = userAgent.match(/OS (\d+)/);
      // viewport units work fine in mobile Safari and webView on iOS 8+
      return iOSversion && iOSversion.length > 1 && parseInt(iOSversion[1]) < 10;
    })();

but why the return valud satement detect as iOS10-.
I think this would cost some unused works on iOS8+

The buggyfill detects newer versions of iOS because of the "browser UI height problem", see https://medium.com/@raimanadh/how-and-why-i-built-vh-fix-2bc0288eb5af for an explanation


fix: makes allowed_idps type to set

Because order of cloudflare_access_application.allowed_idps is not stable, each time terraform plan shows diff. To avoid this, allowed_idps should be set type rather than list.
It might be Cloudflare API doesn't care an order of IDPs.
For example, after I apply a plan below, rerun apply, it shows same diff.
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # cloudflare_access_application.xxx will be updated in-place
  ~ resource "cloudflare_access_application" "xxx" {
      ~ allowed_idps               = [
          - "327a35a4-d355-43f0-a90e-0ee915d3c7f9",
            "c6efb857-e6e4-483a-91c9-f0f0c63ea16e",
          + "327a35a4-d355-43f0-a90e-0ee915d3c7f9",
        ]
        id                         = "fcb66895-7006-482b-94a4-85a9eb3e51df"
        name                       = "XXX"
        # (12 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

the change looks reasonable. can you please add test coverage for this change?

@jacobbednarz It was tested by TestAccCloudflareAccessApplication_WithADefinedIdps method. What kind of test do you want me add?

the fact that the test was previously passing before you made your changes suggests it is not sufficient.
for sufficient test coverage, I should be able to run the test before your fix demonstrating the problem having the test fail, then apply your fix and have the test pass. in this case, you'll need to expertise the update with differently or ordered keys and have terraform not show a diff. if you check out other tests for TypeSet you'll see some prior art.

@jacobbednarz thank you! I will work on it😀

thanks @keitap ! 🏆

acceptance tests are all passing here
TF_ACC=1 go test $(go list ./...) -v -run "^TestAccCloudflareAccessApplication_" -count 1 -parallel 1 -timeout 120m -parallel 1
?   	github.com/cloudflare/terraform-provider-cloudflare	[no test files]
=== RUN   TestAccCloudflareAccessApplication_BasicZone
--- PASS: TestAccCloudflareAccessApplication_BasicZone (5.39s)
=== RUN   TestAccCloudflareAccessApplication_BasicAccount
--- PASS: TestAccCloudflareAccessApplication_BasicAccount (4.42s)
=== RUN   TestAccCloudflareAccessApplication_WithCORS
--- PASS: TestAccCloudflareAccessApplication_WithCORS (7.10s)
=== RUN   TestAccCloudflareAccessApplication_WithSaas
--- PASS: TestAccCloudflareAccessApplication_WithSaas (3.97s)
=== RUN   TestAccCloudflareAccessApplication_WithAutoRedirectToIdentity
--- PASS: TestAccCloudflareAccessApplication_WithAutoRedirectToIdentity (2.43s)
=== RUN   TestAccCloudflareAccessApplication_WithEnableBindingCookie
--- PASS: TestAccCloudflareAccessApplication_WithEnableBindingCookie (5.33s)
=== RUN   TestAccCloudflareAccessApplication_WithCustomDenyFields
--- PASS: TestAccCloudflareAccessApplication_WithCustomDenyFields (3.74s)
=== RUN   TestAccCloudflareAccessApplication_WithADefinedIdps
--- PASS: TestAccCloudflareAccessApplication_WithADefinedIdps (5.21s)
=== RUN   TestAccCloudflareAccessApplication_WithMultipleIdpsReordered
--- PASS: TestAccCloudflareAccessApplication_WithMultipleIdpsReordered (10.36s)
=== RUN   TestAccCloudflareAccessApplication_WithHttpOnlyCookieAttribute
--- PASS: TestAccCloudflareAccessApplication_WithHttpOnlyCookieAttribute (3.50s)
=== RUN   TestAccCloudflareAccessApplication_WithHTTPOnlyCookieAttributeSetToFalse
--- PASS: TestAccCloudflareAccessApplication_WithHTTPOnlyCookieAttributeSetToFalse (3.54s)
=== RUN   TestAccCloudflareAccessApplication_WithSameSiteCookieAttribute
--- PASS: TestAccCloudflareAccessApplication_WithSameSiteCookieAttribute (3.52s)
=== RUN   TestAccCloudflareAccessApplication_WithLogoURL
--- PASS: TestAccCloudflareAccessApplication_WithLogoURL (3.70s)
=== RUN   TestAccCloudflareAccessApplication_WithSkipInterstitial
--- PASS: TestAccCloudflareAccessApplication_WithSkipInterstitial (3.66s)
=== RUN   TestAccCloudflareAccessApplication_WithAppLauncherVisible
--- PASS: TestAccCloudflareAccessApplication_WithAppLauncherVisible (3.58s)
PASS
PASS	github.com/cloudflare/terraform-provider-cloudflare/internal/provider	69.974s
PASS

@jacobbednarz Thank you for merging. Tests are passed but
if removing testAccCloudflareAccessApplicationConfigWithMultipleIdpsReordered and sharing testAccCloudflareAccessApplicationConfigWithMultipleIdps, the resource IDs (and name) will be swapped too. I think what we want is only need to swap allowed_idps order.
https://github.com/cloudflare/terraform-provider-cloudflare/pull/2094/commits/41fb70333f3e438245d4cfd5f7fc73a333914eb4


[Bug] Check for stale datasource connection before execution for Mysql plugin.

Description

Check for stale datasource connection before execution for the Mysql plugin.
Return stale connection exception.

Context
Currently, stale connection is not checked for, and hence an exception occurs during execution which gets returned to UI as it is. With a stale connection, the new action implementation class catches this exception and takes corrective action.
Steps to reproduce the behavior:

Create MySQL datasource.
Restart MySQL to invalidate connection.
Run MySQL query.

Important Details

Version: Any
OS: Any
Browser: Any

@sumitsum @mohanarpit why is this a low priority issue? This was faced by Ravi and now once again. This looks critical to me, it's faced by a user and it's blocking their flow

https://discord.com/channels/725602949748752515/1026404443517890571

Closing this issue since the issue mentioned on Discord link is a different issue.
@ame-appsmith can you please check with the user if they are on latest version. If not then please ask them to upgrade to the latest which might fix their problem since a connection related fix was shipped in one of the earlier versions. If the issue was found in the lastest version then please create a separate GitHub issue for this.


[webapi][OTCIS-4450] Update xml for Webstorage and Extra

Due to testkit-lite has been updated to support both stub and webdriver mode to run all tests, so update xml files to suite.

Unit test result summary: the suites can run well on android.

Miss one request:  maintain source code in one place, copy them to subapp folder while building, configure the copy action in suite.json.

Resubmit this PR by https://github.com/crosswalk-project/crosswalk-test-suite/pull/1864, so close it.


Release 1.3.0

@rultor release it; the tag is 1.3.0.

@rultor release it; the tag is 1.3.0.

@rafamizes OK, I will release it now. Please check the progress here

@rultor release it; the tag is 1.3.0.

@rafamizes Done! FYI, the full log is here (took me 1min)


test: remove e2e tests and cleanup

Description
Remove e2e tests, now superseded by: https://github.com/kubewarden/policy-evaluator/pull/399
Also, splits unit tests and integration tests in the CI and Makefile targets.

I'll update the required tests suite once the PR is merged.

@flavio I cannot merge because of the Expected Status, do you have the right to force-merge?


Add caching layer to the DAO creation wizard to save user state

We would like to be able to have an action that we can use to cache user state when they are in the middle of the form.
export const SET_DAO_NAME = "DAO_REGISTRATION_START"
export const DAO_REGISTRATION_START = "DAO_REGISTRATION_START"
export const DAO_REGISTRATION_COMPLETE = "DAO_REGISTRATION_COMPLETE"

export const setDAO = (daoName: string, tokenName: string, symbol: string ) => ({
  type:"SET_DAO_NAME",
  daoName,
  tokenName,
  symbol
})

export const registerDAO = (dao: DAO) => ({
  dispatch({ type: DAO_REGISTRATION_START })
  /* TODO logic to update list of registered DAO */
  dispatch({ type: DAO_REGISTRATION_COMPLETE })
})

This task is done, but additional improvements are needed to support:

Users leaving midway through setup.
Users wanting to continue a setup.

I've created this task to represent this work:
https://github.com/dOrgTech/dOrg-dApp/issues/11


Update mode.py to prevent null last_saved_at values from breaking runs

If last_saved_at is null, make it equal to created_at as a workaround to prevent dp.parse from failing.
Checklist

[x] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[ ] Links to related issues (if applicable)
[ ] Tests for the changes have been added/updated (if applicable)
[ ] Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
[ ] For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@rtol5, please, can you run black formatting on the code?

@treff7es done, looks like I just needed to remove the extra spacing in line 219. Lmk if this is good now, thanks!


Merging two graphs

Hello :)
Would it be possible to merge two graphs by combining the internal representations of them? What I have in mind is using Object.assign for _nodes, _parent, etc. effectively merging two graphs in O(1). Or is there any other way to do it?
Thank you for your work on Graphlib, Dagre and Dagre-D3. :)

Hi @mlajtos,
Did you find a nice way to merging 2 graphs? I'm looking for the same thing.
Thanks
Mathieu

Hi @mathieugerard ,
I decided not to fiddle with the internal representations of graphlib. Instead I serialized them, joined the serialized representations and then deserialize:
const g1 = new graphlib.Graph()
const g2 = new graphlib.Graph()

g1.setNode("a1")
g1.setNode("b1")
g1.setEdge("a1", "b1")
g1.setEdge("b1", "shared")

g2.setNode("a2")
g2.setNode("b2")
g2.setEdge("a2", "b2")
g2.setEdge("b2", "shared")

const g1_ser = graphlib.json.write(g1)
const g2_ser = graphlib.json.write(g2)

const g3_ser = {
  options: g1_ser.options,
  nodes: [...g1_ser.nodes, ...g2_ser.nodes],
  edges: [...g1_ser.edges, ...g2_ser.edges]
}

const g3 = graphlib.json.read(g3_ser)
console.log(g3.nodes(), g3.edges())

Thank you very much. It works indeed perfectly fine.
I had looked at the json read and write methods and your answer confirms this is the way to go.


Refactor route interface

Currently there are separate route and iptables interfaces deeply
coupled with each other while they are serving the same purpose: route
container traffic in host network. The routing and NAT decision need
cooperation between ip route, iptables, ip rule which are currently
coordinated by its clients: AgentInitilizer and NodeRouteController, and
because of there are linux specific concept, it makes windows
implementation has to make a dummy implementation to map them.
This patch encapsulates the host routing logic into a single interface
RouteService with platform generic methods. With it:

The platform specific implementation detail of iptables, ip route, ip
rule, ipset are hidden from its clients.
Some deeply coupled logic is encapsulated in a single struct, e.g.
marking packets in iptables then matching the mark when routing.

Besides, it enhances several implementations:

Instead of an iptables rule per CIDR, it uses ipset to match
pod-to-external traffic, which has better performance and reduces the
management complication: no dependency on encap mode, no need to update
iptables at runtime.
It fixes the bug that iptables rules are not removed when nodes leave
the cluster.
It uses iptables-restore to update antrea managed chains, getting rid
of string matching when cleaning up stale rules.

This patch tries to solve several problems which is obviously a bad practice, doing it is because they will be conflict with several ongoing PRs so want to reduce the cycles of reviewing and rebasing. I can divide them if it's hard to review and understand.

@jianjuns @wenyingd  This is the idea of refactoring I mentioned in windows PRs. Please see if it makes sense to you. I believe on windows platform we just need to implement RouteService and no platform specific code is in common path.
Please ignore the test failure for now.

/test-e2e

/test-all

/test-conformance
/test-e2e

Looks great to me. I was uncertain if iptables rules fall into route category, for example we have masq rule too, but yes probably it is ok.

I like this change, and it will reduce much work on Windows.
Just a bit curious, it looks "iptables" is placed as a linux utils, and called only by route client. If my understanding is correct, Pod SNAT (to external) is thought as a function of routing after refactoring. Does Windows also need to follow this principle?

@jianjuns @wenyingd If we focus on what the interface does, not how it does, I think it's reasonable to put NAT into it, the iptables, sysctl, ip rule and ipset are all for routing the container packets to other nodes or external correctly in host network, if we divide them by tool, it would be a disaster to their clients.
I think they are also suitable to put together from high-level "routing", anyway it's router who is doing NAT.

routing is the higher-level decision making that directs network packets from their source toward their destination through intermediate network nodes by specific packet forwarding mechanisms

@wenyingd Is it convenient for windows platform to do NAT in similar way? I haven't looked at how you do NAT on windows yet, if it's one-time job, maybe it can be done in Initialize? We can discuss more offline.

@wenyingd Is it convenient for windows platform to do NAT in similar way? I haven't looked at how you do NAT on windows yet, if it's one-time job, maybe it can be done in Initialize? We can discuss more offline.

On Windows, OpenFlow entry is leveraged to do SNAT. It is a one-time job. In my current implementaion, it is placed in agent Initialization, and it is the last step after OVS bridge created and the OF connection is setup. If "routing" is a more suitable module to provide this function, I could try to move it to the Implementation. A possible difficulty I can think of might be, the routeClient on Windows have to call ofClient.

@wenyingd Is it convenient for windows platform to do NAT in similar way? I haven't looked at how you do NAT on windows yet, if it's one-time job, maybe it can be done in Initialize? We can discuss more offline.

On Windows, OpenFlow entry is leveraged to do SNAT. It is a one-time job. In my current implementaion, it is placed in agent Initialization, and it is the last step after OVS bridge created and the OF connection is setup. If "routing" is a more suitable module to provide this function, I could try to move it to the Implementation. A possible difficulty I can think of might be, the routeClient on Windows have to call ofClient.

Then I guess it's not necessary as openflow kind of provides routing function too. I will review your PRs first.

/test-e2e
/test-conformance

/test-e2e

/test-all

/test-all

/test-e2e
/test-networkpolicy

/test-e2e

/test-all

conformance test failed because of #481 which will be fixed in #482
/test-conformance
e2e test failed because of #485 which is not related to this PR either
/test-e2e

@tnqn the netpol tests should not fail if you rebase master

/test-e2e
/test-conformance
/test-networkpolicy

/test-all

/test-networkpolicy

/test-e2e
/test-networkpolicy

/test-e2e

/test-e2e

/test-all

@tnqn the netpol tests should not fail if you rebase master

@antoninbas Thanks for reminding. Actually the failure of netpol was correct because the PR caused a regression, the other e2e tests succeeded was only because they were testing wrong commits (#491). I have fixed the issue (I shouldn't decide the mark of pod-to-external in pre-routing chain as pod-to-service could be DNATed to pod-to-external later) and confirmed the tests are correct.

@wenyingd @antoninbas do you have further comments? If not, I'm going to merge it as a few PRs are related to it.

Hi Quan,
as I was trying to merge this PR, I noticed that iptables.go now is folded into route_linux.go. In doing so the following method in iptables may not have been ported:
1.iptable.AddPeerCIDR:
// The default masquerading rule is all traffic in-port=gw0, out-port!=gw0. The rule
/ should excludes to all traffic destined for peer Pod CIDRs for noEncap traffic mode.

iptable.Reconcile: this handles case where iptable rules varies during traffic mode change, i.e. from encap mode to noEncap mode or vice versa.

I apologize if I have misread ur PR.

@tnqn
Ok I see for 1) we r now using ipSet, that is really cool. So nonEncap will continue to work.
For 2). does antreaxxxxChains gets flushed during initIPTables, I guess it should be based on ur comments?

@tnqn
Ok I see for 1) we r now using ipSet, that is really cool. So nonEncap will continue to work.

Yes, previous multiple rules are replaced by single rule.

For 2). does antreaxxxxChains gets flushed during initIPTables, I guess it should be based on ur comments?
Yes, all antrea-managed chains will be flushed and restored to what the new content is.

My simple request,
since route export Interface "Interface", should we hide "struct Client" ; otherwise caller can use either route.Interface or route.Client to access route. I am guessing we'd prefer caller to use route.Interface?

My simple request,
since route export Interface "Interface", should we hide "struct Client" ; otherwise caller can use either route.Interface or route.Client to access route. I am guessing we'd prefer caller to use route.Interface?

@susanwu88 Sure, makes sense to me. I didn't use Client outside of the package, but forgot to make it private.


PEP 561 marker file py.typed missing from releases

While there is a PEP 561 maker file in nox/py.typed it is not included in the published releases. To reproduce, extract the published nox-2020.5.24.tar.gz and see that the file is missing.
Mypy therefore does now know that this package includes type annotations and will display errors to users.
I'm actually not sure why the marker file is not included in the releases. The setup.py specifically includes it in the package data:
https://github.com/theacodes/nox/blob/00775b470129787b14c45f2853441f9f1cad006d/setup.py#L49
However, this setting might be ignored and perhaps adding the following line to the MANIFEST.in is the correct solution:
included src/py.typed

I would appreciate it, if the correct setting can be found and this published as a bugfix release.

Any statement/action on this? IMO this should be a relatively quick fix.

I'd be happy to review a PR for this. :)


after upgrade, clicking 'Edit Profile' throws an error - ReflectionException (-1) Class SocialiteProviders\GitLab\GitLabExtendSocialite does not exist

Describe the bug
Following upgrade from 0.19 to the latest 0.23.2 version, I noticed that clicking on the Edit Profile option throws an error in the browser:
ReflectionException (-1)
Class SocialiteProviders\GitLab\GitLabExtendSocialite does not exist
Tried clearing the artisan cache but it errors out the same way:

plynch@bookstack:/var/www/bookstack$ sudo php artisan cache:clear
[ReflectionException]
Class SocialiteProviders\GitLab\GitLabExtendSocialite does not exist

This worked previously. Apologies if this is completely obvious - don't know my way around these dependencies and not sure what to do next.
Steps To Reproduce
Steps to reproduce the behavior:

Log into bookstack via remote browser
Click on the logged-in user icon in the top-right corner
Click 'Edit Profile'

Expected behavior
I expect to see the Edit Profile settings.
Screenshots
Log info below:
Your Configuration (please complete the following information):

Exact BookStack Version (Found in settings):
PHP Version:
Hosting Method (Nginx/Apache/Docker):

Additional context
ReflectionException thrown with message "Class SocialiteProviders\GitLab\GitLabExtendSocialite does not exist"
Stacktrace:
#87 ReflectionException in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:752
#86 ReflectionClass:__construct in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:752
#85 Illuminate\Container\Container:build in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:631
#84 Illuminate\Container\Container:resolve in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:586
#83 Illuminate\Container\Container:make in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:732
#82 Illuminate\Foundation\Application:make in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:387
#81 Illuminate\Events\Dispatcher:createClassCallable in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:368
#80 Illuminate\Events\Dispatcher:Illuminate\Events{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:200
#79 Illuminate\Events\Dispatcher:dispatch in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:465
#78 event in /var/www/bookstack/vendor/socialiteproviders/manager/src/ServiceProvider.php:18
#77 SocialiteProviders\Manager\ServiceProvider:boot in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
#76 call_user_func_array in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
#75 Illuminate\Container\BoundMethod:Illuminate\Container{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
#74 Illuminate\Container\BoundMethod:callBoundMethod in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
#73 Illuminate\Container\BoundMethod:call in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:549
#72 Illuminate\Container\Container:call in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:792
#71 Illuminate\Foundation\Application:bootProvider in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:595
#70 Illuminate\Foundation\Application:register in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:706
#69 Illuminate\Foundation\Application:registerDeferredProvider in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:686
#68 Illuminate\Foundation\Application:loadDeferredProvider in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:729
#67 Illuminate\Foundation\Application:make in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:885
#66 Illuminate\Container\Container:resolveClass in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:813
#65 Illuminate\Container\Container:resolveDependencies in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:780
#64 Illuminate\Container\Container:build in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:631
#63 Illuminate\Container\Container:resolve in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Container/Container.php:586
#62 Illuminate\Container\Container:make in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:732
#61 Illuminate\Foundation\Application:make in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php:79
#60 Illuminate\Routing\ControllerDispatcher:transformDependency in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php:46
#59 Illuminate\Routing\ControllerDispatcher:resolveMethodDependencies in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php:27
#58 Illuminate\Routing\ControllerDispatcher:resolveClassMethodDependencies in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:41
#57 Illuminate\Routing\ControllerDispatcher:dispatch in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php:212
#56 Illuminate\Routing\Route:runController in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php:169
#55 Illuminate\Routing\Route:run in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php:658
#54 Illuminate\Routing\Router:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
#53 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/app/Http/Controllers/Controller.php:44
#52 BookStack\Http\Controllers\Controller:BookStack\Http\Controllers{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:131
#51 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#50 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/app/Http/Middleware/Authenticate.php:48
#49 BookStack\Http\Middleware\Authenticate:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#48 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#47 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/app/Http/Middleware/Localization.php:28
#46 BookStack\Http\Middleware\Localization:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#45 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#44 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41
#43 Illuminate\Routing\Middleware\SubstituteBindings:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#42 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#41 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:67
#40 Illuminate\Foundation\Http\Middleware\VerifyCsrfToken:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#39 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#38 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49
#37 Illuminate\View\Middleware\ShareErrorsFromSession:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#36 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#35 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63
#34 Illuminate\Session\Middleware\StartSession:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#33 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#32 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37
#31 Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#30 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#29 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:59
#28 Illuminate\Cookie\Middleware\EncryptCookies:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#27 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#26 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102
#25 Illuminate\Pipeline\Pipeline:then in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php:660
#24 Illuminate\Routing\Router:runRouteWithinStack in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php:635
#23 Illuminate\Routing\Router:runRoute in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php:601
#22 Illuminate\Routing\Router:dispatchToRoute in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php:590
#21 Illuminate\Routing\Router:dispatch in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
#20 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
#19 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:65
#18 Barryvdh\Debugbar\Middleware\InjectDebugbar:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#17 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#16 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/fideloper/proxy/src/TrustProxies.php:56
#15 Fideloper\Proxy\TrustProxies:handle in /var/www/bookstack/app/Http/Middleware/TrustProxies.php:45
#14 BookStack\Http\Middleware\TrustProxies:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#12 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30
#11 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#9 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
#8 Illuminate\Foundation\Http\Middleware\ValidatePostSize:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#6 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46
#5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#3 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102
#2 Illuminate\Pipeline\Pipeline:then in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
#1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
#0 Illuminate\Foundation\Http\Kernel:handle in /var/www/bookstack/public/index.php:53

nvironment & details:
GET Data empty
POST Data empty
Files empty
Cookies
remember_web_59ba36addc2b2f9401580f014c7f58ea4e30989d
"eyJpdiI6IlFPWVVjVUFXWEpoSncxOFdWQnhTTFE9PSIsInZhbHVlIjoiUjlibHFwc3pMMmF1SENoVFhcL2twWUdlNks5OG1iNnJkZHpvbk5tRUVZVjdvMVBcL2xqTHROR0VzcGRnZzlma0p0aDIra1wvK2lnYVk0 ▶"
XSRF-TOKEN
"eyJpdiI6IkUrRWJNeTJNcjNvZDhlSElLNU1oQ3c9PSIsInZhbHVlIjoiWDVYTjArajZPaEduVzQways1RlVQM3QzNngzSDZsKzBUUkxWQUZINlBxa0hYU2ZXU2t1VXJzckR3Vnh2N29ueUZqZ0xrRlRUWG5SN2FC ▶"
laravel_session
"eyJpdiI6Imd6Rk5tV1NXaFhMVkZ4Z3N4d2R4OVE9PSIsInZhbHVlIjoiOHUzRk9HMkZBdmNEZ2hTXC9ucGxabitZNFNXMWp4V1dGaXBSQjBxQjVhZ1BpY1lFcGhGTlBjbVJSbWdack5yTGo2TjFJS2hDSXJJU1JF ▶"
Session empty
Server/Request Data
USER
"www-data"
HOME
"/var/www"
HTTP_COOKIE
"remember_web_59ba36addc2b2f9401580f014c7f58ea4e30989d=eyJpdiI6IlFPWVVjVUFXWEpoSncxOFdWQnhTTFE9PSIsInZhbHVlIjoiUjlibHFwc3pMMmF1SENoVFhcL2twWUdlNks5OG1iNnJkZHpvbk ▶"
HTTP_ACCEPT_LANGUAGE
"en-US,en;q=0.9"
HTTP_ACCEPT_ENCODING
"gzip, deflate"
HTTP_REFERER
"http://bookstack/books/competition-guide/page/healthcare"
HTTP_ACCEPT
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8"
HTTP_USER_AGENT
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
HTTP_DNT
"1"
HTTP_UPGRADE_INSECURE_REQUESTS
"1"
HTTP_CONNECTION
"keep-alive"
HTTP_HOST
"bookstack"
REDIRECT_STATUS
"200"
SERVER_NAME
"perplexed"
SERVER_PORT
"80"
SERVER_ADDR
"<IP_ADDRESS>"
REMOTE_PORT
"57292"
REMOTE_ADDR
"<IP_ADDRESS>"
SERVER_SOFTWARE
"nginx/1.10.3"
GATEWAY_INTERFACE
"CGI/1.1"
REQUEST_SCHEME
"http"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/var/www/bookstack/public"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/settings/users/3"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
SCRIPT_FILENAME
"/var/www/bookstack/public/index.php"
PATH_INFO
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1535683678.6638
REQUEST_TIME
1535683678
APP_ENV
"production"
APP_DEBUG
"true"
APP_KEY
"base64:IoEEgDkwNET2kAnxEisXgLTBFgWL2CxRUoWP8eRHYkM="
DB_HOST
"localhost"
DB_DATABASE
"bookstack"
DB_USERNAME
"bookstack"
DB_PASSWORD
"ZprAWN5d1n9cc"
CACHE_DRIVER
"file"
SESSION_DRIVER
"file"
QUEUE_DRIVER
"sync"
MEMCACHED_SERVERS
"<IP_ADDRESS>:11211:100"
STORAGE_TYPE
"local"
STORAGE_S3_KEY
"false"
STORAGE_S3_SECRET
"false"
STORAGE_S3_REGION
"false"
STORAGE_S3_BUCKET
"false"
STORAGE_URL
"false"
AUTH_METHOD
"standard"
GITHUB_APP_ID
"false"
GITHUB_APP_SECRET
"false"
GOOGLE_APP_ID
"false"
GOOGLE_APP_SECRET
"false"
OKTA_BASE_URL
"false"
OKTA_KEY
"false"
OKTA_SECRET
"false"
DISABLE_EXTERNAL_SERVICES
"false"
LDAP_SERVER
"false"
LDAP_BASE_DN
"false"
LDAP_DN
"false"
LDAP_PASS
"false"
LDAP_USER_FILTER
"false"
LDAP_VERSION
"false"
MAIL_DRIVER
"smtp"
MAIL_HOST
"localhost"
MAIL_PORT
"1025"
MAIL_USERNAME
"null"
MAIL_PASSWORD
"null"
MAIL_ENCRYPTION
"null"
Environment Variables
APP_ENV
"production"
APP_DEBUG
"true"
APP_KEY
"base64:IoEEgDkwNET2kAnxEisXgLTBFgWL2CxRUoWP8eRHYkM="
DB_HOST
"localhost"
DB_DATABASE
"bookstack"
DB_USERNAME
"bookstack"
DB_PASSWORD
"ZprAWN5d1n9cc"
CACHE_DRIVER
"file"
SESSION_DRIVER
"file"
QUEUE_DRIVER
"sync"
MEMCACHED_SERVERS
"<IP_ADDRESS>:11211:100"
STORAGE_TYPE
"local"
STORAGE_S3_KEY
"false"
STORAGE_S3_SECRET
"false"
STORAGE_S3_REGION
"false"
STORAGE_S3_BUCKET
"false"
STORAGE_URL
"false"
AUTH_METHOD
"standard"
GITHUB_APP_ID
"false"
GITHUB_APP_SECRET
"false"
GOOGLE_APP_ID
"false"
GOOGLE_APP_SECRET
"false"
OKTA_BASE_URL
"false"
OKTA_KEY
"false"
OKTA_SECRET
"false"
DISABLE_EXTERNAL_SERVICES
"false"
LDAP_SERVER
"false"
LDAP_BASE_DN
"false"
LDAP_DN
"false"
LDAP_PASS
"false"
LDAP_USER_FILTER
"false"
LDAP_VERSION
"false"
MAIL_DRIVER
"smtp"
MAIL_HOST
"localhost"
MAIL_PORT
"1025"
MAIL_USERNAME
"null"
MAIL_PASSWORD
"null"
MAIL_ENCRYPTION
"null"
Registered Handlers
0. Whoops\Handler\PrettyPageHandler

remember_web_59ba36addc2b2f9401580f014c7f58ea4e30989d
"eyJpdiI6IlFPWVVjVUFXWEpoSncxOFdWQnhTTFE9PSIsInZhbHVlIjoiUjlibHFwc3pMMmF1SENoVFhcL2twWUdlNks5OG1iNnJkZHpvbk5tRUVZVjdvMVBcL2xqTHROR0VzcGRnZzlma0p0aDIra1wvK2lnYVk0 ▶"

XSRF-TOKEN
"eyJpdiI6IkUrRWJNeTJNcjNvZDhlSElLNU1oQ3c9PSIsInZhbHVlIjoiWDVYTjArajZPaEduVzQways1RlVQM3QzNngzSDZsKzBUUkxWQUZINlBxa0hYU2ZXU2t1VXJzckR3Vnh2N29ueUZqZ0xrRlRUWG5SN2FC ▶"

laravel_session
"eyJpdiI6Imd6Rk5tV1NXaFhMVkZ4Z3N4d2R4OVE9PSIsInZhbHVlIjoiOHUzRk9HMkZBdmNEZ2hTXC9ucGxabitZNFNXMWp4V1dGaXBSQjBxQjVhZ1BpY1lFcGhGTlBjbVJSbWdack5yTGo2TjFJS2hDSXJJU1JF ▶"

Hi @lynchpatrickj,
Did you run a composer install on upgrade or does that throw any error when ran?

I did not install composer again after upgrading.
On Aug 31, 2018 9:40 AM, "Dan Brown"<EMAIL_ADDRESS>wrote:
Hi @lynchpatrickj https://github.com/lynchpatrickj,
Did you run a composer install on upgrade or does that throw any error when
ran?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/BookStackApp/BookStack/issues/994#issuecomment-417667538,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJVoYQzNptI-JhFoAcy0DVNPhTDaTtYdks5uWTzigaJpZM4WUhUN
.

Do you get any errors when you run composer install?
Are you running this command on the same machine you host BookStack on?

yes, I am. It says composer is not installed;

Install attempt:
plynch@bookstack:/var/www/bookstack$ sudo apt-get -f install composer
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 composer : Depends: php-symfony-console (>= 2.5) but it is not going to be installed
            Depends: php-symfony-filesystem (>= 2.5) but it is not going to be installed
            Depends: php-symfony-finder (>= 2.4) but it is not going to be installed
            Depends: php-symfony-process (>= 2.4) but it is not going to be installed
            Depends: php-json-schema (>= 1.6) but it is not going to be installed
            Depends: php-json-schema (< 2~~) but it is not going to be installed
            Depends: php-composer-spdx-licenses (>= 1.0) but it is not going to be installed
            Depends: php-composer-spdx-licenses (< 2~~) but it is not going to be installed
            Depends: php-composer-semver (>= 1.0) but it is not going to be installed
            Depends: php-composer-semver (< 2~~) but it is not going to be installed
            Depends: jsonlint (>= 1.4) but it is not going to be installed
            Depends: jsonlint (< 2~~) but it is not going to be installed
            Depends: php-cli-prompt (>= 1.0) but it is not going to be installed
            Depends: php-cli-prompt (< 2~~) but it is not going to be installed
            Recommends: mercurial but it is not going to be installed
 linux-generic-hwe-16.04 : Depends: linux-image-generic-hwe-16.04 (= <IP_ADDRESS>.55) but <IP_ADDRESS>.52 is to be installed
                           Depends: linux-headers-generic-hwe-16.04 (= <IP_ADDRESS>.55) but <IP_ADDRESS>.52 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Hi @lynchpatrickj,
Try the follow command:
php composer.phar install

That worked, thanks!

Since the problem is solved I'm closing this ticket.


Needed to add vmac support

Hi, I needed to add vmac support so I made the following patch I hope you can integrate this for the future:
diff -ru /etc/puppet/environments/development/modules/keepalived/manifests/vrrp/instance.pp arioch-keepalived-1.2.3/manifests/vrrp/instance.pp
--- /etc/puppet/environments/development/modules/keepalived/manifests/vrrp/instance.pp  2016-02-12 18:17:03.405480812 +0000
+++ arioch-keepalived-1.2.3/manifests/vrrp/instance.pp  2015-11-06 08:42:18.000000000 +0000
@@ -164,8 +164,6 @@
   $unicast_source_ip          = undef,
   $unicast_peers              = undef,
   $dont_track_primary         = false,
-  $use_vmac                   = false,
-  $vmac_xmit_base             = false,

 ) {
   $_name = regsubst($name, '[:\/\n]', '')
diff -ru /etc/puppet/environments/development/modules/keepalived/templates/vrrp_instance.erb arioch-keepalived-1.2.3/templates/vrrp_instance.erb
--- /etc/puppet/environments/development/modules/keepalived/templates/vrrp_instance.erb 2016-02-12 18:18:48.851261492 +0000
+++ arioch-keepalived-1.2.3/templates/vrrp_instance.erb 2015-08-04 14:26:22.000000000 +0000
@@ -5,15 +5,6 @@
   priority                  <%= @priority %>
   advert_int                <%= @advert_int %>
   garp_master_delay         <%= @garp_master_delay %>
-
-  <%- if @use_vmac -%>
-  use_vmac
-  <%- end -%>
-
-  <%- if @vmac_xmit_base -%>
-  vmac_xmit_base
-  <%- end -%>
-
   <%- if @lvs_interface -%>
   lvs_sync_daemon_interface <%= @lvs_interface %>
   <%- end -%>

Hi @stevedwray
Could you wrap this in a pull request?
I'd prefer you to have the proper credits for this patch instead of my name showing up instead.
If you're unsure how to create a pull request don't hesitate to ask, I'll help you through the process.

Support has been added with the merge of #108
This issue can be closed.


Work Item save button no longer grey

There seems to have been a change in the validation for the Work Item.
I have copied the instructions from last time. The save box was greyed out until the fields with a star had text added.
Why has this changed? It is useful to ensure all mandated information is recorded.

Fill in the required fields
Note: some of the fields are automatically populated, e.g. version no., background text.
When all details have been added, click Save

The "Save" button will not be visible until all fields have been filled in.
If the "Save" button is not visible, select Validate and a message will be shown against the field(s) that needs updating, for example:

Once all information has been saved, a message will be displayed to show that the profile has been added to the branch.

@jamesrwelch - Peter suggested that we ask you about it.

Validation has been removed so the Wiki page needs updating.

As far as I have always known Mauro to work and what @jamesrwelch has demonstrated to me, the profile fields provide a "Validate" function yet the values may always be saved regardless. Validation apparently means checking if required fields are present which can then be alerted to the user, but does not prevent them from being saved.
I consider this to be working as expected, therefore not a bug. If you would like this functionality changed, a change request will need to be raised with the Mauro team.

@pjmonks - please see my comment above "Validation has been removed so the Wiki page needs updating.".
This issue has been accepted and already moved to "Ready for NHS E Testing".


kubernetes: audit logging guide

Kubernetes keeps an event log that can be viewed using kubectl events. But, many people would also like to have these events go to their centralized logging system as well. This guide will show you how to get these audit logs of kubernetes events in both a best effort and fully consistent manner and inject them using log aggregation systems.
WIP docs: https://docs.google.com/document/d/11_DIkLMmwkGazh02x_2N6eoUdJLY91-cnylog9D-71A/edit#

Assigning this to @kbrwn to get the first draft done.

Ping @kbrwn or @joshix ?

@philips this is currently blocked by the hyperkube ignoring flag arguments. colin has a PR to fix this https://github.com/kubernetes/kubernetes/pull/25512

@kbrwn #25512 is now merged!

@colhom do you think you could put in a cherry pick backport to v1.2 for #25512?

@philips that would be good to do. we have some blockers in coreos-kubernetes on this one as well.

v1.2 cherry-pick pr https://github.com/kubernetes/kubernetes/pull/26754 is lgtm. Should have #25512 in v1.2.5!
\cc @kbrwn @philips

In the heapster project there's an eventer binary which can now be used which effectively does the same as kubectl get events but it supports sending to stdout (basically exactly what kubectl does) and sending to elasticsearch/google cloud storage.
I'm going to look into enabling eventer in coreos-kubernetes and also start investigating more advanced audit logging.

@philips @colegleason @joshix @chancez @kbrwn
Any update on the state of this?

Today audit logging is basically limited to the API Server's logs, and its fairly low detail. These can be collected with normal centralized logging tooling, assuming the API server is running as a pod.
There are also events, as mentioned above, which can be sent to your logging destination of choice using the eventer container, which exists in the heapster image. Just note that events are not at all "audit" material, mostly "pod deleted, pod created, liveness probe failed, new node showed up" types of information. It never includes the "who", so it's not really for auditing.
See https://github.com/kubernetes/heapster/tree/master/events for details on eventer, and https://github.com/kubernetes/heapster/blob/master/docs/sink-configuration.md for the sink configuration.


Fix missing close ``` for code block

The ruby doc for max forgot closing code block with ```

Good catch, thanks!
Merging this.
@chipotle you might want to check if this is correct for the other languages.

Looks like it's just the Ruby one that had the missing ``` bit.


The contract updates and pushes new states

Task
Detailed Description

the contract saves and pushes received states if they are valid and newer than the previously persisted state

Associated story
Story: #167
Notes

The BC already saves states when they are newer than the current state & valid with the moveFromState() in Chess.sol. The "pushing" part is done by execution of the move() function inside the moveFromState() function. Causing an GameStateChanged() event.

Is this task about implementing a changeGameState() without a move?

I am under the impression that this task is already implemented.


Remove /help

There's only one command, it can as well be mentioned in /start

Closed by 27b8f74.


Add log about broker info when getting UNKNOWN_TOPIC_OR_PARTITION error

Description: This patch adds additional logs in the NetworkClient to print metadata info such as leader id and epoch for partitions that fail metadata fetch with UNKNOWN_TOPIC_OR_PARTITION error. This will help with a Venice investigation: https://jira01.corp.linkedin.com:8443/browse/LIKAFKA-33540
Testing: N/A, since it's for logs.

done by mistake

done by mistake


chore: remove greenkeeper-postpublish

greenkeeper-postpublish is not required anymore with the new Greenkeeper integration

:tada: This PR is included in version 3.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


22.04 LTS

Albeit not yet released, but will you also support that?

Hi, thanks for opening an issue. Yes, I do plan to support that.


[iOS] If a List View is in one of the Carousel View’s Views, and you push a page, on pop the List View will always scroll to the top

Repo: https://www.dropbox.com/s/9kcdao17fmtyaek/HeaderTemplateBug.zip?dl=0   (ignore the name, I modified a different bug sample I had)
This bug is kind of hard to explain, but to reproduce, on an iOS device, scroll down to the last item in the list view, tap that item, then go back. Note that you are now scrolled to the top of the list view.
Because of bug 56072 (https://bugzilla.xamarin.com/show_bug.cgi?id=56072), to remove the tab bar when I push a page, I am adjusting the Page’s frame height on push/pop. If you comment out the NavCustomRenderer class where I am doing this, this bug does not occur.
So something is getting messed up when one of the Carousel View’s page’s height is changed. I originally thought that this was caused by bug 43947 (https://bugzilla.xamarin.com/show_bug.cgi?id=43947), but I can only reproduce this using the Carousel View.
Any help with this would be greatly appreciated, I was planning on releasing an app soon, but I don’t really want to release it without a workaround for this bug.
Thanks

Exactly, if you change the height of the page, the control will render again and each view will be rendered again, it's the normal behavior.

@alexrainman But it works fine on Android, doesn't that make it a bug? Could you think of a workaround I could do?

Please, provide a demo project.

Repro from above, https://www.dropbox.com/s/9kcdao17fmtyaek/HeaderTemplateBug.zip?dl=0

@alexrainman apologies, didn't realize I didn't set up the Android part in the repro.
Updated link: https://www.dropbox.com/s/x3js0ljf0ogfdyb/carousellistviewbug.zip?dl=0

@alexrainman Any advice on this would be greatly appreciated. I spent all week on this and the only workaround I was able to come up with is to use ScrollTo on the list view when the detail page is popped, but that scrolls to the top and then down to the right cell, and it looks terrible.
Thanks

@alexrainman Just wondering why this is now labeled cantfix? Is this a bug with Xamarin forms instead of this control? Thanks

It means i don't have a feasible way to fix it for now.

The problem with this is that the navigationbar is shared between pages so if you hide it in the second one, that will trigger the first page to resize the carousel control so the ListView is rendered again.

@alexrainman Any idea why this issue isn't happening on Android? After the resize, is it not rendering the list view again for some reason? Also, if I just have the list view on the main page, without the carousel control, it works fine, if the issue is with the list view rendering again, shouldn't the issue occur that way as well?

This control has been merged into Xamarin.Forms master branch. Please, wait for it to be released as part of Xamarin.Forms and submit any issues there https://github.com/xamarin/xamarin.forms/tree/feature-carouselview. Thanks


More details in README

Three issues.

You are amazing for solving such a precise, small-scale pain point and publishing it. Seriously. GitHub doesn't have place to put praises into, so I am writing it as an issue.
Sorry for not being a diehard coder who always looks into the sources of the solutions presented for him, but it would be nice to clean up the contradiction in the README: you mention that clang is required for compiling your binary, but clang invocation is commented out in build.sh, and g++ (from a totally separate package) is used instead. Please, either comment the g++ invocation instead or mention that one actually needs g++ in the README.
It would be just great to mention that after the building and installing unplugging and plugging the keyboard back will probably help if nothing at all is happening. It was the issue for me, as everything just silently completed, all binaries were put into proper placed, even udev was completely restarted and nevertheless the behavior of f-keys was not changed. Only physical unplugging helped.

Also, I noticed the following more step-by-step instructions (for Debian, supposedly) in the Web, maybe they'll be helpful to write in README, too:
$ sudo apt-get install g++ libusb-1.0-0-dev
$ git clone https://github.com/milgner/k290-fnkeyctl
$ cd k290-fnkeyctl
$ g++ -std=c++11  k290_fnkeyctl.cpp -lusb-1.0 -o k290_fnkeyctl
$ sudo install -o root -g root -m 0755 ./k290_fnkeyctl /usr/local/sbin
$ sudo install -o root -g root -m 0644 ./99-k290-config.rules /etc/udev/rules.d
$ sudo udevadm control --reload-rules
$ sudo udevadm trigger --subsystem-match=input

Courtesy of: http://blog.tataranovich.com/2014/07/logitech-comfort-keyboard-k290.html

Thank you, both for the praise and the feedback! Also for linking the article - I added the udevadm commands to the readme for clarification along with a note to install libusb-1.0-0-dev on Debian-based systems.


Customer feedback | az eventgrid namespace ca-certificate | need PEM file format example

Describe the bug
This GitHub issue is being moved from Azure DevOps UUF 337756.

Engineering request

Provide an example PEM file format in the long-summary or a separate code block.

The customer also needs tips for success such as

Remove all newlines in PEM file. In Bash run cat ./intermediate-ca.pem | tr -d '' > ./intermediate-ca-formatted.pem
CA certificate name can be 3-50 characters long.
CA certificate name can include alphanumeric, hyphen(-) and, no spaces.
The name needs to be unique per namespace.

Customer feedback
Repo:
azure-docs-cli
Title:
az eventgrid namespace ca-certificate | Microsoft Learn
Verbatim:
I am begging you with every part of my being to please provide a correct example of the file format for certificate upload. The REST response simply says that it must be valid PEM, but the API rejects standard compliant PEM with newlines and the format needs to be with newlines removed.cat ./intermediate-ca.pem | tr -d '' > ./intermediate-ca-formatted.pemGets you to the right place.
Verbatim Id:
96adaf05-569a-ef11-8a6a-6045bd007ef6
Live URL:
https://learn.microsoft.com/en-us/cli/azure/eventgrid/namespace/ca-certificate
GitHub URL:
https://github.com/MicrosoftDocs/azure-docs-cli/blob/live/2020-09-01-hybrid/docs-ref-autogen/eventgrid/namespace/ca-certificate.yml
UUF Triage App Feedback URL:
https://aka.ms/UUFTriageApp?pageviewid=91b7b4b4-546c-3a2c-b628-b26d7dcd5f48
Related command
az eventgrid namespace ca-certificate
Errors
the API rejects standard compliant PEM with newlines and the format needs to be with newlines removed
Issue script & Debug output
.
Expected behavior
.
Environment Summary
Azure CLI 2.66.0
Additional context
No response

Thank you for opening this issue, we will look into it.

Facing same issue while creating ca-certificate using Az Cli [azure-cli 2.59.0, eventgrid 1.0.0b1].
Also, while creating ca-certificate via Terraform using AzAPI [Terraform v1.8.4, azure/azapi v2.1.0].
OS: Microsoft Windows Version 23H2 (OS Build 22631.4317)


Warning field missing from Jobs documentation

Issue
When CC returns a job one of the fields in the job is warnings. This is undocumented.
Context
https://v3-apidocs.cloudfoundry.org/version/3.83.0/index.html#the-job-object defines what a job should contain. 'warnings' is not defined, but is returned when acting against a PCF2.8 install.
Steps to Reproduce

Delete a domain
Retrieve the id for the resulting job
Query the job (e.g. cf curl /v3/jobs/24fd8314-ccc6-4329-82aa-0c7e979ce770)
The following result is returned (as an example):

{
   "guid": "24fd8314-ccc6-4329-82aa-0c7e979ce770",
   "created_at": "2020-05-06T16:37:44Z",
   "updated_at": "2020-05-06T16:37:46Z",
   "operation": "domain.delete",
   "state": "COMPLETE",
   "links": {
      "self": {
         "href": "https://api.somewhere/v3/jobs/24fd8314-ccc6-4329-82aa-0c7e979ce770"
      }
   },
   "errors": [],
   "warnings": []
}

Expected result
Either the warnings field shouldn't exist, or more likely it should be documented to the same level of detail as the errors field.
Current result
The warnings field exists, but is undocumented.

Hey,
Thanks for catching this and letting us know. Just committed a quick change to the docs to include this -- 7806c8307dfa1dc36072c39cbb79b61b864a159c
We should see this on our apidocs once the pipeline pushes those changes up (soon).

Aakash


CORS Error is there while fetching data on Main Section.

I think this is a major issue cuz starters and newcomers wont be able to see anything.

@LynxSumit yes it is expected, have you installed CORS extension from chrome? please install and try sometime browser wont allow us to fetch API's from external sites

@LynxSumit Hope you're able to access the site now? are we good to close this issue

sure i will review once you made PR


Face recognition on login via ssh

I think this is a big security issue.
When I try to login to my laptop (wish has howdy installed) via ssh it takes longer than it should, and I have found that is because it tries to make the face recognition.
The really big issue here, is that, if I am working in my laptop, anyone can access to it via ssh, because the face recognition is triggered and the ssh login is allowed.
How to reproduce:

install howdy
install ssh
add face model
access via ssh from a different PC using your username and ANY wrong password

This will trigger the face recognition, and if you are in front of your laptop the ssh access is allowed.
Linux distribution: Ubuntu 18.04
Howdy version: 2.3.0

This used to be handled by looking at the SSH_CONNECTION environment variable and aborting if it was found, looks like it's not there anymore. I'll get onto it immediately so a fixed should be released in a couple of hours.


merge from arlac77/npm-package-template-esm-only

package.json

chore(package): remove ^1.0.0 (devDependencies.markdown-doctest)

:tada: This PR is included in version 2.0.9 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Problem with mount points

Hi I havent found a way to use volume/mount points. Firstly I though that was using the current definition to modify all the parameters specified on the plugin, but it seems to create a new definition from scratch, how can I make this plugin able to add volumes?
Thanks!

Hey there @dcohan, I don't think that's a feature yet.  I don't really use ecs anymore but I still maintain PRs and publishing images so if you'd like to submit a PR, I'll definitely look and bringing that capability in :)


Deep Schema Test

The following validates as false, but should evaluate to true because the object being validated is the exact same as the schema created.
var schemaTester = schema({
	project_users: [{
		id: '5'
	}]
});

var valid = schemaTester({
	project_users: [{
		id: '5'
	}]
});

console.log(valid); // false but should be true

Any solution for this problem ?

Can anyone cite a use case for this 'exact match' rule? I'm considering removing this from js-schema, and using the syntax for something else, such as the array extension, which is now Array.of, but that conflicts with an ES6 API. (#32)

Sorry, I was not right when I acknowledged that this is a bug. In fact, according to the rules, this should be (and is) valid: { project_users: {id:'5'} } (without the array)

I'm still curious of any use cases for the deep equality test

The example I posted to start this issue is a real world use case. Aside from that I don't have any other use cases so far.

Another way to do something like this without explicit support is { id: '5', '*': null } which should be fine in most cases.


WPF DPI Scaling Fix

New Contributors:
please review CONTRIBUTING.md
Purpose:
#720
This works by creating a new DPICorrectedInputState class, which implements a new IInputState interface. One can get an instance of this new class like this new DPICorrectedInputState(input, dpiScaling). This conveniently means that the only method that needs changing is the GetInputState method, and only if it's a platform which has DPI scaling and requires ScottPlot to handle the DPI scaling (i.e. WPF). The modification is trivial even in that case.
New Functionality:
Fixes #720

The DPI factor is only computed once but for some reason it seems to work fine when moving to a different screen? Even when I set windows display scaling to a different value on the other screen. I don't know why this is, I kind of wonder if the demo is really just using the display scaling of Visual Studio. I'll try compiling a build and running it separate from Visual Studio.
The only other thing I'm wondering about is on WinForms, it now uses DPI correction, which doesn't matter now as the DPI factor will always be 1. But if they add DPI support, it's possible they'll go the Avalonia route (handling DPI correction internally), which means this change will break the control whereas if they go the WPF route not making this change will break the control. I think Microsoft would probably mimic their existing product in this regard, but I don't know which is more likely. The Avalonia control uses a "normal" InputState with no DPI correction.

The DPI factor is only computed once but for some reason it seems to work fine when moving to a different screen? Even when I set windows display scaling to a different value on the other screen. I don't know why this is, I kind of wonder if the demo is really just using the display scaling of Visual Studio. I'll try compiling a build and running it separate from Visual Studio.
The only other thing I'm wondering about is on WinForms, it now uses DPI correction, which doesn't matter now as the DPI factor will always be 1. But if they add DPI support, it's possible they'll go the Avalonia route (handling DPI correction internally), which means this change will break the control whereas if they go the WPF route not making this change will break the control. I think Microsoft would probably mimic their existing product in this regard, but I don't know which is more likely. The Avalonia control uses a "normal" InputState with no DPI correction.

Hey @bclehmann! I'm going to put this down for tonight so I don't burn out, but I'll make one note that might be helpful

The only other thing I'm wondering about is on WinForms, it now uses DPI correction, which doesn't matter now as the DPI factor will always be 1

I think .NET Framework and .NET Core WinForms behave differently. There's a demo of each in the sandbox folder, but I recall WinForms in .NET 5 supporting display scaling out of the box (one of the big advantages of upgrading). It looks like you can even define this in Program.cs with Application.SetHighDpiMode(HighDpiMode)
Maybe these preprocessor directives (copy/pasted from the internet) would be useful in controlling behavior inside a user control?
#if NETFRAMEWORK
    FrameworkSpecific();
#else
    CoreSpecific();
#endif

Hey @bclehmann! I'm going to put this down for tonight so I don't burn out, but I'll make one note that might be helpful

The only other thing I'm wondering about is on WinForms, it now uses DPI correction, which doesn't matter now as the DPI factor will always be 1

I think .NET Framework and .NET Core WinForms behave differently. There's a demo of each in the sandbox folder, but I recall WinForms in .NET 5 supporting display scaling out of the box (one of the big advantages of upgrading). It looks like you can even define this in Program.cs with Application.SetHighDpiMode(HighDpiMode)
Maybe these preprocessor directives (copy/pasted from the internet) would be useful in controlling behavior inside a user control?
#if NETFRAMEWORK
    FrameworkSpecific();
#else
    CoreSpecific();
#endif

I think .NET Framework and .NET Core WinForms behave differently. There's a demo of each in the sandbox folder, but I recall WinForms in .NET 5 supporting display scaling out of the box (one of the big advantages of upgrading).

I tried running on Net Framework 4.8, Net Core 3.1, and Net 5 (yeesh Microsoft has to sort out their naming...) and the DPI factor was always set to 1. I may be doing something wrong.
And as for the preprocessor directives, how does it work when you publish to NuGet? I thought the packages were framework-agnostic, and assuming that the C# preprocessor is a traditional preprocessor, those directives would make a choice at compile time on your machine, not at runtime on the users'. However, if the nupkg has an assembly for each version then the preprocessor directives would work.

I think .NET Framework and .NET Core WinForms behave differently. There's a demo of each in the sandbox folder, but I recall WinForms in .NET 5 supporting display scaling out of the box (one of the big advantages of upgrading).

I tried running on Net Framework 4.8, Net Core 3.1, and Net 5 (yeesh Microsoft has to sort out their naming...) and the DPI factor was always set to 1. I may be doing something wrong.
And as for the preprocessor directives, how does it work when you publish to NuGet? I thought the packages were framework-agnostic, and assuming that the C# preprocessor is a traditional preprocessor, those directives would make a choice at compile time on your machine, not at runtime on the users'. However, if the nupkg has an assembly for each version then the preprocessor directives would work.

Preprocessor directives and NuGet
If you check out https://www.nuget.org/packages/ScottPlot.WinForms you can see the platforms a package was targeted for in the dependencies drop-down.
If you download the .nupkg file and rename it to .zip, you can extract the folder and see how it works. It looks like if it targets 4 platforms, the package contains 4 DLLs.
I think this means we can use framework/core preprocessor directives freely!
DPICorrectedInputState and IInputState
I noticed that the only time DPIFactor is used is when the mouse coordinates are multiplied by it before interacting with the control back-end. The use of an interface here seems like a bit much considering the limited scope of what's going on here, and how much code change is required to switch to an interface here. I'm interested in considering some other options to see if there might be something simpler.
I like what you did with GetDPIScale(), and it makes me wonder if putting that code in a little class to couple DPI detection with storing scale factor might make sense here.
I'm thinking out loud here and typing in the browser, but what would you think about something like this stored at the top-level of a class? We could use events to call DisplayScale.Measure() if we suspect the resolution changed.
class DisplayScale
{
    public double ScaleFactor {get; private set;}
    const int DEFAULT_DPI = 96;

    public DisplayScale() => Measure();

    public Measure(){
        using Graphics gfx = Drawing.GDI.Graphics(new Bitmap(1, 1));
        ScaleFactor = gfx.DpiX / DEFAULT_DPI; // is this definitely a floating point result?
    }
}

// control code
DisplayScale DPI = new DisplayScale();

// control GetInputState()
X = e.X * DPI.ScaleFactor,
Y = e.Y * DPI.ScaleFactor,

What do you think?

Preprocessor

I think this means we can use framework/core preprocessor directives freely!

You are correct, I tried this myself with a decompiler and the preprocessor directives work as intended:
C#:
protected override void Dispose(bool disposing)
{
#if NET5_0
	throw new System.Exception("Waaaoow");
#endif
	if (disposing && (components != null))
	{
		components.Dispose();
	}
	base.Dispose(disposing);
}

Output NET 5.0:
.method family hidebysig virtual instance void Dispose(bool disposing) cil managed
{
    // Method Start RVA 0x28b0
    // Code Size 12 (0xc)
    .maxstack 2
    .locals init
    (
        [0] bool #flag1
    )
    L_0000: nop
    L_0001: ldstr "Waaaoow"
    L_0006: newobj instance void [System.Runtime]System.Exception::.ctor(string)
    L_000b: throw
}

Output NET 4.72
.method family hidebysig virtual instance void Dispose(bool disposing) cil managed
{
    // Method Start RVA 0x28b0
    // Code Size 43 (0x2b)
    .maxstack 2
    .locals init
    (
        [0] bool #flag1
    )
    L_0000: nop
    L_0001: ldarg.1
    L_0002: brfalse.s L_000f
    L_0004: ldarg.0
    L_0005: ldfld [ScottPlot.WinForms]ScottPlot.FormsPlot::components
    L_000a: ldnull
    L_000b: cgt.un
    L_000d: br.s L_0010
    L_000f: ldc.i4.0
    L_0010: stloc.0
    L_0011: ldloc.0
    L_0012: brfalse.s L_0022
    L_0014: nop
    L_0015: ldarg.0
    L_0016: ldfld [ScottPlot.WinForms]ScottPlot.FormsPlot::components
    L_001b: callvirt instance void [mscorlib]System.IDisposable::Dispose()
    L_0020: nop
    L_0021: nop
    L_0022: ldarg.0
    L_0023: ldarg.1
    L_0024: call instance void [System.Windows.Forms]System.Windows.Forms.ContainerControl::Dispose(bool)
    L_0029: nop
    L_002a: ret
}

My apologies, the decompiler I used can normally turn the MSIL back into C# (or even VBScript), but it doesn't seem to like the class that I put my test code in. C'est la vie.
IInputState
I chose to use an interface so that the two classes (regular InputState and DPICorrectedInputState) could be used interchangeably, although I concede that having a separate class was perhaps unnecessary. It doesn't really save the user much time over multiplying by the DPI factor themselves. Although perhaps it would make it more convenient if DPICorrectedInputState handled the detection of the DPI scaling factor itself?
DisplayScale.Measure()
I like this idea, I think it would fit in DPICorrectedInputState if you're not moving to scrap that class? Otherwise, I believe it works well as a standalone class. The only thing I would say is that it could probably be a static class.

Preprocessor
Awesome, thanks for checking that out! I suspected that was the case but it helps to see it to know for sure.
FYI I edited your comment to add asm syntax highlighting (mostly because I was curious what would happen)
Where to put scaling logic

It doesn't really save the user much time over multiplying by the DPI factor themselves

Yeah, that's my feeling too. I kind of like seeing that those discrete multiplication steps too - it makes it really obvious exactly what's happening.

I believe it works well as a standalone class. The only thing I would say is that it could probably be a static class.

That sounds good to me! Probably in the ScottPlot.Control namespace?

FYI I edited your comment to add asm syntax highlighting (mostly because I was curious what would happen)

Yeah, it sorta works, it got the opcodes that both have in common like nop and it highlighted the string correctly. Maybe github will add syntax highlighting for MSIL, but I imagine it's a low priority.

That sounds good to me! Probably in the ScottPlot.Control namespace?

Yeah, that sounds good to me.

I ended up doing pretty much exactly what you suggested, I moved against using a static class because one could have two controls on different monitors (although the DPI doesn't seem to change when moving between monitors). And I kept GetDPIScale in ScottPlot.Drawing.GDI because I figured we might as well keep all our GDI+ dependencies in one place, in case one were to move to a different graphics library.
And it's possible that we may move to depend on the platforms to detect the DPI scaling rather than the graphics library, I'm not sure if Skia or other graphics libraries offer facilities to get the DPI scaling information.
One issue I don't have an answer to is when is it necessary to call DisplayScaling.Measure(), I think unfortunately this might depend on individual platform's DPI scaling implementation.
Finally, with regards to WinForms DPI scaling, I got it working, I don't know what the issue was because it seemed to just be as simple as calling SetHighDpiMode and it works. There are no issues with mouse information being incorrect. However there are issues in the WinForms demo's VisualTree when it's set to PerMonitor or PerMonitorV2, but no issues with the actual ScottPlot control. I set it to SystemAware and it looks fine.
PerMonitorV2 (same issue with PerMonitor):

SystemAware:

I set it to SystemAware for now. There was no issue with the ScottPlot control with either.

Thanks @bclehmann!
Interestingly, controls that use display scale correction for mouse tracking also need it for resizing 0de7eddf923539b7266e60f6e2c98cdd3b5c195a
I made a note in https://github.com/ScottPlot/Website/issues/1 to put some of what we discussed here on the new FAQ section when that gets off the ground.


[5.3] Added a some method to Collection

This is a pretty nifty method to have, unless I've missed it already existing.

https://laravel.com/docs/5.2/collections#method-filter

I knew I'd miss it. Thanks @EliasZ.

:+1:


DEV - Removed strip-json-comment and replacement to regext

strip-json-comment and replacement to regext

Coverage remained the same at 100.0% when pulling f37c3df1bb1f4862b7c7cad901050bf0f4c78572 on StfBauer:dev into 80c2ef2b06f5402ba20dc6e25e4248ce6084a6ab on pnp:dev.

Cool! Thanks!

Merged manually. Thanks!


Version drop-down does not work on auth provider page

Version drop-down does not work on auth provider page and redirects to general docs instead of the same provider
Relates to #711
Expected Behavior
Show different version and redirect to same page.
Actual Behavior
Shows correct version, but doc root instead.
Steps to Reproduce the Problem

Go to auth provider page
Select new version in drop-down

Relates to #711

This is the case for all pages. It always re-directs to the root page of the selected version.

This issue seems to be resolved.
When changing the drop down to 2.0 it shows 6 providers. When drop down is 2.11 it shows 9 providers.
I suggest we can close this issue now.

Thanks for checking


Optional slug to unbind the notebook from the generated url name

In this PR we introduce an optional "slug" entry in the config.
This has some advantages:

The url structure is no longer bound to the name of the notebook
But also disadvantages:
The generated markdowns would no longer necessarily share names with the notebook. So It's not so easy to find them if you're looking for them. You would have to go and look at the index.toml to figure out which .md file corresponds to it

The PR now includes an example "slug" for tutorial 1 which sets the slug to the one it has always been in HSH.
And an additional "Slugs" section in Contributing.md


Visual Studio tooling for windows authentication

Using the "old" ASP.NET web applications, the project properties has options to enable windows authentication, and if using OWIN self hosting, you can get the HttpListener and configure the authentication programatically.
My understanding is that I can pack and deploy a ASP.NET 5 app to IIS, and configure IIS for Windows Authentication. However, I don't know how to debug (or if it's possible to debug). Therefore, it's much harder to develop the application in the first place.
When I create a ASP.NET 5 starter web project, I see that when it runs, it runs in IIS Express. Therefore, it would be great if there was a way to configure the project so that IIS Express disables anonymous authentication, and enables Windows authentication.

You should be able to use web.config like you have in the past.

I tried creating a Web.config file in the wwwroot folder like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <authentication mode="Windows"/>
    <authorization>
      <deny users="?"/>
      <allow users="*"/>
    </authorization>
  </system.web>
</configuration>

But using @User.Identity.IsAuthenticated in a razor view just shows false. I tried adding this:
  <system.webServer>
    <security>
      <authentication>
        <anonymousAuthentication enabled="false"/>
      </authentication>
    </security>
  </system.webServer>

But IIS Express would serve up an error page saying:

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

Before today, my only experience with disabling anonymous authentication and enabling Windows authentication is using the IIS Manager GUI, or setting the project properties in Visual Studio. I've never done it in web.config before, but from my searching, I can't find out how to do it, other than what I tried above.

Setting up windows auth on weblistener is similar to that of owinhost. Here is an example:
https://github.com/aspnet/MusicStore/blob/master/src/MusicStore/StartupNtlmAuthentication.cs#L47
Can you try setting the location like in here - I think tooling does some of these for you. I can also see this work item which is not directly related to this but makes me feel tooling does some of these for you : https://github.com/aspnet/Helios/issues/78
https://github.com/aspnet/MusicStore/blob/dev/test/E2ETests/NtlmAuthentation.config#L1028
<location path="MusicStoreNtlmAuthentication">
    <system.webServer>
      <security>
        <authentication>
          <anonymousAuthentication enabled="false" />
          <windowsAuthentication enabled="true" />
        </authentication>
      </security>
    </system.webServer>
  </location>

I cloned the MusicStore repo, but nuget package restore fails for me, so I can't test that solution myself. The first error it reports is "Unable to locate Kestrel >= 1.0.0", which I also can't find in a working solution. There's many other packages it was unable to locate as well.
However, setting ServerInforation's Listener.AuthenticationManager.AuthenticationTypes works when I run using WebListener.  IIS Express still fails, even if I put anonymousAuthentication in a location element, as you suggested. But, WebListener is enough to get me started learning ASP.NET 5.
By the way, I don't have access to the Helios repo, so I can't check the issue you linked. But since I have a way to progress, it's not an issue.
I don't know if you want to close this issue, or keep it open, as I still think tooling could be improved. After hours of googling with bing on the weekend, I didn't find this solution of "app.Server as ServerInformation". But I guess the doco on asp.net will improve as ASP.NET 5 gets closer to release. Plus, it doesn't appear possible to disable anonymous authentication for IIS Express for ASP.NET 5 projects on VS CTP5. Sorry if I sound too negative. I think it's an awesome improvement, and I really like how wwwroot is split out. I think it makes the projects a lot cleaner. Thanks for all your work!

/cc @GrabYourPitchforks

This is a tooling issue.  The VS IDE needs to create the appropriate <authentication> entries in the file (MY_DOCUMENTS)\IISExpress\config\applicationhost.config.  This cannot be done in local Web.config due to the locking mechanisms used.  Basically, tooling needs to do for ASP.NET 5 what it already does for ASP.NET 4.x.

Ah hah! Good to know.

Thanks for the feedback. On the VS side we have this on our backlog as two items that we are tracking. The features we will be working on that impact this are listed below.

Support IIS Express settings and apply them to applicationHost.config
Store the applicationHost.config file with the solution or project (most likely we will store it at the solution level in the .vs folder)

We are going to work hard to get these features in for the next release but we have not yet fully committed to that, but it's likely to happen.

In VS2015 CTP6 we shipped the feature where we store the applicationHost.config file as a part of the solution. The file is stored in the .vs folder and is not designed to be shared with others (we may enable that in a future release).
In the next release we should have the ability to enable ssl/auth options from the properties grid.
I think we can close this item now.

Thanks Sayed.  Is there a sample, or some documentation on how to use the applicationHost.config file, from the .vs folder? Presumably the applicationHost.config file needs to specify the folder path, since the solution could contain more than 1 project, and each could have different settings.
With a ASP.NET 4 project, I can click the project, and in the Properties panel change the Windows authentication and Anonymous authentication options. So, I hope it gets a bit easier to use before RTM, but if I can learn how to write the config file myself, that would be great.

Thanks Sayed. Is there a sample, or some documentation on how to use the applicationHost.config file, from the .vs folder? Presumably the applicationHost.config file needs to specify the folder path, since the solution could contain more than 1 project, and each could have different settings.

@zivkan when you create an ASP.NET 5 web project in VS2015 CTP6 you should find the applicationHost.config file in the .vs folder after you run the project once. If you have multiple web projects in that solution then they will be included in the applicationHost.config as well.
When running from Visual Studio you don't need to interact with that file directly. Visual Studio will take care of it.

With a ASP.NET 4 project, I can click the project, and in the Properties panel change the Windows authentication and Anonymous authentication options. So, I hope it gets a bit easier to use before RTM, but if I can learn how to write the config file myself, that would be great.

This is the feature I mentioned would be coming in a future release of Visual Studio 2015. We recently checked it in.

I tried creating new ASP.NET5 projects and clicking the debug in IIS express button on a machine with VS2015 that I upgraded to CTP6, and also a new VM where I installed CTP6 from MSDN downloads. In both cases, I get a .vs folder, but it doesn't contain an applicationHost.config file anywhere. When I check the IIS Express icon in the systray, it tells the the config is c:\users\accountname\Documents\IISExpress\config\applicationhost.config.  Maybe that change didn't make CTP6?  In any case, it will be great once done.

This is coming.

Thanks David. I've been busy with other things, so I haven't tried, but I think with everyone's help I know how to edit my (MY_DOCUMENTS)\IISExpress\config\applicationhost.config manually for now. Still looking forward to the next VS2015 update and build conference

VS2015 RC now allows this setting to be changed in the IDE. Thank you to everyone involved.